mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-09 01:12:33 +01:00
Compare commits
167 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c7937a9962 | ||
|
|
953e736a97 | ||
|
|
d40229e9cc | ||
|
|
75dbcf4a78 | ||
|
|
d18770c1e7 | ||
|
|
490b0c5f3a | ||
|
|
77e48f8c3e | ||
|
|
882fd9a798 | ||
|
|
38c9d39c2b | ||
|
|
4e2c321e4d | ||
|
|
83e34a1c4e | ||
|
|
f31bf5d80e | ||
|
|
ade688b589 | ||
|
|
b2d27a7d25 | ||
|
|
8e47fe9e1c | ||
|
|
1d39c1acc2 | ||
|
|
f4def9ea28 | ||
|
|
f3fded2a0a | ||
|
|
6c67df0698 | ||
|
|
224fa14e16 | ||
|
|
33045668cd | ||
|
|
c050fe2a27 | ||
|
|
82fa3a447b | ||
|
|
c4a6377af5 | ||
|
|
416f13c708 | ||
|
|
743867b91b | ||
|
|
78307a748d | ||
|
|
a90a03412a | ||
|
|
3212fd2b27 | ||
|
|
56eddeade1 | ||
|
|
db30186386 | ||
|
|
46fe2c67e0 | ||
|
|
748bef6134 | ||
|
|
321fd47ffc | ||
|
|
219cd0f855 | ||
|
|
0628f76a2b | ||
|
|
beaec59ab6 | ||
|
|
11368e48fe | ||
|
|
789d588fde | ||
|
|
1c2c1ff3d8 | ||
|
|
0bb431c4d0 | ||
|
|
47cab90336 | ||
|
|
578c4ca383 | ||
|
|
3debf56c68 | ||
|
|
3c24c1b11a | ||
|
|
b1c4d32fbf | ||
|
|
7ad1553859 | ||
|
|
6f43206331 | ||
|
|
c209d16881 | ||
|
|
2c01a46774 | ||
|
|
f5da9b5e33 | ||
|
|
6728ad3c37 | ||
|
|
4887f51174 | ||
|
|
615456382d | ||
|
|
c9f69279c7 | ||
|
|
a4a1a991b8 | ||
|
|
27b47a4f48 | ||
|
|
a1bba472a0 | ||
|
|
fbb25eae11 | ||
|
|
81dc1415de | ||
|
|
666e66e78f | ||
|
|
b11ac14cf0 | ||
|
|
1461072801 | ||
|
|
ae3c83b7dc | ||
|
|
293726c5e8 | ||
|
|
bd8b393d8a | ||
|
|
aaf2cca45f | ||
|
|
a07852c699 | ||
|
|
9e1b0d1abc | ||
|
|
e21d6b0954 | ||
|
|
4ff78c09fc | ||
|
|
477aeecdac | ||
|
|
5a05d4a4b8 | ||
|
|
f6ab7ca0c9 | ||
|
|
a81c483061 | ||
|
|
4be9730518 | ||
|
|
b1a4b8e7d0 | ||
|
|
18406fc550 | ||
|
|
1dbb19e8ef | ||
|
|
375d9aa336 | ||
|
|
1f986014f1 | ||
|
|
bd8391163a | ||
|
|
989cd87446 | ||
|
|
dcfaeb6606 | ||
|
|
7a272afd12 | ||
|
|
891f8d9442 | ||
|
|
9aab62ab36 | ||
|
|
2f4de2ef75 | ||
|
|
fdac53bfca | ||
|
|
7d8cf99d58 | ||
|
|
3dacdf4e4a | ||
|
|
1b24356e0f | ||
|
|
d0dc792b3c | ||
|
|
01279edfc8 | ||
|
|
64a2cce7c0 | ||
|
|
2aeb0f4f5b | ||
|
|
314be02e65 | ||
|
|
00c6033e11 | ||
|
|
c0a3606a59 | ||
|
|
7ed496d7d9 | ||
|
|
8cb1818c4e | ||
|
|
92cdef71e8 | ||
|
|
c8b5288782 | ||
|
|
24439eb1a3 | ||
|
|
4f08408065 | ||
|
|
31c38cedbc | ||
|
|
606a3f9917 | ||
|
|
45d57b0492 | ||
|
|
420de76b4b | ||
|
|
fd8d571d67 | ||
|
|
d177a2fbb4 | ||
|
|
ca69bf9d7e | ||
|
|
627f5694f0 | ||
|
|
53dfda1413 | ||
|
|
ccddf0d1be | ||
|
|
57f49ec5d4 | ||
|
|
e3041f45ee | ||
|
|
aac24c887f | ||
|
|
e607a53ca3 | ||
|
|
aac4609f2d | ||
|
|
5ec2c1c4b3 | ||
|
|
bb72932601 | ||
|
|
2517d54196 | ||
|
|
106b4a669f | ||
|
|
e370ffb2d4 | ||
|
|
c5045a75d8 | ||
|
|
834a6dc2af | ||
|
|
d846dd2431 | ||
|
|
badf379489 | ||
|
|
1405c03f7d | ||
|
|
41f0920656 | ||
|
|
29db45c763 | ||
|
|
e78baab579 | ||
|
|
48b2d818da | ||
|
|
1d0d3ab747 | ||
|
|
3528049348 | ||
|
|
eeffe4ed34 | ||
|
|
a94f7dc3ad | ||
|
|
efa171819a | ||
|
|
756b1d31ad | ||
|
|
722f6e0db6 | ||
|
|
104592b349 | ||
|
|
455bae98ef | ||
|
|
30e27014b8 | ||
|
|
5c07df812d | ||
|
|
cbbe909bc5 | ||
|
|
c5d8012eb1 | ||
|
|
797ab8a150 | ||
|
|
c30f13a03d | ||
|
|
ac2ff5c604 | ||
|
|
3b6618b7f6 | ||
|
|
dad1e312ab | ||
|
|
c184253951 | ||
|
|
fc63e8b9dc | ||
|
|
ec974cae26 | ||
|
|
4fd67d725a | ||
|
|
0c7cabbf37 | ||
|
|
6a4468d94e | ||
|
|
87fc27c7e6 | ||
|
|
fdbf2fb45d | ||
|
|
386f4bd82e | ||
|
|
48072c58d7 | ||
|
|
692881bf59 | ||
|
|
c73f4a14ee | ||
|
|
742d0e37ee | ||
|
|
0b2a81f4b8 | ||
|
|
9c7647a7ae |
37
ChangeLog
37
ChangeLog
@@ -2,10 +2,28 @@
|
||||
English Dolibarr ChangeLog
|
||||
--------------------------------------------------------------
|
||||
|
||||
***** ChangeLog for 3.6.2 compared to 3.6.1 *****
|
||||
- Fix: fix ErrorBadValueForParamNotAString error message in price customer multiprice.
|
||||
- Fix: bug 1588 : relative discount.
|
||||
- Fix: label of input method not tranlated.
|
||||
- Fix: box of customer and propsects were not correctly disabled.
|
||||
- Fix: [ bug #1618 ] PHP Error thrown when saving a barcode
|
||||
- Fix: Civility & birthdate wasn't save into adherent module.
|
||||
- Fix: webservice Thirdparty parameter lastname for invidual creation is now lastname and not ref
|
||||
- Fix: Chars - is no more allowed into value for code for extra fields.
|
||||
- Fix: [ bug #1622 ] Requesting holiday than spans across two years cause high CPU usage by Apache
|
||||
- Fix: [ bug #1595 ] Selected boolean extrafield in intervention creation page, does not save state
|
||||
- Fix: Show sender Country on PDF docs when sender Country <> receiver Country
|
||||
- Fix: [ bug #1624 ] Use lowest buying price for margin when selling with POS
|
||||
- Fix: [ bug #1749 ] Undefined $mailchimp
|
||||
- Fix: [ bug #1649 ] Cancel button of several thirdparty actions, does the same thing as modify
|
||||
- Fix: [ bug #1736 ] Failing supplier Elephant numeration module with some masks
|
||||
- Fix: [ bug #1731 ] Can't use quick navigation on project tasks secondary tabs
|
||||
|
||||
***** ChangeLog for 3.6.1 compared to 3.6.* *****
|
||||
For users:
|
||||
- Fix: Can upload files on services.
|
||||
- Fix: sql errors on updat fichinter.
|
||||
- Fix: sql errors on update fichinter.
|
||||
- Fix: debian script syntax error.
|
||||
- Fix: error "menu param is not inside list" into pos module.
|
||||
- Fix: Salary payments are not reflected on the reporting sheets.
|
||||
@@ -136,6 +154,23 @@ removed. You must now use the 6 parameters way. See file modMyModule.class.php f
|
||||
- Remove add_photo_web() that is ot used anymore by core code.
|
||||
|
||||
|
||||
***** ChangeLog for 3.5.7 compared to 3.5.6 *****
|
||||
Fix: Paypal link were broken dur to SSL v3 closed.
|
||||
Fix: [ bug #1769 ] Error when installing to a PostgreSQL DB that contains numbers
|
||||
Fix: [ bug #1752 ] Date filter of margins module, filters since 12H instead of 00H
|
||||
Fix: [ bug #1757 ] Sorting breaks product/service statistics
|
||||
|
||||
***** ChangeLog for 3.5.6 compared to 3.5.5 *****
|
||||
Fix: Avoid missing class error for fetch_thirdparty method #1973
|
||||
Fix: Can't update phone_pro from web service
|
||||
Fix: Some security holes.
|
||||
Fix: copy extrafields when creating order from proposal.
|
||||
Fix: report on action was not filtering by environment.
|
||||
Fix: Avoid missing class error.
|
||||
Fix: Add function dolEscapeXML.
|
||||
Fix: Bad days and month reported by function.
|
||||
Fix: Bad margin calculation.
|
||||
|
||||
***** ChangeLog for 3.5.5 compared to 3.5.4 *****
|
||||
Fix: Holiday module was broken. Initializaion of amount of holidays failed.
|
||||
Fix: [ bug #1523 ] suite bug #1334 : filtre et ordre de tri conjoints ne s'appliquent pas.
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
dolibarr (3.6.2-3) unstable; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* New upstream release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Sat, 27 dec 2014 12:00:00 +0100
|
||||
|
||||
dolibarr (3.6.1-3) unstable; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
@@ -11,66 +18,3 @@ dolibarr (3.6.0-3) unstable; urgency=low
|
||||
* New upstream release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Tue, 15 July 2014 12:00:00 +0100
|
||||
|
||||
dolibarr (3.5.5-3) unstable; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* New upstream release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Tue, 8 July 2014 12:00:00 +0100
|
||||
|
||||
dolibarr (3.5.4-3) unstable; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* New upstream release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Tue, 1 July 2014 12:00:00 +0100
|
||||
|
||||
dolibarr (3.5.3-3) unstable; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* New upstream release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Fri, 2 May 2014 12:00:00 +0100
|
||||
|
||||
dolibarr (3.5.2-3) unstable; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* New upstream release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Fri, 14 March 2014 12:00:00 +0100
|
||||
|
||||
dolibarr (3.5.1-3) unstable; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* New upstream release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Fri, 7 Feb 2014 12:00:00 +0100
|
||||
|
||||
dolibarr (3.5.0-3) unstable; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* New upstream release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Fri, 31 Jan 2014 12:00:00 +0100
|
||||
|
||||
dolibarr (3.4.2-3) unstable; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* Maintenance release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Mon, 30 Dec 2013 12:00:00 +0100
|
||||
|
||||
dolibarr (3.4.1-3) unstable; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* Maintenance release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Mon, 27 Apr 2013 12:00:00 +0100
|
||||
|
||||
dolibarr (3.4.0-3) unstable; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* Maintenance release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Mon, 22 Apr 2013 12:00:00 +0100
|
||||
|
||||
@@ -3,7 +3,7 @@ Section: web
|
||||
Priority: optional
|
||||
Maintainer: Laurent Destailleur (eldy) <eldy@users.sourceforge.net>
|
||||
# Uploaders: Laurent Destailleur (eldy) <eldy@users.sourceforge.net> # Only if differs from Maintainer
|
||||
Standards-Version: 3.9.4
|
||||
Standards-Version: 3.9.6
|
||||
Homepage: http://www.dolibarr.org
|
||||
Build-Depends: debhelper (>= 9), po-debconf
|
||||
# This package need at least debian 7 or ubuntu 13.04 or any distribution based on this version
|
||||
@@ -16,7 +16,8 @@ Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm |
|
||||
php5-mysql | php5-mysqli, php5-curl, php5-gd, php5-ldap, php5-geoip,
|
||||
# Required PHP libraries
|
||||
php-pear, php-mail-mime,
|
||||
# php-tcpdf, libfpdi-php, libfpdf-tpl-php, php-fpdf,
|
||||
# php-tcpdf, libfpdi-php,
|
||||
# libfpdf-tpl-php, php-fpdf,
|
||||
# libphp-adodb,
|
||||
# libnusoap-php,
|
||||
# libphp-pclzip,
|
||||
@@ -26,9 +27,10 @@ Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm |
|
||||
# fonts-dejavu-core | ttf-dejavu-core,
|
||||
xdg-utils,
|
||||
mysql-server,
|
||||
mysql-client,
|
||||
${misc:Depends},
|
||||
${perl:Depends}
|
||||
Recommends: mysql-client, apache2 | lighttpd | httpd
|
||||
Recommends: apache2 | lighttpd | httpd
|
||||
Suggests: www-browser
|
||||
Description: Web based software to manage a company or foundation
|
||||
Dolibarr ERP & CRM is an easy to use open source/free software for small
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: Dolibarr
|
||||
Upstream-Contact: Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
Source: http://sourceforge.net/projects/dolibarr/files/
|
||||
Source: http://www.dolibarr.org/files/stable/standard/
|
||||
|
||||
Files: *
|
||||
Copyright: 2002-2009, Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
|
||||
1
build/exe/doliwamp/.gitignore
vendored
Normal file
1
build/exe/doliwamp/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/doliwamp.tmp.iss
|
||||
@@ -16,10 +16,10 @@
|
||||
[Setup]
|
||||
; ----- Change this -----
|
||||
AppName=DoliWamp
|
||||
; DoliWamp-x.x.x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x
|
||||
AppVerName=DoliWamp-3.6.1
|
||||
; DoliWamp-x.x x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x
|
||||
OutputBaseFilename=DoliWamp-3.6.1
|
||||
; Replace key with DoliWamp-x.x.x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x
|
||||
AppVerName=__FILENAMEEXEDOLIWAMP__
|
||||
; Replace key with DoliWamp-x.x x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x
|
||||
OutputBaseFilename=__FILENAMEEXEDOLIWAMP__
|
||||
; ----- End of change
|
||||
;OutputManifestFile=build\doliwampbuild.log
|
||||
; Define full path from which all relative path are defined
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# \file build/makepack-dolibarr.pl
|
||||
# \brief Dolibarr package builder (tgz, zip, rpm, deb, exe, aps)
|
||||
# \author (c)2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
# \author (c)2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
#
|
||||
# This is list of constant you can set to have generated packages moved into a specific dir:
|
||||
#DESTIBETARC='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/lastbuild'
|
||||
@@ -911,8 +911,6 @@ if ($nboftargetok) {
|
||||
close SPECFROM;
|
||||
close SPECTO;
|
||||
print "Version set to $MAJOR.$MINOR.$newbuild\n";
|
||||
#$cmd="cp -pr \"$BUILDROOT/$PROJECT/build/aps/configure\" \"$BUILDROOT/$PROJECT.tmp/$PROJECT/scripts/configure\"";
|
||||
#$ret=`$cmd`;
|
||||
$cmd="cp -pr \"$BUILDROOT/$PROJECT/build/aps/configure.php\" \"$BUILDROOT/$PROJECT.tmp/$PROJECT/scripts/configure.php\"";
|
||||
$ret=`$cmd`;
|
||||
$cmd="cp -pr \"$BUILDROOT/$PROJECT/doc/images\" \"$BUILDROOT/$PROJECT.tmp/$PROJECT/images\"";
|
||||
@@ -951,8 +949,12 @@ if ($nboftargetok) {
|
||||
|
||||
$SOURCEBACK=$SOURCE;
|
||||
$SOURCEBACK =~ s/\//\\/g;
|
||||
print "Compil exe $FILENAMEEXEDOLIWAMP.exe file from iss file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.iss\"\n";
|
||||
$cmd= "ISCC.exe \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.iss\"";
|
||||
|
||||
print "Prepare file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss from \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.iss\"\n";
|
||||
$ret=`cat "$SOURCE/build/exe/doliwamp/doliwamp.iss" | sed -e 's/__FILENAMEEXEDOLIWAMP__/$FILENAMEEXEDOLIWAMP/g' > "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`;
|
||||
|
||||
print "Compil exe $FILENAMEEXEDOLIWAMP.exe file from iss file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\"\n";
|
||||
$cmd= "ISCC.exe \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\"";
|
||||
print "$cmd\n";
|
||||
$ret= `$cmd`;
|
||||
#print "$ret\n";
|
||||
@@ -962,6 +964,9 @@ if ($nboftargetok) {
|
||||
rename("$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe","$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe");
|
||||
print "Move $SOURCE/build/$FILENAMEEXEDOLIWAMP.exe to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n";
|
||||
$ret=`mv "$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe" "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"`;
|
||||
|
||||
$ret=`rm "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`;
|
||||
|
||||
next;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -333,26 +333,11 @@ fi
|
||||
|
||||
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
||||
%changelog
|
||||
* Sat Dec 27 2014 Laurent Destailleur 3.6.2-0.3
|
||||
- Upstream release
|
||||
|
||||
* Wed Sep 24 2014 Laurent Destailleur 3.6.1-0.3
|
||||
- Upstream release
|
||||
|
||||
* Wed Jul 15 2014 Laurent Destailleur 3.6.0-0.3
|
||||
- Upstream release
|
||||
|
||||
* Tue Jul 8 2014 Laurent Destailleur 3.5.5-0.3
|
||||
- Upstream release
|
||||
|
||||
* Tue Jul 1 2014 Laurent Destailleur 3.5.4-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri May 2 2014 Laurent Destailleur 3.5.3-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri Feb 14 2014 Laurent Destailleur 3.5.2-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri Feb 7 2014 Laurent Destailleur 3.5.1-0.3
|
||||
- Upstream release
|
||||
|
||||
* Mon Dec 30 2013 Laurent Destailleur 3.5.0-0.3
|
||||
- Initial version (#723326)
|
||||
|
||||
@@ -569,26 +569,12 @@ fi
|
||||
|
||||
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
||||
%changelog
|
||||
* Sat Dec 27 2014 Laurent Destailleur 3.6.2-0.3
|
||||
- Upstream release
|
||||
|
||||
* Wed Sep 24 2014 Laurent Destailleur 3.6.1-0.3
|
||||
- Upstream release
|
||||
|
||||
* Wed Jul 15 2014 Laurent Destailleur 3.6.0-0.3
|
||||
- Upstream release
|
||||
|
||||
* Tue Jul 8 2014 Laurent Destailleur 3.5.5-0.3
|
||||
- Upstream release
|
||||
|
||||
* Tue Jul 1 2014 Laurent Destailleur 3.5.4-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri May 2 2014 Laurent Destailleur 3.5.3-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri Feb 14 2014 Laurent Destailleur 3.5.2-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri Feb 7 2014 Laurent Destailleur 3.5.1-0.3
|
||||
- Upstream release
|
||||
|
||||
* Mon Dec 30 2013 Laurent Destailleur 3.5.0-0.3
|
||||
- Initial version (#723326)
|
||||
|
||||
@@ -338,26 +338,12 @@ fi
|
||||
|
||||
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
||||
%changelog
|
||||
* Sat Dec 27 2014 Laurent Destailleur 3.6.2-0.3
|
||||
- Upstream release
|
||||
|
||||
* Wed Sep 24 2014 Laurent Destailleur 3.6.1-0.3
|
||||
- Upstream release
|
||||
|
||||
* Wed Jul 15 2014 Laurent Destailleur 3.6.0-0.3
|
||||
- Upstream release
|
||||
|
||||
* Tue Jul 8 2014 Laurent Destailleur 3.5.5-0.3
|
||||
- Upstream release
|
||||
|
||||
* Tue Jul 1 2014 Laurent Destailleur 3.5.4-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri May 2 2014 Laurent Destailleur 3.5.3-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri Feb 14 2014 Laurent Destailleur 3.5.2-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri Feb 7 2014 Laurent Destailleur 3.5.1-0.3
|
||||
- Upstream release
|
||||
|
||||
* Mon Dec 30 2013 Laurent Destailleur 3.5.0-0.3
|
||||
- Initial version (#723326)
|
||||
|
||||
@@ -349,26 +349,12 @@ fi
|
||||
|
||||
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
||||
%changelog
|
||||
* Sat Dec 27 2014 Laurent Destailleur 3.6.2-0.3
|
||||
- Upstream release
|
||||
|
||||
* Wed Sep 24 2014 Laurent Destailleur 3.6.1-0.3
|
||||
- Upstream release
|
||||
|
||||
* Wed Jul 15 2014 Laurent Destailleur 3.6.0-0.3
|
||||
- Upstream release
|
||||
|
||||
* Tue Jul 8 2014 Laurent Destailleur 3.5.5-0.3
|
||||
- Upstream release
|
||||
|
||||
* Tue Jul 1 2014 Laurent Destailleur 3.5.4-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri May 2 2014 Laurent Destailleur 3.5.3-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri Feb 14 2014 Laurent Destailleur 3.5.2-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri Feb 7 2014 Laurent Destailleur 3.5.1-0.3
|
||||
- Upstream release
|
||||
|
||||
* Mon Dec 30 2013 Laurent Destailleur 3.5.0-0.3
|
||||
- Initial version (#723326)
|
||||
|
||||
@@ -6,17 +6,34 @@
|
||||
<exclude-pattern>*/conf.php</exclude-pattern>
|
||||
<exclude-pattern>*/includes/*</exclude-pattern>
|
||||
<exclude-pattern>*/documents/*</exclude-pattern>
|
||||
<exclude-pattern>*/dev/vagrant/*</exclude-pattern>
|
||||
<exclude-pattern>*/custom/*</exclude-pattern>
|
||||
<exclude-pattern>*/nltechno*</exclude-pattern>
|
||||
|
||||
<!-- List of all tests -->
|
||||
|
||||
<!-- List of all tests -->
|
||||
|
||||
<rule ref="Internal.NoCodeFound">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement" />
|
||||
|
||||
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedCATCH">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedFOREACH">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedIF">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedELSE">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedELSEIF">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.NotAllowed">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
@@ -105,7 +122,7 @@
|
||||
<rule ref="Generic.Metrics.CyclomaticComplexity">
|
||||
<properties>
|
||||
<property name="complexity" value="80" />
|
||||
<property name="absoluteComplexity" value="200" />
|
||||
<property name="absoluteComplexity" value="250" />
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="Generic.Metrics.NestingLevel">
|
||||
@@ -162,7 +179,75 @@
|
||||
<rule ref="PEAR.Commenting.ClassComment.MissingTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@authorTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@categoryTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@licenseTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@linkTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@packageTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamType">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamName">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<!-- TODO Remove this and fix reported errors -->
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.MissingReturn">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.ReturnNotRequired">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.Missing">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@authorTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@categoryTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@licenseTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@linkTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@packageTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamType">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamName">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<!-- TODO Remove this and fix reported errors -->
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.MissingReturn">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.ReturnNotRequired">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.Missing">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<!--
|
||||
<rule ref="PEAR.Commenting.FileComment" />
|
||||
<rule ref="PEAR.Commenting.FileComment.WrongStyle">
|
||||
@@ -219,6 +304,24 @@
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.Indent">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.SpaceBeforeOpenBracket">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.SpaceAfterCloseBracket">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.CloseBracketLine">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<rule ref="PEAR.Functions.ValidDefaultValue" />
|
||||
|
||||
@@ -236,6 +339,10 @@
|
||||
</rule>
|
||||
|
||||
<rule ref="PEAR.NamingConventions.ValidFunctionName" />
|
||||
|
||||
<rule ref="PEAR.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.NamingConventions.ValidFunctionName.FunctionNameInvalid">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
@@ -17,6 +17,7 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* or see http://www.gnu.org/
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2009-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -124,7 +125,7 @@ class Adherent extends CommonObject
|
||||
|
||||
|
||||
/**
|
||||
* Fonction envoyant un email a l'adherent avec le texte fourni en parametre.
|
||||
* Function sending an email has the adherent with the text supplied in parameter.
|
||||
*
|
||||
* @param string $text Content of message (not html entities encoded)
|
||||
* @param string $subject Subject of message
|
||||
@@ -247,9 +248,9 @@ class Adherent extends CommonObject
|
||||
|
||||
|
||||
/**
|
||||
* Renvoie le libelle traduit de la nature d'un adherent (physique ou morale)
|
||||
* Return translated label by the nature of a adherent (physical or moral)
|
||||
*
|
||||
* @param string $morphy Nature physique ou morale de l'adherent
|
||||
* @param string $morphy Nature of the adherent (physical or moral)
|
||||
* @return string Label
|
||||
*/
|
||||
function getmorphylib($morphy='')
|
||||
@@ -348,12 +349,12 @@ class Adherent extends CommonObject
|
||||
|
||||
if (! $notrigger)
|
||||
{
|
||||
// Appel des triggers
|
||||
// Call triggers
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
||||
$interface=new Interfaces($this->db);
|
||||
$result=$interface->run_triggers('MEMBER_CREATE',$this,$user,$langs,$conf);
|
||||
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||
// Fin appel triggers
|
||||
// End call triggers
|
||||
}
|
||||
|
||||
if (count($this->errors))
|
||||
@@ -1101,7 +1102,7 @@ class Adherent extends CommonObject
|
||||
$this->ref = $obj->rowid;
|
||||
$this->id = $obj->rowid;
|
||||
$this->ref_ext = $obj->ref_ext;
|
||||
$this->civility_id = $obj->civility;
|
||||
$this->civility_id = $obj->civility_id;
|
||||
$this->firstname = $obj->firstname;
|
||||
$this->lastname = $obj->lastname;
|
||||
$this->login = $obj->login;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2012-2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -707,7 +708,7 @@ else
|
||||
{
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* Fiche creation */
|
||||
/* Creation card */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
$object->canvas=$canvas;
|
||||
@@ -870,7 +871,7 @@ else
|
||||
|
||||
// Birthday
|
||||
print "<tr><td>".$langs->trans("Birthday")."</td><td>\n";
|
||||
$form->select_date(($object->naiss ? $object->naiss : -1),'naiss','','',1,'formsoc');
|
||||
$form->select_date(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc');
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Profil public
|
||||
|
||||
@@ -117,7 +117,7 @@ if ($action == 'edit') // Edit
|
||||
|
||||
print_fiche_titre($langs->trans("Language"),'','').'<br>';
|
||||
print '<table summary="edit" class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td>';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameters").'</td><td>'.$langs->trans("Value").'</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
@@ -159,7 +159,7 @@ if ($action == 'edit') // Edit
|
||||
|
||||
// Other
|
||||
print '<table summary="edit" class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td>';
|
||||
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("Parameters").'</td><td>'.$langs->trans("Value").'</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
@@ -283,7 +283,7 @@ else // Show
|
||||
// Language
|
||||
print_fiche_titre($langs->trans("Language"),'','').'<br>';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td><td> </td></tr>';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameters").'</td><td>'.$langs->trans("Value").'</td><td> </td></tr>';
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DefaultLanguage").'</td><td>';
|
||||
@@ -327,7 +327,7 @@ else // Show
|
||||
// Other
|
||||
$var=true;
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("Parameter").'</td><td colspan="2">'.$langs->trans("Value").'</td></tr>';
|
||||
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("Parameters").'</td><td colspan="2">'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("EnableShowLogo").'</td><td>' . yn($conf->global->MAIN_SHOW_LOGO) . '</td>';
|
||||
|
||||
@@ -184,18 +184,19 @@ if ($action=='show_week')
|
||||
$prev_month = $prev['prev_month'];
|
||||
$prev_day = $prev['prev_day'];
|
||||
$first_day = $prev['first_day'];
|
||||
|
||||
$first_month= $prev['first_month'];
|
||||
$first_year = $prev['first_year'];
|
||||
$week = $prev['week'];
|
||||
|
||||
$day = (int) $day;
|
||||
$next = dol_get_next_week($day, $week, $month, $year);
|
||||
$next = dol_get_next_week($first_day, $week, $first_month, $first_year);
|
||||
$next_year = $next['year'];
|
||||
$next_month = $next['month'];
|
||||
$next_day = $next['day'];
|
||||
|
||||
// Define firstdaytoshow and lastdaytoshow
|
||||
$firstdaytoshow=dol_mktime(0,0,0,$prev_month,$first_day,$prev_year);
|
||||
$lastdaytoshow=dol_mktime(0,0,0,$next_month,$next_day,$next_year);
|
||||
$firstdaytoshow=dol_mktime(0,0,0,$first_month,$first_day,$first_year);
|
||||
$lastdaytoshow=dol_time_plus_duree($firstdaytoshow, 7, 'd');
|
||||
|
||||
$max_day_in_month = date("t",dol_mktime(0,0,0,$month,1,$year));
|
||||
|
||||
@@ -870,39 +871,27 @@ elseif ($action == 'show_week') // View by week
|
||||
}
|
||||
echo " </tr>\n";
|
||||
|
||||
// In loops, tmpday contains day nb in current month (can be zero or negative for days of previous month)
|
||||
//var_dump($eventarray);
|
||||
//print $tmpday;
|
||||
|
||||
echo " <tr>\n";
|
||||
|
||||
for($iter_day = 0; $iter_day < 7; $iter_day++)
|
||||
{
|
||||
if(($tmpday <= $max_day_in_month))
|
||||
{
|
||||
// Show days of the current week
|
||||
$curtime = dol_mktime(0, 0, 0, $month, $tmpday, $year);
|
||||
// Show days of the current week
|
||||
$curtime = dol_time_plus_duree($firstdaytoshow, $iter_day, 'd');
|
||||
$tmparray = dol_getdate($curtime,'fast');
|
||||
$tmpday = $tmparray['mday'];
|
||||
$tmpmonth = $tmparray['mon'];
|
||||
$tmpyear = $tmparray['year'];
|
||||
|
||||
$style='cal_current_month';
|
||||
if ($iter_day == 6) $style.=' cal_other_month_right';
|
||||
$today=0;
|
||||
$todayarray=dol_getdate($now,'fast');
|
||||
if ($todayarray['mday']==$tmpday && $todayarray['mon']==$month && $todayarray['year']==$year) $today=1;
|
||||
if ($today) $style='cal_today';
|
||||
$style='cal_current_month';
|
||||
if ($iter_day == 6) $style.=' cal_other_month_right';
|
||||
$today=0;
|
||||
$todayarray=dol_getdate($now,'fast');
|
||||
if ($todayarray['mday']==$tmpday && $todayarray['mon']==$tmpmonth && $todayarray['year']==$tmpyear) $today=1;
|
||||
if ($today) $style='cal_today';
|
||||
|
||||
echo ' <td class="'.$style.' nowrap" width="14%" valign="top">';
|
||||
show_day_events($db, $tmpday, $month, $year, $month, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300);
|
||||
echo " </td>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$style='cal_current_month';
|
||||
if ($iter_day == 6) $style.=' cal_other_month_right';
|
||||
echo ' <td class="'.$style.' nowrap" width="14%" valign="top">';
|
||||
show_day_events($db, $tmpday - $max_day_in_month, $next_month, $next_year, $month, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300);
|
||||
echo "</td>\n";
|
||||
}
|
||||
$tmpday++;
|
||||
echo ' <td class="'.$style.'" width="14%" valign="top">';
|
||||
show_day_events($db, $tmpday, $tmpmonth, $tmpyear, $month, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300);
|
||||
echo " </td>\n";
|
||||
}
|
||||
echo " </tr>\n";
|
||||
|
||||
|
||||
@@ -79,17 +79,21 @@ $object = new Societe($db);
|
||||
$parameters = array('socid' => $id);
|
||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some
|
||||
|
||||
//Some actions show a "cancel" input submit button with name="cancel"
|
||||
$cancelbutton = GETPOST('cancel');
|
||||
|
||||
if ($action == 'setcustomeraccountancycode')
|
||||
{
|
||||
$result=$object->fetch($id);
|
||||
$object->code_compta=$_POST["customeraccountancycode"];
|
||||
$result=$object->update($object->id,$user,1,1,0);
|
||||
if ($result < 0)
|
||||
{
|
||||
$mesgs[]=join(',',$object->errors);
|
||||
if (!$cancelbutton) {
|
||||
$result=$object->fetch($id);
|
||||
$object->code_compta=$_POST["customeraccountancycode"];
|
||||
$result=$object->update($object->id,$user,1,1,0);
|
||||
if ($result < 0)
|
||||
{
|
||||
$mesgs[]=join(',',$object->errors);
|
||||
}
|
||||
$action="";
|
||||
}
|
||||
$action="";
|
||||
}
|
||||
|
||||
// conditions de reglement
|
||||
@@ -139,10 +143,14 @@ if ($action == 'cstc')
|
||||
// Update communication level
|
||||
if ($action == 'setOutstandingBill')
|
||||
{
|
||||
$object->fetch($id);
|
||||
$object->outstanding_limit=GETPOST('OutstandingBill');
|
||||
$result=$object->set_OutstandingBill($user);
|
||||
if ($result < 0) setEventMessage($object->error,'errors');
|
||||
if (!$cancelbutton) {
|
||||
$object->fetch($id);
|
||||
$object->outstanding_limit = GETPOST('OutstandingBill');
|
||||
$result = $object->set_OutstandingBill($user);
|
||||
if ($result < 0) {
|
||||
setEventMessage($object->error, 'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -413,7 +413,15 @@ class Propal extends CommonObject
|
||||
|
||||
|
||||
// infos marge
|
||||
$this->line->fk_fournprice = $fk_fournprice;
|
||||
if (!empty($fk_product) && empty($fk_fournprice) && empty($pa_ht)) {
|
||||
// by external module, take lowest buying price
|
||||
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
|
||||
$productFournisseur = new ProductFournisseur($this->db);
|
||||
$productFournisseur->find_min_price_product_fournisseur($fk_product);
|
||||
$this->line->fk_fournprice = $productFournisseur->product_fourn_price_id;
|
||||
} else {
|
||||
$this->line->fk_fournprice = $fk_fournprice;
|
||||
}
|
||||
$this->line->pa_ht = $pa_ht;
|
||||
|
||||
// Mise en option de la ligne
|
||||
@@ -565,7 +573,15 @@ class Propal extends CommonObject
|
||||
$this->line->skip_update_total = $skip_update_total;
|
||||
|
||||
// infos marge
|
||||
$this->line->fk_fournprice = $fk_fournprice;
|
||||
if (!empty($fk_product) && empty($fk_fournprice) && empty($pa_ht)) {
|
||||
// by external module, take lowest buying price
|
||||
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
|
||||
$productFournisseur = new ProductFournisseur($this->db);
|
||||
$productFournisseur->find_min_price_product_fournisseur($fk_product);
|
||||
$this->line->fk_fournprice = $productFournisseur->product_fourn_price_id;
|
||||
} else {
|
||||
$this->line->fk_fournprice = $fk_fournprice;
|
||||
}
|
||||
$this->line->pa_ht = $pa_ht;
|
||||
|
||||
$this->line->date_start=$date_start;
|
||||
|
||||
@@ -898,6 +898,13 @@ class Commande extends CommonOrder
|
||||
$this->date_validation = '';
|
||||
$this->ref_client = '';
|
||||
|
||||
// Set ref
|
||||
require_once DOL_DOCUMENT_ROOT ."/core/modules/commande/".$conf->global->COMMANDE_ADDON.'.php';
|
||||
$obj = $conf->global->COMMANDE_ADDON;
|
||||
$modCommande = new $obj;
|
||||
$this->ref = $modCommande->getNextValue($objsoc,$this);
|
||||
|
||||
|
||||
// Create clone
|
||||
$result=$this->create($user);
|
||||
if ($result < 0) $error++;
|
||||
@@ -985,7 +992,12 @@ class Commande extends CommonOrder
|
||||
$line->marge_tx = $marginInfos[1];
|
||||
$line->marque_tx = $marginInfos[2];
|
||||
|
||||
$this->lines[$i] = $line;
|
||||
// get extrafields from original line
|
||||
$object->lines[$i]->fetch_optionals($object->lines[$i]->rowid);
|
||||
foreach($object->lines[$i]->array_options as $options_key => $value)
|
||||
$line->array_options[$options_key] = $value;
|
||||
|
||||
$this->lines[$i] = $line;
|
||||
}
|
||||
|
||||
$this->socid = $object->socid;
|
||||
@@ -1004,6 +1016,11 @@ class Commande extends CommonOrder
|
||||
$this->origin = $object->element;
|
||||
$this->origin_id = $object->id;
|
||||
|
||||
// get extrafields from original line
|
||||
$object->fetch_optionals($object->id);
|
||||
foreach($object->array_options as $options_key => $value)
|
||||
$this->array_options[$options_key] = $value;
|
||||
|
||||
// Possibility to add external linked objects with hooks
|
||||
$this->linked_objects[$this->origin] = $this->origin_id;
|
||||
if (is_array($object->other_linked_objects) && ! empty($object->other_linked_objects))
|
||||
@@ -1197,7 +1214,15 @@ class Commande extends CommonOrder
|
||||
$this->line->date_end=$date_end;
|
||||
|
||||
// infos marge
|
||||
$this->line->fk_fournprice = $fk_fournprice;
|
||||
if (!empty($fk_product) && empty($fk_fournprice) && empty($pa_ht)) {
|
||||
// by external module, take lowest buying price
|
||||
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
|
||||
$productFournisseur = new ProductFournisseur($this->db);
|
||||
$productFournisseur->find_min_price_product_fournisseur($fk_product);
|
||||
$this->line->fk_fournprice = $productFournisseur->product_fourn_price_id;
|
||||
} else {
|
||||
$this->line->fk_fournprice = $fk_fournprice;
|
||||
}
|
||||
$this->line->pa_ht = $pa_ht;
|
||||
|
||||
// TODO Ne plus utiliser
|
||||
@@ -2404,7 +2429,15 @@ class Commande extends CommonOrder
|
||||
$this->line->skip_update_total=$skip_update_total;
|
||||
|
||||
// infos marge
|
||||
$this->line->fk_fournprice = $fk_fournprice;
|
||||
if (!empty($fk_product) && empty($fk_fournprice) && empty($pa_ht)) {
|
||||
//by external module, take lowest buying price
|
||||
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
|
||||
$productFournisseur = new ProductFournisseur($this->db);
|
||||
$productFournisseur->find_min_price_product_fournisseur($fk_product);
|
||||
$this->line->fk_fournprice = $productFournisseur->product_fourn_price_id;
|
||||
} else {
|
||||
$this->line->fk_fournprice = $fk_fournprice;
|
||||
}
|
||||
$this->line->pa_ht = $pa_ht;
|
||||
|
||||
// TODO deprecated
|
||||
|
||||
@@ -164,7 +164,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
|
||||
$sql.= " ORDER BY dlr ASC";
|
||||
|
||||
// Supplier invoices
|
||||
$sql2= " SELECT 'invoice_supplier' as family, ff.rowid as objid, ff.ref_supplier as ref, (-1*ff.total_ttc) as total_ttc, ff.type, ff.date_lim_reglement as dlr,";
|
||||
$sql2= " SELECT 'invoice_supplier' as family, ff.rowid as objid, ff.ref as ref, ff.ref_supplier as ref_supplier, (-1*ff.total_ttc) as total_ttc, ff.type, ff.date_lim_reglement as dlr,";
|
||||
$sql2.= " s.rowid as socid, s.nom, s.fournisseur";
|
||||
$sql2.= " FROM ".MAIN_DB_PREFIX."facture_fourn as ff";
|
||||
$sql2.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON ff.fk_soc = s.rowid";
|
||||
@@ -260,12 +260,13 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
|
||||
|
||||
if ($obj->family == 'invoice_supplier')
|
||||
{
|
||||
// TODO This code is to avoid to count suppliers credit note (ff.type = 2)
|
||||
// Ajouter gestion des avoirs fournisseurs, champ
|
||||
if (($obj->total_ttc < 0 && $obj->type != 2)
|
||||
|| ($obj->total_ttc > 0 && $obj->type == 2))
|
||||
$showline=1;
|
||||
// Uncomment this line to avoid to count suppliers credit note (ff.type = 2)
|
||||
//$showline=(($obj->total_ttc < 0 && $obj->type != 2) || ($obj->total_ttc > 0 && $obj->type == 2))
|
||||
if ($showline)
|
||||
{
|
||||
$facturefournstatic->ref=$obj->ref;
|
||||
$ref=$obj->ref;
|
||||
$facturefournstatic->ref=$ref;
|
||||
$facturefournstatic->id=$obj->objid;
|
||||
$facturefournstatic->type=$obj->type;
|
||||
$ref = $facturefournstatic->getNomUrl(1,'');
|
||||
@@ -304,7 +305,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
|
||||
if ($paiement) $total_ttc = $obj->total_ttc - $paiement;
|
||||
$solde += $total_ttc;
|
||||
|
||||
// We discard with a remain to pay to 0
|
||||
// We discard lines with a remainder to pay to 0
|
||||
if (price2num($total_ttc) != 0)
|
||||
{
|
||||
$var=!$var;
|
||||
|
||||
@@ -111,7 +111,7 @@ if ($conf->salaries->enabled)
|
||||
$total = 0 ;
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("PeriodEndDate"),$_SERVER["PHP_SELF"],"s.datev","",$param,'width="120"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("PeriodEndDate"),$_SERVER["PHP_SELF"],"s.datev","",$param,'width="140px"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"],"s.label","",$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("ExpectedToPay"),$_SERVER["PHP_SELF"],"s.amount","",$param,'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("RefPayment"),$_SERVER["PHP_SELF"],"s.rowid","",$param,'',$sortfield,$sortorder);
|
||||
@@ -144,7 +144,7 @@ if ($conf->salaries->enabled)
|
||||
|
||||
$i++;
|
||||
}
|
||||
print '<tr class="liste_total"><td align="right" colspan="2">'.$langs->trans("Total").'</td>';
|
||||
print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").'</td>';
|
||||
print '<td align="right">'.price($total)."</td>";
|
||||
print '<td align="center"> </td>';
|
||||
print '<td align="center"> </td>';
|
||||
@@ -174,7 +174,7 @@ if ($conf->tax->enabled)
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("PeriodEndDate"),$_SERVER["PHP_SELF"],"cs.date_ech","",$param,'width="120"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("PeriodEndDate"),$_SERVER["PHP_SELF"],"cs.date_ech","",$param,'width="140px"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"],"c.libelle","",$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"cs.fk_type","",$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("ExpectedToPay"),$_SERVER["PHP_SELF"],"cs.amount","",$param,'align="right"',$sortfield,$sortorder);
|
||||
@@ -304,7 +304,7 @@ if ($conf->tax->enabled)
|
||||
$total = 0 ;
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("PeriodEndDate"),$_SERVER["PHP_SELF"],"pv.datev","",$param,'width="120"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("PeriodEndDate"),$_SERVER["PHP_SELF"],"pv.datev","",$param,'width="140px"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"],"pv.label","",$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("ExpectedToPay"),$_SERVER["PHP_SELF"],"pv.amount","",$param,'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("RefPayment"),$_SERVER["PHP_SELF"],"pv.rowid","",$param,'',$sortfield,$sortorder);
|
||||
@@ -337,7 +337,7 @@ if ($conf->tax->enabled)
|
||||
|
||||
$i++;
|
||||
}
|
||||
print '<tr class="liste_total"><td align="right" colspan="2">'.$langs->trans("Total").'</td>';
|
||||
print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").'</td>';
|
||||
print '<td align="right">'.price($total)."</td>";
|
||||
print '<td align="center"> </td>';
|
||||
print '<td align="center"> </td>';
|
||||
|
||||
@@ -1152,6 +1152,8 @@ else if ($action == 'addline' && $user->rights->facture->creer)
|
||||
$pu_ttc = $prod->multiprices_ttc[$object->client->price_level];
|
||||
$price_min = $prod->multiprices_min[$object->client->price_level];
|
||||
$price_base_type = $prod->multiprices_base_type[$object->client->price_level];
|
||||
if (isset($prod->multiprices_tva_tx[$object->client->price_level])) $tva_tx=$prod->multiprices_tva_tx[$object->client->price_level];
|
||||
if (isset($prod->multiprices_recuperableonly[$object->client->price_level])) $tva_npr=$prod->multiprices_recuperableonly[$object->client->price_level];
|
||||
}
|
||||
elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
|
||||
{
|
||||
|
||||
@@ -725,6 +725,11 @@ class Facture extends CommonInvoice
|
||||
$marginInfos = getMarginInfos($object->lines[$i]->subprice, $object->lines[$i]->remise_percent, $object->lines[$i]->tva_tx, $object->lines[$i]->localtax1_tx, $object->lines[$i]->localtax2_tx, $object->lines[$i]->fk_fournprice, $object->lines[$i]->pa_ht);
|
||||
$line->pa_ht = $marginInfos[0];
|
||||
|
||||
// get extrafields from original line
|
||||
$object->lines[$i]->fetch_optionals($object->lines[$i]->rowid);
|
||||
foreach($object->lines[$i]->array_options as $options_key => $value)
|
||||
$line->array_options[$options_key] = $value;
|
||||
|
||||
$this->lines[$i] = $line;
|
||||
}
|
||||
|
||||
@@ -744,6 +749,11 @@ class Facture extends CommonInvoice
|
||||
$this->origin = $object->element;
|
||||
$this->origin_id = $object->id;
|
||||
|
||||
// get extrafields from original line
|
||||
$object->fetch_optionals($object->id);
|
||||
foreach($object->array_options as $options_key => $value)
|
||||
$this->array_options[$options_key] = $value;
|
||||
|
||||
// Possibility to add external linked objects with hooks
|
||||
$this->linked_objects[$this->origin] = $this->origin_id;
|
||||
if (! empty($object->other_linked_objects) && is_array($object->other_linked_objects))
|
||||
@@ -2203,7 +2213,15 @@ class Facture extends CommonInvoice
|
||||
$this->line->skip_update_total = $skip_update_total;
|
||||
|
||||
// infos marge
|
||||
$this->line->fk_fournprice = $fk_fournprice;
|
||||
if (!empty($fk_product) && empty($fk_fournprice) && empty($pa_ht)) {
|
||||
// POS or external module, take lowest buying price
|
||||
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
|
||||
$productFournisseur = new ProductFournisseur($this->db);
|
||||
$productFournisseur->find_min_price_product_fournisseur($fk_product);
|
||||
$this->line->fk_fournprice = $productFournisseur->product_fourn_price_id;
|
||||
} else {
|
||||
$this->line->fk_fournprice = $fk_fournprice;
|
||||
}
|
||||
$this->line->pa_ht = $pa_ht;
|
||||
|
||||
if (is_array($array_option) && count($array_option)>0) {
|
||||
@@ -3467,6 +3485,14 @@ class FactureLigne extends CommonInvoiceLine
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
// POS or by external module, take lowest buying price
|
||||
if (!empty($this->fk_product) && empty($this->fk_fournprice) && empty($this->pa_ht)) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
|
||||
$productFournisseur = new ProductFournisseur($this->db);
|
||||
$productFournisseur->find_min_price_product_fournisseur($this->fk_product);
|
||||
$this->fk_fournprice = $productFournisseur->product_fourn_price_id;
|
||||
}
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2012 Destailleur Laurent <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -41,6 +41,7 @@ class Contrat extends CommonObject
|
||||
public $table_element='contrat';
|
||||
public $table_element_line='contratdet';
|
||||
public $fk_element='fk_contrat';
|
||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
|
||||
var $id;
|
||||
var $ref;
|
||||
|
||||
@@ -114,7 +114,7 @@ class box_activity extends ModeleBoxes
|
||||
$billurl="viewstatut=2&paye=1&year=".$objp->annee;
|
||||
|
||||
$this->info_box_contents[$i][2] = array('td' => 'align="right"',
|
||||
'text' => $objp->nb, 'url' => DOL_URL_ROOT."/compta/facture/liste.php?".$billurl."&mainmenu=accountancy&leftmenu=customers_bills"
|
||||
'text' => $objp->nb, 'url' => DOL_URL_ROOT."/compta/facture/list.php?".$billurl."&mainmenu=accountancy&leftmenu=customers_bills"
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][3] = array('td' => 'align="right"',
|
||||
|
||||
@@ -37,12 +37,28 @@ class box_clients extends ModeleBoxes
|
||||
var $depends = array("societe");
|
||||
|
||||
var $db;
|
||||
var $param;
|
||||
var $enabled = 1;
|
||||
|
||||
var $info_box_head = array();
|
||||
var $info_box_contents = array();
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param string $param More parameters
|
||||
*/
|
||||
function __construct($db,$param='')
|
||||
{
|
||||
global $conf, $user;
|
||||
|
||||
$this->db = $db;
|
||||
|
||||
// disable box for such cases
|
||||
if (! empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) $this->enabled=0; // disabled by this option
|
||||
}
|
||||
|
||||
/**
|
||||
* Load data for box to show them later
|
||||
*
|
||||
|
||||
@@ -39,11 +39,28 @@ class box_prospect extends ModeleBoxes
|
||||
var $depends = array("societe");
|
||||
|
||||
var $db;
|
||||
var $enabled = 1;
|
||||
|
||||
var $info_box_head = array();
|
||||
var $info_box_contents = array();
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param string $param More parameters
|
||||
*/
|
||||
function __construct($db,$param='')
|
||||
{
|
||||
global $conf, $user;
|
||||
|
||||
$this->db = $db;
|
||||
|
||||
// disable box for such cases
|
||||
if (! empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) $this->enabled=0; // disabled by this option
|
||||
}
|
||||
|
||||
/**
|
||||
* Load data into info_box_contents array to show array later.
|
||||
*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012-2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2011-2014 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||
@@ -609,6 +609,8 @@ abstract class CommonObject
|
||||
|
||||
if (empty($this->socid) && empty($this->fk_soc)) return 0;
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||
|
||||
$thirdparty = new Societe($this->db);
|
||||
$result=$thirdparty->fetch(isset($this->socid)?$this->socid:$this->fk_soc);
|
||||
$this->client = $thirdparty; // deprecated
|
||||
@@ -2218,10 +2220,10 @@ abstract class CommonObject
|
||||
$this->array_options[$key] = price2num($this->array_options[$key]);
|
||||
break;
|
||||
case 'date':
|
||||
$this->array_options[$key]=$this->db->idate($this->array_options[$key]);
|
||||
if (is_numeric($this->array_options[$key])) $this->array_options[$key]=$this->db->idate($this->array_options[$key]);
|
||||
break;
|
||||
case 'datetime':
|
||||
$this->array_options[$key]=$this->db->idate($this->array_options[$key]);
|
||||
if (is_numeric($this->array_options[$key])) $this->array_options[$key]=$this->db->idate($this->array_options[$key]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -2235,7 +2237,7 @@ abstract class CommonObject
|
||||
{
|
||||
$attributeKey = substr($key,8); // Remove 'options_' prefix
|
||||
// Add field of attribut
|
||||
if ($extrafields->attribute_type[$attributeKey] != 'separate') // Only for other type of separate
|
||||
if (isset($extrafields->attribute_type[$attributeKey]) && $extrafields->attribute_type[$attributeKey] != 'separate') // Only for other type of separate
|
||||
$sql.=",".$attributeKey;
|
||||
}
|
||||
$sql .= ") VALUES (".$this->id;
|
||||
@@ -2243,7 +2245,7 @@ abstract class CommonObject
|
||||
{
|
||||
$attributeKey = substr($key,8); // Remove 'options_' prefix
|
||||
// Add field o fattribut
|
||||
if($extrafields->attribute_type[$attributeKey] != 'separate') // Only for other type of separate)
|
||||
if(isset($extrafields->attribute_type[$attributeKey]) && $extrafields->attribute_type[$attributeKey] != 'separate') // Only for other type of separate)
|
||||
{
|
||||
if ($this->array_options[$key] != '')
|
||||
{
|
||||
|
||||
@@ -154,7 +154,7 @@ class ExtraFields
|
||||
{
|
||||
$table=$elementtype.'_extrafields';
|
||||
|
||||
if (! empty($attrname) && preg_match("/^\w[a-zA-Z0-9-_]*$/",$attrname) && ! is_numeric($attrname))
|
||||
if (! empty($attrname) && preg_match("/^\w[a-zA-Z0-9_]*$/",$attrname) && ! is_numeric($attrname))
|
||||
{
|
||||
if ($type=='boolean') {
|
||||
$typedb='int';
|
||||
@@ -743,15 +743,17 @@ class ExtraFields
|
||||
if (strpos($InfoFieldList[4], 'extra')!==false)
|
||||
{
|
||||
$sql.= ' as main, '.MAIN_DB_PREFIX .$InfoFieldList[0].'_extrafields as extra';
|
||||
$sqlwhere.= ' AND extra.fk_object=main.'.$InfoFieldList[2]. ' AND '.$InfoFieldList[4];
|
||||
$sqlwhere.= ' WHERE extra.fk_object=main.'.$InfoFieldList[2]. ' AND '.$InfoFieldList[4];
|
||||
}
|
||||
else
|
||||
{
|
||||
$sqlwhere.= ' AND '.$InfoFieldList[4];
|
||||
$sqlwhere.= ' WHERE '.$InfoFieldList[4];
|
||||
}
|
||||
}else {
|
||||
$sqlwhere.= ' WHERE 1';
|
||||
}
|
||||
if (in_array($InfoFieldList[0],array('tablewithentity'))) $sqlwhere.= ' AND entity = '.$conf->entity; // Some tables may have field, some other not. For the moment we disable it.
|
||||
$sql.=preg_replace('/^ AND /','',$sqlwhere);
|
||||
//$sql.=preg_replace('/^ AND /','',$sqlwhere);
|
||||
//print $sql;
|
||||
|
||||
dol_syslog(get_class($this).'::showInputField type=sellist sql='.$sql);
|
||||
@@ -979,7 +981,10 @@ class ExtraFields
|
||||
{
|
||||
foreach ($fields_label as $field_toshow)
|
||||
{
|
||||
$translabel=$langs->trans($obj->$field_toshow);
|
||||
$translabel='';
|
||||
if (!empty($obj->$field_toshow)) {
|
||||
$translabel=$langs->trans($obj->$field_toshow);
|
||||
}
|
||||
if ($translabel!=$field_toshow) {
|
||||
$value.=dol_trunc($translabel,18).' ';
|
||||
}else {
|
||||
@@ -989,7 +994,10 @@ class ExtraFields
|
||||
}
|
||||
else
|
||||
{
|
||||
$translabel=$langs->trans($obj->$InfoFieldList[1]);
|
||||
$translabel='';
|
||||
if (!empty($obj->$InfoFieldList[1])) {
|
||||
$translabel=$langs->trans($obj->$InfoFieldList[1]);
|
||||
}
|
||||
if ($translabel!=$obj->$InfoFieldList[1]) {
|
||||
$value=dol_trunc($translabel,18);
|
||||
}else {
|
||||
|
||||
@@ -131,6 +131,7 @@ class HookManager
|
||||
// Define type of hook ('output', 'returnvalue' or 'addreplace'). 'addreplace' should be type for all hooks. 'output' and 'returnvalue' are deprecated.
|
||||
$hooktype='output';
|
||||
if (preg_match('/^pdf_/',$method)) $hooktype='returnvalue'; // pdf_xxx except pdf_writelinedesc are returnvalue hooks. When there is 2 hooks of this type, only last one win.
|
||||
if ($method =='insertExtraFields') $hooktype='returnvalue';
|
||||
if (in_array(
|
||||
$method,
|
||||
array(
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
@@ -14,6 +14,7 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* or see http://www.gnu.org/
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -1033,6 +1033,7 @@ class FormOther
|
||||
if ($nbboxactivated)
|
||||
{
|
||||
$langs->load("boxes");
|
||||
$langs->load("projects");
|
||||
|
||||
$emptybox=new ModeleBoxes($db);
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ require_once '../main.inc.php';
|
||||
|
||||
if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang')); // If language was forced on URL by the main.inc.php
|
||||
$langs->load("main");
|
||||
$langs->load("agenda");
|
||||
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
||||
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
|
||||
|
||||
@@ -57,7 +58,7 @@ if (GETPOST('mode') && GETPOST('mode') == 'test')
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<title>Calendar</title>';
|
||||
print '<title>'.$langs->trans("Calendar").'</title>';
|
||||
}
|
||||
|
||||
// Define tradMonths javascript array (we define this in datapicker AND in parent page to avoid errors with IE8)
|
||||
|
||||
@@ -351,7 +351,6 @@ class DoliDBMysqli extends DoliDB
|
||||
* @return int Nombre de lignes
|
||||
* @see num_rows
|
||||
*/
|
||||
|
||||
function affected_rows($resultset)
|
||||
{
|
||||
// If resultset not provided, we take the last used by connexion
|
||||
|
||||
@@ -387,7 +387,7 @@ class DoliDBPgsql extends DoliDB
|
||||
if ((! empty($host) && $host == "socket") && ! defined('NOLOCALSOCKETPGCONNECT'))
|
||||
{
|
||||
$con_string = "dbname='".$name."' user='".$login."' password='".$passwd."'"; // $name may be empty
|
||||
$this->db = pg_connect($con_string);
|
||||
$this->db = @pg_connect($con_string);
|
||||
}
|
||||
|
||||
// if local connection failed or not requested, use TCP/IP
|
||||
@@ -397,7 +397,7 @@ class DoliDBPgsql extends DoliDB
|
||||
if (! $port) $port = 5432;
|
||||
|
||||
$con_string = "host='".$host."' port='".$port."' dbname='".$name."' user='".$login."' password='".$passwd."'";
|
||||
$this->db = pg_connect($con_string);
|
||||
$this->db = @pg_connect($con_string);
|
||||
}
|
||||
|
||||
// now we test if at least one connect method was a success
|
||||
@@ -832,7 +832,7 @@ class DoliDBPgsql extends DoliDB
|
||||
// Test charset match LC_TYPE (pgsql error otherwise)
|
||||
//print $charset.' '.setlocale(LC_CTYPE,'0'); exit;
|
||||
|
||||
$sql='CREATE DATABASE '.$database.' OWNER '.$owner.' ENCODING \''.$charset.'\'';
|
||||
$sql='CREATE DATABASE "'.$database.'" OWNER "'.$owner.'" ENCODING \''.$charset.'\'';
|
||||
dol_syslog($sql,LOG_DEBUG);
|
||||
$ret=$this->query($sql);
|
||||
return $ret;
|
||||
|
||||
@@ -482,7 +482,7 @@ function dol_get_last_day($year,$month=12,$gm=false)
|
||||
* @param int $month Month
|
||||
* @param int $year Year
|
||||
* @param int $gm False or 0 or 'server' = Return date to compare with server TZ, True or 1 to compare with GM date.
|
||||
* @return array year,month, week,first_day,prev_year,prev_month,prev_day
|
||||
* @return array year,month,week,first_day,prev_year,prev_month,prev_day
|
||||
*/
|
||||
function dol_get_first_day_week($day,$month,$year,$gm=false)
|
||||
{
|
||||
@@ -524,7 +524,7 @@ function dol_get_first_day_week($day,$month,$year,$gm=false)
|
||||
}
|
||||
$tmpmonth = $prev_month;
|
||||
$tmpyear = $prev_year;
|
||||
|
||||
|
||||
//Get first day of next week
|
||||
$tmptime=dol_mktime(12,0,0,$month,$tmpday,$year,1,0);
|
||||
$tmptime-=24*60*60*7;
|
||||
@@ -532,7 +532,7 @@ function dol_get_first_day_week($day,$month,$year,$gm=false)
|
||||
$prev_day = $tmparray['mday'];
|
||||
|
||||
//Check prev day of week is in same month than first day or not
|
||||
if ($prev_day>$tmpday)
|
||||
if ($prev_day > $tmpday)
|
||||
{
|
||||
$prev_month = $month-1;
|
||||
$prev_year = $year;
|
||||
@@ -544,7 +544,7 @@ function dol_get_first_day_week($day,$month,$year,$gm=false)
|
||||
}
|
||||
}
|
||||
|
||||
$week = date("W",dol_mktime(0,0,0,$month,$tmpday,$year,$gm));
|
||||
$week = date("W",dol_mktime(0,0,0,$tmpmonth,$tmpday,$tmpyear,$gm));
|
||||
|
||||
return array('year' => $year, 'month' => $month, 'week' => $week, 'first_day' => $tmpday, 'first_month' => $tmpmonth, 'first_year' => $tmpyear, 'prev_year' => $prev_year, 'prev_month' => $prev_month, 'prev_day' => $prev_day);
|
||||
}
|
||||
@@ -563,9 +563,10 @@ function num_public_holiday($timestampStart, $timestampEnd, $countrycode='FR')
|
||||
$nbFerie = 0;
|
||||
|
||||
// Check to ensure we use correct parameters
|
||||
if ((($timestampEnd - $timestampStart) % 86400) != 0) return 'ErrorDates must use same hour and be GMT dates';
|
||||
if ((($timestampEnd - $timestampStart) % 86400) != 0) return 'ErrorDates must use same hours and must be GMT dates';
|
||||
|
||||
while ($timestampStart < $timestampEnd) // Loop end when equals
|
||||
$i=0;
|
||||
while ($timestampStart < $timestampEnd && ($i < 50000)) // Loop end when equals (Test on i is a security loop to avoid infinite loop)
|
||||
{
|
||||
$ferie=false;
|
||||
$countryfound=0;
|
||||
@@ -573,7 +574,6 @@ function num_public_holiday($timestampStart, $timestampEnd, $countrycode='FR')
|
||||
$jour = date("d", $timestampStart);
|
||||
$mois = date("m", $timestampStart);
|
||||
$annee = date("Y", $timestampStart);
|
||||
|
||||
if ($countrycode == 'FR')
|
||||
{
|
||||
$countryfound=1;
|
||||
@@ -676,8 +676,10 @@ function num_public_holiday($timestampStart, $timestampEnd, $countrycode='FR')
|
||||
if ($ferie) $nbFerie++;
|
||||
|
||||
// Increase number of days (on go up into loop)
|
||||
$jour++;
|
||||
$timestampStart=dol_mktime(0,0,0,$mois,$jour,$annee,1); // Generate GMT date for next day
|
||||
$timestampStart=dol_time_plus_duree($timestampStart, 1, 'd');
|
||||
//var_dump($jour.' '.$mois.' '.$annee.' '.$timestampStart);
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
return $nbFerie;
|
||||
@@ -718,13 +720,16 @@ function num_between_day($timestampStart, $timestampEnd, $lastday=0)
|
||||
* @param int $inhour 0: return number of days, 1: return number of hours
|
||||
* @param int $lastday We include last day, 0: no, 1:yes
|
||||
* @param int $halfday Tag to define half day when holiday start and end
|
||||
* @param string $country_code Country code (company country code if not defined)
|
||||
* @return int Number of days or hours
|
||||
*/
|
||||
function num_open_day($timestampStart, $timestampEnd, $inhour=0, $lastday=0, $halfday=0)
|
||||
function num_open_day($timestampStart, $timestampEnd, $inhour=0, $lastday=0, $halfday=0, $country_code='')
|
||||
{
|
||||
global $langs;
|
||||
global $langs,$mysoc;
|
||||
|
||||
dol_syslog('num_open_day timestampStart='.$timestampStart.' timestampEnd='.$timestampEnd.' bit='.$lastday);
|
||||
if (empty($country_code)) $country_code=$mysoc->country_code;
|
||||
|
||||
dol_syslog('num_open_day timestampStart='.$timestampStart.' timestampEnd='.$timestampEnd.' bit='.$lastday.' country_code='.$country_code);
|
||||
|
||||
// Check parameters
|
||||
if (! is_int($timestampStart) && ! is_float($timestampStart)) return 'ErrorBadParameter_num_open_day';
|
||||
@@ -733,7 +738,9 @@ function num_open_day($timestampStart, $timestampEnd, $inhour=0, $lastday=0, $ha
|
||||
//print 'num_open_day timestampStart='.$timestampStart.' timestampEnd='.$timestampEnd.' bit='.$lastday;
|
||||
if ($timestampStart < $timestampEnd)
|
||||
{
|
||||
$nbOpenDay = num_between_day($timestampStart, $timestampEnd, $lastday) - num_public_holiday($timestampStart, $timestampEnd, $lastday);
|
||||
$numdays = num_between_day($timestampStart, $timestampEnd, $lastday);
|
||||
$numholidays = num_public_holiday($timestampStart, $timestampEnd, $country_code);
|
||||
$nbOpenDay = $numdays - $numholidays;
|
||||
$nbOpenDay.= " " . $langs->trans("Days");
|
||||
if ($inhour == 1 && $nbOpenDay <= 3) $nbOpenDay = $nbOpenDay*24 . $langs->trans("HourShort");
|
||||
return $nbOpenDay - (($inhour == 1 ? 12 : 0.5) * abs($halfday));
|
||||
|
||||
@@ -719,11 +719,12 @@ function dol_bc($var,$moreclass='')
|
||||
* @param Object $object A company or contact object
|
||||
* @param int $withcountry 1=Add country into address string
|
||||
* @param string $sep Separator to use to build string
|
||||
* @param Tranlsate $outputlangs Object lang that contains language for text translation.
|
||||
* @return string Formated string
|
||||
*/
|
||||
function dol_format_address($object,$withcountry=0,$sep="\n")
|
||||
function dol_format_address($object,$withcountry=0,$sep="\n",$outputlangs='')
|
||||
{
|
||||
global $conf;
|
||||
global $conf,$langs;
|
||||
|
||||
$ret='';
|
||||
$countriesusingstate=array('AU','US','IN','GB','ES','UK','TR');
|
||||
@@ -768,8 +769,8 @@ function dol_format_address($object,$withcountry=0,$sep="\n")
|
||||
$ret.=", ".$object->state;
|
||||
}
|
||||
}
|
||||
|
||||
if ($withcountry) $ret.=($object->country?$sep.$object->country:'');
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
if ($withcountry) $ret.=($object->country_code?$sep.$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$object->country_code)):'');
|
||||
|
||||
return $ret;
|
||||
}
|
||||
@@ -1053,7 +1054,11 @@ function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=false,$check=1)
|
||||
$default_timezone=@date_default_timezone_get();
|
||||
}
|
||||
}
|
||||
else $localtz = new DateTimeZone('UTC');
|
||||
|
||||
if (empty($localtz)) {
|
||||
$localtz = new DateTimeZone('UTC');
|
||||
}
|
||||
|
||||
$dt = new DateTime(null,$localtz);
|
||||
$dt->setDate($year,$month,$day);
|
||||
$dt->setTime((int) $hour, (int) $minute, (int) $second);
|
||||
|
||||
@@ -738,7 +738,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m
|
||||
$sql = "SELECT MAX(".$sqlstring.") as val";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX.$table;
|
||||
$sql.= " WHERE ".$field." LIKE '".$maskLike."'";
|
||||
$sql.= " AND ".$field." NOT LIKE '%PROV%'";
|
||||
$sql.= " AND ".$field." NOT LIKE '(PROV%)'";
|
||||
$sql.= " AND entity IN (".getEntity($table, 1).")";
|
||||
if ($where) $sql.=$where;
|
||||
if ($sqlwhere) $sql.=' AND '.$sqlwhere;
|
||||
|
||||
@@ -2,19 +2,20 @@
|
||||
/*
|
||||
* Copyright (C) 2009-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* or see http://www.gnu.org/
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/core/lib/invoice2.lib.php
|
||||
|
||||
@@ -309,7 +309,10 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target
|
||||
|
||||
if ($mode == 'source')
|
||||
{
|
||||
$stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset(dol_format_address($sourcecompany))."\n";
|
||||
$withCountry = 0;
|
||||
if (!empty($sourcecompany->country_code) && ($targetcompany->country_code != $sourcecompany->country_code)) $withCountry = 1;
|
||||
|
||||
$stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset(dol_format_address($sourcecompany, $withCountry, "\n", $outputlangs))."\n";
|
||||
|
||||
if (empty($conf->global->MAIN_PDF_DISABLESOURCEDETAILS))
|
||||
{
|
||||
|
||||
@@ -174,11 +174,17 @@ function restrictedArea($user, $features, $objectid=0, $dbtablename='', $feature
|
||||
}
|
||||
else if (! empty($feature2)) // This should be used for future changes
|
||||
{
|
||||
$tmpreadok=1;
|
||||
foreach($feature2 as $subfeature)
|
||||
{
|
||||
if (! empty($subfeature) && empty($user->rights->$feature->$subfeature->lire) && empty($user->rights->$feature->$subfeature->read)) { $readok=0; $nbko++; }
|
||||
else if (empty($subfeature) && empty($user->rights->$feature->lire) && empty($user->rights->$feature->read)) { $readok=0; $nbko++; }
|
||||
else { $readok=1; break; } // Break is to bypass second test if the first is ok
|
||||
if (! empty($subfeature) && empty($user->rights->$feature->$subfeature->lire) && empty($user->rights->$feature->$subfeature->read)) { $tmpreadok=0; }
|
||||
else if (empty($subfeature) && empty($user->rights->$feature->lire) && empty($user->rights->$feature->read)) { $tmpreadok=0; }
|
||||
else { $tmpreadok=1; break; } // Break is to bypass second test if the first is ok
|
||||
}
|
||||
if (! $tmpreadok) // We found a test on feature that is ko
|
||||
{
|
||||
$readok=0; // All tests are ko (we manage here the and, the or will be managed later using $nbko).
|
||||
$nbko++;
|
||||
}
|
||||
}
|
||||
else if (! empty($feature) && ($feature!='user' && $feature!='usergroup')) // This is for old permissions
|
||||
|
||||
@@ -184,6 +184,7 @@ class CommActionRapport
|
||||
$sql.= " WHERE c.id=a.fk_action AND a.fk_user_author = u.rowid";
|
||||
$sql.= " AND a.datep BETWEEN '".$this->db->idate(dol_get_first_day($this->year,$this->month,false))."'";
|
||||
$sql.= " AND '".$this->db->idate(dol_get_last_day($this->year,$this->month,false))."'";
|
||||
$sql.= " AND a.entity = ".$conf->entity;
|
||||
$sql.= " ORDER BY a.datep DESC";
|
||||
|
||||
dol_syslog(get_class($this)."::_page sql=".$sql);
|
||||
|
||||
@@ -1177,7 +1177,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
if ($showaddress)
|
||||
{
|
||||
// Sender properties
|
||||
$carac_emetteur = pdf_build_address($outputlangs,$this->emetteur);
|
||||
$carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->client);
|
||||
|
||||
// Show sender
|
||||
$posy=42;
|
||||
|
||||
@@ -1134,7 +1134,7 @@ class pdf_proforma extends ModelePDFCommandes
|
||||
if ($showaddress)
|
||||
{
|
||||
// Sender properties
|
||||
$carac_emetteur = pdf_build_address($outputlangs,$this->emetteur);
|
||||
$carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->client);
|
||||
|
||||
// Show sender
|
||||
$posy=42;
|
||||
|
||||
@@ -520,7 +520,7 @@ class pdf_strato extends ModelePDFContract
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n";
|
||||
}
|
||||
|
||||
$carac_emetteur .= pdf_build_address($outputlangs,$this->emetteur);
|
||||
$carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->client);
|
||||
|
||||
// Show sender
|
||||
$posy=42;
|
||||
|
||||
@@ -516,7 +516,7 @@ class pdf_merou extends ModelePdfExpedition
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
|
||||
// Sender properties
|
||||
$carac_emetteur = pdf_build_address($outputlangs,$this->emetteur);
|
||||
$carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->client);
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 3);
|
||||
$pdf->SetXY($blSocX,$blSocY+4);
|
||||
|
||||
@@ -564,7 +564,7 @@ class pdf_rouget extends ModelePdfExpedition
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n";
|
||||
}
|
||||
|
||||
$carac_emetteur .= pdf_build_address($outputlangs,$this->emetteur);
|
||||
$carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->client);
|
||||
|
||||
// Show sender
|
||||
$posx=$this->marge_gauche;
|
||||
|
||||
@@ -1363,7 +1363,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
if ($showaddress)
|
||||
{
|
||||
// Sender properties
|
||||
$carac_emetteur = pdf_build_address($outputlangs,$this->emetteur);
|
||||
$carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->client);
|
||||
|
||||
// Show sender
|
||||
$posy=42;
|
||||
|
||||
@@ -253,7 +253,32 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
$txt='<strong>'.dol_htmlentitiesbr($outputlangs->transnoentities("Date")." : ".dol_print_date($objectligne->datei,'dayhour',false,$outputlangs,true)." - ".$outputlangs->transnoentities("Duration")." : ".convertSecondToTime($objectligne->duration),1,$outputlangs->charset_output).'</strong>';
|
||||
$desc=dol_htmlentitiesbr($objectligne->desc,1);
|
||||
|
||||
$pdf->startTransaction();
|
||||
$pdf->writeHTMLCell(0, 0, $curX, $curY + 1, dol_concatdesc($txt,$desc), 0, 1, 0);
|
||||
$pageposafter=$pdf->getPage();
|
||||
if ($pageposafter > $pageposbefore) // There is a pagebreak
|
||||
{
|
||||
$pdf->rollbackTransaction(true);
|
||||
$pageposafter=$pageposbefore;
|
||||
//print $pageposafter.'-'.$pageposbefore;exit;
|
||||
$pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it.
|
||||
$pdf->writeHTMLCell(0, 0, $curX, $curY, $txt.'<br>'.$desc, LR, 1, 0);
|
||||
$pageposafter=$pdf->getPage();
|
||||
$posyafter=$pdf->GetY();
|
||||
//var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit;
|
||||
if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text
|
||||
{
|
||||
if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page
|
||||
{
|
||||
$pdf->AddPage('','',true);
|
||||
$pdf->setPage($pageposafter+1);
|
||||
}
|
||||
}
|
||||
}
|
||||
else // No pagebreak
|
||||
{
|
||||
$pdf->commitTransaction();
|
||||
}
|
||||
|
||||
$nexY = $pdf->GetY();
|
||||
$pageposafter=$pdf->getPage();
|
||||
@@ -505,7 +530,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n";
|
||||
}
|
||||
|
||||
$carac_emetteur .= pdf_build_address($outputlangs,$this->emetteur);
|
||||
$carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->client);
|
||||
|
||||
// Show sender
|
||||
$posy=42;
|
||||
|
||||
@@ -749,7 +749,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
if ($showaddress)
|
||||
{
|
||||
// Sender properties
|
||||
$carac_emetteur = pdf_build_address($outputlangs,$this->emetteur);
|
||||
$carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->client);
|
||||
|
||||
// Show sender
|
||||
$posy=42;
|
||||
|
||||
@@ -1269,7 +1269,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n";
|
||||
}
|
||||
|
||||
$carac_emetteur .= pdf_build_address($outputlangs,$this->emetteur);
|
||||
$carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->client);
|
||||
|
||||
// Show sender
|
||||
$posy=42;
|
||||
|
||||
@@ -961,7 +961,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
if ($showaddress)
|
||||
{
|
||||
// Sender properties
|
||||
$carac_emetteur = pdf_build_address($outputlangs,$this->emetteur);
|
||||
$carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->client);
|
||||
|
||||
// Show sender
|
||||
$posy=42;
|
||||
|
||||
@@ -1005,7 +1005,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
if ($showaddress)
|
||||
{
|
||||
// Sender properties
|
||||
$carac_emetteur = pdf_build_address($outputlangs,$this->emetteur);
|
||||
$carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->client);
|
||||
|
||||
// Show sender
|
||||
$posy=42;
|
||||
|
||||
@@ -203,7 +203,7 @@ else {
|
||||
<?php } ?>
|
||||
<td align="right"><input type="text" size="2" name="qty" class="flat" value="<?php echo (isset($_POST["qty"])?$_POST["qty"]:1); ?>">
|
||||
</td>
|
||||
<td align="right" class="nowrap"><input type="text" size="1" class="flat" value="<?php echo (isset($_POST["remise_percent"])?$_POST["remise_percent"]:$buyer->remise_client); ?>" name="remise_percent"><span class="hideonsmartphone">%</span></td>
|
||||
<td align="right" class="nowrap"><input type="text" size="1" class="flat" value="<?php echo (isset($_POST["remise_percent"])?$_POST["remise_percent"]:$buyer->remise_percent); ?>" name="remise_percent"><span class="hideonsmartphone">%</span></td>
|
||||
|
||||
<?php
|
||||
if (! empty($usemargins))
|
||||
|
||||
@@ -95,9 +95,18 @@ if ($action == 'confirm_execute' && $confirm == "yes" && $user->rights->cron->ex
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($object->lastresult > 0) setEventMessage($langs->trans("JobFinished"),'warnings');
|
||||
else setEventMessage($langs->trans("JobFinished"),'mesgs');
|
||||
$action='';
|
||||
$res = $object->reprogram_jobs($user->login);
|
||||
if ($res > 0)
|
||||
{
|
||||
if ($object->lastresult > 0) setEventMessage($langs->trans("JobFinished"),'warnings');
|
||||
else setEventMessage($langs->trans("JobFinished"),'mesgs');
|
||||
$action='';
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessage($object->error,'errors');
|
||||
$action='';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -100,6 +100,21 @@ if ($action == 'confirm_execute' && $confirm == "yes" && $user->rights->cron->ex
|
||||
if ($result < 0) {
|
||||
setEventMessage($object->error,'errors');
|
||||
}
|
||||
else
|
||||
{
|
||||
$res = $object->reprogram_jobs($user->login);
|
||||
if ($res > 0)
|
||||
{
|
||||
if ($object->lastresult > 0) setEventMessage($langs->trans("JobFinished"),'warnings');
|
||||
else setEventMessage($langs->trans("JobFinished"),'mesgs');
|
||||
$action='';
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessage($object->error,'errors');
|
||||
$action='';
|
||||
}
|
||||
}
|
||||
|
||||
header("Location: ".DOL_URL_ROOT.'/cron/list.php?status=-1'); // Make a call to avoid to run twice job when using back
|
||||
exit;
|
||||
|
||||
@@ -152,6 +152,11 @@ else if ($action == 'confirm_modify' && $confirm == 'yes' && $user->rights->fich
|
||||
|
||||
else if ($action == 'add' && $user->rights->ficheinter->creer)
|
||||
{
|
||||
// Fill array 'array_options' with data from add form
|
||||
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels, $object);
|
||||
if ($ret < 0) $error ++;
|
||||
|
||||
$object->socid = $socid;
|
||||
$object->duree = GETPOST('duree','int');
|
||||
$object->fk_project = GETPOST('projectid','int');
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
* \brief File that include conf.php file and commons lib like functions.lib.php
|
||||
*/
|
||||
|
||||
if (! defined('DOL_VERSION')) define('DOL_VERSION','3.6.1');
|
||||
if (! defined('DOL_VERSION')) define('DOL_VERSION','3.6.2');
|
||||
if (! defined('EURO')) define('EURO',chr(128));
|
||||
|
||||
// Define syslog constants
|
||||
|
||||
@@ -2016,7 +2016,8 @@ class CommandeFournisseur extends CommonOrder
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the translated input method
|
||||
* Returns the translated input method of object (defined if $this->methode_commande_id > 0).
|
||||
* This function make a sql request to get translation. No cache yet, try to not use it inside a loop.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -2026,21 +2027,19 @@ class CommandeFournisseur extends CommonOrder
|
||||
|
||||
if ($this->methode_commande_id > 0)
|
||||
{
|
||||
$sql = "SELECT rowid, code, libelle";
|
||||
$sql = "SELECT rowid, code, libelle as label";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX.'c_input_method';
|
||||
$sql.= " WHERE active=1 AND rowid = ".$db->escape($this->methode_commande_id);
|
||||
|
||||
$query = $db->query($sql);
|
||||
|
||||
if ($query && $db->num_rows($query))
|
||||
{
|
||||
$result = $db->fetch_object($query);
|
||||
$obj = $db->fetch_object($query);
|
||||
|
||||
$string = $langs->trans($result->code);
|
||||
|
||||
if ($string == $result->code)
|
||||
$string = $langs->trans($obj->code);
|
||||
if ($string == $obj->code)
|
||||
{
|
||||
$string = $obj->libelle != '-' ? $obj->libelle : '';
|
||||
$string = $obj->label != '-' ? $obj->label : '';
|
||||
}
|
||||
|
||||
return $string;
|
||||
|
||||
@@ -60,14 +60,18 @@ $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action
|
||||
|
||||
if ($action == 'setsupplieraccountancycode')
|
||||
{
|
||||
$result=$object->fetch($id);
|
||||
$object->code_compta_fournisseur=$_POST["supplieraccountancycode"];
|
||||
$result=$object->update($object->id,$user,1,0,1);
|
||||
if ($result < 0)
|
||||
{
|
||||
$mesg=join(',',$object->errors);
|
||||
}
|
||||
$action="";
|
||||
$cancelbutton = GETPOST('cancel');
|
||||
|
||||
if (!$cancelbutton) {
|
||||
|
||||
$result = $object->fetch($id);
|
||||
$object->code_compta_fournisseur = $_POST["supplieraccountancycode"];
|
||||
$result = $object->update($object->id, $user, 1, 0, 1);
|
||||
if ($result < 0) {
|
||||
$mesg = join(',', $object->errors);
|
||||
}
|
||||
$action = "";
|
||||
}
|
||||
}
|
||||
// conditions de reglement
|
||||
if ($action == 'setconditions' && $user->rights->societe->creer)
|
||||
|
||||
Binary file not shown.
@@ -28,10 +28,10 @@ ProductsAndServicesStatistics=Products and Services statistics
|
||||
ProductsStatistics=Products statistics
|
||||
ProductsOnSell=Available products
|
||||
ProductsNotOnSell=Obsolete products
|
||||
ProductsOnSellAndOnBuy=Products not for sale nor purchase
|
||||
ProductsOnSellAndOnBuy=Products for sale and for purchase
|
||||
ServicesOnSell=Available services
|
||||
ServicesNotOnSell=Obsolete services
|
||||
ServicesOnSellAndOnBuy=Services not for sale nor purchase
|
||||
ServicesOnSellAndOnBuy=Services for sale and for purchase
|
||||
InternalRef=Internal reference
|
||||
LastRecorded=Last products/services on sell recorded
|
||||
LastRecordedProductsAndServices=Last %s recorded products/services
|
||||
|
||||
@@ -3,6 +3,7 @@ RefProject=Ref. project
|
||||
ProjectId=Project Id
|
||||
Project=Project
|
||||
Projects=Projects
|
||||
ProjectStatus=Project status
|
||||
SharedProject=Everybody
|
||||
PrivateProject=Contacts of project
|
||||
MyProjectsDesc=This view is limited to projects you are a contact for (whatever is the type).
|
||||
|
||||
@@ -32,4 +32,6 @@ ResourceLinkedWithSuccess=Resource linked with success
|
||||
TitleResourceCard=Resource card
|
||||
ConfirmDeleteResource=Confirm to delete this resource
|
||||
RessourceSuccessfullyDeleted=Resource successfully deleted
|
||||
DictionaryResourceType=Type of resources
|
||||
DictionaryResourceType=Type of resources
|
||||
|
||||
SelectResource=Select resource
|
||||
|
||||
@@ -3,6 +3,7 @@ RefProject=Ref. proyecto
|
||||
ProjectId=Id proyecto
|
||||
Project=Proyecto
|
||||
Projects=Proyectos
|
||||
ProjectStatus=Estado del proyecto
|
||||
SharedProject=Proyecto compartido
|
||||
PrivateProject=Contactos del proyecto
|
||||
MyProjectsDesc=Esta vista muestra aquellos proyectos en los que usted es un contacto afectado (cualquier tipo).
|
||||
|
||||
@@ -257,7 +257,7 @@ CreditNotes=Avoirs
|
||||
Deposit=Acompte
|
||||
Deposits=Acomptes
|
||||
DiscountFromCreditNote=Remise issue de l'avoir %s
|
||||
DiscountFromDeposit=Paiements issue de l'acompte %s
|
||||
DiscountFromDeposit=Paiement issu de l'acompte %s
|
||||
AbsoluteDiscountUse=Ce type de crédit ne peut s'utiliser que sur une facture non validée
|
||||
CreditNoteDepositUse=La facture doit être validée pour pouvoir utiliser ce type de crédit
|
||||
NewGlobalDiscount=Nouvelle ligne de déduction
|
||||
|
||||
@@ -199,7 +199,7 @@ AccountancyJournal=Code journal comptabilité
|
||||
COMPTA_PRODUCT_BUY_ACCOUNT=Code comptable par défaut pour l'achat de produits
|
||||
COMPTA_PRODUCT_SOLD_ACCOUNT=Code comptable par défaut pour la vente de produits
|
||||
COMPTA_SERVICE_BUY_ACCOUNT=Code comptable par défaut pour l'achat de services
|
||||
COMPTA_SERVICE_SOLD_ACCOUNT=Code comptable par défaut pour la vente de produits
|
||||
COMPTA_SERVICE_SOLD_ACCOUNT=Code comptable par défaut pour la vente de services
|
||||
COMPTA_VAT_ACCOUNT=Code comptable par défaut pour l'encaissement de TVA
|
||||
COMPTA_VAT_BUY_ACCOUNT=Code comptable par défaut pour le versement de la TVA
|
||||
COMPTA_ACCOUNT_CUSTOMER=Code comptable par défaut des tiers clients
|
||||
|
||||
@@ -32,4 +32,6 @@ ResourceLinkedWithSuccess=Ressource liée avec succès
|
||||
TitleResourceCard=Fiche ressource
|
||||
ConfirmDeleteResource=Confirmer la suppression de cette ressource?
|
||||
RessourceSuccessfullyDeleted=Ressource effacée avec succès
|
||||
DictionaryResourceType=Type de ressources
|
||||
DictionaryResourceType=Type de ressources
|
||||
|
||||
SelectResource=Sélectionner la ressource
|
||||
|
||||
@@ -57,9 +57,9 @@ $pagenext = $page + 1;
|
||||
$startdate=$enddate='';
|
||||
|
||||
if (!empty($_POST['startdatemonth']))
|
||||
$startdate = dol_mktime(12, 0, 0, $_POST['startdatemonth'], $_POST['startdateday'], $_POST['startdateyear']);
|
||||
$startdate = dol_mktime(0, 0, 0, $_POST['startdatemonth'], $_POST['startdateday'], $_POST['startdateyear']);
|
||||
if (!empty($_POST['enddatemonth']))
|
||||
$enddate = dol_mktime(12, 0, 0, $_POST['enddatemonth'], $_POST['enddateday'], $_POST['enddateyear']);
|
||||
$enddate = dol_mktime(23, 59, 59, $_POST['enddatemonth'], $_POST['enddateday'], $_POST['enddateyear']);
|
||||
|
||||
/*
|
||||
* View
|
||||
@@ -109,8 +109,8 @@ $sql = "SELECT";
|
||||
if ($agentid > 0) $sql.= " s.rowid as socid, s.nom, s.code_client, s.client,";
|
||||
$sql.= " u.rowid as agent, u.login, u.lastname, u.firstname,";
|
||||
$sql.= " sum(d.total_ht) as selling_price,";
|
||||
$sql.= " sum(".$db->ifsql('d.total_ht <=0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,";
|
||||
$sql.= " sum(".$db->ifsql('d.total_ht <=0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge" ;
|
||||
$sql.= " sum(".$db->ifsql('d.total_ht < 0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,";
|
||||
$sql.= " sum(".$db->ifsql('d.total_ht < 0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge" ;
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."facture as f";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_contact e ON e.element_id = f.rowid and e.statut = 4 and e.fk_c_type_contact = ".(empty($conf->global->AGENT_CONTACT_TYPE)?-1:$conf->global->AGENT_CONTACT_TYPE);
|
||||
@@ -119,6 +119,7 @@ $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."user as u";
|
||||
$sql.= " WHERE f.fk_soc = s.rowid";
|
||||
$sql.= " AND sc.fk_soc = f.fk_soc";
|
||||
$sql.= " AND (d.product_type = 0 OR d.product_type = 1)";
|
||||
if (! empty($conf->global->AGENT_CONTACT_TYPE))
|
||||
$sql.= " AND ((e.fk_socpeople IS NULL AND sc.fk_user = u.rowid) OR (e.fk_socpeople IS NOT NULL AND e.fk_socpeople = u.rowid))";
|
||||
else
|
||||
|
||||
@@ -164,8 +164,8 @@ $sql = "SELECT";
|
||||
$sql.= " s.rowid as socid, s.nom, s.code_client, s.client,";
|
||||
if ($client) $sql.= " f.rowid as facid, f.facnumber, f.total as total_ht, f.datef, f.paye, f.fk_statut as statut,";
|
||||
$sql.= " sum(d.total_ht) as selling_price,";
|
||||
$sql.= " sum(".$db->ifsql('d.total_ht <=0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,";
|
||||
$sql.= " sum(".$db->ifsql('d.total_ht <=0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge";
|
||||
$sql.= " sum(".$db->ifsql('d.total_ht < 0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,";
|
||||
$sql.= " sum(".$db->ifsql('d.total_ht < 0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."facture as f";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."facturedet as d";
|
||||
@@ -173,6 +173,7 @@ $sql.= " WHERE f.fk_soc = s.rowid";
|
||||
$sql.= " AND f.fk_statut > 0";
|
||||
$sql.= " AND s.entity = ".$conf->entity;
|
||||
$sql.= " AND d.fk_facture = f.rowid";
|
||||
$sql.= " AND (d.product_type = 0 OR d.product_type = 1)";
|
||||
if ($client)
|
||||
$sql.= " AND f.fk_soc = ".$socid;
|
||||
if (!empty($startdate))
|
||||
|
||||
@@ -167,8 +167,8 @@ $sql = "SELECT p.label, p.rowid, p.fk_product_type, p.ref,";
|
||||
if ($id > 0) $sql.= " d.fk_product,";
|
||||
if ($id > 0) $sql.= " f.rowid as facid, f.facnumber, f.total as total_ht, f.datef, f.paye, f.fk_statut as statut,";
|
||||
$sql.= " sum(d.total_ht) as selling_price,";
|
||||
$sql.= " sum(".$db->ifsql('d.total_ht <=0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,";
|
||||
$sql.= " sum(".$db->ifsql('d.total_ht <=0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge";
|
||||
$sql.= " sum(".$db->ifsql('d.total_ht < 0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,";
|
||||
$sql.= " sum(".$db->ifsql('d.total_ht < 0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."product as p";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."facture as f";
|
||||
|
||||
@@ -683,7 +683,8 @@ function hash_call($methodName,$nvpStr)
|
||||
exit;*/
|
||||
curl_setopt($ch, CURLOPT_URL, $API_Endpoint);
|
||||
curl_setopt($ch, CURLOPT_VERBOSE, 1);
|
||||
curl_setopt($ch, CURLOPT_SSLVERSION, 3); // Force SSLv3
|
||||
//curl_setopt($ch, CURLOPT_SSLVERSION, 3); // Force SSLv3
|
||||
curl_setopt($ch, CURLOPT_SSLVERSION, 1); // Force TLSv1
|
||||
|
||||
//turning off the server and peer verification(TrustManager Concept).
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
|
||||
|
||||
@@ -4,16 +4,10 @@
|
||||
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2007-2011 Jean Heimburger <jean@tiaris.info>
|
||||
<<<<<<< HEAD
|
||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013-2014 Cedric GROSS <c.gross@kreiz-it.fr>
|
||||
* Copyright (C) 2013 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2011-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
=======
|
||||
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Cedric GROSS <c.gross@kreiz-it.fr>
|
||||
* Copyright (C) 2013-2014 Marcos García <marcosgdf@gmail.com>
|
||||
>>>>>>> refs/remotes/origin/3.5
|
||||
* Copyright (C) 2011-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -124,7 +124,7 @@ if (empty($reshook))
|
||||
// Barcode value
|
||||
if ($action == 'setbarcode' && $createbarcode)
|
||||
{
|
||||
$result=$object->check_barcode(GETPOST('barcode'),GETPOT('barcode_type_code'));
|
||||
$result=$object->check_barcode(GETPOST('barcode'),GETPOST('barcode_type_code'));
|
||||
|
||||
if ($result >= 0)
|
||||
{
|
||||
@@ -422,10 +422,10 @@ if (empty($reshook))
|
||||
$_error++;
|
||||
$action = "";
|
||||
|
||||
$mesg='<div class="error">'.$langs->trans("ErrorProductAlreadyExists",$object->ref);
|
||||
$mesg=$langs->trans("ErrorProductAlreadyExists",$object->ref);
|
||||
$mesg.=' <a href="'.$_SERVER["PHP_SELF"].'?ref='.$object->ref.'">'.$langs->trans("ShowCardHere").'</a>.';
|
||||
$mesg.='</div>';
|
||||
setEventMessage($mesg, 'errors');
|
||||
$object->fetch($id);
|
||||
//dol_print_error($object->db);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -167,7 +167,7 @@ print $total;
|
||||
print '</td></tr>';
|
||||
print '</table>';
|
||||
|
||||
if (! empty($conf->categorie->enabled))
|
||||
if (! empty($conf->categorie->enabled) && ! empty($conf->global->CATEGORY_GRAPHSTATS_ON_PRODUCTS))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
print '<br>';
|
||||
|
||||
@@ -324,12 +324,16 @@ else
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat" type="text" name="snom" size="12" value="'.$snom.'">';
|
||||
print '</td>';
|
||||
|
||||
// Barcode
|
||||
if (! empty($conf->barcode->enabled))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
print '<input class="flat" type="text" name="sbarcode" size="6" value="'.$sbarcode.'">';
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Date modification
|
||||
print '<td class="liste_titre">';
|
||||
print ' ';
|
||||
print '</td>';
|
||||
@@ -363,16 +367,7 @@ else
|
||||
print '<td class="liste_titre">';
|
||||
print ' ';
|
||||
print '</td>';
|
||||
//desiredstock
|
||||
print '<td class="liste_titre">';
|
||||
print ' ';
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
print ' ';
|
||||
print '</td>';
|
||||
// Desired stock
|
||||
print '<td class="liste_titre">';
|
||||
print ' ';
|
||||
print '</td>';
|
||||
@@ -467,7 +462,7 @@ else
|
||||
}
|
||||
|
||||
// Better buy price
|
||||
if ($user->rights->produit->creer)
|
||||
if ($user->rights->fournisseur->lire)
|
||||
{
|
||||
print '<td align="right">';
|
||||
if ($objp->minsellprice != '')
|
||||
@@ -501,15 +496,6 @@ else
|
||||
print $product_static->stock_reel;
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td>';
|
||||
print ' ';
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
print ' ';
|
||||
print '</td>';
|
||||
}
|
||||
}
|
||||
|
||||
// Status (to buy)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -71,7 +72,9 @@ llxHeader('','',$helpurl);
|
||||
$sql = "SELECT count(*) as c";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."product";
|
||||
$sql.= ' WHERE entity IN ('.getEntity('product', 1).')';
|
||||
if (isset($type)) $sql.= " AND fk_product_type = ".$type;
|
||||
if ($type !== '') {
|
||||
$sql.= " AND fk_product_type = ".$type;
|
||||
}
|
||||
|
||||
$result=$db->query($sql);
|
||||
if ($result)
|
||||
@@ -82,11 +85,14 @@ if ($result)
|
||||
|
||||
$param = '';
|
||||
$title = $langs->trans("ListProductServiceByPopularity");
|
||||
if (isset($type))
|
||||
{
|
||||
if ($type !== '') {
|
||||
$param = '&type='.$type;
|
||||
$title = $langs->trans("ListProductByPopularity");
|
||||
if ($type == 1) $title = $langs->trans("ListServiceByPopularity");
|
||||
|
||||
if ($type == 1) {
|
||||
$title = $langs->trans("ListServiceByPopularity");
|
||||
} else {
|
||||
$title = $langs->trans("ListProductByPopularity");
|
||||
}
|
||||
}
|
||||
|
||||
print_barre_liste($title, $page, "popuprop.php",$param,"","","",$num);
|
||||
@@ -106,7 +112,9 @@ $sql.= " FROM ".MAIN_DB_PREFIX."propaldet as pd";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."product as p";
|
||||
$sql.= ' WHERE p.entity IN ('.getEntity('product', 1).')';
|
||||
$sql.= " AND p.rowid = pd.fk_product";
|
||||
if (isset($type)) $sql.= " AND fk_product_type = ".$type;
|
||||
if ($type !== '') {
|
||||
$sql.= " AND fk_product_type = ".$type;
|
||||
}
|
||||
$sql.= " GROUP BY (p.rowid)";
|
||||
$sql.= $db->order($sortfield,$sortorder);
|
||||
$sql.= $db->plimit($limit, $offset);
|
||||
|
||||
@@ -365,10 +365,14 @@ if (! empty($conf->global->PRODUIT_MULTIPRICES)) {
|
||||
|
||||
// Prix mini
|
||||
print '<tr><td>' . $langs->trans("MinPrice") . ' ' . $i . '</td><td>';
|
||||
if ($object->multiprices_base_type ["$i"] == 'TTC') {
|
||||
print price($object->multiprices_min_ttc ["$i"]) . ' ' . $langs->trans($object->multiprices_base_type ["$i"]);
|
||||
} else {
|
||||
print price($object->multiprices_min ["$i"]) . ' ' . $langs->trans($object->multiprices_base_type ["$i"]);
|
||||
if (empty($object->multiprices_base_type["$i"])) $object->multiprices_base_type["$i"]="HT";
|
||||
if ($object->multiprices_base_type["$i"] == 'TTC')
|
||||
{
|
||||
print price($object->multiprices_min_ttc["$i"]) . ' ' . $langs->trans($object->multiprices_base_type["$i"]);
|
||||
}
|
||||
else
|
||||
{
|
||||
print price($object->multiprices_min["$i"]) . ' ' . $langs->trans($object->multiprices_base_type["$i"]);
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -153,7 +154,7 @@ if ($id > 0 || ! empty($ref))
|
||||
print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client","","&id=".$product->id,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("DateInvoice"),$_SERVER["PHP_SELF"],"f.datef","","&id=".$product->id,'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Qty"),$_SERVER["PHP_SELF"],"d.qty","","&id=".$product->id,'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"f.total_ht","","&id=".$product->id,'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"f.total","","&id=".$product->id,'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"f.paye,f.fk_statut","","&id=".$product->id,'align="right"',$sortfield,$sortorder);
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
@@ -769,7 +769,7 @@ class Task extends CommonObject
|
||||
if ($this->db->query($sql) )
|
||||
{
|
||||
$tasktime_id = $this->db->last_insert_id(MAIN_DB_PREFIX."projet_task_time");
|
||||
$ret = $tasktme_id;
|
||||
$ret = $tasktime_id;
|
||||
|
||||
if (! $notrigger)
|
||||
{
|
||||
@@ -801,10 +801,7 @@ class Task extends CommonObject
|
||||
dol_syslog(get_class($this)."::addTimeSpent error -2 ".$this->error, LOG_ERR);
|
||||
$ret = -2;
|
||||
}
|
||||
}
|
||||
|
||||
if ($ret >= 0)
|
||||
{
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."projet_task_time";
|
||||
$sql.= " SET thm = (SELECT thm FROM ".MAIN_DB_PREFIX."user WHERE rowid = ".$this->timespent_fk_user.")";
|
||||
$sql.= " WHERE rowid = ".$tasktime_id;
|
||||
@@ -1025,7 +1022,8 @@ class Task extends CommonObject
|
||||
|
||||
$error=0;
|
||||
|
||||
$now=dol_now();
|
||||
//Use 00:00 of today if time is use on task.
|
||||
$now=dol_mktime(0,0,0,dol_print_date(dol_now(),'%m'),dol_print_date(dol_now(),'%d'),dol_print_date(dol_now(),'%Y'));
|
||||
|
||||
$datec = $now;
|
||||
|
||||
|
||||
@@ -212,7 +212,7 @@ if ($action=="addelement")
|
||||
$elementselectid = GETPOST("elementselect");
|
||||
$result=$project->update_element($tablename, $elementselectid);
|
||||
if ($result<0) {
|
||||
setEventMessage($mailchimp->error,'errors');
|
||||
setEventMessage($project->error,'errors');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -373,8 +373,10 @@ foreach ($listofreferent as $key => $value)
|
||||
}
|
||||
}
|
||||
|
||||
$langs->load('margins');
|
||||
|
||||
// Margin display of the project
|
||||
print_titre("Margin");
|
||||
print_titre($langs->trans("Margins"));
|
||||
print '<table class="noborder">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td align="left" width="200">'.$langs->trans("Element").'</td>';
|
||||
|
||||
@@ -57,7 +57,7 @@ $projectstatic = new Project($db);
|
||||
// Add new contact
|
||||
if ($action == 'addcontact' && $user->rights->projet->creer)
|
||||
{
|
||||
$result = $object->fetch($id);
|
||||
$result = $object->fetch($id, $ref);
|
||||
|
||||
if ($result > 0 && $id > 0)
|
||||
{
|
||||
@@ -87,7 +87,7 @@ if ($action == 'addcontact' && $user->rights->projet->creer)
|
||||
// bascule du statut d'un contact
|
||||
if ($action == 'swapstatut' && $user->rights->projet->creer)
|
||||
{
|
||||
if ($object->fetch($id))
|
||||
if ($object->fetch($id, $ref))
|
||||
{
|
||||
$result=$object->swapContactStatus(GETPOST('ligne'));
|
||||
}
|
||||
@@ -100,7 +100,7 @@ if ($action == 'swapstatut' && $user->rights->projet->creer)
|
||||
// Efface un contact
|
||||
if ($action == 'deleteline' && $user->rights->projet->creer)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$object->fetch($id, $ref);
|
||||
$result = $object->delete_contact($_GET["lineid"]);
|
||||
|
||||
if ($result >= 0)
|
||||
@@ -152,7 +152,7 @@ $userstatic = new User($db);
|
||||
|
||||
if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
if ($object->fetch($id) > 0)
|
||||
if ($object->fetch($id, $ref) > 0)
|
||||
{
|
||||
$result=$projectstatic->fetch($object->fk_project);
|
||||
if (! empty($projectstatic->socid)) $projectstatic->societe->fetch($projectstatic->socid);
|
||||
@@ -245,7 +245,7 @@ if ($id > 0 || ! empty($ref))
|
||||
$object->next_prev_filter=" fk_projet in (".$projectsListId.")";
|
||||
}
|
||||
else $object->next_prev_filter=" fk_projet = ".$projectstatic->id;
|
||||
print $form->showrefnav($object,'id',$linkback,1,'rowid','ref','',$param);
|
||||
print $form->showrefnav($object,'ref',$linkback,1,'ref','ref','',$param);
|
||||
print '</td></tr>';
|
||||
|
||||
// Label
|
||||
|
||||
@@ -209,7 +209,7 @@ if ($object->id > 0)
|
||||
$object->next_prev_filter=" fk_projet in (".$projectsListId.")";
|
||||
}
|
||||
else $object->next_prev_filter=" fk_projet = ".$projectstatic->id;
|
||||
print $form->showrefnav($object,'id',$linkback,1,'rowid','ref','',$param);
|
||||
print $form->showrefnav($object,'ref',$linkback,1,'ref','ref','',$param);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ print '<table class="noborder" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Project").'</td>';
|
||||
print '<td>'.$langs->trans("Status").'</td>';
|
||||
print '<td>'.$langs->trans("ProjectStatus").'</td>';
|
||||
print '<td>'.$langs->trans("RefTask").'</td>';
|
||||
print '<td>'.$langs->trans("LabelTask").'</td>';
|
||||
print '<td align="center">'.$langs->trans("DateStart").'</td>';
|
||||
|
||||
@@ -181,7 +181,7 @@ if ($object->id > 0)
|
||||
$object->next_prev_filter=" fk_projet in (".$projectsListId.")";
|
||||
}
|
||||
else $object->next_prev_filter=" fk_projet = ".$projectstatic->id;
|
||||
print $form->showrefnav($object,'id',$linkback,1,'rowid','ref','',$param);
|
||||
print $form->showrefnav($object,'ref',$linkback,1,'ref','ref','',$param);
|
||||
print '</td></tr>';
|
||||
|
||||
// Label
|
||||
|
||||
@@ -72,7 +72,7 @@ if ($action == 'addtimespent' && $user->rights->projet->creer)
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$object->fetch($id, $ref);
|
||||
|
||||
$object->timespent_note = $_POST["timespent_note"];
|
||||
$object->timespent_duration = $_POST["timespent_durationhour"]*60*60; // We store duration in seconds
|
||||
@@ -109,7 +109,7 @@ if ($action == 'updateline' && ! $_POST["cancel"] && $user->rights->projet->cree
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$object->fetch($id, $ref);
|
||||
|
||||
$object->timespent_id = $_POST["lineid"];
|
||||
$object->timespent_note = $_POST["timespent_note_line"];
|
||||
@@ -183,7 +183,7 @@ if ($id > 0 || ! empty($ref))
|
||||
/*
|
||||
* Fiche projet en mode visu
|
||||
*/
|
||||
if ($object->fetch($id) >= 0)
|
||||
if ($object->fetch($id, $ref) >= 0)
|
||||
{
|
||||
$result=$projectstatic->fetch($object->fk_project);
|
||||
if (! empty($projectstatic->socid)) $projectstatic->societe->fetch($projectstatic->socid);
|
||||
@@ -277,7 +277,7 @@ if ($id > 0 || ! empty($ref))
|
||||
$object->next_prev_filter=" fk_projet in (".$projectsListId.")";
|
||||
}
|
||||
else $object->next_prev_filter=" fk_projet = ".$projectstatic->id;
|
||||
print $form->showrefnav($object,'id',$linkback,1,'rowid','ref','',$param);
|
||||
print $form->showrefnav($object,'ref',$linkback,1,'ref','ref','',$param);
|
||||
print '</td></tr>';
|
||||
|
||||
// Label
|
||||
|
||||
@@ -1,19 +1,20 @@
|
||||
<?php
|
||||
/* Copyright (C) - 2013 Jean-François FERRY <jfefe@aternatik.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* or see http://www.gnu.org/
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file place/class/html.place.class.php
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
*/
|
||||
|
||||
// Put here all includes required by your class file
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php");
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php";
|
||||
require_once DOL_DOCUMENT_ROOT."/core/lib/functions2.lib.php";
|
||||
|
||||
/**
|
||||
* DAO Resource object
|
||||
@@ -330,12 +330,12 @@ class Resource extends CommonObject
|
||||
function delete($rowid, $notrigger=0)
|
||||
{
|
||||
global $user,$langs,$conf;
|
||||
|
||||
|
||||
$error=0;
|
||||
|
||||
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."resource";
|
||||
$sql.= " WHERE rowid =".$rowid;
|
||||
|
||||
|
||||
dol_syslog(get_class($this)."::delete sql=".$sql);
|
||||
if ($this->db->query($sql))
|
||||
{
|
||||
@@ -355,7 +355,7 @@ class Resource extends CommonObject
|
||||
}
|
||||
// End call triggers
|
||||
}
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
@@ -371,7 +371,7 @@ class Resource extends CommonObject
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Load resource objects into $this->lines
|
||||
*
|
||||
@@ -507,9 +507,9 @@ class Resource extends CommonObject
|
||||
$line->fk_user_create = $obj->fk_user_create;
|
||||
|
||||
if($obj->resource_id && $obj->resource_type)
|
||||
$line->objresource = $this->fetchObjectByElement($obj->resource_id,$obj->resource_type);
|
||||
$line->objresource = fetchObjectByElement($obj->resource_id,$obj->resource_type);
|
||||
if($obj->element_id && $obj->element_type)
|
||||
$line->objelement = $this->fetchObjectByElement($obj->element_id,$obj->element_type);
|
||||
$line->objelement = fetchObjectByElement($obj->element_id,$obj->element_type);
|
||||
$this->lines[$i] = $line;
|
||||
|
||||
$i++;
|
||||
@@ -591,7 +591,7 @@ class Resource extends CommonObject
|
||||
$line->mandatory = $obj->mandatory;
|
||||
$line->fk_user_create = $obj->fk_user_create;
|
||||
|
||||
$this->lines[$i] = $this->fetchObjectByElement($obj->resource_id,$obj->resource_type);
|
||||
$this->lines[$i] = fetchObjectByElement($obj->resource_id,$obj->resource_type);
|
||||
|
||||
$i++;
|
||||
}
|
||||
@@ -814,7 +814,7 @@ class Resource extends CommonObject
|
||||
$i=0;
|
||||
foreach($resources as $nb => $resource)
|
||||
{
|
||||
$this->lines[$i] = $this->fetchObjectByElement($resource['resource_id'],$resource['resource_type']);
|
||||
$this->lines[$i] = fetchObjectByElement($resource['resource_id'],$resource['resource_type']);
|
||||
$i++;
|
||||
}
|
||||
return $i;
|
||||
|
||||
@@ -2848,10 +2848,10 @@ class Societe extends CommonObject
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if thirdparty may using localtax or not
|
||||
* Check if we must use localtax feature or not according to country (country of $mysocin most cases).
|
||||
*
|
||||
* @param int $localTaxNum To get info for only localtax1 or localtax2
|
||||
* @return array array(0=>boolean, 1=>boolean)
|
||||
* @return boolean true or false
|
||||
*/
|
||||
function useLocalTax($localTaxNum=0)
|
||||
{
|
||||
@@ -2873,9 +2873,9 @@ class Societe extends CommonObject
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if thirdparty is from a country using revenue stamps
|
||||
* Check if we must use revenue stamps feature or not according to country (country of $mysocin most cases).
|
||||
*
|
||||
* @return boolean Yes or no
|
||||
* @return boolean true or false
|
||||
*/
|
||||
function useRevenueStamp()
|
||||
{
|
||||
|
||||
@@ -159,7 +159,7 @@ print $total;
|
||||
print '</td></tr>';
|
||||
print '</table>';
|
||||
|
||||
if (! empty($conf->categorie->enabled))
|
||||
if (! empty($conf->categorie->enabled) && ! empty($conf->global->CATEGORY_GRAPHSTATS_ON_THIRDPARTIES))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
$elementtype = 'societe';
|
||||
|
||||
@@ -2220,8 +2220,6 @@ class User extends CommonObject
|
||||
* Reconstruit l'arborescence hierarchique des users sous la forme d'un tableau
|
||||
* Renvoi un tableau de tableau('id','id_parent',...) trie selon arbre et avec:
|
||||
* id = id du user
|
||||
* id_parent = id du user parent
|
||||
* id_children = tableau des id enfant
|
||||
* name = nom du user
|
||||
* fullname = nom avec chemin complet du user
|
||||
* fullpath = chemin complet compose des id
|
||||
@@ -2306,6 +2304,29 @@ class User extends CommonObject
|
||||
return $this->users;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return list of all childs users in herarchy.
|
||||
*
|
||||
* @return array Array of user id lower than user. This overwrite this->users.
|
||||
*/
|
||||
function getAllChildIds()
|
||||
{
|
||||
// Init this->users
|
||||
$this->get_full_tree();
|
||||
|
||||
$idtoscan=$this->id;
|
||||
$childids=array();
|
||||
|
||||
dol_syslog("Build childid for id = ".$idtoscan);
|
||||
foreach($this->users as $id => $val)
|
||||
{
|
||||
//var_dump($val['fullpath']);
|
||||
if (preg_match('/_'.$idtoscan.'_/', $val['fullpath'])) $childids[$val['id']]=$val['id'];
|
||||
}
|
||||
|
||||
return $childids;
|
||||
}
|
||||
|
||||
/**
|
||||
* For user id_user and its childs available in this->users, define property fullpath and fullname
|
||||
*
|
||||
|
||||
@@ -1208,7 +1208,11 @@ else
|
||||
|
||||
// Signature
|
||||
print '<tr><td valign="top">'.$langs->trans('Signature').'</td><td>';
|
||||
print dol_htmlentitiesbr($object->signature);
|
||||
if (empty($conf->global->FCKEDITOR_ENABLE_USERSIGN)) {
|
||||
print dol_htmlentitiesbr($object->signature);
|
||||
} else {
|
||||
print $object->signature;
|
||||
}
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Hierarchy
|
||||
|
||||
@@ -655,6 +655,7 @@ function updateContact($authentication,$contact)
|
||||
$object->province_id=$contact['province_id'];
|
||||
|
||||
|
||||
$object->phone_pro=$contact['phone_pro'];
|
||||
$object->phone_perso=$contact['phone_perso'];
|
||||
$object->phone_mobile=$contact['phone_mobile'];
|
||||
$object->fax=$contact['fax'];
|
||||
|
||||
@@ -460,7 +460,7 @@ function createThirdParty($authentication,$thirdparty)
|
||||
$result=$newobject->create($fuser);
|
||||
if ($newobject->particulier && $result > 0) {
|
||||
$newobject->firstname = $thirdparty['firstname'];
|
||||
$newobject->name_bis = $thirdparty['ref'];
|
||||
$newobject->name_bis = $thirdparty['lastname'];
|
||||
$result = $newobject->create_individual($fuser);
|
||||
}
|
||||
if ($result <= 0)
|
||||
|
||||
@@ -22,7 +22,7 @@ if [ -f "$1.odt" ]
|
||||
nbprocess=$(pgrep -c soffice)
|
||||
if [ $nbprocess -ne 1 ]
|
||||
then
|
||||
soffice --invisible --accept="socket,host=127.0.0.1,port=8100;urp;" --nofirststartwizard --headless&
|
||||
soffice --invisible --accept="socket,host=127.0.0.1,port=8100;urp;" --nofirststartwizard --headless &
|
||||
retcode=$?
|
||||
if [ $retcode -ne 0 ]
|
||||
then
|
||||
|
||||
Reference in New Issue
Block a user