Merge branch '15.0' of https://github.com/Dolibarr/dolibarr into Fix_15.0_pdf_sponge_with_too_many_situation
This commit is contained in:
commit
54efa4a1af
75
ChangeLog
75
ChangeLog
@ -3,6 +3,81 @@ English Dolibarr ChangeLog
|
|||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
***** ChangeLog for 15.0.3 compared to 15.0.2 *****
|
||||||
|
|
||||||
|
FIX: 15.0: modules cannot declare more than 1 cron job using the same method with different parameters
|
||||||
|
FIX: 15 fix graph ficheinter status
|
||||||
|
FIX: #18704
|
||||||
|
FIX: #20444
|
||||||
|
FIX: #20448 missing preg_replace for vat rate when adding a free line
|
||||||
|
FIX: #20476 migration postgresql 13.0.x to 14.0.x packaging type
|
||||||
|
FIX: #20487 missing letter D in constant THIRDPARTIES_DISABLE_RELATED_…
|
||||||
|
FIX: #20487 missing letter D in constant THIRDPARTIES_DISABLE_RELATED_OBJECT_TAB
|
||||||
|
FIX: #20527 Accountancy - Unbalanced entry proposed when an employee are declared on a social contribution
|
||||||
|
FIX: #20527 Accountancy Unbalanced entry proposed when an employee are declared on social contribution
|
||||||
|
FIX: #20621 signature online with proposal with n page.
|
||||||
|
FIX: #20696
|
||||||
|
FIX: #20828
|
||||||
|
FIX: #20886 : manage durations in list_print_total.tpl.php
|
||||||
|
FIX: #20902
|
||||||
|
FIX: #21051
|
||||||
|
FIX: #21093
|
||||||
|
FIX: #21138
|
||||||
|
FIX: #21140
|
||||||
|
FIX: #21174
|
||||||
|
FIX: #21323
|
||||||
|
FIX: #21472 On the bank transfer lists, a change of page switches to the lists of the direct debit module
|
||||||
|
FIX: #21495
|
||||||
|
FIX: #21518
|
||||||
|
FIX: Accountancy - Label of VAT account is empty
|
||||||
|
FIX: Accountancy - Model account list - Problem of CSRF
|
||||||
|
FIX: Accountancy - Partitioning of the entity on an automatic binding
|
||||||
|
FIX: add missing thead, th and id on table
|
||||||
|
FIX: backport commit 5b3fcc5e43979b1b0789bf81fb8f1b2b59c93056, chkbxlst cannot be emptied
|
||||||
|
FIX: Bank account not set when creating invoice from order
|
||||||
|
FIX: Bank transfer - Link on code supplier invoice was bad
|
||||||
|
FIX: Can convert a partially closed down payment when close for
|
||||||
|
FIX: class center linkedObjectblock order date
|
||||||
|
FIX: count elements in invoice list (Issue #21444)
|
||||||
|
FIX: Customer price non numeric warning when 0 vat.
|
||||||
|
FIX: errors in getLinesArray()
|
||||||
|
FIX: False alert of WAF when there is "set" into some URL action=update.
|
||||||
|
FIX: Intervention graph by status on ficheinter Index page
|
||||||
|
FIX: Intervention url link into Commerce index
|
||||||
|
FIX: Fix get origin from other than supplier proposal when add a new supplier proposal
|
||||||
|
FIX: Fix show errors in card
|
||||||
|
FIX: fourn/commande/card.php Added "$object" parameter to $formfile->showdocuments call
|
||||||
|
FIX: french traductions for payment methods
|
||||||
|
FIX: hook for dol_format_address
|
||||||
|
FIX: Index page for "Sales" give wrong URL link to Intervention
|
||||||
|
FIX: issue Dolibarr#21495 for v15
|
||||||
|
FIX: label and get_substitutionarray_each_var_object on ODT generation
|
||||||
|
FIX: load product stock in inventory lines
|
||||||
|
FIX: missing morecss for multiselectarray
|
||||||
|
FIX: missins time spent list menu
|
||||||
|
FIX: new member subscription: bank account and payment mode might be hidden
|
||||||
|
FIX: ODT generation of BOM document
|
||||||
|
FIX: ODT tags for subobjects {object_subobject_yyy} was not working.
|
||||||
|
FIX: qty received label in Squille PDF model
|
||||||
|
FIX: rank duplicate on mass action invoice from multiple orders
|
||||||
|
FIX: regression + add $forceentity parameter
|
||||||
|
FIX: regression PR #20713
|
||||||
|
FIX: security breach if we have same ref number in multiple entities
|
||||||
|
FIX: selection of type of invoice
|
||||||
|
FIX: Send remind to pay invoice only on validated invoices
|
||||||
|
FIX: Show sellist type of extrafield when none category selected
|
||||||
|
FIX: signature online with proposal with n page.
|
||||||
|
FIX: sql error when PRODUCT_USE_SUPPLIER_PACKAGING enabled.
|
||||||
|
FIX: sql order
|
||||||
|
FIX: trash icon on crontask list to do not work
|
||||||
|
FIX: v15 linked object block center order date
|
||||||
|
FIX: Warning on attribut
|
||||||
|
FIX: We must remove empty values of $features array in fetchByProductCombination2ValuePairs() because some products can use only several attributes in their variations and not necessarily all. In this case, fetch doesn't work without my correction
|
||||||
|
FIX: with callback function
|
||||||
|
FIX: xml file for company with special chars in name
|
||||||
|
FIX: Zatca QR code must use company name/vat
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 15.0.2 compared to 15.0.1 *****
|
***** ChangeLog for 15.0.2 compared to 15.0.1 *****
|
||||||
|
|
||||||
FIX: #19777 #20281
|
FIX: #19777 #20281
|
||||||
|
|||||||
24
build/README
24
build/README
@ -13,32 +13,12 @@ It is here only to build Dolibarr packages, and those generated packages will no
|
|||||||
|
|
||||||
There are several tools:
|
There are several tools:
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
- To build full Dolibarr packages, launch the script
|
- To build full Dolibarr packages, launch the script
|
||||||
> Launch command perl makepack-dolibarr.pl
|
> Launch command perl makepack-dolibarr.pl
|
||||||
|
|
||||||
--------------------------------------------------------------------------------------------------
|
See makepack-howto.txt for prerequisites.
|
||||||
|
|
||||||
|
|
||||||
Prerequisites to build tgz, debian and rpm packages:
|
|
||||||
> apt-get install tar dpkg dpatch p7zip-full rpm zip
|
|
||||||
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Prerequisites to build autoexe DoliWamp package:
|
|
||||||
> apt-get install wine q4wine
|
|
||||||
> Launch "wine cmd" to check a drive Z: pointing to / exists.
|
|
||||||
> Install InnoSetup
|
|
||||||
For example by running isetup-5.5.8.exe (https://www.jrsoftware.org) https://files.jrsoftware.org/is/5/
|
|
||||||
> Install WampServer into "C:\wamp64" to have Apache, PHP and MariaDB
|
|
||||||
For example by running wampserver3.2.0_x64.exe (https://www.wampserver.com).
|
|
||||||
See file build/exe/doliwamp.iss to know the doliwamp version currently setup.
|
|
||||||
> Add path to ISCC into PATH windows var:
|
|
||||||
Launch wine cmd, then regedit and add entry int HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment\PATH
|
|
||||||
> To build manually the .exe from Windows (running from makepack-dolibarr.pl script is however recommanded),
|
|
||||||
open file build/exe/doliwamp.iss and click on button "Compile".
|
|
||||||
The .exe file will be build into directory build.
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
2
build/exe/doliwamp/.gitignore
vendored
2
build/exe/doliwamp/.gitignore
vendored
@ -1 +1 @@
|
|||||||
/doliwamp.tmp.iss
|
/doliwamp.tmp.iss*
|
||||||
|
|||||||
@ -24,15 +24,14 @@ OutputBaseFilename=__FILENAMEEXEDOLIWAMP__
|
|||||||
;OutputManifestFile=build\doliwampbuild.log
|
;OutputManifestFile=build\doliwampbuild.log
|
||||||
; Define full path from which all relative path are defined
|
; Define full path from which all relative path are defined
|
||||||
; You must modify this to put here your dolibarr root directory
|
; You must modify this to put here your dolibarr root directory
|
||||||
;SourceDir=Z:\home\ldestailleur\git\dolibarrxxx
|
|
||||||
SourceDir=..\..\..
|
SourceDir=..\..\..
|
||||||
AppId=doliwamp
|
AppId=doliwamp
|
||||||
AppPublisher=NLTechno
|
AppPublisher=DoliCloud
|
||||||
AppPublisherURL=https://www.nltechno.com
|
AppPublisherURL=https://www.dolicloud.com
|
||||||
AppSupportURL=https://www.dolibarr.org
|
AppSupportURL=https://www.dolibarr.org
|
||||||
AppUpdatesURL=https://www.dolibarr.org
|
AppUpdatesURL=https://www.dolibarr.org
|
||||||
AppComments=DoliWamp includes Dolibarr, Apache, PHP and Mysql software.
|
AppComments=DoliWamp includes Dolibarr, Apache, PHP and Mysql software.
|
||||||
AppCopyright=Copyright (C) 2008-2020 Laurent Destailleur (NLTechno), Fabian Rodriguez (Le Goût du Libre)
|
AppCopyright=Copyright (C) 2008-2022 Laurent Destailleur (DoliCloud), Fabian Rodriguez (Le Goût du Libre)
|
||||||
DefaultDirName=c:\dolibarr
|
DefaultDirName=c:\dolibarr
|
||||||
DefaultGroupName=Dolibarr
|
DefaultGroupName=Dolibarr
|
||||||
;LicenseFile=COPYING
|
;LicenseFile=COPYING
|
||||||
@ -81,7 +80,7 @@ Name: "desktopicon"; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:
|
|||||||
Name: "{app}\logs"
|
Name: "{app}\logs"
|
||||||
Name: "{app}\tmp"
|
Name: "{app}\tmp"
|
||||||
Name: "{app}\dolibarr_documents"
|
Name: "{app}\dolibarr_documents"
|
||||||
Name: "{app}\bin\apache\apache2.4.41\logs"
|
Name: "{app}\bin\apache\apache2.4.51\logs"
|
||||||
|
|
||||||
[Files]
|
[Files]
|
||||||
; Stop/start
|
; Stop/start
|
||||||
@ -101,17 +100,12 @@ Source: "build\exe\doliwamp\UsedPort.exe"; DestDir: "{app}\"; Flags: ignoreversi
|
|||||||
|
|
||||||
; PhpMyAdmin, Apache, Php, Mysql
|
; PhpMyAdmin, Apache, Php, Mysql
|
||||||
; Put here path of Wampserver applications
|
; Put here path of Wampserver applications
|
||||||
; Value OK: apache 2.2.6, php 5.2.5 (5.2.11, 5.3.0 and 5.3.1 fails if php_exif, php_pgsql, php_zip is on), mysql 5.0.45
|
|
||||||
; Value OK: apache 2.2.11, php 5.3.0 (if no php_exif, php_pgsql, php_zip), mysql 5.0.45
|
|
||||||
; Value OK: apache 2.4.9, php 5.5.12, mysql 5.0.45 instead of 5.6.17 (wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-32b.exe)
|
|
||||||
; Value OK: apache 2.4.41, php 7.3.12, mariadb10.4.10 (wampserver3.2.0_x64.exe)
|
; Value OK: apache 2.4.41, php 7.3.12, mariadb10.4.10 (wampserver3.2.0_x64.exe)
|
||||||
Source: "C:\wamp64\apps\phpmyadmin4.9.2\*.*"; DestDir: "{app}\apps\phpmyadmin4.9.2"; Flags: ignoreversion recursesubdirs; Excludes: "config.inc.php,wampserver.conf,*.log,*_log,darkblue_orange"
|
; Value OK: apache 2.4.51, php 7.3.33, mariadb10.6.5 (wampserver3.2.6_x64.exe)
|
||||||
;Source: "C:\Program Files\Wamp\bin\apache\apache2.4.9\*.*"; DestDir: "{app}\bin\apache\apache2.4.9"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,httpd.conf,wampserver.conf,*.log,*_log"
|
Source: "C:\wamp64\apps\phpmyadmin4.9.7\*.*"; DestDir: "{app}\apps\phpmyadmin4.9.7"; Flags: ignoreversion recursesubdirs; Excludes: "config.inc.php,wampserver.conf,*.log,*_log,darkblue_orange"
|
||||||
Source: "C:\wamp64\bin\apache\apache2.4.41\*.*"; DestDir: "{app}\bin\apache\apache2.4.41"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,httpd.conf,wampserver.conf,*.log,*_log"
|
Source: "C:\wamp64\bin\apache\apache2.4.51\*.*"; DestDir: "{app}\bin\apache\apache2.4.51"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,httpd.conf,wampserver.conf,*.log,*_log"
|
||||||
;Source: "C:\Program Files\Wamp\bin\php\php5.5.12\*.*"; DestDir: "{app}\bin\php\php5.5.12"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,phpForApache.ini,wampserver.conf,*.log,*_log"
|
Source: "C:\wamp64\bin\php\php7.3.33\*.*"; DestDir: "{app}\bin\php\php7.3.33"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,phpForApache.ini,wampserver.conf,*.log,*_log"
|
||||||
Source: "C:\wamp64\bin\php\php7.3.12\*.*"; DestDir: "{app}\bin\php\php7.3.12"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,phpForApache.ini,wampserver.conf,*.log,*_log"
|
Source: "C:\wamp64\bin\mariadb\mariadb10.6.5\*.*"; DestDir: "{app}\bin\mariadb\mariadb10.6.5"; Flags: ignoreversion recursesubdirs; Excludes: "my.ini,data\*,wampserver.conf,*.log,*_log,MySQLInstanceConfig.exe"
|
||||||
;Source: "C:\Program Files\Wamp\bin\mysql\mysql5.0.45\*.*"; DestDir: "{app}\bin\mysql\mysql5.0.45"; Flags: ignoreversion recursesubdirs; Excludes: "my.ini,data\*,wampserver.conf,*.log,*_log,MySQLInstanceConfig.exe"
|
|
||||||
Source: "C:\wamp64\bin\mariadb\mariadb10.4.10\*.*"; DestDir: "{app}\bin\mariadb\mariadb10.4.10"; Flags: ignoreversion recursesubdirs; Excludes: "my.ini,data\*,wampserver.conf,*.log,*_log,MySQLInstanceConfig.exe"
|
|
||||||
|
|
||||||
; Mysql data files (does not overwrite if exists)
|
; Mysql data files (does not overwrite if exists)
|
||||||
; We must copy them because the tool mysql_install_db.exe to generate them at first install does not return to prompt so make install hang
|
; We must copy them because the tool mysql_install_db.exe to generate them at first install does not return to prompt so make install hang
|
||||||
@ -128,12 +122,10 @@ Source: "*.*"; DestDir: "{app}\www\dolibarr"; Flags: ignoreversion; Excludes: ".
|
|||||||
Source: "build\exe\doliwamp\phpmyadmin.conf.install"; DestDir: "{app}\alias"; Flags: ignoreversion;
|
Source: "build\exe\doliwamp\phpmyadmin.conf.install"; DestDir: "{app}\alias"; Flags: ignoreversion;
|
||||||
Source: "build\exe\doliwamp\dolibarr.conf.install"; DestDir: "{app}\alias"; Flags: ignoreversion;
|
Source: "build\exe\doliwamp\dolibarr.conf.install"; DestDir: "{app}\alias"; Flags: ignoreversion;
|
||||||
Source: "build\exe\doliwamp\config.inc.php.install"; DestDir: "{app}\apps\phpmyadmin4.1.14"; Flags: ignoreversion;
|
Source: "build\exe\doliwamp\config.inc.php.install"; DestDir: "{app}\apps\phpmyadmin4.1.14"; Flags: ignoreversion;
|
||||||
;Source: "build\exe\doliwamp\httpd.conf.install"; DestDir: "{app}\bin\apache\apache2.4.9\conf"; Flags: ignoreversion;
|
Source: "build\exe\doliwamp\httpd.conf.install"; DestDir: "{app}\bin\apache\apache2.4.51\conf"; Flags: ignoreversion;
|
||||||
Source: "build\exe\doliwamp\httpd.conf.install"; DestDir: "{app}\bin\apache\apache2.4.41\conf"; Flags: ignoreversion;
|
|
||||||
Source: "build\exe\doliwamp\my.ini.install"; DestDir: "{app}\bin\mysql\mysql5.0.45"; Flags: ignoreversion;
|
Source: "build\exe\doliwamp\my.ini.install"; DestDir: "{app}\bin\mysql\mysql5.0.45"; Flags: ignoreversion;
|
||||||
Source: "build\exe\doliwamp\my.ini.install"; DestDir: "{app}\bin\mariadb\mariadb10.4.10"; Flags: ignoreversion;
|
Source: "build\exe\doliwamp\my.ini.install"; DestDir: "{app}\bin\mariadb\mariadb10.6.5"; Flags: ignoreversion;
|
||||||
;Source: "build\exe\doliwamp\php.ini.install"; DestDir: "{app}\bin\php\php5.5.12"; Flags: ignoreversion;
|
Source: "build\exe\doliwamp\php.ini.install"; DestDir: "{app}\bin\php\php7.3.33"; Flags: ignoreversion;
|
||||||
Source: "build\exe\doliwamp\php.ini.install"; DestDir: "{app}\bin\php\php7.3.12"; Flags: ignoreversion;
|
|
||||||
Source: "build\exe\doliwamp\index.php.install"; DestDir: "{app}\www"; Flags: ignoreversion;
|
Source: "build\exe\doliwamp\index.php.install"; DestDir: "{app}\www"; Flags: ignoreversion;
|
||||||
Source: "build\exe\doliwamp\install.forced.php.install"; DestDir: "{app}\www\dolibarr\htdocs\install"; Flags: ignoreversion;
|
Source: "build\exe\doliwamp\install.forced.php.install"; DestDir: "{app}\www\dolibarr\htdocs\install"; Flags: ignoreversion;
|
||||||
Source: "build\exe\doliwamp\openssl.conf"; DestDir: "{app}"; Flags: ignoreversion;
|
Source: "build\exe\doliwamp\openssl.conf"; DestDir: "{app}"; Flags: ignoreversion;
|
||||||
@ -240,13 +232,10 @@ procedure InitializeWizard();
|
|||||||
begin
|
begin
|
||||||
|
|
||||||
//version des applis, a modifier pour chaque version de WampServer 2
|
//version des applis, a modifier pour chaque version de WampServer 2
|
||||||
//apacheVersion := '2.4.9';
|
apacheVersion := '2.4.51';
|
||||||
//phpVersion := '5.5.12' ;
|
phpVersion := '7.3.33' ;
|
||||||
apacheVersion := '2.4.41';
|
mysqlVersion := '10.6.5';
|
||||||
phpVersion := '7.3.12' ;
|
phpmyadminVersion := '4.9.7';
|
||||||
//mysqlVersion := '5.0.45';
|
|
||||||
mysqlVersion := '10.4.10';
|
|
||||||
phpmyadminVersion := '4.1.14';
|
|
||||||
|
|
||||||
smtpServer := 'localhost';
|
smtpServer := 'localhost';
|
||||||
apachePort := '80';
|
apachePort := '80';
|
||||||
@ -380,9 +369,9 @@ begin
|
|||||||
|
|
||||||
|
|
||||||
// Migration of database
|
// Migration of database
|
||||||
// datadir := pathWithSlashes+'/bin/mariadb/marradb10.4.10/data';
|
// datadir := pathWithSlashes+'/bin/mariadb/mariadb10.6.5/data';
|
||||||
// exedirold := pathWithSlashes+'/bin/mariadb/marradb10.4.10/';
|
// exedirold := pathWithSlashes+'/bin/mariadb/mariadb10.6.5/';
|
||||||
// exedirnew := pathWithSlashes+'/bin/mariadb/marradb10.4.10/';
|
// exedirnew := pathWithSlashes+'/bin/mariadb/mariadb10.6.5/';
|
||||||
|
|
||||||
// If we have a new database version, we should only copy old my.ini file into new directory
|
// If we have a new database version, we should only copy old my.ini file into new directory
|
||||||
// and change only all basedir= strings to use new version. Like this, data dir is still correct.
|
// and change only all basedir= strings to use new version. Like this, data dir is still correct.
|
||||||
@ -1082,7 +1071,7 @@ Filename: "{app}\rundoliwamp.bat"; Description: {cm:LaunchNow}; Flags: shellexec
|
|||||||
|
|
||||||
[UninstallDelete]
|
[UninstallDelete]
|
||||||
Type: files; Name: "{app}\*.*"
|
Type: files; Name: "{app}\*.*"
|
||||||
Type: files; Name: "{app}\bin\mariadb\mariadb10.4.10\*.*"
|
Type: files; Name: "{app}\bin\mariadb\mariadb10.6.5\*.*"
|
||||||
Type: filesandordirs; Name: "{app}\alias"
|
Type: filesandordirs; Name: "{app}\alias"
|
||||||
Type: filesandordirs; Name: "{app}\apps"
|
Type: filesandordirs; Name: "{app}\apps"
|
||||||
Type: filesandordirs; Name: "{app}\bin\apache"
|
Type: filesandordirs; Name: "{app}\bin\apache"
|
||||||
|
|||||||
@ -65,7 +65,7 @@ $DIR||='.'; $DIR =~ s/([^\/\\])[\\\/]+$/$1/;
|
|||||||
|
|
||||||
$SOURCE="$DIR/..";
|
$SOURCE="$DIR/..";
|
||||||
$DESTI="$SOURCE/build";
|
$DESTI="$SOURCE/build";
|
||||||
if ($SOURCE !~ /^\//)
|
if ($SOURCE !~ /^\// && $SOURCE !~ /^[a-z]:/i)
|
||||||
{
|
{
|
||||||
print "Error: Launch the script $PROG.$Extension with its full path from /.\n";
|
print "Error: Launch the script $PROG.$Extension with its full path from /.\n";
|
||||||
print "$PROG.$Extension aborted.\n";
|
print "$PROG.$Extension aborted.\n";
|
||||||
@ -76,15 +76,23 @@ if (! $ENV{"DESTIBETARC"} || ! $ENV{"DESTISTABLE"})
|
|||||||
{
|
{
|
||||||
print "Error: Missing environment variables.\n";
|
print "Error: Missing environment variables.\n";
|
||||||
print "You must define the environment variable DESTIBETARC and DESTISTABLE to point to the\ndirectories where you want to save the generated packages.\n";
|
print "You must define the environment variable DESTIBETARC and DESTISTABLE to point to the\ndirectories where you want to save the generated packages.\n";
|
||||||
|
print "$PROG.$Extension aborted.\n";
|
||||||
|
print "\n";
|
||||||
|
print "You can set them with\n";
|
||||||
|
print "On Linux:\n";
|
||||||
|
print "export DESTIBETARC='/tmp'; export DESTISTABLE='/tmp';\n";
|
||||||
|
print "On Windows:\n";
|
||||||
|
print "set DESTIBETARC=c:/tmp\n";
|
||||||
|
print "set DESTISTABLE=c:/tmp\n";
|
||||||
|
print "\n";
|
||||||
print "Example: DESTIBETARC='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/lastbuild'\n";
|
print "Example: DESTIBETARC='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/lastbuild'\n";
|
||||||
print "Example: DESTISTABLE='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/stable'\n";
|
print "Example: DESTISTABLE='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/stable'\n";
|
||||||
print "$PROG.$Extension aborted.\n";
|
|
||||||
sleep 2;
|
sleep 2;
|
||||||
exit 1;
|
exit 1;
|
||||||
}
|
}
|
||||||
if (! -d $ENV{"DESTIBETARC"} || ! -d $ENV{"DESTISTABLE"})
|
if (! -d $ENV{"DESTIBETARC"} || ! -d $ENV{"DESTISTABLE"})
|
||||||
{
|
{
|
||||||
print "Error: Directory of environment variable DESTIBETARC or DESTISTABLE does not exist.\n";
|
print "Error: Directory of environment variable DESTIBETARC ($ENV{'DESTIBETARC'}) or DESTISTABLE ($ENV{'DESTISTABLE'}) does not exist.\n";
|
||||||
print "$PROG.$Extension aborted.\n";
|
print "$PROG.$Extension aborted.\n";
|
||||||
sleep 2;
|
sleep 2;
|
||||||
exit 1;
|
exit 1;
|
||||||
@ -94,7 +102,7 @@ if (! -d $ENV{"DESTIBETARC"} || ! -d $ENV{"DESTISTABLE"})
|
|||||||
# --------------
|
# --------------
|
||||||
if ("$^O" =~ /linux/i || (-d "/etc" && -d "/var" && "$^O" !~ /cygwin/i)) { $OS='linux'; $CR=''; }
|
if ("$^O" =~ /linux/i || (-d "/etc" && -d "/var" && "$^O" !~ /cygwin/i)) { $OS='linux'; $CR=''; }
|
||||||
elsif (-d "/etc" && -d "/Users") { $OS='macosx'; $CR=''; }
|
elsif (-d "/etc" && -d "/Users") { $OS='macosx'; $CR=''; }
|
||||||
elsif ("$^O" =~ /cygwin/i || "$^O" =~ /win32/i) { $OS='windows'; $CR="\r"; }
|
elsif ("$^O" =~ /cygwin/i || "$^O" =~ /win32/i || "$^O" =~ /msys/i) { $OS='windows'; $CR="\r"; }
|
||||||
if (! $OS) {
|
if (! $OS) {
|
||||||
print "Error: Can't detect your OS.\n";
|
print "Error: Can't detect your OS.\n";
|
||||||
print "Can't continue.\n";
|
print "Can't continue.\n";
|
||||||
@ -390,7 +398,7 @@ if ($nboftargetok) {
|
|||||||
$olddir=getcwd();
|
$olddir=getcwd();
|
||||||
chdir("$SOURCE");
|
chdir("$SOURCE");
|
||||||
|
|
||||||
print "Clean $SOURCE/htdocs\n";
|
print "Clean $SOURCE/htdocs/includes/autoload.php\n";
|
||||||
$ret=`rm -f $SOURCE/htdocs/includes/autoload.php`;
|
$ret=`rm -f $SOURCE/htdocs/includes/autoload.php`;
|
||||||
|
|
||||||
$ret=`git ls-files . --exclude-standard --others`;
|
$ret=`git ls-files . --exclude-standard --others`;
|
||||||
@ -1076,28 +1084,52 @@ if ($nboftargetok) {
|
|||||||
print "Remove target $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe...\n";
|
print "Remove target $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe...\n";
|
||||||
unlink "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe";
|
unlink "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe";
|
||||||
|
|
||||||
print "Check that in your Wine setup, you have created a Z: drive that point to your / directory.\n";
|
if ($OS eq 'windows') {
|
||||||
|
print "Check that ISCC.exe is in your PATH.\n";
|
||||||
|
} else {
|
||||||
|
print "Check that in your Wine setup, you have created a Z: drive that point to your / directory.\n";
|
||||||
|
}
|
||||||
|
|
||||||
$SOURCEBACK=$SOURCE;
|
$SOURCEBACK=$SOURCE;
|
||||||
$SOURCEBACK =~ s/\//\\/g;
|
$SOURCEBACK =~ s/\//\\/g;
|
||||||
|
|
||||||
print "Prepare file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss from \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.iss\"\n";
|
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";
|
#$ret=`cat "$SOURCE/build/exe/doliwamp/doliwamp.iss" | sed -e 's/__FILENAMEEXEDOLIWAMP__/$FILENAMEEXEDOLIWAMP/g' > "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`;
|
||||||
$cmd= "wine ISCC.exe \"Z:$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\"";
|
open(IN, '<' . $SOURCE."/build/exe/doliwamp/doliwamp.iss") or die $!;
|
||||||
|
open(OUT, '>' . "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss") or die $!;
|
||||||
|
while(<IN>)
|
||||||
|
{
|
||||||
|
$_ =~ s/__FILENAMEEXEDOLIWAMP__/$FILENAMEEXEDOLIWAMP/g;
|
||||||
|
print OUT $_;
|
||||||
|
}
|
||||||
|
close(IN);
|
||||||
|
close(OUT);
|
||||||
|
|
||||||
|
print "Compil exe $FILENAMEEXEDOLIWAMP.exe file from iss file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\" on OS $OS\n";
|
||||||
|
|
||||||
|
if ($OS eq 'windows') {
|
||||||
|
$cmd= "ISCC.exe \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\"";
|
||||||
|
} else {
|
||||||
|
#$cmd= "wine ISCC.exe \"Z:$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\"";
|
||||||
|
}
|
||||||
print "$cmd\n";
|
print "$cmd\n";
|
||||||
$ret= `$cmd`;
|
$ret= `$cmd`;
|
||||||
#print "$ret\n";
|
print "ret=$ret\n";
|
||||||
|
|
||||||
# Move to final dir
|
# Move to final dir
|
||||||
print "Move \"$SOURCE\\build\\$FILENAMEEXEDOLIWAMP.exe\" to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n";
|
print "Move \"$SOURCE\\build\\$FILENAMEEXEDOLIWAMP.exe\" to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n";
|
||||||
rename("$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe","$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe");
|
rename("$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe","$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe");
|
||||||
print "Move $SOURCE/build/$FILENAMEEXEDOLIWAMP.exe to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n";
|
print "Move $SOURCE/build/$FILENAMEEXEDOLIWAMP.exe to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n";
|
||||||
$ret=`mv "$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe" "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"`;
|
|
||||||
|
use File::Copy;
|
||||||
|
|
||||||
|
#$ret=`mv "$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe" "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"`;
|
||||||
|
$ret=move("$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe", "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe");
|
||||||
|
|
||||||
print "Remove tmp file $SOURCE/build/exe/doliwamp/doliwamp.tmp.iss\n";
|
print "Remove tmp file $SOURCE/build/exe/doliwamp/doliwamp.tmp.iss\n";
|
||||||
$ret=`rm "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`;
|
#$ret=`rm "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`;
|
||||||
|
$ret=unlink("$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss");
|
||||||
|
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,34 @@
|
|||||||
----- Dolibarr Makepack How To -----
|
----- Dolibarr Makepack How To -----
|
||||||
This documentation describe steps to build a BETA or RELEASE versions
|
This documentation describe steps to build a BETA or RELEASE versions
|
||||||
of Dolibarr. There is a chapter for BETA version and a chapter for
|
of Dolibarr. There is a chapter for BETA version and a chapter for RELEASE version.
|
||||||
RELEASE version.
|
|
||||||
|
|
||||||
|
***** Prerequisites For Linux *****
|
||||||
|
|
||||||
|
Prerequisites to build tgz, debian and rpm packages:
|
||||||
|
> apt-get install perl tar dpkg dpatch p7zip-full rpm zip php-cli
|
||||||
|
|
||||||
|
Prerequisites to build autoexe DoliWamp package:
|
||||||
|
> apt-get install wine q4wine
|
||||||
|
> Launch "wine cmd" to check a drive Z: pointing to / exists.
|
||||||
|
> Install InnoSetup
|
||||||
|
For example by running isetup-5.5.8.exe (https://www.jrsoftware.org) https://files.jrsoftware.org/is/5/
|
||||||
|
> Install WampServer into "C:\wamp64" to have Apache, PHP and MariaDB
|
||||||
|
For example by running wampserver3.2.0_x64.exe (https://www.wampserver.com).
|
||||||
|
See file build/exe/doliwamp.iss to know the doliwamp version currently setup.
|
||||||
|
> Add path to ISCC into PATH windows var:
|
||||||
|
Launch wine cmd, then regedit and add entry int HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment\PATH
|
||||||
|
> To build manually the .exe from Windows (running from makepack-dolibarr.pl script is however recommanded),
|
||||||
|
open file build/exe/doliwamp.iss and click on button "Compile".
|
||||||
|
The .exe file will be build into directory build.
|
||||||
|
|
||||||
|
|
||||||
|
***** Prerequisites For Windows *****
|
||||||
|
|
||||||
|
Install Perl
|
||||||
|
Install WampServer-3.2.*-64.exe
|
||||||
|
isetup-5.5.8.exe
|
||||||
|
|
||||||
|
|
||||||
***** Actions to do a BETA *****
|
***** Actions to do a BETA *****
|
||||||
This files describe steps made by Dolibarr packaging team to make a
|
This files describe steps made by Dolibarr packaging team to make a
|
||||||
|
|||||||
@ -54,7 +54,7 @@ BuildRequires: desktop-file-utils
|
|||||||
Group: Applications/Productivity
|
Group: Applications/Productivity
|
||||||
Requires: apache-base, apache-mod_php, php-cgi, php-cli, php-bz2, php-gd, php-ldap, php-imap, php-mysqli, php-openssl, fonts-ttf-dejavu
|
Requires: apache-base, apache-mod_php, php-cgi, php-cli, php-bz2, php-gd, php-ldap, php-imap, php-mysqli, php-openssl, fonts-ttf-dejavu
|
||||||
Requires: mysql, mysql-client
|
Requires: mysql, mysql-client
|
||||||
%else%_datadir/dolibarr/htdocs/datapolicy
|
%else
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
# Voir http://en.opensuse.org/openSUSE:Packaging_Conventions_RPM_Macros
|
# Voir http://en.opensuse.org/openSUSE:Packaging_Conventions_RPM_Macros
|
||||||
Group: Productivity/Office/Management
|
Group: Productivity/Office/Management
|
||||||
@ -67,7 +67,7 @@ Requires: httpd, php >= 5.3.0, php-cli, php-gd, php-ldap, php-imap, php-mbstring
|
|||||||
Requires: mysql-server, mysql
|
Requires: mysql-server, mysql
|
||||||
Requires: php-mysqli >= 4.1.0
|
Requires: php-mysqli >= 4.1.0
|
||||||
%endif
|
%endif
|
||||||
%endif%_datadir/dolibarr/htdocs/eventorganization
|
%endif
|
||||||
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -125,7 +125,7 @@ cui hai bisogno ed essere facile da usare.
|
|||||||
|
|
||||||
%if 0%{?sles_version}
|
%if 0%{?sles_version}
|
||||||
%{__rm} -rf $RPM_BUILD_ROOT
|
%{__rm} -rf $RPM_BUILD_ROOT
|
||||||
%{__mkdir} $RPM_BUILD_ROOT%_datadir/dolibarr/htdocs/datapolicy
|
%{__mkdir} $RPM_BUILD_ROOT%
|
||||||
%{__mkdir} $RPM_BUILD_ROOT%{_sysconfdir}
|
%{__mkdir} $RPM_BUILD_ROOT%{_sysconfdir}
|
||||||
%{__mkdir} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
|
%{__mkdir} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
|
||||||
%else
|
%else
|
||||||
|
|||||||
@ -679,7 +679,7 @@ if ($id) {
|
|||||||
// Can an entry be erased or disabled ?
|
// Can an entry be erased or disabled ?
|
||||||
$iserasable = 1; $canbedisabled = 1; $canbemodified = 1; // true by default
|
$iserasable = 1; $canbedisabled = 1; $canbemodified = 1; // true by default
|
||||||
|
|
||||||
$url = $_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(!empty($obj->rowid) ? $obj->rowid : (!empty($obj->code) ? $obj->code : '')).'&code='.(!empty($obj->code) ?urlencode($obj->code) : '');
|
$url = $_SERVER["PHP_SELF"].'?token='.newToken().($page ? '&page='.$page : '').'&sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(!empty($obj->rowid) ? $obj->rowid : (!empty($obj->code) ? $obj->code : '')).'&code='.(!empty($obj->code) ?urlencode($obj->code) : '');
|
||||||
if ($param) {
|
if ($param) {
|
||||||
$url .= '&'.$param;
|
$url .= '&'.$param;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -328,7 +328,7 @@ if ($action == 'writebookkeeping') {
|
|||||||
|
|
||||||
foreach ($arrayofvat[$key] as $k => $mt) {
|
foreach ($arrayofvat[$key] as $k => $mt) {
|
||||||
if ($mt) {
|
if ($mt) {
|
||||||
$accountingaccount->fetch($k, null, true); // TODO Use a cache for label
|
$accountingaccount->fetch(null, $k, true); // TODO Use a cache for label
|
||||||
$account_label = $accountingaccount->label;
|
$account_label = $accountingaccount->label;
|
||||||
|
|
||||||
// get compte id and label
|
// get compte id and label
|
||||||
|
|||||||
@ -451,7 +451,7 @@ if ($action == 'writebookkeeping') {
|
|||||||
|
|
||||||
foreach ($arrayofvat[$key] as $k => $mt) {
|
foreach ($arrayofvat[$key] as $k => $mt) {
|
||||||
if ($mt) {
|
if ($mt) {
|
||||||
$accountingaccount->fetch($k, null, true); // TODO Use a cache for label
|
$accountingaccount->fetch(null, $k, true); // TODO Use a cache for label
|
||||||
$label_account = $accountingaccount->label;
|
$label_account = $accountingaccount->label;
|
||||||
|
|
||||||
$bookkeeping = new BookKeeping($db);
|
$bookkeeping = new BookKeeping($db);
|
||||||
|
|||||||
@ -463,7 +463,7 @@ if ($action == 'writebookkeeping') {
|
|||||||
|
|
||||||
foreach ($arrayofvat[$key] as $k => $mt) {
|
foreach ($arrayofvat[$key] as $k => $mt) {
|
||||||
if ($mt) {
|
if ($mt) {
|
||||||
$accountingaccount->fetch($k, null, true); // TODO Use a cache for label
|
$accountingaccount->fetch(null, $k, true); // TODO Use a cache for label
|
||||||
$label_account = $accountingaccount->label;
|
$label_account = $accountingaccount->label;
|
||||||
|
|
||||||
$bookkeeping = new BookKeeping($db);
|
$bookkeeping = new BookKeeping($db);
|
||||||
|
|||||||
@ -2065,8 +2065,8 @@ class ActionComm extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($conf->global->AGENDA_EXPORT_FIX_TZ)) {
|
if (!empty($conf->global->AGENDA_EXPORT_FIX_TZ)) {
|
||||||
$timestampStart = - ($conf->global->AGENDA_EXPORT_FIX_TZ * 3600);
|
$timestampStart = $timestampStart - ($conf->global->AGENDA_EXPORT_FIX_TZ * 3600);
|
||||||
$timestampEnd = - ($conf->global->AGENDA_EXPORT_FIX_TZ * 3600);
|
$timestampEnd = $timestampEnd - ($conf->global->AGENDA_EXPORT_FIX_TZ * 3600);
|
||||||
}
|
}
|
||||||
|
|
||||||
$urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root));
|
$urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root));
|
||||||
|
|||||||
@ -109,7 +109,7 @@ $month = GETPOST("month", "int") ?GETPOST("month", "int") : date("m");
|
|||||||
$week = GETPOST("week", "int") ?GETPOST("week", "int") : date("W");
|
$week = GETPOST("week", "int") ?GETPOST("week", "int") : date("W");
|
||||||
$day = GETPOST("day", "int") ?GETPOST("day", "int") : date("d");
|
$day = GETPOST("day", "int") ?GETPOST("day", "int") : date("d");
|
||||||
$pid = GETPOST("search_projectid", "int", 3) ? GETPOST("search_projectid", "int", 3) : GETPOST("projectid", "int", 3);
|
$pid = GETPOST("search_projectid", "int", 3) ? GETPOST("search_projectid", "int", 3) : GETPOST("projectid", "int", 3);
|
||||||
$status = GETPOSTISSET("search_status") ? GETPOST("search_status", 'aZ09') : GETPOST("status", 'aZ09'); // status may be 0, 50, 100, 'todo'
|
$status = GETPOSTISSET("search_status") ? GETPOST("search_status", 'aZ09') : GETPOST("status", 'aZ09'); // status may be 0, 50, 100, 'todo', 'na' or -1
|
||||||
$type = GETPOSTISSET("search_type", 'aZ09') ? GETPOST("search_type", 'aZ09') : GETPOST("type", 'aZ09');
|
$type = GETPOSTISSET("search_type", 'aZ09') ? GETPOST("search_type", 'aZ09') : GETPOST("type", 'aZ09');
|
||||||
$maxprint = GETPOSTISSET("maxprint") ? GETPOST("maxprint", 'int') : $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW;
|
$maxprint = GETPOSTISSET("maxprint") ? GETPOST("maxprint", 'int') : $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW;
|
||||||
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
||||||
@ -760,12 +760,14 @@ if ($type) {
|
|||||||
if ($status == '0') {
|
if ($status == '0') {
|
||||||
$sql .= " AND a.percent = 0";
|
$sql .= " AND a.percent = 0";
|
||||||
}
|
}
|
||||||
if ($status == '-1') {
|
if ($status == '-1' || $status == 'na') {
|
||||||
|
// Not applicable
|
||||||
$sql .= " AND a.percent = -1";
|
$sql .= " AND a.percent = -1";
|
||||||
} // Not applicable
|
}
|
||||||
if ($status == '50') {
|
if ($status == '50') {
|
||||||
|
// Running already started
|
||||||
$sql .= " AND (a.percent > 0 AND a.percent < 100)";
|
$sql .= " AND (a.percent > 0 AND a.percent < 100)";
|
||||||
} // Running already started
|
}
|
||||||
if ($status == 'done' || $status == '100') {
|
if ($status == 'done' || $status == '100') {
|
||||||
$sql .= " AND (a.percent = 100)";
|
$sql .= " AND (a.percent = 100)";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -99,7 +99,7 @@ $month = GETPOST("month", "int") ?GETPOST("month", "int") : date("m");
|
|||||||
$week = GETPOST("week", "int") ?GETPOST("week", "int") : date("W");
|
$week = GETPOST("week", "int") ?GETPOST("week", "int") : date("W");
|
||||||
$day = GETPOST("day", "int") ?GETPOST("day", "int") : date("d");
|
$day = GETPOST("day", "int") ?GETPOST("day", "int") : date("d");
|
||||||
$pid = GETPOST("search_projectid", "int", 3) ?GETPOST("search_projectid", "int", 3) : GETPOST("projectid", "int", 3);
|
$pid = GETPOST("search_projectid", "int", 3) ?GETPOST("search_projectid", "int", 3) : GETPOST("projectid", "int", 3);
|
||||||
$status = GETPOSTISSET("search_status") ? GETPOST("search_status", 'aZ09') : GETPOST("status", 'aZ09'); // status may be 0, 50, 100, 'todo'
|
$status = GETPOSTISSET("search_status") ? GETPOST("search_status", 'aZ09') : GETPOST("status", 'aZ09'); // status may be 0, 50, 100, 'todo', 'na' or -1
|
||||||
$type = GETPOST("search_type", 'alpha') ?GETPOST("search_type", 'alpha') : GETPOST("type", 'alpha');
|
$type = GETPOST("search_type", 'alpha') ?GETPOST("search_type", 'alpha') : GETPOST("type", 'alpha');
|
||||||
$maxprint = ((GETPOST("maxprint", 'int') != '') ?GETPOST("maxprint", 'int') : $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW);
|
$maxprint = ((GETPOST("maxprint", 'int') != '') ?GETPOST("maxprint", 'int') : $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW);
|
||||||
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
||||||
@ -626,12 +626,14 @@ if ($type) {
|
|||||||
if ($status == '0') {
|
if ($status == '0') {
|
||||||
$sql .= " AND a.percent = 0";
|
$sql .= " AND a.percent = 0";
|
||||||
}
|
}
|
||||||
if ($status == '-1') {
|
if ($status == '-1' || $status == 'na') {
|
||||||
|
// Not applicable
|
||||||
$sql .= " AND a.percent = -1";
|
$sql .= " AND a.percent = -1";
|
||||||
} // Not applicable
|
}
|
||||||
if ($status == '50') {
|
if ($status == '50') {
|
||||||
|
// Running already started
|
||||||
$sql .= " AND (a.percent > 0 AND a.percent < 100)";
|
$sql .= " AND (a.percent > 0 AND a.percent < 100)";
|
||||||
} // Running already started
|
}
|
||||||
if ($status == 'done' || $status == '100') {
|
if ($status == 'done' || $status == '100') {
|
||||||
$sql .= " AND (a.percent = 100)";
|
$sql .= " AND (a.percent = 100)";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1655,7 +1655,7 @@ if ($action == 'create') {
|
|||||||
// Mode of payment
|
// Mode of payment
|
||||||
print '<tr><td>'.$langs->trans('PaymentMode').'</td><td>';
|
print '<tr><td>'.$langs->trans('PaymentMode').'</td><td>';
|
||||||
print img_picto('', 'bank').' ';
|
print img_picto('', 'bank').' ';
|
||||||
$form->select_types_paiements((GETPOSTISSET('mode_reglement_id') && (GETPOST('mode_reglement_id') != 0 ? GETPOST('mode_reglement_id', 'int') : $soc->mode_reglement_id)), 'mode_reglement_id', 'CRDT', 0, 1, 0, 0, 1, 'maxwidth200 widthcentpercentminusx');
|
$form->select_types_paiements((GETPOSTISSET('mode_reglement_id') && GETPOST('mode_reglement_id') != 0) ? GETPOST('mode_reglement_id', 'int') : $soc->mode_reglement_id, 'mode_reglement_id', 'CRDT', 0, 1, 0, 0, 1, 'maxwidth200 widthcentpercentminusx');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Bank Account
|
// Bank Account
|
||||||
|
|||||||
@ -1445,12 +1445,13 @@ class Propal extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Load a proposal from database. Get also lines.
|
* Load a proposal from database. Get also lines.
|
||||||
*
|
*
|
||||||
* @param int $rowid id of object to load
|
* @param int $rowid id of object to load
|
||||||
* @param string $ref Ref of proposal
|
* @param string $ref Ref of proposal
|
||||||
* @param string $ref_ext Ref ext of proposal
|
* @param string $ref_ext Ref ext of proposal
|
||||||
* @return int >0 if OK, <0 if KO
|
* @param int $forceentity Entity id to force
|
||||||
|
* @return int >0 if OK, <0 if KO
|
||||||
*/
|
*/
|
||||||
public function fetch($rowid, $ref = '', $ref_ext = '')
|
public function fetch($rowid, $ref = '', $ref_ext = '', $forceentity = 0)
|
||||||
{
|
{
|
||||||
$sql = "SELECT p.rowid, p.ref, p.entity, p.remise, p.remise_percent, p.remise_absolue, p.fk_soc";
|
$sql = "SELECT p.rowid, p.ref, p.entity, p.remise, p.remise_percent, p.remise_absolue, p.fk_soc";
|
||||||
$sql .= ", p.total_ttc, p.total_tva, p.localtax1, p.localtax2, p.total_ht";
|
$sql .= ", p.total_ttc, p.total_tva, p.localtax1, p.localtax2, p.total_ht";
|
||||||
@ -1489,10 +1490,15 @@ class Propal extends CommonObject
|
|||||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_input_reason as dr ON p.fk_input_reason = dr.rowid';
|
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_input_reason as dr ON p.fk_input_reason = dr.rowid';
|
||||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_incoterms as i ON p.fk_incoterms = i.rowid';
|
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_incoterms as i ON p.fk_incoterms = i.rowid';
|
||||||
|
|
||||||
if ($ref) {
|
if (!empty($ref)) {
|
||||||
$sql .= " WHERE p.entity IN (".getEntity('propal').")"; // Dont't use entity if you use rowid
|
if (!empty($forceentity)) {
|
||||||
|
$sql .= " WHERE p.entity = ".(int) $forceentity; // Check only the current entity because we may have the same reference in several entities
|
||||||
|
} else {
|
||||||
|
$sql .= " WHERE p.entity IN (".getEntity('propal').")";
|
||||||
|
}
|
||||||
$sql .= " AND p.ref='".$this->db->escape($ref)."'";
|
$sql .= " AND p.ref='".$this->db->escape($ref)."'";
|
||||||
} else {
|
} else {
|
||||||
|
// Dont't use entity if you use rowid
|
||||||
$sql .= " WHERE p.rowid = ".((int) $rowid);
|
$sql .= " WHERE p.rowid = ".((int) $rowid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -425,12 +425,12 @@ if ($socid > 0) {
|
|||||||
print '<td class="nowrap">'.$langs->trans("ConsumedBy").'</td>';
|
print '<td class="nowrap">'.$langs->trans("ConsumedBy").'</td>';
|
||||||
print '<td class="right">'.$langs->trans("AmountHT").'</td>';
|
print '<td class="right">'.$langs->trans("AmountHT").'</td>';
|
||||||
if (!empty($conf->multicurrency->enabled)) {
|
if (!empty($conf->multicurrency->enabled)) {
|
||||||
print '<td class="right">'.$langs->trans("MulticurrencyAmountHT").'</td>';
|
print '<td class="right tdoverflowmax125" title="'.dol_escape_htmltag($langs->trans("MulticurrencyAmountHT")).'">'.$langs->trans("MulticurrencyAmountHT").'</td>';
|
||||||
}
|
}
|
||||||
print '<td class="right">'.$langs->trans("VATRate").'</td>';
|
print '<td class="right">'.$langs->trans("VATRate").'</td>';
|
||||||
print '<td class="right">'.$langs->trans("AmountTTC").'</td>';
|
print '<td class="right">'.$langs->trans("AmountTTC").'</td>';
|
||||||
if (!empty($conf->multicurrency->enabled)) {
|
if (!empty($conf->multicurrency->enabled)) {
|
||||||
print '<td class="right">'.$langs->trans("MulticurrencyAmountTTC").'</td>';
|
print '<td class="right tdoverflowmax125" title="'.dol_escape_htmltag($langs->trans("MulticurrencyAmountTTC")).'">'.$langs->trans("MulticurrencyAmountTTC").'</td>';
|
||||||
}
|
}
|
||||||
print '<td width="100" class="center">'.$langs->trans("DiscountOfferedBy").'</td>';
|
print '<td width="100" class="center">'.$langs->trans("DiscountOfferedBy").'</td>';
|
||||||
print '<td width="50"> </td>';
|
print '<td width="50"> </td>';
|
||||||
@ -563,12 +563,12 @@ if ($socid > 0) {
|
|||||||
print '<td class="nowrap">'.$langs->trans("ConsumedBy").'</td>';
|
print '<td class="nowrap">'.$langs->trans("ConsumedBy").'</td>';
|
||||||
print '<td class="right">'.$langs->trans("AmountHT").'</td>';
|
print '<td class="right">'.$langs->trans("AmountHT").'</td>';
|
||||||
if (!empty($conf->multicurrency->enabled)) {
|
if (!empty($conf->multicurrency->enabled)) {
|
||||||
print '<td class="right">'.$langs->trans("MulticurrencyAmountHT").'</td>';
|
print '<td class="right tdoverflowmax125" title="'.dol_escape_htmltag($langs->trans("MulticurrencyAmountHT")).'">'.$langs->trans("MulticurrencyAmountHT").'</td>';
|
||||||
}
|
}
|
||||||
print '<td class="right">'.$langs->trans("VATRate").'</td>';
|
print '<td class="right">'.$langs->trans("VATRate").'</td>';
|
||||||
print '<td class="right">'.$langs->trans("AmountTTC").'</td>';
|
print '<td class="right">'.$langs->trans("AmountTTC").'</td>';
|
||||||
if (!empty($conf->multicurrency->enabled)) {
|
if (!empty($conf->multicurrency->enabled)) {
|
||||||
print '<td class="right">'.$langs->trans("MulticurrencyAmountTTC").'</td>';
|
print '<td class="right tdoverflowmax125" title="'.dol_escape_htmltag($langs->trans("MulticurrencyAmountTTC")).'">'.$langs->trans("MulticurrencyAmountTTC").'</td>';
|
||||||
}
|
}
|
||||||
print '<td width="100" class="center">'.$langs->trans("DiscountOfferedBy").'</td>';
|
print '<td width="100" class="center">'.$langs->trans("DiscountOfferedBy").'</td>';
|
||||||
print '<td width="50"> </td>';
|
print '<td width="50"> </td>';
|
||||||
@ -736,12 +736,12 @@ if ($socid > 0) {
|
|||||||
print '<td class="nowrap">'.$langs->trans("ConsumedBy").'</td>';
|
print '<td class="nowrap">'.$langs->trans("ConsumedBy").'</td>';
|
||||||
print '<td class="right">'.$langs->trans("AmountHT").'</td>';
|
print '<td class="right">'.$langs->trans("AmountHT").'</td>';
|
||||||
if (!empty($conf->multicurrency->enabled)) {
|
if (!empty($conf->multicurrency->enabled)) {
|
||||||
print '<td class="right">'.$langs->trans("MulticurrencyAmountHT").'</td>';
|
print '<td class="right tdoverflowmax125" title="'.dol_escape_htmltag($langs->trans("MulticurrencyAmountHT")).'">'.$langs->trans("MulticurrencyAmountHT").'</td>';
|
||||||
}
|
}
|
||||||
print '<td class="right">'.$langs->trans("VATRate").'</td>';
|
print '<td class="right">'.$langs->trans("VATRate").'</td>';
|
||||||
print '<td class="right">'.$langs->trans("AmountTTC").'</td>';
|
print '<td class="right">'.$langs->trans("AmountTTC").'</td>';
|
||||||
if (!empty($conf->multicurrency->enabled)) {
|
if (!empty($conf->multicurrency->enabled)) {
|
||||||
print '<td class="right">'.$langs->trans("MulticurrencyAmountTTC").'</td>';
|
print '<td class="right tdoverflowmax125" title="'.dol_escape_htmltag($langs->trans("MulticurrencyAmountTTC")).'">'.$langs->trans("MulticurrencyAmountTTC").'</td>';
|
||||||
}
|
}
|
||||||
print '<td width="100" class="center">'.$langs->trans("Author").'</td>';
|
print '<td width="100" class="center">'.$langs->trans("Author").'</td>';
|
||||||
print '<td width="50"> </td>';
|
print '<td width="50"> </td>';
|
||||||
@ -896,12 +896,12 @@ if ($socid > 0) {
|
|||||||
print '<td class="nowrap">'.$langs->trans("ConsumedBy").'</td>';
|
print '<td class="nowrap">'.$langs->trans("ConsumedBy").'</td>';
|
||||||
print '<td class="right">'.$langs->trans("AmountHT").'</td>';
|
print '<td class="right">'.$langs->trans("AmountHT").'</td>';
|
||||||
if (!empty($conf->multicurrency->enabled)) {
|
if (!empty($conf->multicurrency->enabled)) {
|
||||||
print '<td class="right">'.$langs->trans("MulticurrencyAmountHT").'</td>';
|
print '<td class="right toverflowmax125" title="'.dol_escape_htmltag($langs->trans("MulticurrencyAmountHT")).'">'.$langs->trans("MulticurrencyAmountHT").'</td>';
|
||||||
}
|
}
|
||||||
print '<td class="right">'.$langs->trans("VATRate").'</td>';
|
print '<td class="right">'.$langs->trans("VATRate").'</td>';
|
||||||
print '<td class="right">'.$langs->trans("AmountTTC").'</td>';
|
print '<td class="right">'.$langs->trans("AmountTTC").'</td>';
|
||||||
if (!empty($conf->multicurrency->enabled)) {
|
if (!empty($conf->multicurrency->enabled)) {
|
||||||
print '<td class="right">'.$langs->trans("MulticurrencyAmountTTC").'</td>';
|
print '<td class="right tdoverflowmax125" title="'.dol_escape_htmltag($langs->trans("MulticurrencyAmountTTC")).'">'.$langs->trans("MulticurrencyAmountTTC").'</td>';
|
||||||
}
|
}
|
||||||
print '<td width="100" class="center">'.$langs->trans("Author").'</td>';
|
print '<td width="100" class="center">'.$langs->trans("Author").'</td>';
|
||||||
print '<td width="50"> </td>';
|
print '<td width="50"> </td>';
|
||||||
|
|||||||
@ -5439,9 +5439,9 @@ if ($action == 'create') {
|
|||||||
) {
|
) {
|
||||||
print '<a class="butAction'.($conf->use_javascript_ajax ? ' reposition' : '').'" href="'.$_SERVER["PHP_SELF"].'?facid='.$object->id.'&action=converttoreduc" title="'.dol_escape_htmltag($langs->trans("ConfirmConvertToReduc2")).'">'.$langs->trans('ConvertToReduc').'</a>';
|
print '<a class="butAction'.($conf->use_javascript_ajax ? ' reposition' : '').'" href="'.$_SERVER["PHP_SELF"].'?facid='.$object->id.'&action=converttoreduc" title="'.dol_escape_htmltag($langs->trans("ConfirmConvertToReduc2")).'">'.$langs->trans('ConvertToReduc').'</a>';
|
||||||
}
|
}
|
||||||
// For deposit invoice
|
// For down payment invoice (deposit)
|
||||||
if ($object->type == Facture::TYPE_DEPOSIT && $usercancreate && $object->statut > Facture::STATUS_DRAFT && empty($discount->id)) {
|
if ($object->type == Facture::TYPE_DEPOSIT && $usercancreate && $object->statut > Facture::STATUS_DRAFT && empty($discount->id)) {
|
||||||
if (price2num($object->total_ttc, 'MT') == price2num($sumofpaymentall, 'MT')) {
|
if (price2num($object->total_ttc, 'MT') == price2num($sumofpaymentall, 'MT') || ($object->type == Facture::STATUS_ABANDONED && in_array($object->close_code, array('bankcharge', 'discount_vat', 'other')))) {
|
||||||
// We can close a down payment only if paid amount is same than amount of down payment (by definition)
|
// We can close a down payment only if paid amount is same than amount of down payment (by definition)
|
||||||
print '<a class="butAction'.($conf->use_javascript_ajax ? ' reposition' : '').'" href="'.$_SERVER["PHP_SELF"].'?facid='.$object->id.'&action=converttoreduc">'.$langs->trans('ConvertToReduc').'</a>';
|
print '<a class="butAction'.($conf->use_javascript_ajax ? ' reposition' : '').'" href="'.$_SERVER["PHP_SELF"].'?facid='.$object->id.'&action=converttoreduc">'.$langs->trans('ConvertToReduc').'</a>';
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -160,7 +160,7 @@ class Facture extends CommonInvoice
|
|||||||
public $revenuestamp;
|
public $revenuestamp;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ! Closing after partial payment: discount_vat, badsupplier, abandon
|
* ! Closing after partial payment: discount_vat, badcustomer or badsupplier, bankcharge, other
|
||||||
* ! Closing when no payment: replaced, abandoned
|
* ! Closing when no payment: replaced, abandoned
|
||||||
* @var string Close code
|
* @var string Close code
|
||||||
*/
|
*/
|
||||||
@ -417,7 +417,10 @@ class Facture extends CommonInvoice
|
|||||||
const STATUS_ABANDONED = 3;
|
const STATUS_ABANDONED = 3;
|
||||||
|
|
||||||
const CLOSECODE_DISCOUNTVAT = 'discount_vat'; // Abandonned remain - escompte
|
const CLOSECODE_DISCOUNTVAT = 'discount_vat'; // Abandonned remain - escompte
|
||||||
const CLOSECODE_BADDEBT = 'badcustomer'; // Abandonned - bad
|
const CLOSECODE_BADDEBT = 'badcustomer'; // Abandonned remain - bad customer
|
||||||
|
const CLOSECODE_BANKCHARGE = 'bankcharge'; // Abandonned remain - bank charge
|
||||||
|
const CLOSECODE_OTHER = 'other'; // Abandonned remain - other
|
||||||
|
|
||||||
const CLOSECODE_ABANDONED = 'abandon'; // Abandonned - other
|
const CLOSECODE_ABANDONED = 'abandon'; // Abandonned - other
|
||||||
const CLOSECODE_REPLACED = 'replaced'; // Closed after doing a replacement invoice
|
const CLOSECODE_REPLACED = 'replaced'; // Closed after doing a replacement invoice
|
||||||
|
|
||||||
@ -5075,6 +5078,7 @@ class Facture extends CommonInvoice
|
|||||||
$sql .= ", ".MAIN_DB_PREFIX."c_paiement as cp";
|
$sql .= ", ".MAIN_DB_PREFIX."c_paiement as cp";
|
||||||
}
|
}
|
||||||
$sql .= " WHERE f.paye = 0";
|
$sql .= " WHERE f.paye = 0";
|
||||||
|
$sql .= " AND f.fk_statut = ".self::STATUS_VALIDATED;
|
||||||
$sql .= " AND f.date_lim_reglement = '".$this->db->idate($tmpidate, 'gmt')."'";
|
$sql .= " AND f.date_lim_reglement = '".$this->db->idate($tmpidate, 'gmt')."'";
|
||||||
$sql .= " AND f.entity IN (".getEntity('facture').")";
|
$sql .= " AND f.entity IN (".getEntity('facture').")";
|
||||||
if (!empty($paymentmode) && $paymentmode != 'all') {
|
if (!empty($paymentmode) && $paymentmode != 'all') {
|
||||||
|
|||||||
@ -846,9 +846,9 @@ $sql .= ' f.rowid DESC ';
|
|||||||
$nbtotalofrecords = '';
|
$nbtotalofrecords = '';
|
||||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
||||||
/* This old and fast method to get and count full list returns all record so use a high amount of memory.
|
/* This old and fast method to get and count full list returns all record so use a high amount of memory.
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
$nbtotalofrecords = $db->num_rows($result);
|
$nbtotalofrecords = $db->num_rows($result);
|
||||||
*/
|
*/
|
||||||
/* The fast and low memory method to get and count full list converts the sql into a sql count */
|
/* The fast and low memory method to get and count full list converts the sql into a sql count */
|
||||||
if ($sall || $search_product_category > 0 || $search_user > 0) {
|
if ($sall || $search_product_category > 0 || $search_user > 0) {
|
||||||
$sqlforcount = preg_replace('/^SELECT[a-zA-Z0-9\._\s\(\),=<>\:\-\']+\sFROM/', 'SELECT COUNT(DISTINCT f.rowid) as nbtotalofrecords FROM', $sql);
|
$sqlforcount = preg_replace('/^SELECT[a-zA-Z0-9\._\s\(\),=<>\:\-\']+\sFROM/', 'SELECT COUNT(DISTINCT f.rowid) as nbtotalofrecords FROM', $sql);
|
||||||
@ -1078,8 +1078,8 @@ if ($resql) {
|
|||||||
$arrayofmassactions['makepayment'] = img_picto('', 'payment', 'class="pictofixedwidth"').$langs->trans("MakePaymentAndClassifyPayed");
|
$arrayofmassactions['makepayment'] = img_picto('', 'payment', 'class="pictofixedwidth"').$langs->trans("MakePaymentAndClassifyPayed");
|
||||||
}
|
}
|
||||||
if ($conf->prelevement->enabled && !empty($user->rights->prelevement->bons->creer)) {
|
if ($conf->prelevement->enabled && !empty($user->rights->prelevement->bons->creer)) {
|
||||||
$langs->load("withdrawals");
|
$langs->load("withdrawals");
|
||||||
$arrayofmassactions['withdrawrequest'] = img_picto('', 'payment', 'class="pictofixedwidth"').$langs->trans("MakeWithdrawRequest");
|
$arrayofmassactions['withdrawrequest'] = img_picto('', 'payment', 'class="pictofixedwidth"').$langs->trans("MakeWithdrawRequest");
|
||||||
}
|
}
|
||||||
if ($user->rights->facture->supprimer) {
|
if ($user->rights->facture->supprimer) {
|
||||||
if (!empty($conf->global->INVOICE_CAN_REMOVE_DRAFT_ONLY)) {
|
if (!empty($conf->global->INVOICE_CAN_REMOVE_DRAFT_ONLY)) {
|
||||||
@ -1266,11 +1266,11 @@ if ($resql) {
|
|||||||
print '<td class="liste_titre center">';
|
print '<td class="liste_titre center">';
|
||||||
print '<div class="nowrap">';
|
print '<div class="nowrap">';
|
||||||
/*
|
/*
|
||||||
print $langs->trans('From').' ';
|
print $langs->trans('From').' ';
|
||||||
print $form->selectDate($search_datelimit_start ? $search_datelimit_start : -1, 'search_datelimit_start', 0, 0, 1);
|
print $form->selectDate($search_datelimit_start ? $search_datelimit_start : -1, 'search_datelimit_start', 0, 0, 1);
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '<div class="nowrap">';
|
print '<div class="nowrap">';
|
||||||
print $langs->trans('to').' ';*/
|
print $langs->trans('to').' ';*/
|
||||||
print $form->selectDate($search_datelimit_end ? $search_datelimit_end : -1, 'search_datelimit_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("Before"));
|
print $form->selectDate($search_datelimit_end ? $search_datelimit_end : -1, 'search_datelimit_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("Before"));
|
||||||
print '<br><input type="checkbox" name="search_option" value="late"'.($option == 'late' ? ' checked' : '').'> '.$langs->trans("Alert");
|
print '<br><input type="checkbox" name="search_option" value="late"'.($option == 'late' ? ' checked' : '').'> '.$langs->trans("Alert");
|
||||||
print '</div>';
|
print '</div>';
|
||||||
@ -1686,12 +1686,12 @@ if ($resql) {
|
|||||||
$facturestatic->note_public = $obj->note_public;
|
$facturestatic->note_public = $obj->note_public;
|
||||||
$facturestatic->note_private = $obj->note_private;
|
$facturestatic->note_private = $obj->note_private;
|
||||||
if (!empty($conf->global->INVOICE_USE_SITUATION) && !empty($conf->global->INVOICE_USE_RETAINED_WARRANTY)) {
|
if (!empty($conf->global->INVOICE_USE_SITUATION) && !empty($conf->global->INVOICE_USE_RETAINED_WARRANTY)) {
|
||||||
$facturestatic->retained_warranty = $obj->retained_warranty;
|
$facturestatic->retained_warranty = $obj->retained_warranty;
|
||||||
$facturestatic->retained_warranty_date_limit = $obj->retained_warranty_date_limit;
|
$facturestatic->retained_warranty_date_limit = $obj->retained_warranty_date_limit;
|
||||||
$facturestatic->situation_final = $obj->retained_warranty_date_limit;
|
$facturestatic->situation_final = $obj->retained_warranty_date_limit;
|
||||||
$facturestatic->situation_final = $obj->retained_warranty_date_limit;
|
$facturestatic->situation_final = $obj->retained_warranty_date_limit;
|
||||||
$facturestatic->situation_cycle_ref = $obj->situation_cycle_ref;
|
$facturestatic->situation_cycle_ref = $obj->situation_cycle_ref;
|
||||||
$facturestatic->situation_counter = $obj->situation_counter;
|
$facturestatic->situation_counter = $obj->situation_counter;
|
||||||
}
|
}
|
||||||
$companystatic->id = $obj->socid;
|
$companystatic->id = $obj->socid;
|
||||||
$companystatic->name = $obj->name;
|
$companystatic->name = $obj->name;
|
||||||
@ -1990,14 +1990,14 @@ if ($resql) {
|
|||||||
|
|
||||||
// Amount HT
|
// Amount HT
|
||||||
if (!empty($arrayfields['f.total_ht']['checked'])) {
|
if (!empty($arrayfields['f.total_ht']['checked'])) {
|
||||||
print '<td class="right nowraponall">'.price($obj->total_ht)."</td>\n";
|
print '<td class="right nowraponall">'.price($obj->total_ht)."</td>\n";
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
$totalarray['pos'][$totalarray['nbfield']] = 'f.total_ht';
|
$totalarray['pos'][$totalarray['nbfield']] = 'f.total_ht';
|
||||||
}
|
}
|
||||||
$totalarray['val']['f.total_ht'] += $obj->total_ht;
|
$totalarray['val']['f.total_ht'] += $obj->total_ht;
|
||||||
}
|
}
|
||||||
// Amount VAT
|
// Amount VAT
|
||||||
if (!empty($arrayfields['f.total_tva']['checked'])) {
|
if (!empty($arrayfields['f.total_tva']['checked'])) {
|
||||||
@ -2159,16 +2159,16 @@ if ($resql) {
|
|||||||
|
|
||||||
// Currency rate
|
// Currency rate
|
||||||
if (!empty($arrayfields['f.multicurrency_tx']['checked'])) {
|
if (!empty($arrayfields['f.multicurrency_tx']['checked'])) {
|
||||||
print '<td class="nowraponall">';
|
print '<td class="nowraponall">';
|
||||||
$form->form_multicurrency_rate($_SERVER['PHP_SELF'].'?id='.$obj->rowid, $obj->multicurrency_tx, 'none', $obj->multicurrency_code);
|
$form->form_multicurrency_rate($_SERVER['PHP_SELF'].'?id='.$obj->rowid, $obj->multicurrency_tx, 'none', $obj->multicurrency_code);
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Amount HT
|
// Amount HT
|
||||||
if (!empty($arrayfields['f.multicurrency_total_ht']['checked'])) {
|
if (!empty($arrayfields['f.multicurrency_total_ht']['checked'])) {
|
||||||
print '<td class="right nowraponall amount">'.price($obj->multicurrency_total_ht)."</td>\n";
|
print '<td class="right nowraponall amount">'.price($obj->multicurrency_total_ht)."</td>\n";
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1488,7 +1488,7 @@ class BonPrelevement extends CommonObject
|
|||||||
fputs($this->file, ' <NbOfTxs>'.$i.'</NbOfTxs>'.$CrLf);
|
fputs($this->file, ' <NbOfTxs>'.$i.'</NbOfTxs>'.$CrLf);
|
||||||
fputs($this->file, ' <CtrlSum>'.$this->total.'</CtrlSum>'.$CrLf);
|
fputs($this->file, ' <CtrlSum>'.$this->total.'</CtrlSum>'.$CrLf);
|
||||||
fputs($this->file, ' <InitgPty>'.$CrLf);
|
fputs($this->file, ' <InitgPty>'.$CrLf);
|
||||||
fputs($this->file, ' <Nm>'.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale), ''))).'</Nm>'.$CrLf);
|
fputs($this->file, ' <Nm>'.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale), ' '))).'</Nm>'.$CrLf);
|
||||||
fputs($this->file, ' <Id>'.$CrLf);
|
fputs($this->file, ' <Id>'.$CrLf);
|
||||||
fputs($this->file, ' <PrvtId>'.$CrLf);
|
fputs($this->file, ' <PrvtId>'.$CrLf);
|
||||||
fputs($this->file, ' <Othr>'.$CrLf);
|
fputs($this->file, ' <Othr>'.$CrLf);
|
||||||
@ -1604,7 +1604,7 @@ class BonPrelevement extends CommonObject
|
|||||||
fputs($this->file, ' <NbOfTxs>'.$i.'</NbOfTxs>'.$CrLf);
|
fputs($this->file, ' <NbOfTxs>'.$i.'</NbOfTxs>'.$CrLf);
|
||||||
fputs($this->file, ' <CtrlSum>'.$this->total.'</CtrlSum>'.$CrLf);
|
fputs($this->file, ' <CtrlSum>'.$this->total.'</CtrlSum>'.$CrLf);
|
||||||
fputs($this->file, ' <InitgPty>'.$CrLf);
|
fputs($this->file, ' <InitgPty>'.$CrLf);
|
||||||
fputs($this->file, ' <Nm>'.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale), ''))).'</Nm>'.$CrLf);
|
fputs($this->file, ' <Nm>'.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale), ' '))).'</Nm>'.$CrLf);
|
||||||
fputs($this->file, ' <Id>'.$CrLf);
|
fputs($this->file, ' <Id>'.$CrLf);
|
||||||
fputs($this->file, ' <PrvtId>'.$CrLf);
|
fputs($this->file, ' <PrvtId>'.$CrLf);
|
||||||
fputs($this->file, ' <Othr>'.$CrLf);
|
fputs($this->file, ' <Othr>'.$CrLf);
|
||||||
@ -1854,16 +1854,16 @@ class BonPrelevement extends CommonObject
|
|||||||
$XML_DEBITOR .= ' </FinInstnId>'.$CrLf;
|
$XML_DEBITOR .= ' </FinInstnId>'.$CrLf;
|
||||||
$XML_DEBITOR .= ' </DbtrAgt>'.$CrLf;
|
$XML_DEBITOR .= ' </DbtrAgt>'.$CrLf;
|
||||||
$XML_DEBITOR .= ' <Dbtr>'.$CrLf;
|
$XML_DEBITOR .= ' <Dbtr>'.$CrLf;
|
||||||
$XML_DEBITOR .= ' <Nm>'.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($row_nom), ''))).'</Nm>'.$CrLf;
|
$XML_DEBITOR .= ' <Nm>'.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($row_nom), ' '))).'</Nm>'.$CrLf;
|
||||||
$XML_DEBITOR .= ' <PstlAdr>'.$CrLf;
|
$XML_DEBITOR .= ' <PstlAdr>'.$CrLf;
|
||||||
$XML_DEBITOR .= ' <Ctry>'.$row_country_code.'</Ctry>'.$CrLf;
|
$XML_DEBITOR .= ' <Ctry>'.$row_country_code.'</Ctry>'.$CrLf;
|
||||||
$addressline1 = strtr($row_address, array(CHR(13) => ", ", CHR(10) => ""));
|
$addressline1 = strtr($row_address, array(CHR(13) => ", ", CHR(10) => ""));
|
||||||
$addressline2 = strtr($row_zip.(($row_zip && $row_town) ? ' ' : ''.$row_town), array(CHR(13) => ", ", CHR(10) => ""));
|
$addressline2 = strtr($row_zip.(($row_zip && $row_town) ? ' ' : ''.$row_town), array(CHR(13) => ", ", CHR(10) => ""));
|
||||||
if (trim($addressline1)) {
|
if (trim($addressline1)) {
|
||||||
$XML_DEBITOR .= ' <AdrLine>'.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline1), ''), 70, 'right', 'UTF-8', 1)).'</AdrLine>'.$CrLf;
|
$XML_DEBITOR .= ' <AdrLine>'.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline1), ' '), 70, 'right', 'UTF-8', 1)).'</AdrLine>'.$CrLf;
|
||||||
}
|
}
|
||||||
if (trim($addressline2)) {
|
if (trim($addressline2)) {
|
||||||
$XML_DEBITOR .= ' <AdrLine>'.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline2), ''), 70, 'right', 'UTF-8', 1)).'</AdrLine>'.$CrLf;
|
$XML_DEBITOR .= ' <AdrLine>'.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline2), ' '), 70, 'right', 'UTF-8', 1)).'</AdrLine>'.$CrLf;
|
||||||
}
|
}
|
||||||
$XML_DEBITOR .= ' </PstlAdr>'.$CrLf;
|
$XML_DEBITOR .= ' </PstlAdr>'.$CrLf;
|
||||||
$XML_DEBITOR .= ' </Dbtr>'.$CrLf;
|
$XML_DEBITOR .= ' </Dbtr>'.$CrLf;
|
||||||
@ -1908,14 +1908,14 @@ class BonPrelevement extends CommonObject
|
|||||||
$XML_CREDITOR .= ' <InstdAmt Ccy="EUR">'.round($row_somme, 2).'</InstdAmt>'.$CrLf;
|
$XML_CREDITOR .= ' <InstdAmt Ccy="EUR">'.round($row_somme, 2).'</InstdAmt>'.$CrLf;
|
||||||
$XML_CREDITOR .= ' </Amt>'.$CrLf;
|
$XML_CREDITOR .= ' </Amt>'.$CrLf;
|
||||||
/*
|
/*
|
||||||
$XML_CREDITOR .= ' <DrctDbtTx>'.$CrLf;
|
$XML_CREDITOR .= ' <DrctDbtTx>'.$CrLf;
|
||||||
$XML_CREDITOR .= ' <MndtRltdInf>'.$CrLf;
|
$XML_CREDITOR .= ' <MndtRltdInf>'.$CrLf;
|
||||||
$XML_CREDITOR .= ' <MndtId>'.$Rum.'</MndtId>'.$CrLf;
|
$XML_CREDITOR .= ' <MndtId>'.$Rum.'</MndtId>'.$CrLf;
|
||||||
$XML_CREDITOR .= ' <DtOfSgntr>'.$DtOfSgntr.'</DtOfSgntr>'.$CrLf;
|
$XML_CREDITOR .= ' <DtOfSgntr>'.$DtOfSgntr.'</DtOfSgntr>'.$CrLf;
|
||||||
$XML_CREDITOR .= ' <AmdmntInd>false</AmdmntInd>'.$CrLf;
|
$XML_CREDITOR .= ' <AmdmntInd>false</AmdmntInd>'.$CrLf;
|
||||||
$XML_CREDITOR .= ' </MndtRltdInf>'.$CrLf;
|
$XML_CREDITOR .= ' </MndtRltdInf>'.$CrLf;
|
||||||
$XML_CREDITOR .= ' </DrctDbtTx>'.$CrLf;
|
$XML_CREDITOR .= ' </DrctDbtTx>'.$CrLf;
|
||||||
*/
|
*/
|
||||||
//$XML_CREDITOR .= ' <ChrgBr>SLEV</ChrgBr>'.$CrLf;
|
//$XML_CREDITOR .= ' <ChrgBr>SLEV</ChrgBr>'.$CrLf;
|
||||||
$XML_CREDITOR .= ' <CdtrAgt>'.$CrLf;
|
$XML_CREDITOR .= ' <CdtrAgt>'.$CrLf;
|
||||||
$XML_CREDITOR .= ' <FinInstnId>'.$CrLf;
|
$XML_CREDITOR .= ' <FinInstnId>'.$CrLf;
|
||||||
@ -1923,16 +1923,16 @@ class BonPrelevement extends CommonObject
|
|||||||
$XML_CREDITOR .= ' </FinInstnId>'.$CrLf;
|
$XML_CREDITOR .= ' </FinInstnId>'.$CrLf;
|
||||||
$XML_CREDITOR .= ' </CdtrAgt>'.$CrLf;
|
$XML_CREDITOR .= ' </CdtrAgt>'.$CrLf;
|
||||||
$XML_CREDITOR .= ' <Cdtr>'.$CrLf;
|
$XML_CREDITOR .= ' <Cdtr>'.$CrLf;
|
||||||
$XML_CREDITOR .= ' <Nm>'.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($row_nom)))).'</Nm>'.$CrLf;
|
$XML_CREDITOR .= ' <Nm>'.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($row_nom), ' '))).'</Nm>'.$CrLf;
|
||||||
$XML_CREDITOR .= ' <PstlAdr>'.$CrLf;
|
$XML_CREDITOR .= ' <PstlAdr>'.$CrLf;
|
||||||
$XML_CREDITOR .= ' <Ctry>'.$row_country_code.'</Ctry>'.$CrLf;
|
$XML_CREDITOR .= ' <Ctry>'.$row_country_code.'</Ctry>'.$CrLf;
|
||||||
$addressline1 = strtr($row_address, array(CHR(13) => ", ", CHR(10) => ""));
|
$addressline1 = strtr($row_address, array(CHR(13) => ", ", CHR(10) => ""));
|
||||||
$addressline2 = strtr($row_zip.(($row_zip && $row_town) ? ' ' : ''.$row_town), array(CHR(13) => ", ", CHR(10) => ""));
|
$addressline2 = strtr($row_zip.(($row_zip && $row_town) ? ' ' : ''.$row_town), array(CHR(13) => ", ", CHR(10) => ""));
|
||||||
if (trim($addressline1)) {
|
if (trim($addressline1)) {
|
||||||
$XML_CREDITOR .= ' <AdrLine>'.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline1), ''), 70, 'right', 'UTF-8', 1)).'</AdrLine>'.$CrLf;
|
$XML_CREDITOR .= ' <AdrLine>'.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline1), ' '), 70, 'right', 'UTF-8', 1)).'</AdrLine>'.$CrLf;
|
||||||
}
|
}
|
||||||
if (trim($addressline2)) {
|
if (trim($addressline2)) {
|
||||||
$XML_CREDITOR .= ' <AdrLine>'.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline2), ''), 70, 'right', 'UTF-8', 1)).'</AdrLine>'.$CrLf;
|
$XML_CREDITOR .= ' <AdrLine>'.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline2), ' '), 70, 'right', 'UTF-8', 1)).'</AdrLine>'.$CrLf;
|
||||||
}
|
}
|
||||||
$XML_CREDITOR .= ' </PstlAdr>'.$CrLf;
|
$XML_CREDITOR .= ' </PstlAdr>'.$CrLf;
|
||||||
$XML_CREDITOR .= ' </Cdtr>'.$CrLf;
|
$XML_CREDITOR .= ' </Cdtr>'.$CrLf;
|
||||||
@ -2096,16 +2096,16 @@ class BonPrelevement extends CommonObject
|
|||||||
$XML_SEPA_INFO .= ' </PmtTpInf>'.$CrLf;
|
$XML_SEPA_INFO .= ' </PmtTpInf>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' <ReqdColltnDt>'.$dateTime_ETAD.'</ReqdColltnDt>'.$CrLf;
|
$XML_SEPA_INFO .= ' <ReqdColltnDt>'.$dateTime_ETAD.'</ReqdColltnDt>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' <Cdtr>'.$CrLf;
|
$XML_SEPA_INFO .= ' <Cdtr>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' <Nm>'.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale), ''))).'</Nm>'.$CrLf;
|
$XML_SEPA_INFO .= ' <Nm>'.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale), ' '))).'</Nm>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' <PstlAdr>'.$CrLf;
|
$XML_SEPA_INFO .= ' <PstlAdr>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' <Ctry>'.$country[1].'</Ctry>'.$CrLf;
|
$XML_SEPA_INFO .= ' <Ctry>'.$country[1].'</Ctry>'.$CrLf;
|
||||||
$addressline1 = strtr($configuration->global->MAIN_INFO_SOCIETE_ADDRESS, array(CHR(13) => ", ", CHR(10) => ""));
|
$addressline1 = strtr($configuration->global->MAIN_INFO_SOCIETE_ADDRESS, array(CHR(13) => ", ", CHR(10) => ""));
|
||||||
$addressline2 = strtr($configuration->global->MAIN_INFO_SOCIETE_ZIP.(($configuration->global->MAIN_INFO_SOCIETE_ZIP || ' '.$configuration->global->MAIN_INFO_SOCIETE_TOWN) ? ' ' : '').$configuration->global->MAIN_INFO_SOCIETE_TOWN, array(CHR(13) => ", ", CHR(10) => ""));
|
$addressline2 = strtr($configuration->global->MAIN_INFO_SOCIETE_ZIP.(($configuration->global->MAIN_INFO_SOCIETE_ZIP || ' '.$configuration->global->MAIN_INFO_SOCIETE_TOWN) ? ' ' : '').$configuration->global->MAIN_INFO_SOCIETE_TOWN, array(CHR(13) => ", ", CHR(10) => ""));
|
||||||
if ($addressline1) {
|
if ($addressline1) {
|
||||||
$XML_SEPA_INFO .= ' <AdrLine>'.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline1), ''), 70, 'right', 'UTF-8', 1)).'</AdrLine>'.$CrLf;
|
$XML_SEPA_INFO .= ' <AdrLine>'.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline1), ' '), 70, 'right', 'UTF-8', 1)).'</AdrLine>'.$CrLf;
|
||||||
}
|
}
|
||||||
if ($addressline2) {
|
if ($addressline2) {
|
||||||
$XML_SEPA_INFO .= ' <AdrLine>'.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline2), ''), 70, 'right', 'UTF-8', 1)).'</AdrLine>'.$CrLf;
|
$XML_SEPA_INFO .= ' <AdrLine>'.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline2), ' '), 70, 'right', 'UTF-8', 1)).'</AdrLine>'.$CrLf;
|
||||||
}
|
}
|
||||||
$XML_SEPA_INFO .= ' </PstlAdr>'.$CrLf;
|
$XML_SEPA_INFO .= ' </PstlAdr>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' </Cdtr>'.$CrLf;
|
$XML_SEPA_INFO .= ' </Cdtr>'.$CrLf;
|
||||||
@ -2120,11 +2120,11 @@ class BonPrelevement extends CommonObject
|
|||||||
$XML_SEPA_INFO .= ' </FinInstnId>'.$CrLf;
|
$XML_SEPA_INFO .= ' </FinInstnId>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' </CdtrAgt>'.$CrLf;
|
$XML_SEPA_INFO .= ' </CdtrAgt>'.$CrLf;
|
||||||
/* $XML_SEPA_INFO .= ' <UltmtCdtr>'.$CrLf;
|
/* $XML_SEPA_INFO .= ' <UltmtCdtr>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' <Nm>'.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale)))).'</Nm>'.$CrLf;
|
$XML_SEPA_INFO .= ' <Nm>'.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale), ' '))).'</Nm>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' <PstlAdr>'.$CrLf;
|
$XML_SEPA_INFO .= ' <PstlAdr>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' <Ctry>'.$country[1].'</Ctry>'.$CrLf;
|
$XML_SEPA_INFO .= ' <Ctry>'.$country[1].'</Ctry>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' <AdrLine>'.dolEscapeXML(dol_string_nospecial(dol_string_unaccent($conf->global->MAIN_INFO_SOCIETE_ADDRESS), '')).'</AdrLine>'.$CrLf;
|
$XML_SEPA_INFO .= ' <AdrLine>'.dolEscapeXML(dol_string_nospecial(dol_string_unaccent($conf->global->MAIN_INFO_SOCIETE_ADDRESS), ' ')).'</AdrLine>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' <AdrLine>'.dolEscapeXML(dol_string_nospecial(dol_string_unaccent($conf->global->MAIN_INFO_SOCIETE_ZIP.' '.$conf->global->MAIN_INFO_SOCIETE_TOWN), '')).'</AdrLine>'.$CrLf;
|
$XML_SEPA_INFO .= ' <AdrLine>'.dolEscapeXML(dol_string_nospecial(dol_string_unaccent($conf->global->MAIN_INFO_SOCIETE_ZIP.' '.$conf->global->MAIN_INFO_SOCIETE_TOWN), ' ')).'</AdrLine>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' </PstlAdr>'.$CrLf;
|
$XML_SEPA_INFO .= ' </PstlAdr>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' </UltmtCdtr>'.$CrLf;*/
|
$XML_SEPA_INFO .= ' </UltmtCdtr>'.$CrLf;*/
|
||||||
$XML_SEPA_INFO .= ' <ChrgBr>SLEV</ChrgBr>'.$CrLf; // Field "Responsible of fees". Must be SLEV
|
$XML_SEPA_INFO .= ' <ChrgBr>SLEV</ChrgBr>'.$CrLf; // Field "Responsible of fees". Must be SLEV
|
||||||
@ -2162,16 +2162,16 @@ class BonPrelevement extends CommonObject
|
|||||||
}
|
}
|
||||||
$XML_SEPA_INFO .= ' <ReqdExctnDt>'.dol_print_date($dateTime_ETAD, 'dayrfc').'</ReqdExctnDt>'.$CrLf;
|
$XML_SEPA_INFO .= ' <ReqdExctnDt>'.dol_print_date($dateTime_ETAD, 'dayrfc').'</ReqdExctnDt>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' <Dbtr>'.$CrLf;
|
$XML_SEPA_INFO .= ' <Dbtr>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' <Nm>'.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale), ''))).'</Nm>'.$CrLf;
|
$XML_SEPA_INFO .= ' <Nm>'.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale), ' '))).'</Nm>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' <PstlAdr>'.$CrLf;
|
$XML_SEPA_INFO .= ' <PstlAdr>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' <Ctry>'.$country[1].'</Ctry>'.$CrLf;
|
$XML_SEPA_INFO .= ' <Ctry>'.$country[1].'</Ctry>'.$CrLf;
|
||||||
$addressline1 = strtr($configuration->global->MAIN_INFO_SOCIETE_ADDRESS, array(CHR(13) => ", ", CHR(10) => ""));
|
$addressline1 = strtr($configuration->global->MAIN_INFO_SOCIETE_ADDRESS, array(CHR(13) => ", ", CHR(10) => ""));
|
||||||
$addressline2 = strtr($configuration->global->MAIN_INFO_SOCIETE_ZIP.(($configuration->global->MAIN_INFO_SOCIETE_ZIP || ' '.$configuration->global->MAIN_INFO_SOCIETE_TOWN) ? ' ' : '').$configuration->global->MAIN_INFO_SOCIETE_TOWN, array(CHR(13) => ", ", CHR(10) => ""));
|
$addressline2 = strtr($configuration->global->MAIN_INFO_SOCIETE_ZIP.(($configuration->global->MAIN_INFO_SOCIETE_ZIP || ' '.$configuration->global->MAIN_INFO_SOCIETE_TOWN) ? ' ' : '').$configuration->global->MAIN_INFO_SOCIETE_TOWN, array(CHR(13) => ", ", CHR(10) => ""));
|
||||||
if ($addressline1) {
|
if ($addressline1) {
|
||||||
$XML_SEPA_INFO .= ' <AdrLine>'.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline1), ''), 70, 'right', 'UTF-8', 1)).'</AdrLine>'.$CrLf;
|
$XML_SEPA_INFO .= ' <AdrLine>'.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline1), ' '), 70, 'right', 'UTF-8', 1)).'</AdrLine>'.$CrLf;
|
||||||
}
|
}
|
||||||
if ($addressline2) {
|
if ($addressline2) {
|
||||||
$XML_SEPA_INFO .= ' <AdrLine>'.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline2), ''), 70, 'right', 'UTF-8', 1)).'</AdrLine>'.$CrLf;
|
$XML_SEPA_INFO .= ' <AdrLine>'.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline2), ' '), 70, 'right', 'UTF-8', 1)).'</AdrLine>'.$CrLf;
|
||||||
}
|
}
|
||||||
$XML_SEPA_INFO .= ' </PstlAdr>'.$CrLf;
|
$XML_SEPA_INFO .= ' </PstlAdr>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' </Dbtr>'.$CrLf;
|
$XML_SEPA_INFO .= ' </Dbtr>'.$CrLf;
|
||||||
@ -2186,26 +2186,26 @@ class BonPrelevement extends CommonObject
|
|||||||
$XML_SEPA_INFO .= ' </FinInstnId>'.$CrLf;
|
$XML_SEPA_INFO .= ' </FinInstnId>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' </DbtrAgt>'.$CrLf;
|
$XML_SEPA_INFO .= ' </DbtrAgt>'.$CrLf;
|
||||||
/* $XML_SEPA_INFO .= ' <UltmtCdtr>'.$CrLf;
|
/* $XML_SEPA_INFO .= ' <UltmtCdtr>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' <Nm>'.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale)))).'</Nm>'.$CrLf;
|
$XML_SEPA_INFO .= ' <Nm>'.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale), ' '))).'</Nm>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' <PstlAdr>'.$CrLf;
|
$XML_SEPA_INFO .= ' <PstlAdr>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' <Ctry>'.$country[1].'</Ctry>'.$CrLf;
|
$XML_SEPA_INFO .= ' <Ctry>'.$country[1].'</Ctry>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' <AdrLine>'.dolEscapeXML(dol_string_nospecial(dol_string_unaccent($conf->global->MAIN_INFO_SOCIETE_ADDRESS), '')).'</AdrLine>'.$CrLf;
|
$XML_SEPA_INFO .= ' <AdrLine>'.dolEscapeXML(dol_string_nospecial(dol_string_unaccent($conf->global->MAIN_INFO_SOCIETE_ADDRESS), ' ')).'</AdrLine>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' <AdrLine>'.dolEscapeXML(dol_string_nospecial(dol_string_unaccent($conf->global->MAIN_INFO_SOCIETE_ZIP.' '.$conf->global->MAIN_INFO_SOCIETE_TOWN), '')).'</AdrLine>'.$CrLf;
|
$XML_SEPA_INFO .= ' <AdrLine>'.dolEscapeXML(dol_string_nospecial(dol_string_unaccent($conf->global->MAIN_INFO_SOCIETE_ZIP.' '.$conf->global->MAIN_INFO_SOCIETE_TOWN), ' ')).'</AdrLine>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' </PstlAdr>'.$CrLf;
|
$XML_SEPA_INFO .= ' </PstlAdr>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' </UltmtCdtr>'.$CrLf;*/
|
$XML_SEPA_INFO .= ' </UltmtCdtr>'.$CrLf;*/
|
||||||
$XML_SEPA_INFO .= ' <ChrgBr>SLEV</ChrgBr>'.$CrLf; // Field "Responsible of fees". Must be SLEV
|
$XML_SEPA_INFO .= ' <ChrgBr>SLEV</ChrgBr>'.$CrLf; // Field "Responsible of fees". Must be SLEV
|
||||||
/*$XML_SEPA_INFO .= ' <CdtrSchmeId>'.$CrLf;
|
/*$XML_SEPA_INFO .= ' <CdtrSchmeId>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' <Id>'.$CrLf;
|
$XML_SEPA_INFO .= ' <Id>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' <PrvtId>'.$CrLf;
|
$XML_SEPA_INFO .= ' <PrvtId>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' <Othr>'.$CrLf;
|
$XML_SEPA_INFO .= ' <Othr>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' <Id>'.$this->emetteur_ics.'</Id>'.$CrLf;
|
$XML_SEPA_INFO .= ' <Id>'.$this->emetteur_ics.'</Id>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' <SchmeNm>'.$CrLf;
|
$XML_SEPA_INFO .= ' <SchmeNm>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' <Prtry>SEPA</Prtry>'.$CrLf;
|
$XML_SEPA_INFO .= ' <Prtry>SEPA</Prtry>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' </SchmeNm>'.$CrLf;
|
$XML_SEPA_INFO .= ' </SchmeNm>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' </Othr>'.$CrLf;
|
$XML_SEPA_INFO .= ' </Othr>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' </PrvtId>'.$CrLf;
|
$XML_SEPA_INFO .= ' </PrvtId>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' </Id>'.$CrLf;
|
$XML_SEPA_INFO .= ' </Id>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' </CdtrSchmeId>'.$CrLf;*/
|
$XML_SEPA_INFO .= ' </CdtrSchmeId>'.$CrLf;*/
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
fputs($this->file, 'INCORRECT EMETTEUR '.$XML_SEPA_INFO.$CrLf);
|
fputs($this->file, 'INCORRECT EMETTEUR '.$XML_SEPA_INFO.$CrLf);
|
||||||
@ -2343,59 +2343,59 @@ class BonPrelevement extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if ($mode == 'direct_debit') {
|
if ($mode == 'direct_debit') {
|
||||||
$sql = "SELECT b.rowid, f.datedue as datefin";
|
$sql = "SELECT b.rowid, f.datedue as datefin";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f";
|
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f";
|
||||||
$sql .= " WHERE f.entity IN (".getEntity('facture').")";
|
$sql .= " WHERE f.entity IN (".getEntity('facture').")";
|
||||||
$sql .= " AND f.total_ttc > 0";
|
$sql .= " AND f.total_ttc > 0";
|
||||||
} else {
|
} else {
|
||||||
$sql = "SELECT b.rowid, f.datedue as datefin";
|
$sql = "SELECT b.rowid, f.datedue as datefin";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f";
|
$sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f";
|
||||||
$sql .= " WHERE f.entity IN (".getEntity('facture_fourn').")";
|
$sql .= " WHERE f.entity IN (".getEntity('facture_fourn').")";
|
||||||
$sql .= " AND f.total_ttc > 0";
|
$sql .= " AND f.total_ttc > 0";
|
||||||
}
|
}
|
||||||
|
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
$now = dol_now();
|
$now = dol_now();
|
||||||
|
|
||||||
$response = new WorkboardResponse();
|
$response = new WorkboardResponse();
|
||||||
if ($mode == 'direct_debit') {
|
if ($mode == 'direct_debit') {
|
||||||
$response->warning_delay = $conf->prelevement->warning_delay / 60 / 60 / 24;
|
$response->warning_delay = $conf->prelevement->warning_delay / 60 / 60 / 24;
|
||||||
$response->label = $langs->trans("PendingDirectDebitToComplete");
|
$response->label = $langs->trans("PendingDirectDebitToComplete");
|
||||||
$response->labelShort = $langs->trans("PendingDirectDebitToCompleteShort");
|
$response->labelShort = $langs->trans("PendingDirectDebitToCompleteShort");
|
||||||
$response->url = DOL_URL_ROOT.'/compta/prelevement/index.php?leftmenu=checks&mainmenu=bank';
|
$response->url = DOL_URL_ROOT.'/compta/prelevement/index.php?leftmenu=checks&mainmenu=bank';
|
||||||
} else {
|
} else {
|
||||||
$response->warning_delay = $conf->paymentbybanktransfer->warning_delay / 60 / 60 / 24;
|
$response->warning_delay = $conf->paymentbybanktransfer->warning_delay / 60 / 60 / 24;
|
||||||
$response->label = $langs->trans("PendingCreditTransferToComplete");
|
$response->label = $langs->trans("PendingCreditTransferToComplete");
|
||||||
$response->labelShort = $langs->trans("PendingCreditTransferToCompleteShort");
|
$response->labelShort = $langs->trans("PendingCreditTransferToCompleteShort");
|
||||||
$response->url = DOL_URL_ROOT.'/compta/paymentbybanktransfer/index.php?leftmenu=checks&mainmenu=bank';
|
$response->url = DOL_URL_ROOT.'/compta/paymentbybanktransfer/index.php?leftmenu=checks&mainmenu=bank';
|
||||||
}
|
}
|
||||||
$response->img = img_object('', "payment");
|
$response->img = img_object('', "payment");
|
||||||
|
|
||||||
while ($obj = $this->db->fetch_object($resql)) {
|
while ($obj = $this->db->fetch_object($resql)) {
|
||||||
$response->nbtodo++;
|
$response->nbtodo++;
|
||||||
|
|
||||||
if ($this->db->jdate($obj->datefin) < ($now - $conf->withdraw->warning_delay)) {
|
if ($this->db->jdate($obj->datefin) < ($now - $conf->withdraw->warning_delay)) {
|
||||||
$response->nbtodolate++;
|
$response->nbtodolate++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$response->nbtodo = 0;
|
$response->nbtodo = 0;
|
||||||
$response->nbtodolate = 0;
|
$response->nbtodolate = 0;
|
||||||
// Return workboard only if quantity is not 0
|
// Return workboard only if quantity is not 0
|
||||||
if ($response->nbtodo) {
|
if ($response->nbtodo) {
|
||||||
return $response;
|
return $response;
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
dol_print_error($this->db);
|
dol_print_error($this->db);
|
||||||
$this->error = $this->db->error();
|
$this->error = $this->db->error();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2005-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2005-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2010-2018 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2018 Juanjo Menent <jmenent@2byte.es>
|
||||||
|
* Copyright (C) 2022 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -108,7 +109,7 @@ llxHeader('', $langs->trans("WithdrawalsLines"));
|
|||||||
|
|
||||||
$sql = "SELECT p.rowid, p.ref, p.statut as status, p.datec";
|
$sql = "SELECT p.rowid, p.ref, p.statut as status, p.datec";
|
||||||
$sql .= " , f.rowid as facid, f.ref as invoiceref, f.total_ttc";
|
$sql .= " , f.rowid as facid, f.ref as invoiceref, f.total_ttc";
|
||||||
$sql .= " , s.rowid as socid, s.nom as name, s.code_client, s.email";
|
$sql .= " , s.rowid as socid, s.nom as name, s.code_client, s.code_fournisseur, s.email";
|
||||||
$sql .= " , pl.amount, pl.statut as statut_ligne, pl.rowid as rowid_ligne";
|
$sql .= " , pl.amount, pl.statut as statut_ligne, pl.rowid as rowid_ligne";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p";
|
$sql .= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p";
|
||||||
$sql .= " , ".MAIN_DB_PREFIX."prelevement_lignes as pl";
|
$sql .= " , ".MAIN_DB_PREFIX."prelevement_lignes as pl";
|
||||||
@ -139,7 +140,7 @@ if ($search_bon) {
|
|||||||
}
|
}
|
||||||
if ($type == 'bank-transfer') {
|
if ($type == 'bank-transfer') {
|
||||||
if ($search_code) {
|
if ($search_code) {
|
||||||
$sql .= natural_search("s.code_fourn", $search_code);
|
$sql .= natural_search("s.code_fournisseur", $search_code);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ($search_code) {
|
if ($search_code) {
|
||||||
@ -172,6 +173,9 @@ if ($result) {
|
|||||||
|
|
||||||
$param = "&statut=".urlencode($statut);
|
$param = "&statut=".urlencode($statut);
|
||||||
$param .= "&search_bon=".urlencode($search_bon);
|
$param .= "&search_bon=".urlencode($search_bon);
|
||||||
|
if ($type == 'bank-transfer') {
|
||||||
|
$param .= '&type=bank-transfer';
|
||||||
|
}
|
||||||
if ($limit > 0 && $limit != $conf->liste_limit) {
|
if ($limit > 0 && $limit != $conf->liste_limit) {
|
||||||
$param .= '&limit='.urlencode($limit);
|
$param .= '&limit='.urlencode($limit);
|
||||||
}
|
}
|
||||||
@ -204,7 +208,7 @@ if ($result) {
|
|||||||
print '<td class="liste_titre"><input type="text" class="flat" name="search_bon" value="'.dol_escape_htmltag($search_bon).'" size="6"></td>';
|
print '<td class="liste_titre"><input type="text" class="flat" name="search_bon" value="'.dol_escape_htmltag($search_bon).'" size="6"></td>';
|
||||||
print '<td class="liste_titre"> </td>';
|
print '<td class="liste_titre"> </td>';
|
||||||
print '<td class="liste_titre"><input type="text" class="flat" name="search_company" value="'.dol_escape_htmltag($search_company).'" size="6"></td>';
|
print '<td class="liste_titre"><input type="text" class="flat" name="search_company" value="'.dol_escape_htmltag($search_company).'" size="6"></td>';
|
||||||
print '<td class="liste_titre" align="center"><input type="text" class="flat" name="search_code" value="'.dol_escape_htmltag($search_code).'" size="6"></td>';
|
print '<td class="liste_titre center"><input type="text" class="flat" name="search_code" value="'.dol_escape_htmltag($search_code).'" size="6"></td>';
|
||||||
print '<td class="liste_titre"> </td>';
|
print '<td class="liste_titre"> </td>';
|
||||||
print '<td class="liste_titre"> </td>';
|
print '<td class="liste_titre"> </td>';
|
||||||
print '<td class="liste_titre maxwidthsearch">';
|
print '<td class="liste_titre maxwidthsearch">';
|
||||||
@ -214,8 +218,12 @@ if ($result) {
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
$columntitle = "WithdrawalsReceipts";
|
$columntitle = "WithdrawalsReceipts";
|
||||||
|
$columntitlethirdparty = "CustomerCode";
|
||||||
|
$columncodethirdparty = "s.code_client";
|
||||||
if ($type == 'bank-transfer') {
|
if ($type == 'bank-transfer') {
|
||||||
$columntitle = "BankTransferReceipts";
|
$columntitle = "BankTransferReceipts";
|
||||||
|
$columntitlethirdparty = "SupplierCode";
|
||||||
|
$columncodethirdparty = "s.code_fournisseur";
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
@ -223,7 +231,7 @@ if ($result) {
|
|||||||
print_liste_field_titre("Line", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
|
print_liste_field_titre("Line", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Bill", $_SERVER["PHP_SELF"], "f.ref", '', $param, '', $sortfield, $sortorder);
|
print_liste_field_titre("Bill", $_SERVER["PHP_SELF"], "f.ref", '', $param, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "s.nom", '', $param, '', $sortfield, $sortorder);
|
print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "s.nom", '', $param, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("CustomerCode", $_SERVER["PHP_SELF"], "s.code_client", '', $param, '', $sortfield, $sortorder, 'center ');
|
print_liste_field_titre($columntitlethirdparty, $_SERVER["PHP_SELF"], $columncodethirdparty, '', $param, '', $sortfield, $sortorder, 'center ');
|
||||||
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "p.datec", "", $param, '', $sortfield, $sortorder, 'center ');
|
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "p.datec", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "pl.amount", "", $param, '', $sortfield, $sortorder, 'right ');
|
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "pl.amount", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||||
print_liste_field_titre('');
|
print_liste_field_titre('');
|
||||||
@ -256,9 +264,17 @@ if ($result) {
|
|||||||
print '</a></td>';
|
print '</a></td>';
|
||||||
|
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print '<a href="'.DOL_URL_ROOT.'/compta/facture/card.php?facid='.$obj->facid.'">';
|
$link_to_bill = '/compta/facture/card.php?facid=';
|
||||||
print img_object($langs->trans("ShowBill"), "bill");
|
$link_title = 'Invoice';
|
||||||
print ' <a href="'.DOL_URL_ROOT.'/compta/facture/card.php?facid='.$obj->facid.'">'.$obj->invoiceref."</a></td>\n";
|
$link_picto = 'bill';
|
||||||
|
if ($type == 'bank-transfer') {
|
||||||
|
$link_to_bill = '/fourn/facture/card.php?facid=';
|
||||||
|
$link_title = 'SupplierInvoice';
|
||||||
|
$link_picto = 'supplier_invoice';
|
||||||
|
}
|
||||||
|
print '<a href="'.DOL_URL_ROOT.$link_to_bill.$obj->facid.'">';
|
||||||
|
print img_object($langs->trans($link_title), $link_picto);
|
||||||
|
print ' '.$obj->invoiceref."</td>\n";
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
@ -266,7 +282,15 @@ if ($result) {
|
|||||||
print $company->getNomUrl(1);
|
print $company->getNomUrl(1);
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
|
|
||||||
print '<td align="center"><a href="card.php?id='.$obj->rowid.'">'.$obj->code_client."</a></td>\n";
|
|
||||||
|
print '<td class="center">';
|
||||||
|
$link_to_tab = '/comm/card.php?socid=';
|
||||||
|
$link_code = $obj->code_client;
|
||||||
|
if ($type == 'bank-transfer') {
|
||||||
|
$link_to_tab = '/fourn/card.php?socid=';
|
||||||
|
$link_code = $obj->code_fournisseur;
|
||||||
|
}
|
||||||
|
print '<a href="'.DOL_URL_ROOT.$link_to_tab.$company->id.'">'.$link_code."</a></td>\n";
|
||||||
|
|
||||||
print '<td class="center">'.dol_print_date($db->jdate($obj->datec), 'day')."</td>\n";
|
print '<td class="center">'.dol_print_date($db->jdate($obj->datec), 'day')."</td>\n";
|
||||||
|
|
||||||
|
|||||||
@ -132,6 +132,9 @@ if ($result) {
|
|||||||
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
|
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
|
||||||
$param .= '&contextpage='.urlencode($contextpage);
|
$param .= '&contextpage='.urlencode($contextpage);
|
||||||
}
|
}
|
||||||
|
if ($type == 'bank-transfer') {
|
||||||
|
$param .= '&type=bank-transfer';
|
||||||
|
}
|
||||||
if ($limit > 0 && $limit != $conf->liste_limit) {
|
if ($limit > 0 && $limit != $conf->liste_limit) {
|
||||||
$param .= '&limit='.urlencode($limit);
|
$param .= '&limit='.urlencode($limit);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -74,6 +74,7 @@ if (!$error && $massaction == 'confirm_presend') {
|
|||||||
$nbignored = 0;
|
$nbignored = 0;
|
||||||
$langs->load("mails");
|
$langs->load("mails");
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/signature.lib.php';
|
||||||
|
|
||||||
$listofobjectid = array();
|
$listofobjectid = array();
|
||||||
$listofobjectthirdparties = array();
|
$listofobjectthirdparties = array();
|
||||||
@ -642,6 +643,8 @@ if ($massaction == 'confirm_createbills') { // Create bills from orders.
|
|||||||
|
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
|
$nbOrders = is_array($orders) ? count($orders) : 1;
|
||||||
|
|
||||||
foreach ($orders as $id_order) {
|
foreach ($orders as $id_order) {
|
||||||
$cmd = new Commande($db);
|
$cmd = new Commande($db);
|
||||||
if ($cmd->fetch($id_order) <= 0) {
|
if ($cmd->fetch($id_order) <= 0) {
|
||||||
@ -774,6 +777,8 @@ if ($massaction == 'confirm_createbills') { // Create bills from orders.
|
|||||||
|
|
||||||
$objecttmp->context['createfromclone'];
|
$objecttmp->context['createfromclone'];
|
||||||
|
|
||||||
|
$rankedLine = ($nbOrders > 1) ? -1 : $lines[$i]->rang;
|
||||||
|
|
||||||
$result = $objecttmp->addline(
|
$result = $objecttmp->addline(
|
||||||
$desc,
|
$desc,
|
||||||
$lines[$i]->subprice,
|
$lines[$i]->subprice,
|
||||||
@ -791,7 +796,9 @@ if ($massaction == 'confirm_createbills') { // Create bills from orders.
|
|||||||
'HT',
|
'HT',
|
||||||
0,
|
0,
|
||||||
$product_type,
|
$product_type,
|
||||||
$lines[$i]->rang,
|
//we have define the max rank for each line which makes it possible not to have a duplicate on the rank field in the case of several orders
|
||||||
|
//-1 will give us the right number
|
||||||
|
$rankedLine, // rank
|
||||||
$lines[$i]->special_code,
|
$lines[$i]->special_code,
|
||||||
$objecttmp->origin,
|
$objecttmp->origin,
|
||||||
$lines[$i]->rowid,
|
$lines[$i]->rowid,
|
||||||
|
|||||||
@ -1759,7 +1759,7 @@ class ExtraFields
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$value = '<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">'.implode(' ', $toprint).'</ul></div>';
|
if (!empty($toprint)) $value = '<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">'.implode(' ', $toprint).'</ul></div>';
|
||||||
} else {
|
} else {
|
||||||
dol_syslog(get_class($this).'::showOutputField error '.$this->db->lasterror(), LOG_WARNING);
|
dol_syslog(get_class($this).'::showOutputField error '.$this->db->lasterror(), LOG_WARNING);
|
||||||
}
|
}
|
||||||
@ -1950,7 +1950,7 @@ class ExtraFields
|
|||||||
if (!empty($onlykey) && $onlykey != '@GETPOSTISSET' && $key != $onlykey) {
|
if (!empty($onlykey) && $onlykey != '@GETPOSTISSET' && $key != $onlykey) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!empty($onlykey) && $onlykey == '@GETPOSTISSET' && !GETPOSTISSET('options_'.$key) && $this->attributes[$object->table_element]['type'][$key] != 'boolean') {
|
if (!empty($onlykey) && $onlykey == '@GETPOSTISSET' && !GETPOSTISSET('options_'.$key) && (! in_array($this->attributes[$object->table_element]['type'][$key], array('boolean', 'chkbxlst')))) {
|
||||||
//when unticking boolean field, it's not set in POST
|
//when unticking boolean field, it's not set in POST
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -843,12 +843,12 @@ function show_projects($conf, $langs, $db, $object, $backtopage = '', $nocreatel
|
|||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<td>';
|
print '<td class="nowraponall">';
|
||||||
print $projecttmp->getNomUrl(1);
|
print $projecttmp->getNomUrl(1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Label
|
// Label
|
||||||
print '<td>'.$obj->title.'</td>';
|
print '<td class="tdoverflowmax200" title="'.dol_escape_htmltag($obj->title).'">'.dol_escape_htmltag($obj->title).'</td>';
|
||||||
// Date start
|
// Date start
|
||||||
print '<td class="center">'.dol_print_date($db->jdate($obj->do), "day").'</td>';
|
print '<td class="center">'.dol_print_date($db->jdate($obj->do), "day").'</td>';
|
||||||
// Date end
|
// Date end
|
||||||
|
|||||||
@ -5187,9 +5187,10 @@ function print_fleche_navigation($page, $file, $options = '', $nextpage = 0, $be
|
|||||||
* @param boolean $addpercent Add a percent % sign in output
|
* @param boolean $addpercent Add a percent % sign in output
|
||||||
* @param int $info_bits Miscellaneous information on vat (0=Default, 1=French NPR vat)
|
* @param int $info_bits Miscellaneous information on vat (0=Default, 1=French NPR vat)
|
||||||
* @param int $usestarfornpr -1=Never show, 0 or 1=Use '*' for NPR vat rates
|
* @param int $usestarfornpr -1=Never show, 0 or 1=Use '*' for NPR vat rates
|
||||||
|
* @param int $html Used for html output
|
||||||
* @return string String with formated amounts ('19,6' or '19,6%' or '8.5% (NPR)' or '8.5% *' or '19,6 (CODEX)')
|
* @return string String with formated amounts ('19,6' or '19,6%' or '8.5% (NPR)' or '8.5% *' or '19,6 (CODEX)')
|
||||||
*/
|
*/
|
||||||
function vatrate($rate, $addpercent = false, $info_bits = 0, $usestarfornpr = 0)
|
function vatrate($rate, $addpercent = false, $info_bits = 0, $usestarfornpr = 0, $html = 0)
|
||||||
{
|
{
|
||||||
$morelabel = '';
|
$morelabel = '';
|
||||||
|
|
||||||
@ -5197,9 +5198,11 @@ function vatrate($rate, $addpercent = false, $info_bits = 0, $usestarfornpr = 0)
|
|||||||
$rate = str_replace('%', '', $rate);
|
$rate = str_replace('%', '', $rate);
|
||||||
$addpercent = true;
|
$addpercent = true;
|
||||||
}
|
}
|
||||||
|
$reg = array();
|
||||||
if (preg_match('/\((.*)\)/', $rate, $reg)) {
|
if (preg_match('/\((.*)\)/', $rate, $reg)) {
|
||||||
$morelabel = ' ('.$reg[1].')';
|
$morelabel = ' ('.$reg[1].')';
|
||||||
$rate = preg_replace('/\s*'.preg_quote($morelabel, '/').'/', '', $rate);
|
$rate = preg_replace('/\s*'.preg_quote($morelabel, '/').'/', '', $rate);
|
||||||
|
$morelabel = ' '.($html ? '<span class="opacitymedium">' : '').'('.$reg[1].')'.($html ? '</span>' : '');
|
||||||
}
|
}
|
||||||
if (preg_match('/\*/', $rate)) {
|
if (preg_match('/\*/', $rate)) {
|
||||||
$rate = str_replace('*', '', $rate);
|
$rate = str_replace('*', '', $rate);
|
||||||
|
|||||||
@ -1165,6 +1165,7 @@ function getCustomerInvoiceUnpaidOpenTable($maxCount = 500, $socid = 0)
|
|||||||
$i++;
|
$i++;
|
||||||
$total += $obj->total_ht;
|
$total += $obj->total_ht;
|
||||||
$total_ttc += $obj->total_ttc;
|
$total_ttc += $obj->total_ttc;
|
||||||
|
$totalam += $obj->am;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -26,7 +26,7 @@
|
|||||||
*/
|
*/
|
||||||
function showOnlineSignatureUrl($type, $ref)
|
function showOnlineSignatureUrl($type, $ref)
|
||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $langs;
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("payment", "paybox"));
|
$langs->loadLangs(array("payment", "paybox"));
|
||||||
@ -59,7 +59,8 @@ function showOnlineSignatureUrl($type, $ref)
|
|||||||
*/
|
*/
|
||||||
function getOnlineSignatureUrl($mode, $type, $ref = '', $localorexternal = 1)
|
function getOnlineSignatureUrl($mode, $type, $ref = '', $localorexternal = 1)
|
||||||
{
|
{
|
||||||
global $conf, $db, $langs, $dolibarr_main_url_root;
|
global $conf, $dolibarr_main_url_root;
|
||||||
|
global $object;
|
||||||
|
|
||||||
$ref = str_replace(' ', '', $ref);
|
$ref = str_replace(' ', '', $ref);
|
||||||
$out = '';
|
$out = '';
|
||||||
@ -90,7 +91,7 @@ function getOnlineSignatureUrl($mode, $type, $ref = '', $localorexternal = 1)
|
|||||||
if ($mode == 1) {
|
if ($mode == 1) {
|
||||||
$out .= "hash('".$securekeyseed."' + '".$type."' + proposal_ref)";
|
$out .= "hash('".$securekeyseed."' + '".$type."' + proposal_ref)";
|
||||||
} else {
|
} else {
|
||||||
$out .= '&securekey='.dol_hash($securekeyseed.$type.$ref, '0');
|
$out .= '&securekey='.dol_hash($securekeyseed.$type.$ref.$object->entity, '0');
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
if ($mode == 1) {
|
if ($mode == 1) {
|
||||||
@ -120,7 +121,7 @@ function getOnlineSignatureUrl($mode, $type, $ref = '', $localorexternal = 1)
|
|||||||
|
|
||||||
// For multicompany
|
// For multicompany
|
||||||
if (!empty($out) && !empty($conf->multicompany->enabled)) {
|
if (!empty($out) && !empty($conf->multicompany->enabled)) {
|
||||||
$out .= "&entity=".$conf->entity; // Check the entity because we may have the same reference in several entities
|
$out .= "&entity=".$object->entity; // Check the entity of object because we may have the same reference in several entities
|
||||||
}
|
}
|
||||||
|
|
||||||
return $out;
|
return $out;
|
||||||
|
|||||||
@ -93,7 +93,8 @@ class modIncoterm extends DolibarrModules
|
|||||||
'tabfieldvalue'=>array("code,libelle"), // List of fields (list of fields to edit a record)
|
'tabfieldvalue'=>array("code,libelle"), // List of fields (list of fields to edit a record)
|
||||||
'tabfieldinsert'=>array("code,libelle"), // List of fields (list of fields for insert)
|
'tabfieldinsert'=>array("code,libelle"), // List of fields (list of fields for insert)
|
||||||
'tabrowid'=>array("rowid"), // Name of columns with primary key (try to always name it 'rowid')
|
'tabrowid'=>array("rowid"), // Name of columns with primary key (try to always name it 'rowid')
|
||||||
'tabcond'=>array($conf->incoterm->enabled)
|
'tabcond'=>array($conf->incoterm->enabled),
|
||||||
|
'tabhelp' => array(array())
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->boxes = array(); // List of boxes
|
$this->boxes = array(); // List of boxes
|
||||||
|
|||||||
@ -231,7 +231,8 @@ class modPartnership extends DolibarrModules
|
|||||||
// Name of columns with primary key (try to always name it 'rowid')
|
// Name of columns with primary key (try to always name it 'rowid')
|
||||||
'tabrowid'=>array("rowid"),
|
'tabrowid'=>array("rowid"),
|
||||||
// Condition to show each dictionary
|
// Condition to show each dictionary
|
||||||
'tabcond'=>array($conf->partnership->enabled)
|
'tabcond'=>array($conf->partnership->enabled),
|
||||||
|
'tabhelp' => array(array())
|
||||||
);
|
);
|
||||||
|
|
||||||
// Boxes/Widgets
|
// Boxes/Widgets
|
||||||
|
|||||||
@ -239,22 +239,26 @@ class modResource extends DolibarrModules
|
|||||||
$this->export_code[$r] = $this->rights_class.'_'.$r;
|
$this->export_code[$r] = $this->rights_class.'_'.$r;
|
||||||
$this->export_label[$r] = "ResourceSingular"; // Translation key (used only if key ExportDataset_xxx_z not found)
|
$this->export_label[$r] = "ResourceSingular"; // Translation key (used only if key ExportDataset_xxx_z not found)
|
||||||
$this->export_permission[$r] = array(array("resource", "read"));
|
$this->export_permission[$r] = array(array("resource", "read"));
|
||||||
$this->export_fields_array[$r] = array('r.rowid'=>'IdResource', 'r.ref'=>'ResourceFormLabel_ref', 'c.code'=>'ResourceTypeCode', 'c.label'=>'ResourceType', 'r.description'=>'ResourceFormLabel_description', 'r.note_private'=>"NotePrivate", 'r.note_public'=>"NotePublic", 'r.asset_number'=>'AssetNumber', 'r.datec'=>"DateCreation", 'r.tms'=>"DateLastModification");
|
|
||||||
|
$this->export_fields_array[$r] = array('r.rowid'=>'IdResource', 'r.ref'=>'ResourceFormLabel_ref', 'c.rowid'=>'ResourceTypeID', 'c.code'=>'ResourceTypeCode', 'c.label'=>'ResourceTypeLabel', 'r.description'=>'ResourceFormLabel_description', 'r.note_private'=>"NotePrivate", 'r.note_public'=>"NotePublic", 'r.asset_number'=>'AssetNumber', 'r.datec'=>"DateCreation", 'r.tms'=>"DateLastModification");
|
||||||
$this->export_TypeFields_array[$r] = array('r.rowid'=>'List:resource:ref', 'r.ref'=>'Text', 'r.asset_number'=>'Text', 'r.description'=>'Text', 'c.code'=>'Text', 'c.label'=>'List:c_type_resource:label', 'r.datec'=>'Date', 'r.tms'=>'Date', 'r.note_private'=>'Text', 'r.note_public'=>'Text');
|
$this->export_TypeFields_array[$r] = array('r.rowid'=>'List:resource:ref', 'r.ref'=>'Text', 'r.asset_number'=>'Text', 'r.description'=>'Text', 'c.code'=>'Text', 'c.label'=>'List:c_type_resource:label', 'r.datec'=>'Date', 'r.tms'=>'Date', 'r.note_private'=>'Text', 'r.note_public'=>'Text');
|
||||||
$this->export_entities_array[$r] = array('r.rowid'=>'resource', 'r.ref'=>'resource', 'c.code'=>'resource', 'c.label'=>'resource', 'r.description'=>'resource', 'r.note_private'=>"resource", 'r.resource'=>"resource", 'r.asset_number'=>'resource', 'r.datec'=>"resource", 'r.tms'=>"resource");
|
$this->export_entities_array[$r] = array('r.rowid'=>'resource', 'r.ref'=>'resource', 'c.code'=>'resource', 'c.label'=>'resource', 'r.description'=>'resource', 'r.note_private'=>"resource", 'r.resource'=>"resource", 'r.asset_number'=>'resource', 'r.datec'=>"resource", 'r.tms'=>"resource");
|
||||||
|
|
||||||
$keyforselect = 'resource';
|
$keyforselect = 'resource';
|
||||||
$keyforelement = 'resource';
|
$keyforelement = 'resource';
|
||||||
$keyforaliasextra = 'extra';
|
$keyforaliasextra = 'extra';
|
||||||
|
|
||||||
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
|
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
|
||||||
|
|
||||||
$this->export_dependencies_array[$r] = array('resource'=>array('r.rowid')); // We must keep this until the aggregate_array is used. To add unique key if we ask a field of a child to avoid the DISTINCT to discard them.
|
$this->export_dependencies_array[$r] = array('resource'=>array('r.rowid')); // We must keep this until the aggregate_array is used. To add unique key if we ask a field of a child to avoid the DISTINCT to discard them.
|
||||||
$this->export_sql_start[$r] = 'SELECT DISTINCT ';
|
$this->export_sql_start[$r] = 'SELECT DISTINCT ';
|
||||||
$this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'resource as r';
|
$this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'resource as r';
|
||||||
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_type_resource as c ON c.rowid=r.fk_code_type_resource';
|
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_type_resource as c ON c.code = r.fk_code_type_resource';
|
||||||
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'resource_extrafields as extra ON extra.fk_object = r.rowid';
|
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'resource_extrafields as extra ON extra.fk_object = r.rowid';
|
||||||
$this->export_sql_end[$r] .= ' WHERE r.entity IN ('.getEntity('resource').')';
|
$this->export_sql_end[$r] .= ' WHERE r.entity IN ('.getEntity('resource').')';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Imports
|
// Imports
|
||||||
//--------
|
//--------
|
||||||
$r = 0;
|
$r = 0;
|
||||||
|
|||||||
@ -611,7 +611,7 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
* Lines or orders with quantity shipped and remain to ship
|
* Lines or orders with quantity shipped and remain to ship
|
||||||
* Note: Qty shipped are already available into $object->expeditions[fk_product]
|
* Note: Qty shipped are already available into $object->expeditions[fk_product]
|
||||||
*/
|
*/
|
||||||
print '<table class="noborder noshadow" width="100%">';
|
print '<table id="tablelines" class="noborder noshadow" width="100%">';
|
||||||
|
|
||||||
$sql = "SELECT cd.rowid, cd.fk_product, cd.product_type as type, cd.label, cd.description,";
|
$sql = "SELECT cd.rowid, cd.fk_product, cd.product_type as type, cd.label, cd.description,";
|
||||||
$sql .= " cd.price, cd.tva_tx, cd.subprice,";
|
$sql .= " cd.price, cd.tva_tx, cd.subprice,";
|
||||||
@ -636,18 +636,19 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
if ($resql) {
|
if ($resql) {
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
print '<thead>';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Description").'</td>';
|
print '<th>'.$langs->trans("Description").'</th>';
|
||||||
print '<td class="center">'.$langs->trans("QtyOrdered").'</td>';
|
print '<th class="center">'.$langs->trans("QtyOrdered").'</th>';
|
||||||
print '<td class="center">'.$langs->trans("QtyShipped").'</td>';
|
print '<th class="center">'.$langs->trans("QtyShipped").'</th>';
|
||||||
print '<td class="center">'.$langs->trans("KeepToShip").'</td>';
|
print '<th class="center">'.$langs->trans("KeepToShip").'</th>';
|
||||||
if (!empty($conf->stock->enabled)) {
|
if (!empty($conf->stock->enabled)) {
|
||||||
print '<td class="center">'.$langs->trans("RealStock").'</td>';
|
print '<th class="center">'.$langs->trans("RealStock").'</th>';
|
||||||
} else {
|
} else {
|
||||||
print '<td> </td>';
|
print '<th> </th>';
|
||||||
}
|
}
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
print '</thead>';
|
||||||
|
|
||||||
$toBeShipped = array();
|
$toBeShipped = array();
|
||||||
$toBeShippedTotal = 0;
|
$toBeShippedTotal = 0;
|
||||||
|
|||||||
@ -263,7 +263,7 @@ if (empty($reshook)) {
|
|||||||
if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->expensereport->creer))
|
if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->expensereport->creer))
|
||||||
|| (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->expensereport->creer) && empty($user->rights->expensereport->writeall_advance))) {
|
|| (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->expensereport->creer) && empty($user->rights->expensereport->writeall_advance))) {
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages($langs->trans("NotEnoughPermission"), null, 'errors');
|
setEventMessages($langs->trans("NotEnoughPermissions"), null, 'errors');
|
||||||
}
|
}
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->expensereport->writeall_advance)) {
|
if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->expensereport->writeall_advance)) {
|
||||||
|
|||||||
@ -482,7 +482,7 @@ if ($resql) {
|
|||||||
if ($canedit) {
|
if ($canedit) {
|
||||||
print '<a href="'.DOL_URL_ROOT.'/expensereport/card.php?action=create&fk_user_author='.$fuser->id.'" class="butAction">'.$langs->trans("AddTrip").'</a>';
|
print '<a href="'.DOL_URL_ROOT.'/expensereport/card.php?action=create&fk_user_author='.$fuser->id.'" class="butAction">'.$langs->trans("AddTrip").'</a>';
|
||||||
} else {
|
} else {
|
||||||
print '<a href="#" class="butActionRefused" title="'.$langs->trans("NotEnoughPermission").'">'.$langs->trans("AddTrip").'</a>';
|
print '<a href="#" class="butActionRefused" title="'.$langs->trans("NotEnoughPermissions").'">'.$langs->trans("AddTrip").'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|||||||
@ -960,7 +960,7 @@ class ProductFournisseur extends Product
|
|||||||
public function display_price_product_fournisseur($showunitprice = 1, $showsuptitle = 1, $maxlen = 0, $notooltip = 0, $productFournList = array())
|
public function display_price_product_fournisseur($showunitprice = 1, $showsuptitle = 1, $maxlen = 0, $notooltip = 0, $productFournList = array())
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
$out = '';
|
$out = '';
|
||||||
$langs->load("suppliers");
|
$langs->load("suppliers");
|
||||||
@ -978,7 +978,7 @@ class ProductFournisseur extends Product
|
|||||||
}
|
}
|
||||||
$out .= '</table>';
|
$out .= '</table>';
|
||||||
} else {
|
} else {
|
||||||
$out = ($showunitprice ? price($this->fourn_unitprice * (1 - $this->fourn_remise_percent / 100) + $this->fourn_remise).' '.$langs->trans("HT").' <span class="opacitymedium">(</span>' : '');
|
$out = ($showunitprice ? price($this->fourn_unitprice * (1 - $this->fourn_remise_percent / 100) + $this->fourn_remise, 0, $langs, 1, -1, -1, $conf->currency).' '.$langs->trans("HT").' <span class="opacitymedium">(</span>' : '');
|
||||||
$out .= ($showsuptitle ? '<span class="opacitymedium">'.$langs->trans("Supplier").'</span>: ' : '').$this->getSocNomUrl(1, 'supplier', $maxlen, $notooltip).' / <span class="opacitymedium">'.$langs->trans("SupplierRef").'</span>: '.$this->ref_supplier;
|
$out .= ($showsuptitle ? '<span class="opacitymedium">'.$langs->trans("Supplier").'</span>: ' : '').$this->getSocNomUrl(1, 'supplier', $maxlen, $notooltip).' / <span class="opacitymedium">'.$langs->trans("SupplierRef").'</span>: '.$this->ref_supplier;
|
||||||
$out .= ($showunitprice ? '<span class="opacitymedium">)</span>' : '');
|
$out .= ($showunitprice ? '<span class="opacitymedium">)</span>' : '');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -590,7 +590,7 @@ if (empty($reshook)) {
|
|||||||
$localtax1_tx,
|
$localtax1_tx,
|
||||||
$localtax2_tx,
|
$localtax2_tx,
|
||||||
$idprod,
|
$idprod,
|
||||||
0, // We already have the $idprod always defined
|
$productsupplier->product_fourn_price_id,
|
||||||
$ref_supplier,
|
$ref_supplier,
|
||||||
$remise_percent,
|
$remise_percent,
|
||||||
$price_base_type,
|
$price_base_type,
|
||||||
@ -2665,7 +2665,7 @@ if ($action == 'create') {
|
|||||||
$delallowed = $usercancreate;
|
$delallowed = $usercancreate;
|
||||||
$modelpdf = (!empty($object->model_pdf) ? $object->model_pdf : (empty($conf->global->COMMANDE_SUPPLIER_ADDON_PDF) ? '' : $conf->global->COMMANDE_SUPPLIER_ADDON_PDF));
|
$modelpdf = (!empty($object->model_pdf) ? $object->model_pdf : (empty($conf->global->COMMANDE_SUPPLIER_ADDON_PDF) ? '' : $conf->global->COMMANDE_SUPPLIER_ADDON_PDF));
|
||||||
|
|
||||||
print $formfile->showdocuments('commande_fournisseur', $objref, $filedir, $urlsource, $genallowed, $delallowed, $modelpdf, 1, 0, 0, 0, 0, '', '', '', $object->thirdparty->default_lang);
|
print $formfile->showdocuments('commande_fournisseur', $objref, $filedir, $urlsource, $genallowed, $delallowed, $modelpdf, 1, 0, 0, 0, 0, '', '', '', $object->thirdparty->default_lang, '', $object);
|
||||||
$somethingshown = $formfile->numoffiles;
|
$somethingshown = $formfile->numoffiles;
|
||||||
|
|
||||||
// Show links to link elements
|
// Show links to link elements
|
||||||
|
|||||||
@ -85,7 +85,8 @@ UPDATE llx_const set value = __ENCRYPT('eldy')__ WHERE __DECRYPT('value')__ = 'c
|
|||||||
DELETE FROM llx_user_param where param = 'MAIN_THEME' and value in ('auguria', 'amarok', 'cameleo');
|
DELETE FROM llx_user_param where param = 'MAIN_THEME' and value in ('auguria', 'amarok', 'cameleo');
|
||||||
|
|
||||||
ALTER TABLE llx_product_fournisseur_price ADD COLUMN packaging real DEFAULT NULL;
|
ALTER TABLE llx_product_fournisseur_price ADD COLUMN packaging real DEFAULT NULL;
|
||||||
ALTER TABLE llx_product_fournisseur_price MODIFY COLUMN packaging real DEFAULT NULL;
|
-- VMYSQL4.3 ALTER TABLE llx_product_fournisseur_price MODIFY COLUMN packaging real DEFAULT NULL;
|
||||||
|
-- VPGSQL8.2 ALTER TABLE llx_product_fournisseur_price MODIFY COLUMN packaging real DEFAULT NULL USING packaging::real;
|
||||||
|
|
||||||
|
|
||||||
-- For v14
|
-- For v14
|
||||||
|
|||||||
@ -344,7 +344,7 @@ KiloBytes=Kilobytes
|
|||||||
MegaBytes=Megabytes
|
MegaBytes=Megabytes
|
||||||
GigaBytes=Gigabytes
|
GigaBytes=Gigabytes
|
||||||
TeraBytes=Terabytes
|
TeraBytes=Terabytes
|
||||||
UserAuthor=Ceated by
|
UserAuthor=Created by
|
||||||
UserModif=Updated by
|
UserModif=Updated by
|
||||||
b=b.
|
b=b.
|
||||||
Kb=Kb
|
Kb=Kb
|
||||||
@ -709,6 +709,7 @@ FeatureDisabled=Feature disabled
|
|||||||
MoveBox=Move widget
|
MoveBox=Move widget
|
||||||
Offered=Offered
|
Offered=Offered
|
||||||
NotEnoughPermissions=You don't have permission for this action
|
NotEnoughPermissions=You don't have permission for this action
|
||||||
|
UserNotInHierachy=This action is reserved to the supervisors of this user
|
||||||
SessionName=Session name
|
SessionName=Session name
|
||||||
Method=Method
|
Method=Method
|
||||||
Receive=Receive
|
Receive=Receive
|
||||||
|
|||||||
@ -81,14 +81,14 @@ PaymentsReports=Rapports de règlements
|
|||||||
PaymentsAlreadyDone=Versements déjà effectués
|
PaymentsAlreadyDone=Versements déjà effectués
|
||||||
PaymentsBackAlreadyDone=Remboursements déjà effectués
|
PaymentsBackAlreadyDone=Remboursements déjà effectués
|
||||||
PaymentRule=Mode de paiement
|
PaymentRule=Mode de paiement
|
||||||
PaymentMode=Payment method
|
PaymentMode=Mode de règlement
|
||||||
PaymentModes=Payment methods
|
PaymentModes=Modes de règlement
|
||||||
DefaultPaymentMode=Default Payment method
|
DefaultPaymentMode=Mode de règlement par défaut
|
||||||
DefaultBankAccount=Compte bancaire par défaut
|
DefaultBankAccount=Compte bancaire par défaut
|
||||||
IdPaymentMode=Payment method (id)
|
IdPaymentMode=Mode de règlement (id)
|
||||||
CodePaymentMode=Payment method (code)
|
CodePaymentMode=Mode de règlement (code)
|
||||||
LabelPaymentMode=Payment method (label)
|
LabelPaymentMode=Mode de règlement (label)
|
||||||
PaymentModeShort=Payment method
|
PaymentModeShort=Mode règlement
|
||||||
PaymentTerm=Condition de règlement
|
PaymentTerm=Condition de règlement
|
||||||
PaymentConditions=Conditions de règlement
|
PaymentConditions=Conditions de règlement
|
||||||
PaymentConditionsShort=Conditions de règlement
|
PaymentConditionsShort=Conditions de règlement
|
||||||
|
|||||||
@ -130,7 +130,7 @@ function testSqlAndScriptInject($val, $type)
|
|||||||
$inj += preg_match('/user\s*\(/i', $val); // avoid to use function user() or mysql_user() that return current database login
|
$inj += preg_match('/user\s*\(/i', $val); // avoid to use function user() or mysql_user() that return current database login
|
||||||
$inj += preg_match('/information_schema/i', $val); // avoid to use request that read information_schema database
|
$inj += preg_match('/information_schema/i', $val); // avoid to use request that read information_schema database
|
||||||
$inj += preg_match('/<svg/i', $val); // <svg can be allowed in POST
|
$inj += preg_match('/<svg/i', $val); // <svg can be allowed in POST
|
||||||
$inj += preg_match('/update.+set.+=/i', $val);
|
$inj += preg_match('/update[^&].*set.+=/i', $val); // the [^&] test is to avoir error when request is like action=update&...set...
|
||||||
$inj += preg_match('/union.+select/i', $val);
|
$inj += preg_match('/union.+select/i', $val);
|
||||||
}
|
}
|
||||||
if ($type == 3) {
|
if ($type == 3) {
|
||||||
|
|||||||
@ -221,7 +221,10 @@ class modMyModule extends DolibarrModules
|
|||||||
// Name of columns with primary key (try to always name it 'rowid')
|
// Name of columns with primary key (try to always name it 'rowid')
|
||||||
'tabrowid'=>array("rowid", "rowid", "rowid"),
|
'tabrowid'=>array("rowid", "rowid", "rowid"),
|
||||||
// Condition to show each dictionary
|
// Condition to show each dictionary
|
||||||
'tabcond'=>array($conf->mymodule->enabled, $conf->mymodule->enabled, $conf->mymodule->enabled)
|
'tabcond'=>array($conf->mymodule->enabled, $conf->mymodule->enabled, $conf->mymodule->enabled),
|
||||||
|
// Tooltip for every fields of dictionaries: DO NOT PUT AN EMPTY ARRAY
|
||||||
|
'tabhelp'=>array(array('field1' => 'field1tooltip', 'field2' => 'field2tooltip'), array('field1' => 'field1tooltip', 'field2' => 'field2tooltip'), ...),
|
||||||
|
|
||||||
);
|
);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@ -103,6 +103,7 @@ if ($cancel) {
|
|||||||
$action = '';
|
$action = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$parameters = array();
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||||
if ($reshook < 0) {
|
if ($reshook < 0) {
|
||||||
|
|||||||
@ -1177,7 +1177,7 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_
|
|||||||
if (empty($positiverates)) {
|
if (empty($positiverates)) {
|
||||||
$positiverates = '0';
|
$positiverates = '0';
|
||||||
}
|
}
|
||||||
echo vatrate($positiverates.($object->default_vat_code ? ' ('.$object->default_vat_code.')' : ''), '%', $object->tva_npr);
|
echo vatrate($positiverates.($object->default_vat_code ? ' ('.$object->default_vat_code.')' : ''), '%', $object->tva_npr, 0, 1);
|
||||||
/*
|
/*
|
||||||
if ($object->default_vat_code)
|
if ($object->default_vat_code)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -137,7 +137,7 @@ if ($reshook < 0) {
|
|||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha') || GETPOST('valid')) { // Both test are required to be compatible with all browsers
|
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // Both test are required to be compatible with all browsers
|
||||||
$search_ref = '';
|
$search_ref = '';
|
||||||
$search_label = '';
|
$search_label = '';
|
||||||
$sall = '';
|
$sall = '';
|
||||||
@ -669,6 +669,8 @@ if ($search_ref || $search_label || $sall || $salert || $draftorder || GETPOST('
|
|||||||
if ($limit > 0 && $limit != $conf->liste_limit) {
|
if ($limit > 0 && $limit != $conf->liste_limit) {
|
||||||
$filters .= '&limit='.urlencode($limit);
|
$filters .= '&limit='.urlencode($limit);
|
||||||
}
|
}
|
||||||
|
if (!empty($includeproductswithoutdesiredqty)) $filters .= '&includeproductswithoutdesiredqty='.urlencode($includeproductswithoutdesiredqty);
|
||||||
|
if (!empty($salert)) $filters .= '&salert='.urlencode($salert);
|
||||||
|
|
||||||
$param = (isset($type) ? '&type='.urlencode($type) : '');
|
$param = (isset($type) ? '&type='.urlencode($type) : '');
|
||||||
$param .= '&fourn_id='.urlencode($fourn_id).'&search_label='.urlencode($search_label).'&includeproductswithoutdesiredqty='.urlencode($includeproductswithoutdesiredqty).'&salert='.urlencode($salert).'&draftorder='.urlencode($draftorder);
|
$param .= '&fourn_id='.urlencode($fourn_id).'&search_label='.urlencode($search_label).'&includeproductswithoutdesiredqty='.urlencode($includeproductswithoutdesiredqty).'&salert='.urlencode($salert).'&draftorder='.urlencode($draftorder);
|
||||||
@ -676,6 +678,8 @@ $param .= '&search_ref='.urlencode($search_ref);
|
|||||||
$param .= '&mode='.urlencode($mode);
|
$param .= '&mode='.urlencode($mode);
|
||||||
$param .= '&fk_supplier='.urlencode($fk_supplier);
|
$param .= '&fk_supplier='.urlencode($fk_supplier);
|
||||||
$param .= '&fk_entrepot='.urlencode($fk_entrepot);
|
$param .= '&fk_entrepot='.urlencode($fk_entrepot);
|
||||||
|
if (!empty($includeproductswithoutdesiredqty)) $param .= '&includeproductswithoutdesiredqty='.urlencode($includeproductswithoutdesiredqty);
|
||||||
|
if (!empty($salert)) $param .= '&salert='.urlencode($salert);
|
||||||
|
|
||||||
$stocklabel = $langs->trans('Stock');
|
$stocklabel = $langs->trans('Stock');
|
||||||
$stocklabelbis = $langs->trans('Stock');
|
$stocklabelbis = $langs->trans('Stock');
|
||||||
|
|||||||
@ -322,7 +322,7 @@ $sql .= " t.rowid as id, t.ref, t.label, t.planned_workload, t.duration_effectiv
|
|||||||
$sql .= " t.description, t.fk_task_parent";
|
$sql .= " t.description, t.fk_task_parent";
|
||||||
$sql .= " ,t.budget_amount";
|
$sql .= " ,t.budget_amount";
|
||||||
// We'll need these fields in order to filter by categ
|
// We'll need these fields in order to filter by categ
|
||||||
if ($search_categ) {
|
if ($search_categ > 0) {
|
||||||
$sql .= ", cs.fk_categorie, cs.fk_project";
|
$sql .= ", cs.fk_categorie, cs.fk_project";
|
||||||
}
|
}
|
||||||
// Add sum fields
|
// Add sum fields
|
||||||
@ -342,7 +342,7 @@ $sql .= $hookmanager->resPrint;
|
|||||||
$sql .= " FROM ".MAIN_DB_PREFIX."projet as p";
|
$sql .= " FROM ".MAIN_DB_PREFIX."projet as p";
|
||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid";
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid";
|
||||||
// We'll need this table joined to the select in order to filter by categ
|
// We'll need this table joined to the select in order to filter by categ
|
||||||
if (!empty($search_categ)) {
|
if ($search_categ > 0) {
|
||||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_project as cs ON p.rowid = cs.fk_project"; // We'll need this table joined to the select in order to filter by categ
|
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_project as cs ON p.rowid = cs.fk_project"; // We'll need this table joined to the select in order to filter by categ
|
||||||
}
|
}
|
||||||
$sql .= ", ".MAIN_DB_PREFIX."projet_task as t";
|
$sql .= ", ".MAIN_DB_PREFIX."projet_task as t";
|
||||||
|
|||||||
@ -126,7 +126,7 @@ $creditor = $mysoc->name;
|
|||||||
$type = $source;
|
$type = $source;
|
||||||
if ($source == 'proposal') {
|
if ($source == 'proposal') {
|
||||||
$object = new Propal($db);
|
$object = new Propal($db);
|
||||||
$object->fetch(0, $ref);
|
$object->fetch(0, $ref, '', $entity);
|
||||||
} else {
|
} else {
|
||||||
accessforbidden('Bad value for source');
|
accessforbidden('Bad value for source');
|
||||||
exit;
|
exit;
|
||||||
@ -139,7 +139,7 @@ if ($source == 'proposal') {
|
|||||||
$securekeyseed = $conf->global->PROPOSAL_ONLINE_SIGNATURE_SECURITY_TOKEN;
|
$securekeyseed = $conf->global->PROPOSAL_ONLINE_SIGNATURE_SECURITY_TOKEN;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!dol_verifyHash($securekeyseed.$type.$ref, $SECUREKEY, '0')) {
|
if (!dol_verifyHash($securekeyseed.$type.$ref.$object->entity, $SECUREKEY, '0')) {
|
||||||
http_response_code(403);
|
http_response_code(403);
|
||||||
print 'Bad value for securitykey. Value provided '.dol_escape_htmltag($SECUREKEY).' does not match expected value for ref='.dol_escape_htmltag($ref);
|
print 'Bad value for securitykey. Value provided '.dol_escape_htmltag($SECUREKEY).' does not match expected value for ref='.dol_escape_htmltag($ref);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
@ -288,18 +288,8 @@ $error = 0;
|
|||||||
// Signature on commercial proposal
|
// Signature on commercial proposal
|
||||||
if ($source == 'proposal') {
|
if ($source == 'proposal') {
|
||||||
$found = true;
|
$found = true;
|
||||||
$langs->load("proposal");
|
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
$result = $object->fetch_thirdparty($object->socid);
|
||||||
|
|
||||||
$proposal = new Propal($db);
|
|
||||||
$result = $proposal->fetch('', $ref);
|
|
||||||
if ($result <= 0) {
|
|
||||||
$mesg = $proposal->error;
|
|
||||||
$error++;
|
|
||||||
} else {
|
|
||||||
$result = $proposal->fetch_thirdparty($proposal->socid);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Creditor
|
// Creditor
|
||||||
|
|
||||||
@ -315,39 +305,39 @@ if ($source == 'proposal') {
|
|||||||
print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("ThirdParty");
|
print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("ThirdParty");
|
||||||
print '</td><td class="CTableRow2">';
|
print '</td><td class="CTableRow2">';
|
||||||
print img_picto('', 'company', 'class="pictofixedwidth"');
|
print img_picto('', 'company', 'class="pictofixedwidth"');
|
||||||
print '<b>'.$proposal->thirdparty->name.'</b>';
|
print '<b>'.$object->thirdparty->name.'</b>';
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
// Amount
|
// Amount
|
||||||
|
|
||||||
print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("Amount");
|
print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("Amount");
|
||||||
print '</td><td class="CTableRow2">';
|
print '</td><td class="CTableRow2">';
|
||||||
print '<b>'.price($proposal->total_ttc, 0, $langs, 1, -1, -1, $conf->currency).'</b>';
|
print '<b>'.price($object->total_ttc, 0, $langs, 1, -1, -1, $conf->currency).'</b>';
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
// Object
|
// Object
|
||||||
|
|
||||||
$text = '<b>'.$langs->trans("SignatureProposalRef", $proposal->ref).'</b>';
|
$text = '<b>'.$langs->trans("SignatureProposalRef", $object->ref).'</b>';
|
||||||
print '<tr class="CTableRow2"><td class="CTableRow2 tdtop">'.$langs->trans("Designation");
|
print '<tr class="CTableRow2"><td class="CTableRow2 tdtop">'.$langs->trans("Designation");
|
||||||
print '</td><td class="CTableRow2">'.$text;
|
print '</td><td class="CTableRow2">'.$text;
|
||||||
if ($proposal->status == $proposal::STATUS_VALIDATED) {
|
if ($object->status == $object::STATUS_VALIDATED) {
|
||||||
$directdownloadlink = $proposal->getLastMainDocLink('proposal');
|
$directdownloadlink = $object->getLastMainDocLink('proposal');
|
||||||
if ($directdownloadlink) {
|
if ($directdownloadlink) {
|
||||||
print '<br><a href="'.$directdownloadlink.'">';
|
print '<br><a href="'.$directdownloadlink.'">';
|
||||||
print img_mime($proposal->last_main_doc, '');
|
print img_mime($object->last_main_doc, '');
|
||||||
print $langs->trans("DownloadDocument").'</a>';
|
print $langs->trans("DownloadDocument").'</a>';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$last_main_doc_file = $proposal->last_main_doc;
|
$last_main_doc_file = $object->last_main_doc;
|
||||||
|
|
||||||
if ($proposal->status == $proposal::STATUS_NOTSIGNED) {
|
if ($object->status == $object::STATUS_NOTSIGNED) {
|
||||||
$directdownloadlink = $proposal->getLastMainDocLink('proposal');
|
$directdownloadlink = $object->getLastMainDocLink('proposal');
|
||||||
if ($directdownloadlink) {
|
if ($directdownloadlink) {
|
||||||
print '<br><a href="'.$directdownloadlink.'">';
|
print '<br><a href="'.$directdownloadlink.'">';
|
||||||
print img_mime($proposal->last_main_doc, '');
|
print img_mime($object->last_main_doc, '');
|
||||||
print $langs->trans("DownloadDocument").'</a>';
|
print $langs->trans("DownloadDocument").'</a>';
|
||||||
}
|
}
|
||||||
} elseif ($proposal->status == $proposal::STATUS_SIGNED || $proposal->status == $proposal::STATUS_BILLED) {
|
} elseif ($object->status == $object::STATUS_SIGNED || $object->status == $object::STATUS_BILLED) {
|
||||||
if (preg_match('/_signed-(\d+)/', $last_main_doc_file)) { // If the last main doc has been signed
|
if (preg_match('/_signed-(\d+)/', $last_main_doc_file)) { // If the last main doc has been signed
|
||||||
$last_main_doc_file_not_signed = preg_replace('/_signed-(\d+)/', '', $last_main_doc_file);
|
$last_main_doc_file_not_signed = preg_replace('/_signed-(\d+)/', '', $last_main_doc_file);
|
||||||
|
|
||||||
@ -355,10 +345,10 @@ if ($source == 'proposal') {
|
|||||||
$datefilenotsigned = dol_filemtime($last_main_doc_file_not_signed);
|
$datefilenotsigned = dol_filemtime($last_main_doc_file_not_signed);
|
||||||
|
|
||||||
if (empty($datefilenotsigned) || $datefilesigned > $datefilenotsigned) {
|
if (empty($datefilenotsigned) || $datefilesigned > $datefilenotsigned) {
|
||||||
$directdownloadlink = $proposal->getLastMainDocLink('proposal');
|
$directdownloadlink = $object->getLastMainDocLink('proposal');
|
||||||
if ($directdownloadlink) {
|
if ($directdownloadlink) {
|
||||||
print '<br><a href="'.$directdownloadlink.'">';
|
print '<br><a href="'.$directdownloadlink.'">';
|
||||||
print img_mime($proposal->last_main_doc, '');
|
print img_mime($object->last_main_doc, '');
|
||||||
print $langs->trans("DownloadDocument").'</a>';
|
print $langs->trans("DownloadDocument").'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -367,7 +357,7 @@ if ($source == 'proposal') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '<input type="hidden" name="source" value="'.GETPOST("source", 'alpha').'">';
|
print '<input type="hidden" name="source" value="'.GETPOST("source", 'alpha').'">';
|
||||||
print '<input type="hidden" name="ref" value="'.$proposal->ref.'">';
|
print '<input type="hidden" name="ref" value="'.$object->ref.'">';
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
// TODO Add link to download PDF (similar code than for invoice)
|
// TODO Add link to download PDF (similar code than for invoice)
|
||||||
|
|||||||
@ -41,14 +41,16 @@ if (!defined("NOSESSION")) {
|
|||||||
define("NOSESSION", '1');
|
define("NOSESSION", '1');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print "*** SHOW SESSION STATUS<br>\n";
|
||||||
print "Legend:<br>\n";
|
print "Legend:<br>\n";
|
||||||
print 'PHP_SESSION_DISABLED='.PHP_SESSION_DISABLED."<br>\n";
|
print 'PHP_SESSION_DISABLED='.PHP_SESSION_DISABLED."<br>\n";
|
||||||
print 'PHP_SESSION_NONE='.PHP_SESSION_NONE."<br>\n";
|
print 'PHP_SESSION_NONE='.PHP_SESSION_NONE."<br>\n";
|
||||||
print 'PHP_SESSION_ACTIVE='.PHP_SESSION_ACTIVE."<br>\n";
|
print 'PHP_SESSION_ACTIVE='.PHP_SESSION_ACTIVE."<br>\n";
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print 'session_status='.session_status().' (before main.inc.php)';
|
print 'session_status='.session_status().' (before main.inc.php)<br>';
|
||||||
print '<br>';
|
|
||||||
|
print '<br><br>'."\n";
|
||||||
|
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
|
|
||||||
@ -62,7 +64,8 @@ if ($dolibarr_main_prod) {
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
echo "Test<br>\n";
|
print "*** TEST READ OF /tmp/test.txt FILE<br>\n";
|
||||||
|
|
||||||
$out='';
|
$out='';
|
||||||
$ret=0;
|
$ret=0;
|
||||||
|
|
||||||
@ -78,14 +81,21 @@ if ($f) {
|
|||||||
|
|
||||||
print '<br><br>'."\n";
|
print '<br><br>'."\n";
|
||||||
|
|
||||||
|
|
||||||
|
print "*** TEST READ OF /test.txt FILE AND LS /dev/std*<br>\n";
|
||||||
|
|
||||||
exec('cat /test.txt; ls /dev/std*; sleep 1;', $out, $ret);
|
exec('cat /test.txt; ls /dev/std*; sleep 1;', $out, $ret);
|
||||||
print $ret."<br>\n";
|
print "ret=".$ret."<br>\n";
|
||||||
print_r($out);
|
print_r($out);
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
print '<br><br>'."\n";
|
print '<br><br>'."\n";
|
||||||
|
|
||||||
|
|
||||||
|
print "*** TRY TO RUN CLAMDSCAN<br>\n";
|
||||||
|
|
||||||
$ret = 0;
|
$ret = 0;
|
||||||
$out = null;
|
$out = null;
|
||||||
exec('/usr/bin/clamdscan --fdpass filethatdoesnotexists.php', $out, $ret);
|
exec('/usr/bin/clamdscan --fdpass filethatdoesnotexists.php', $out, $ret);
|
||||||
print $ret."<br>\n";
|
print "ret=".$ret."<br>\n";
|
||||||
print_r($out);
|
print_r($out);
|
||||||
|
|||||||
@ -554,9 +554,8 @@ if (empty($reshook)) {
|
|||||||
}
|
}
|
||||||
//var_dump($object->array_languages);exit;
|
//var_dump($object->array_languages);exit;
|
||||||
|
|
||||||
if (GETPOST('deletephoto')) {
|
if (!empty($_FILES['photo']['name'])) {
|
||||||
$object->logo = '';
|
$current_logo = $object->logo;
|
||||||
} elseif (!empty($_FILES['photo']['name'])) {
|
|
||||||
$object->logo = dol_sanitizeFileName($_FILES['photo']['name']);
|
$object->logo = dol_sanitizeFileName($_FILES['photo']['name']);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -786,6 +785,13 @@ if (empty($reshook)) {
|
|||||||
}
|
}
|
||||||
if ($file_OK) {
|
if ($file_OK) {
|
||||||
if (image_format_supported($_FILES['photo']['name']) > 0) {
|
if (image_format_supported($_FILES['photo']['name']) > 0) {
|
||||||
|
if ($current_logo != $object->logo) {
|
||||||
|
$fileimg = $dir.'/'.$current_logo;
|
||||||
|
$dirthumbs = $dir.'/thumbs';
|
||||||
|
dol_delete_file($fileimg);
|
||||||
|
dol_delete_dir_recursive($dirthumbs);
|
||||||
|
}
|
||||||
|
|
||||||
dol_mkdir($dir);
|
dol_mkdir($dir);
|
||||||
|
|
||||||
if (@is_dir($dir)) {
|
if (@is_dir($dir)) {
|
||||||
|
|||||||
@ -302,7 +302,7 @@ $sql .= " p.rowid as project_id, p.ref as project_ref,";
|
|||||||
if (empty($user->rights->societe->client->voir) && !$socid) {
|
if (empty($user->rights->societe->client->voir) && !$socid) {
|
||||||
$sql .= " sc.fk_soc, sc.fk_user,";
|
$sql .= " sc.fk_soc, sc.fk_user,";
|
||||||
}
|
}
|
||||||
$sql .= " u.firstname, u.lastname, u.photo, u.login, u.statut as status, u.admin, u.employee, u.email as uemail";
|
$sql .= " u.firstname, u.lastname, u.photo, u.login, u.statut as ustatus, u.admin, u.employee, u.email as uemail";
|
||||||
// Add fields from extrafields
|
// Add fields from extrafields
|
||||||
if (!empty($extrafields->attributes[$object->table_element]['label'])) {
|
if (!empty($extrafields->attributes[$object->table_element]['label'])) {
|
||||||
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {
|
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {
|
||||||
|
|||||||
@ -692,7 +692,7 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac
|
|||||||
if ($permissiontoaddbankaccount) {
|
if ($permissiontoaddbankaccount) {
|
||||||
$morehtmlright = dolGetButtonTitle($langs->trans('Add'), '', 'fa fa-plus-circle', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=create');
|
$morehtmlright = dolGetButtonTitle($langs->trans('Add'), '', 'fa fa-plus-circle', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=create');
|
||||||
} else {
|
} else {
|
||||||
$morehtmlright = dolGetButtonTitle($langs->trans('Add'), 'NotEnoughPermission', 'fa fa-plus-circle', '', '', -2);
|
$morehtmlright = dolGetButtonTitle($langs->trans('Add'), $langs->trans('NotEnoughPermissions'), 'fa fa-plus-circle', '', '', -2);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$morehtmlright = dolGetButtonTitle($langs->trans('Add'), 'AlreadyOneBankAccount', 'fa fa-plus-circle', '', '', -2);
|
$morehtmlright = dolGetButtonTitle($langs->trans('Add'), 'AlreadyOneBankAccount', 'fa fa-plus-circle', '', '', -2);
|
||||||
|
|||||||
@ -608,6 +608,10 @@ class ProductCombination
|
|||||||
$prodcomb2val = new ProductCombination2ValuePair($this->db);
|
$prodcomb2val = new ProductCombination2ValuePair($this->db);
|
||||||
$prodcomb = new ProductCombination($this->db);
|
$prodcomb = new ProductCombination($this->db);
|
||||||
|
|
||||||
|
$features = array_filter($features, function ($v) {
|
||||||
|
return !empty($v);
|
||||||
|
});
|
||||||
|
|
||||||
foreach ($features as $attr => $attr_val) {
|
foreach ($features as $attr => $attr_val) {
|
||||||
$actual_comp[$attr] = $attr_val;
|
$actual_comp[$attr] = $attr_val;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -217,9 +217,17 @@ class SecurityTest extends PHPUnit\Framework\TestCase
|
|||||||
$result=testSqlAndScriptInject($test, 1);
|
$result=testSqlAndScriptInject($test, 1);
|
||||||
$this->assertEquals($expectedresult, $result, 'Error on testSqlAndScriptInject for SQL1b. Should find an attack on GET param and did not.');
|
$this->assertEquals($expectedresult, $result, 'Error on testSqlAndScriptInject for SQL1b. Should find an attack on GET param and did not.');
|
||||||
|
|
||||||
|
$test = '... update ... set ... =';
|
||||||
|
$result=testSqlAndScriptInject($test, 1);
|
||||||
|
$this->assertEquals($expectedresult, $result, 'Error on testSqlAndScriptInject for SQL2a. Should find an attack on GET param and did not.');
|
||||||
|
|
||||||
|
$test = 'action=update& ... set ... =';
|
||||||
|
$result=testSqlAndScriptInject($test, 1);
|
||||||
|
$this->assertEquals(0, $result, 'Error on testSqlAndScriptInject for SQL2b. Should not find an attack on GET param and did.');
|
||||||
|
|
||||||
$test = '... union ... selection ';
|
$test = '... union ... selection ';
|
||||||
$result=testSqlAndScriptInject($test, 1);
|
$result=testSqlAndScriptInject($test, 1);
|
||||||
$this->assertEquals($expectedresult, $result, 'Error on testSqlAndScriptInject for SQL2. Should find an attack on GET param and did not.');
|
$this->assertEquals($expectedresult, $result, 'Error on testSqlAndScriptInject for SQL2c. Should find an attack on GET param and did not.');
|
||||||
|
|
||||||
$test = 'javascript:';
|
$test = 'javascript:';
|
||||||
$result=testSqlAndScriptInject($test, 0);
|
$result=testSqlAndScriptInject($test, 0);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user