commit
2054447beb
2
.github/workflows/stale-issues-safe.yml
vendored
2
.github/workflows/stale-issues-safe.yml
vendored
@ -16,7 +16,7 @@ jobs:
|
|||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
stale-message: 'This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. This issue may be closed automatically by stale bot in 15 days (you should still be able to re-open it if required).'
|
stale-message: 'This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. This issue may be closed automatically by stale bot in 15 days (you should still be able to re-open it if required).'
|
||||||
stale-label: 'Issue Stale (automatic label)'
|
stale-label: 'Issue Stale (automatic label)'
|
||||||
exempt-labels: 'Priority High / Blocking,Priority Top Strategic,Priority Medium,Hacktoberfest,good first issue,Bug Security (CVE)'
|
exempt-labels: 'Priority High / Blocking,Priority Top Strategic,Priority Medium,Hacktoberfest,good first issue,Bug Security (CVE),Analysis of PR in progres'
|
||||||
days-before-stale: 365
|
days-before-stale: 365
|
||||||
days-before-close: 15
|
days-before-close: 15
|
||||||
operations-per-run: 100
|
operations-per-run: 100
|
||||||
|
|||||||
38
ChangeLog
38
ChangeLog
@ -8,7 +8,10 @@ For Users:
|
|||||||
NEW: Module MO (Manufacturing Order) is available as stable module.
|
NEW: Module MO (Manufacturing Order) is available as stable module.
|
||||||
|
|
||||||
For Developers or integrators:
|
For Developers or integrators:
|
||||||
|
* A new way to navigate between pages in list is available. To use it, you must
|
||||||
|
- replace $page = GETPOST('page', 'int') with $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||||
|
- remove input field in form '<input type="hidden" name="page" value="'.$page.'">';'
|
||||||
|
- add parameter $pagenavastextinput to value 1 when calling print_barre_liste
|
||||||
|
|
||||||
|
|
||||||
WARNING:
|
WARNING:
|
||||||
@ -23,6 +26,36 @@ Following changes may create regressions for some external modules, but were nec
|
|||||||
by a "_" automatically when a reference (with a custom numbering mask that use it) is generated.
|
by a "_" automatically when a reference (with a custom numbering mask that use it) is generated.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
***** ChangeLog for 11.0.3 compared to 11.0.2 *****
|
||||||
|
FIX: unit price for selected supplier products not set. NaN was used.
|
||||||
|
FIX: use bad var to check if total is positive for each VAT rate when validating an invoice
|
||||||
|
FIX: status missing from last customer invoices box when using MAIN_STATUS_USES_CSS
|
||||||
|
FIX: translations for "orders" not loaded in the homepage box
|
||||||
|
FIX: #13194
|
||||||
|
FIX: #13274 cannot add or update 0 value for an int or double extrafield
|
||||||
|
FIX: #13285 SQL error during migration with pgsql
|
||||||
|
FIX: #13294
|
||||||
|
FIX: #13313
|
||||||
|
FIX: Clone Fourn Command, add line's extrafields
|
||||||
|
FIX: cols parameter not propagated to tpl
|
||||||
|
FIX: CSRF error when creating an intervention
|
||||||
|
FIX: date order was -1D and desc with label repetition
|
||||||
|
FIX: empty of series in graph of product distribution
|
||||||
|
FIX: fk_type subscription list via api REST
|
||||||
|
FIX: link when using anchor on "/" in website module
|
||||||
|
FIX: menu export document was not visible when using "simple accounting"
|
||||||
|
FIX: missing class declaration
|
||||||
|
FIX: missing global $conf
|
||||||
|
FIX: Missing token in some forms (avoid unset POST errors)
|
||||||
|
FIX: params of setEventMessage($langs->trans('ErrorProductClone')...
|
||||||
|
FIX: Remove unexisting link
|
||||||
|
FIX: mass action on stock movements
|
||||||
|
FIX: substitute lines dates values on doc generator (ODT, ...)
|
||||||
|
FIX: Ticket - Load Cache Messages Ticket, wrong message's status
|
||||||
|
FIX: Ticket Public - Private messages are displayed
|
||||||
|
FIX: wrong include - replace extrafields_create.tpl.php to extrafields_add.tpl.php
|
||||||
|
|
||||||
***** ChangeLog for 11.0.2 compared to 11.0.1 *****
|
***** ChangeLog for 11.0.2 compared to 11.0.1 *****
|
||||||
FIX: #10309
|
FIX: #10309
|
||||||
FIX: #13110
|
FIX: #13110
|
||||||
@ -30,7 +63,8 @@ FIX: #13118
|
|||||||
FIX: #13124
|
FIX: #13124
|
||||||
FIX: #13131
|
FIX: #13131
|
||||||
FIX: #13135
|
FIX: #13135
|
||||||
FIX: #13146 #13198
|
FIX: #13146
|
||||||
|
FIX: #13198
|
||||||
FIX: #13175
|
FIX: #13175
|
||||||
FIX: #13182
|
FIX: #13182
|
||||||
FIX: #13183
|
FIX: #13183
|
||||||
|
|||||||
@ -102,10 +102,13 @@ Source: "build\exe\doliwamp\UsedPort.exe"; DestDir: "{app}\"; Flags: ignoreversi
|
|||||||
; 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.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.2.11, php 5.3.0 (if no php_exif, php_pgsql, php_zip), mysql 5.0.45
|
||||||
; Value OK: apache 2.4.19, 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.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 To test: apache 2.4.41, php 7.3.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)
|
||||||
Source: "C:\Program Files\Wamp\apps\phpmyadmin4.1.14\*.*"; DestDir: "{app}\apps\phpmyadmin4.1.14"; Flags: ignoreversion recursesubdirs; Excludes: "config.inc.php,wampserver.conf,*.log,*_log,darkblue_orange"
|
Source: "C:\Program Files\Wamp\apps\phpmyadmin4.1.14\*.*"; DestDir: "{app}\apps\phpmyadmin4.1.14"; Flags: ignoreversion recursesubdirs; Excludes: "config.inc.php,wampserver.conf,*.log,*_log,darkblue_orange"
|
||||||
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:\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:\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\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:\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.12\*.*"; DestDir: "{app}\bin\php\php7.3.12"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,phpForApache.ini,wampserver.conf,*.log,*_log"
|
||||||
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:\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"
|
||||||
; Mysql data files (does not overwrite if exists)
|
; Mysql data files (does not overwrite if exists)
|
||||||
Source: "build\exe\doliwamp\mysql\*.*"; DestDir: "{app}\bin\mysql\data\mysql"; Flags: onlyifdoesntexist ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db"
|
Source: "build\exe\doliwamp\mysql\*.*"; DestDir: "{app}\bin\mysql\data\mysql"; Flags: onlyifdoesntexist ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db"
|
||||||
@ -119,9 +122,11 @@ 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.9\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\php.ini.install"; DestDir: "{app}\bin\php\php5.5.12"; 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.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;
|
||||||
@ -227,8 +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.9';
|
||||||
phpVersion := '5.5.12' ;
|
//phpVersion := '5.5.12' ;
|
||||||
|
apacheVersion := '2.4.41';
|
||||||
|
phpVersion := '7.3.12' ;
|
||||||
mysqlVersion := '5.0.45';
|
mysqlVersion := '5.0.45';
|
||||||
phpmyadminVersion := '4.1.14';
|
phpmyadminVersion := '4.1.14';
|
||||||
|
|
||||||
@ -392,40 +399,42 @@ begin
|
|||||||
//----------------------------------------------
|
//----------------------------------------------
|
||||||
// TODO Update this list when changing PHP/Apache versions
|
// TODO Update this list when changing PHP/Apache versions
|
||||||
|
|
||||||
phpDllCopy := 'fdftk.dll';
|
// phpDllCopy := 'fdftk.dll';
|
||||||
|
// filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
|
||||||
|
// phpDllCopy := 'fribidi.dll';
|
||||||
|
// filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
|
||||||
|
// phpDllCopy := 'gds32.dll';
|
||||||
|
// filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
|
||||||
|
// phpDllCopy := 'libeay32.dll';
|
||||||
|
// filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
|
||||||
|
// phpDllCopy := 'libmhash.dll';
|
||||||
|
// filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
|
||||||
|
// phpDllCopy := 'libmysql.dll';
|
||||||
|
// filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
|
||||||
|
// phpDllCopy := 'libpq.dll';
|
||||||
|
// filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
|
||||||
|
// phpDllCopy := 'msql.dll';
|
||||||
|
// filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
|
||||||
|
// phpDllCopy := 'libmcrypt.dll';
|
||||||
|
// filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
|
||||||
|
// phpDllCopy := 'libmysqli.dll';
|
||||||
|
// filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
|
||||||
|
// phpDllCopy := 'ntwdblib.dll';
|
||||||
|
// filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
|
||||||
|
|
||||||
|
// phpDllCopy := 'php5activescript.dll';
|
||||||
|
// filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
|
||||||
|
// phpDllCopy := 'php5nsapi.dll';
|
||||||
|
// filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
|
||||||
|
phpDllCopy := 'php7apache2_4.dll';
|
||||||
filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
|
filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
|
||||||
phpDllCopy := 'fribidi.dll';
|
phpDllCopy := 'php7ts.dll';
|
||||||
filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
|
|
||||||
phpDllCopy := 'gds32.dll';
|
|
||||||
filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
|
|
||||||
phpDllCopy := 'libeay32.dll';
|
|
||||||
filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
|
|
||||||
phpDllCopy := 'libmhash.dll';
|
|
||||||
filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
|
|
||||||
phpDllCopy := 'libmysql.dll';
|
|
||||||
filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
|
|
||||||
phpDllCopy := 'libpq.dll';
|
|
||||||
filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
|
|
||||||
phpDllCopy := 'msql.dll';
|
|
||||||
filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
|
|
||||||
phpDllCopy := 'libmcrypt.dll';
|
|
||||||
filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
|
|
||||||
phpDllCopy := 'libmysqli.dll';
|
|
||||||
filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
|
|
||||||
phpDllCopy := 'ntwdblib.dll';
|
|
||||||
filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
|
filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
|
||||||
|
|
||||||
phpDllCopy := 'php5activescript.dll';
|
// phpDllCopy := 'ssleay32.dll';
|
||||||
filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
|
// filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
|
||||||
phpDllCopy := 'php5nsapi.dll';
|
// phpDllCopy := 'yaz.dll';
|
||||||
filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
|
// filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
|
||||||
phpDllCopy := 'php5ts.dll';
|
|
||||||
filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
|
|
||||||
|
|
||||||
phpDllCopy := 'ssleay32.dll';
|
|
||||||
filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
|
|
||||||
phpDllCopy := 'yaz.dll';
|
|
||||||
filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
|
|
||||||
|
|
||||||
|
|
||||||
// Remove lock file
|
// Remove lock file
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
# \file build/makepack-dolibarr.pl
|
# \file build/makepack-dolibarr.pl
|
||||||
# \brief Dolibarr package builder (tgz, zip, rpm, deb, exe, aps)
|
# \brief Dolibarr package builder (tgz, zip, rpm, deb, exe, aps)
|
||||||
# \author (c)2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
# \author (c)2004-2020 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
#
|
#
|
||||||
# This is list of constant you can set to have generated packages moved into a specific dir:
|
# This is list of constant you can set to have generated packages moved into a specific dir:
|
||||||
#DESTIBETARC='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/lastbuild'
|
#DESTIBETARC='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/lastbuild'
|
||||||
@ -430,12 +430,14 @@ if ($nboftargetok) {
|
|||||||
$ret=`git tag -a -f -m "$MAJOR.$MINOR.$BUILD" "$MAJOR.$MINOR.$BUILD"`;
|
$ret=`git tag -a -f -m "$MAJOR.$MINOR.$BUILD" "$MAJOR.$MINOR.$BUILD"`;
|
||||||
print 'Run git push -f --tags'."\n";
|
print 'Run git push -f --tags'."\n";
|
||||||
$ret=`git push -f --tags`;
|
$ret=`git push -f --tags`;
|
||||||
|
#$ret=`git push -f origin "$MAJOR.$MINOR.$BUILD"`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print 'Run git push --tags'."\n";
|
print 'Run git push --tags'."\n";
|
||||||
$ret=`git push --tags`;
|
$ret=`git push --tags`;
|
||||||
|
#$ret=`git push origin "$MAJOR.$MINOR.$BUILD"`;
|
||||||
}
|
}
|
||||||
chdir("$olddir");
|
chdir("$olddir");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -54,5 +54,5 @@ fi
|
|||||||
|
|
||||||
echo Think to launch also:
|
echo Think to launch also:
|
||||||
echo "> dev/tools/fixaltlanguages.sh fix all"
|
echo "> dev/tools/fixaltlanguages.sh fix all"
|
||||||
echo "For v11: Replace also regex \(.*(sponge|cornas|eratosthene|cyan).*\) with ''"
|
echo "For v11: Replace also regex \(.*(sponge|cornas|eratosthene|cyan).*\) with '' on *.lang files"
|
||||||
|
|
||||||
|
|||||||
@ -10,7 +10,11 @@
|
|||||||
https://github.com/Dolibarr/foundation
|
https://github.com/Dolibarr/foundation
|
||||||
|
|
||||||
|
|
||||||
* Few icons are from http://led24.de/iconset/. This is original README file for this source:
|
* Few icons are / were from website led24.de
|
||||||
|
|
||||||
|
* Attention: This website is no longer available!
|
||||||
|
|
||||||
|
This is original README file for this source:
|
||||||
-------------------------------------------------------
|
-------------------------------------------------------
|
||||||
You can do whatever you want with these icons (use on web or in desktop applications) as long as you don’t pass them off as your own and remove this readme file. A credit statement and a link back to
|
You can do whatever you want with these icons (use on web or in desktop applications) as long as you don’t pass them off as your own and remove this readme file. A credit statement and a link back to
|
||||||
http://led24.de/iconset/ or http://led24.de/ would be appreciated.
|
http://led24.de/iconset/ or http://led24.de/ would be appreciated.
|
||||||
|
|||||||
@ -70,11 +70,11 @@ $arrayfields = array(
|
|||||||
'aa.labelshort'=>array('label'=>$langs->trans("LabelToShow"), 'checked'=>1),
|
'aa.labelshort'=>array('label'=>$langs->trans("LabelToShow"), 'checked'=>1),
|
||||||
'aa.account_parent'=>array('label'=>$langs->trans("Accountparent"), 'checked'=>1),
|
'aa.account_parent'=>array('label'=>$langs->trans("Accountparent"), 'checked'=>1),
|
||||||
'aa.pcg_type'=>array('label'=>$langs->trans("Pcgtype"), 'checked'=>1, 'help'=>'PcgtypeDesc'),
|
'aa.pcg_type'=>array('label'=>$langs->trans("Pcgtype"), 'checked'=>1, 'help'=>'PcgtypeDesc'),
|
||||||
'aa.reconciliable'=>array('label'=>$langs->trans("Reconciliable"), 'checked'=>1),
|
'aa.reconcilable'=>array('label'=>$langs->trans("Reconcilable"), 'checked'=>1),
|
||||||
'aa.active'=>array('label'=>$langs->trans("Activated"), 'checked'=>1)
|
'aa.active'=>array('label'=>$langs->trans("Activated"), 'checked'=>1)
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($conf->global->MAIN_FEATURES_LEVEL < 2) unset($arrayfields['aa.reconciliable']);
|
if ($conf->global->MAIN_FEATURES_LEVEL < 2) unset($arrayfields['aa.reconcilable']);
|
||||||
|
|
||||||
$accounting = new AccountingAccount($db);
|
$accounting = new AccountingAccount($db);
|
||||||
|
|
||||||
@ -197,7 +197,7 @@ if ($action == 'delete') {
|
|||||||
|
|
||||||
$pcgver = $conf->global->CHARTOFACCOUNTS;
|
$pcgver = $conf->global->CHARTOFACCOUNTS;
|
||||||
|
|
||||||
$sql = "SELECT aa.rowid, aa.fk_pcg_version, aa.pcg_type, aa.account_number, aa.account_parent , aa.label, aa.labelshort, aa.reconciliable, aa.active, ";
|
$sql = "SELECT aa.rowid, aa.fk_pcg_version, aa.pcg_type, aa.account_number, aa.account_parent , aa.label, aa.labelshort, aa.reconcilable, aa.active, ";
|
||||||
$sql .= " a2.rowid as rowid2, a2.label as label2, a2.account_number as account_number2";
|
$sql .= " a2.rowid as rowid2, a2.label as label2, a2.account_number as account_number2";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."accounting_account as aa";
|
$sql .= " FROM ".MAIN_DB_PREFIX."accounting_account as aa";
|
||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version AND aa.entity = ".$conf->entity;
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version AND aa.entity = ".$conf->entity;
|
||||||
@ -357,7 +357,7 @@ if ($resql)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['aa.pcg_type']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" size="6" name="search_pcgtype" value="'.$search_pcgtype.'"></td>';
|
if (!empty($arrayfields['aa.pcg_type']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" size="6" name="search_pcgtype" value="'.$search_pcgtype.'"></td>';
|
||||||
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { if (! empty($arrayfields['aa.reconciliable']['checked'])) print '<td class="liste_titre"> </td>'; }
|
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { if (! empty($arrayfields['aa.reconcilable']['checked'])) print '<td class="liste_titre"> </td>'; }
|
||||||
if (!empty($arrayfields['aa.active']['checked'])) print '<td class="liste_titre"> </td>';
|
if (!empty($arrayfields['aa.active']['checked'])) print '<td class="liste_titre"> </td>';
|
||||||
print '<td class="liste_titre maxwidthsearch">';
|
print '<td class="liste_titre maxwidthsearch">';
|
||||||
$searchpicto = $form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0, 'checkforselect', 1);
|
$searchpicto = $form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0, 'checkforselect', 1);
|
||||||
@ -371,7 +371,7 @@ if ($resql)
|
|||||||
if (!empty($arrayfields['aa.labelshort']['checked'])) print_liste_field_titre($arrayfields['aa.labelshort']['label'], $_SERVER["PHP_SELF"], "aa.labelshort", "", $param, '', $sortfield, $sortorder);
|
if (!empty($arrayfields['aa.labelshort']['checked'])) print_liste_field_titre($arrayfields['aa.labelshort']['label'], $_SERVER["PHP_SELF"], "aa.labelshort", "", $param, '', $sortfield, $sortorder);
|
||||||
if (!empty($arrayfields['aa.account_parent']['checked'])) print_liste_field_titre($arrayfields['aa.account_parent']['label'], $_SERVER["PHP_SELF"], "aa.account_parent", "", $param, '', $sortfield, $sortorder, 'left ');
|
if (!empty($arrayfields['aa.account_parent']['checked'])) print_liste_field_titre($arrayfields['aa.account_parent']['label'], $_SERVER["PHP_SELF"], "aa.account_parent", "", $param, '', $sortfield, $sortorder, 'left ');
|
||||||
if (!empty($arrayfields['aa.pcg_type']['checked'])) print_liste_field_titre($arrayfields['aa.pcg_type']['label'], $_SERVER["PHP_SELF"], 'aa.pcg_type', '', $param, '', $sortfield, $sortorder, '', $arrayfields['aa.pcg_type']['help']);
|
if (!empty($arrayfields['aa.pcg_type']['checked'])) print_liste_field_titre($arrayfields['aa.pcg_type']['label'], $_SERVER["PHP_SELF"], 'aa.pcg_type', '', $param, '', $sortfield, $sortorder, '', $arrayfields['aa.pcg_type']['help']);
|
||||||
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { if (! empty($arrayfields['aa.reconciliable']['checked'])) print_liste_field_titre($arrayfields['aa.reconciliable']['label'], $_SERVER["PHP_SELF"], 'aa.reconciliable', '', $param, '', $sortfield, $sortorder); }
|
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { if (! empty($arrayfields['aa.reconcilable']['checked'])) print_liste_field_titre($arrayfields['aa.reconcilable']['label'], $_SERVER["PHP_SELF"], 'aa.reconcilable', '', $param, '', $sortfield, $sortorder); }
|
||||||
if (!empty($arrayfields['aa.active']['checked'])) print_liste_field_titre($arrayfields['aa.active']['label'], $_SERVER["PHP_SELF"], 'aa.active', '', $param, '', $sortfield, $sortorder);
|
if (!empty($arrayfields['aa.active']['checked'])) print_liste_field_titre($arrayfields['aa.active']['label'], $_SERVER["PHP_SELF"], 'aa.active', '', $param, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
@ -450,9 +450,9 @@ if ($resql)
|
|||||||
|
|
||||||
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
|
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
|
||||||
// Activated or not reconciliation on accounting account
|
// Activated or not reconciliation on accounting account
|
||||||
if (!empty($arrayfields['aa.reconciliable']['checked'])) {
|
if (!empty($arrayfields['aa.reconcilable']['checked'])) {
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
if (empty($obj->reconciliable)) {
|
if (empty($obj->reconcilable)) {
|
||||||
print '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?id=' . $obj->rowid . '&action=enable&mode=1">';
|
print '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?id=' . $obj->rowid . '&action=enable&mode=1">';
|
||||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
|
|||||||
@ -197,7 +197,7 @@ if ($resql) {
|
|||||||
|
|
||||||
$param="&socid=".$socid;
|
$param="&socid=".$socid;
|
||||||
print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '?socid=' . $object->id . '" method="POST">';
|
print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '?socid=' . $object->id . '" method="POST">';
|
||||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
print '<input type="hidden" name="token" value="' . newToken() . '">';
|
||||||
print '<input type="hidden" name="socid" value="' . $object->id . '">';
|
print '<input type="hidden" name="socid" value="' . $object->id . '">';
|
||||||
|
|
||||||
$letteringbutton = '<a class="divButAction"><span class="valignmiddle"><input class="butAction" type="submit" value="lettering" name="lettering" id="lettering"></span></a>';
|
$letteringbutton = '<a class="divButAction"><span class="valignmiddle"><input class="butAction" type="submit" value="lettering" name="lettering" id="lettering"></span></a>';
|
||||||
|
|||||||
@ -195,7 +195,7 @@ if ($resql) {
|
|||||||
|
|
||||||
$param="&socid=".$socid;
|
$param="&socid=".$socid;
|
||||||
print '<form name="add" action="'.$_SERVER["PHP_SELF"].'?socid=' . $object->id . '" method="POST">';
|
print '<form name="add" action="'.$_SERVER["PHP_SELF"].'?socid=' . $object->id . '" method="POST">';
|
||||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
print '<input type="hidden" name="token" value="' . newToken() . '">';
|
||||||
print '<input type="hidden" name="socid" value="' . $object->id . '">';
|
print '<input type="hidden" name="socid" value="' . $object->id . '">';
|
||||||
|
|
||||||
$letteringbutton = '<a class="divButAction"><span class="valignmiddle"><input class="butAction" type="submit" value="lettering" name="lettering" id="lettering"></span></a>';
|
$letteringbutton = '<a class="divButAction"><span class="valignmiddle"><input class="butAction" type="submit" value="lettering" name="lettering" id="lettering"></span></a>';
|
||||||
|
|||||||
@ -1088,9 +1088,23 @@ class AccountancyExport
|
|||||||
{
|
{
|
||||||
$soc = $this->db->fetch_object($resql);
|
$soc = $this->db->fetch_object($resql);
|
||||||
|
|
||||||
$address = str_replace(array("\t", "\n", "\r"), " ", $soc->address);
|
$address=array('','','');
|
||||||
|
if (strpos($soc->address, "\n")!==false) {
|
||||||
|
$address = explode("\n", $soc->address);
|
||||||
|
if (is_array($address) && count($address)>0) {
|
||||||
|
foreach($address as $key=>$data) {
|
||||||
|
$address[$key]=str_replace(array("\t", "\n", "\r"), "", $data);
|
||||||
|
$address[$key]=dol_trunc($address[$key], 40, 'right', 'UTF-8', 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$address[0] = substr(str_replace(array("\t", "\r"), " ", $soc->address), 0, 40);
|
||||||
|
$address[1] = substr(str_replace(array("\t", "\r"), " ", $soc->address), 41, 40);
|
||||||
|
$address[2] = substr(str_replace(array("\t", "\r"), " ", $soc->address), 82, 40);
|
||||||
|
}
|
||||||
|
|
||||||
$type_enregistrement = 'C';
|
$type_enregistrement = 'C';
|
||||||
|
//TYPE
|
||||||
print $type_enregistrement.$separator;
|
print $type_enregistrement.$separator;
|
||||||
//NOCL
|
//NOCL
|
||||||
print $soc->code_client.$separator;
|
print $soc->code_client.$separator;
|
||||||
@ -1099,15 +1113,15 @@ class AccountancyExport
|
|||||||
//LIBI
|
//LIBI
|
||||||
print $separator;
|
print $separator;
|
||||||
//TITR
|
//TITR
|
||||||
print getFormeJuridiqueLabel($soc->fk_forme_juridique).$separator;
|
print $separator;
|
||||||
//RSSO
|
//RSSO
|
||||||
print $soc->nom.$separator;
|
print $soc->nom.$separator;
|
||||||
//CAD1
|
//CAD1
|
||||||
print substr($address, 0, 40).$separator;
|
print $address[0].$separator;
|
||||||
//CAD2
|
//CAD2
|
||||||
print substr($address, 41, 40).$separator;
|
print $address[1].$separator;
|
||||||
//CAD3
|
//CAD3
|
||||||
print substr($address, 82, 40).$separator;
|
print $address[2].$separator;
|
||||||
//COPO
|
//COPO
|
||||||
print $soc->zip.$separator;
|
print $soc->zip.$separator;
|
||||||
//BUDI
|
//BUDI
|
||||||
@ -1129,7 +1143,7 @@ class AccountancyExport
|
|||||||
//COMM
|
//COMM
|
||||||
print $separator;
|
print $separator;
|
||||||
//SIRE
|
//SIRE
|
||||||
print $soc->siret.$separator;
|
print str_replace(" ", "", $soc->siret).$separator;
|
||||||
//RIBP
|
//RIBP
|
||||||
print $separator;
|
print $separator;
|
||||||
//DOBQ
|
//DOBQ
|
||||||
@ -1267,8 +1281,6 @@ class AccountancyExport
|
|||||||
} else {
|
} else {
|
||||||
print $separator;
|
print $separator;
|
||||||
}
|
}
|
||||||
// SECT
|
|
||||||
print $separator;
|
|
||||||
// CTRE
|
// CTRE
|
||||||
print $separator;
|
print $separator;
|
||||||
// NORL
|
// NORL
|
||||||
@ -1286,13 +1298,13 @@ class AccountancyExport
|
|||||||
// CDES
|
// CDES
|
||||||
print $separator;
|
print $separator;
|
||||||
// QTUE
|
// QTUE
|
||||||
print '0'.$separator;
|
print $separator;
|
||||||
// MTDV
|
// MTDV
|
||||||
print $separator;
|
|
||||||
// CODV
|
|
||||||
print '0'.$separator;
|
print '0'.$separator;
|
||||||
// TXDV
|
// CODV
|
||||||
print $separator;
|
print $separator;
|
||||||
|
// TXDV
|
||||||
|
print '0'.$separator;
|
||||||
// MOPM
|
// MOPM
|
||||||
print $separator;
|
print $separator;
|
||||||
// BONP
|
// BONP
|
||||||
|
|||||||
@ -136,9 +136,9 @@ class AccountingAccount extends CommonObject
|
|||||||
public $active;
|
public $active;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int reconciliable
|
* @var int reconcilable
|
||||||
*/
|
*/
|
||||||
public $reconciliable;
|
public $reconcilable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
@ -167,7 +167,7 @@ class AccountingAccount extends CommonObject
|
|||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
if ($rowid || $account_number) {
|
if ($rowid || $account_number) {
|
||||||
$sql = "SELECT a.rowid as rowid, a.datec, a.tms, a.fk_pcg_version, a.pcg_type, a.account_number, a.account_parent, a.label, a.labelshort, a.fk_accounting_category, a.fk_user_author, a.fk_user_modif, a.active, a.reconciliable";
|
$sql = "SELECT a.rowid as rowid, a.datec, a.tms, a.fk_pcg_version, a.pcg_type, a.account_number, a.account_parent, a.label, a.labelshort, a.fk_accounting_category, a.fk_user_author, a.fk_user_modif, a.active, a.reconcilable";
|
||||||
$sql .= ", ca.label as category_label";
|
$sql .= ", ca.label as category_label";
|
||||||
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as a";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as a";
|
||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_accounting_category as ca ON a.fk_accounting_category = ca.rowid";
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_accounting_category as ca ON a.fk_accounting_category = ca.rowid";
|
||||||
@ -208,7 +208,7 @@ class AccountingAccount extends CommonObject
|
|||||||
$this->fk_user_modif = $obj->fk_user_modif;
|
$this->fk_user_modif = $obj->fk_user_modif;
|
||||||
$this->active = $obj->active;
|
$this->active = $obj->active;
|
||||||
$this->status = $obj->active;
|
$this->status = $obj->active;
|
||||||
$this->reconciliable = $obj->reconciliable;
|
$this->reconcilable = $obj->reconcilable;
|
||||||
|
|
||||||
return $this->id;
|
return $this->id;
|
||||||
} else {
|
} else {
|
||||||
@ -267,7 +267,7 @@ class AccountingAccount extends CommonObject
|
|||||||
$sql .= ", fk_accounting_category";
|
$sql .= ", fk_accounting_category";
|
||||||
$sql .= ", fk_user_author";
|
$sql .= ", fk_user_author";
|
||||||
$sql .= ", active";
|
$sql .= ", active";
|
||||||
$sql .= ", reconciliable";
|
$sql .= ", reconcilable";
|
||||||
$sql .= ") VALUES (";
|
$sql .= ") VALUES (";
|
||||||
$sql .= " '" . $this->db->idate($now) . "'";
|
$sql .= " '" . $this->db->idate($now) . "'";
|
||||||
$sql .= ", " . $conf->entity;
|
$sql .= ", " . $conf->entity;
|
||||||
@ -280,7 +280,7 @@ class AccountingAccount extends CommonObject
|
|||||||
$sql .= ", " . (empty($this->account_category) ? 0 : (int) $this->account_category);
|
$sql .= ", " . (empty($this->account_category) ? 0 : (int) $this->account_category);
|
||||||
$sql .= ", " . $user->id;
|
$sql .= ", " . $user->id;
|
||||||
$sql .= ", " . (int) $this->active;
|
$sql .= ", " . (int) $this->active;
|
||||||
$sql .= ", " . (int) $this->reconciliable;
|
$sql .= ", " . (int) $this->reconcilable;
|
||||||
$sql .= ")";
|
$sql .= ")";
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
@ -348,7 +348,7 @@ class AccountingAccount extends CommonObject
|
|||||||
$sql .= " , fk_accounting_category = " . (empty($this->account_category) ? 0 : (int) $this->account_category);
|
$sql .= " , fk_accounting_category = " . (empty($this->account_category) ? 0 : (int) $this->account_category);
|
||||||
$sql .= " , fk_user_modif = " . $user->id;
|
$sql .= " , fk_user_modif = " . $user->id;
|
||||||
$sql .= " , active = " . (int) $this->active;
|
$sql .= " , active = " . (int) $this->active;
|
||||||
$sql .= " , reconciliable = " . (int) $this->reconciliable;
|
$sql .= " , reconcilable = " . (int) $this->reconcilable;
|
||||||
$sql .= " WHERE rowid = " . $this->id;
|
$sql .= " WHERE rowid = " . $this->id;
|
||||||
|
|
||||||
dol_syslog(get_class($this) . "::update sql=" . $sql, LOG_DEBUG);
|
dol_syslog(get_class($this) . "::update sql=" . $sql, LOG_DEBUG);
|
||||||
@ -588,7 +588,7 @@ class AccountingAccount extends CommonObject
|
|||||||
}
|
}
|
||||||
elseif ($mode == 1)
|
elseif ($mode == 1)
|
||||||
{
|
{
|
||||||
$fieldtouse = 'reconciliable';
|
$fieldtouse = 'reconcilable';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
@ -619,7 +619,7 @@ class AccountingAccount extends CommonObject
|
|||||||
* Account activated
|
* Account activated
|
||||||
*
|
*
|
||||||
* @param int $id Id
|
* @param int $id Id
|
||||||
* @param int $mode 0=field active, 1=field reconciliable, 2=field active_customer_list, 3=field_active_supplier_list
|
* @param int $mode 0=field active, 1=field reconcilable
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
public function account_activate($id, $mode = 0)
|
public function account_activate($id, $mode = 0)
|
||||||
@ -633,7 +633,7 @@ class AccountingAccount extends CommonObject
|
|||||||
}
|
}
|
||||||
elseif ($mode == 1)
|
elseif ($mode == 1)
|
||||||
{
|
{
|
||||||
$fieldtouse = 'reconciliable';
|
$fieldtouse = 'reconcilable';
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "UPDATE " . MAIN_DB_PREFIX . "accounting_account ";
|
$sql = "UPDATE " . MAIN_DB_PREFIX . "accounting_account ";
|
||||||
|
|||||||
@ -566,8 +566,8 @@ if ($result) {
|
|||||||
|
|
||||||
print '<td>'.$objp->tva_intra.'</td>';
|
print '<td>'.$objp->tva_intra.'</td>';
|
||||||
|
|
||||||
// Current account
|
// Found accounts
|
||||||
print '<td class="center" style="'.$code_sell_p_notset.'">';
|
print '<td style="'.$code_sell_p_notset.'">';
|
||||||
$s = '<span class="small">'.(($objp->type_l == 1) ? $langs->trans("DefaultForService") : $langs->trans("DefaultForProduct")).': </span>';
|
$s = '<span class="small">'.(($objp->type_l == 1) ? $langs->trans("DefaultForService") : $langs->trans("DefaultForProduct")).': </span>';
|
||||||
$shelp = '';
|
$shelp = '';
|
||||||
if ($suggestedaccountingaccountbydefaultfor == 'eec') $shelp .= $langs->trans("SaleEEC");
|
if ($suggestedaccountingaccountbydefaultfor == 'eec') $shelp .= $langs->trans("SaleEEC");
|
||||||
|
|||||||
@ -225,9 +225,9 @@ $sql .= " INNER JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = f.fk_soc";
|
|||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as co ON co.rowid = s.fk_pays ";
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as co ON co.rowid = s.fk_pays ";
|
||||||
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."facture_fourn_det as l ON f.rowid = l.fk_facture_fourn";
|
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."facture_fourn_det as l ON f.rowid = l.fk_facture_fourn";
|
||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = l.fk_product";
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = l.fk_product";
|
||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON p.accountancy_code_sell = aa.account_number AND aa.active = 1 AND aa.fk_pcg_version = '".$chartaccountcode."' AND aa.entity = ".$conf->entity;
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON p.accountancy_code_buy = aa.account_number AND aa.active = 1 AND aa.fk_pcg_version = '".$chartaccountcode."' AND aa.entity = ".$conf->entity;
|
||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa2 ON p.accountancy_code_sell_intra = aa2.account_number AND aa2.active = 1 AND aa2.fk_pcg_version = '".$chartaccountcode."' AND aa2.entity = ".$conf->entity;
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa2 ON p.accountancy_code_buy_intra = aa2.account_number AND aa2.active = 1 AND aa2.fk_pcg_version = '".$chartaccountcode."' AND aa2.entity = ".$conf->entity;
|
||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa3 ON p.accountancy_code_sell_export = aa3.account_number AND aa3.active = 1 AND aa3.fk_pcg_version = '".$chartaccountcode."' AND aa3.entity = ".$conf->entity;
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa3 ON p.accountancy_code_buy_export = aa3.account_number AND aa3.active = 1 AND aa3.fk_pcg_version = '".$chartaccountcode."' AND aa3.entity = ".$conf->entity;
|
||||||
$sql .= " WHERE f.fk_statut > 0 AND l.fk_code_ventilation <= 0";
|
$sql .= " WHERE f.fk_statut > 0 AND l.fk_code_ventilation <= 0";
|
||||||
$sql .= " AND l.product_type <= 2";
|
$sql .= " AND l.product_type <= 2";
|
||||||
// Add search filter like
|
// Add search filter like
|
||||||
@ -411,6 +411,10 @@ if ($result) {
|
|||||||
$facturefourn_static = new FactureFournisseur($db);
|
$facturefourn_static = new FactureFournisseur($db);
|
||||||
$product_static = new Product($db);
|
$product_static = new Product($db);
|
||||||
|
|
||||||
|
$isBuyerInEEC = isInEEC($mysoc);
|
||||||
|
|
||||||
|
$accountingaccount_codetotid_cache = array();
|
||||||
|
|
||||||
while ($i < min($num_lines, $limit)) {
|
while ($i < min($num_lines, $limit)) {
|
||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
|
|
||||||
@ -440,7 +444,7 @@ if ($result) {
|
|||||||
$code_buy_p_notset = '';
|
$code_buy_p_notset = '';
|
||||||
$objp->aarowid_suggest = ''; // Will be set later
|
$objp->aarowid_suggest = ''; // Will be set later
|
||||||
|
|
||||||
$isBuyerInEEC = isInEEC($objp);
|
$isSellerInEEC = isInEEC($objp);
|
||||||
|
|
||||||
$suggestedaccountingaccountbydefaultfor = '';
|
$suggestedaccountingaccountbydefaultfor = '';
|
||||||
if ($objp->type_l == 1) {
|
if ($objp->type_l == 1) {
|
||||||
@ -548,7 +552,7 @@ if ($result) {
|
|||||||
// VAT Num
|
// VAT Num
|
||||||
print '<td>'.$objp->tva_intra.'</td>';
|
print '<td>'.$objp->tva_intra.'</td>';
|
||||||
|
|
||||||
// Current account
|
// Found accounts
|
||||||
print '<td style="'.$code_buy_p_notset.'">';
|
print '<td style="'.$code_buy_p_notset.'">';
|
||||||
$s = '<span class="small">'.(($objp->type_l == 1) ? $langs->trans("DefaultForService") : $langs->trans("DefaultForProduct")).': </span>';
|
$s = '<span class="small">'.(($objp->type_l == 1) ? $langs->trans("DefaultForService") : $langs->trans("DefaultForProduct")).': </span>';
|
||||||
$shelp = '';
|
$shelp = '';
|
||||||
|
|||||||
@ -259,7 +259,7 @@ print '<br>';
|
|||||||
|
|
||||||
print img_picto('', 'puce').' '.$langs->trans("DocForAllMembersCards", ($conf->global->ADHERENT_CARD_TYPE?$conf->global->ADHERENT_CARD_TYPE:$langs->transnoentitiesnoconv("None"))).' ';
|
print img_picto('', 'puce').' '.$langs->trans("DocForAllMembersCards", ($conf->global->ADHERENT_CARD_TYPE?$conf->global->ADHERENT_CARD_TYPE:$langs->transnoentitiesnoconv("None"))).' ';
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
print '<input type="hidden" name="token" value="' . newToken() . '">';
|
||||||
print '<input type="hidden" name="foruserid" value="all">';
|
print '<input type="hidden" name="foruserid" value="all">';
|
||||||
print '<input type="hidden" name="mode" value="card">';
|
print '<input type="hidden" name="mode" value="card">';
|
||||||
print '<input type="hidden" name="action" value="builddoc">';
|
print '<input type="hidden" name="action" value="builddoc">';
|
||||||
@ -279,7 +279,7 @@ print '<br><br>';
|
|||||||
|
|
||||||
print img_picto('', 'puce').' '.$langs->trans("DocForOneMemberCards", ($conf->global->ADHERENT_CARD_TYPE?$conf->global->ADHERENT_CARD_TYPE:$langs->transnoentitiesnoconv("None"))).' ';
|
print img_picto('', 'puce').' '.$langs->trans("DocForOneMemberCards", ($conf->global->ADHERENT_CARD_TYPE?$conf->global->ADHERENT_CARD_TYPE:$langs->transnoentitiesnoconv("None"))).' ';
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
print '<input type="hidden" name="token" value="' . newToken() . '">';
|
||||||
print '<input type="hidden" name="mode" value="cardlogin">';
|
print '<input type="hidden" name="mode" value="cardlogin">';
|
||||||
print '<input type="hidden" name="action" value="builddoc">';
|
print '<input type="hidden" name="action" value="builddoc">';
|
||||||
print $langs->trans("DescADHERENT_CARD_TYPE").' ';
|
print $langs->trans("DescADHERENT_CARD_TYPE").' ';
|
||||||
@ -299,7 +299,7 @@ print '<br><br>';
|
|||||||
|
|
||||||
print img_picto('', 'puce').' '.$langs->trans("DocForLabels", $conf->global->ADHERENT_ETIQUETTE_TYPE).' ';
|
print img_picto('', 'puce').' '.$langs->trans("DocForLabels", $conf->global->ADHERENT_ETIQUETTE_TYPE).' ';
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
print '<input type="hidden" name="token" value="' . newToken() . '">';
|
||||||
print '<input type="hidden" name="mode" value="label">';
|
print '<input type="hidden" name="mode" value="label">';
|
||||||
print '<input type="hidden" name="action" value="builddoc">';
|
print '<input type="hidden" name="action" value="builddoc">';
|
||||||
print $langs->trans("DescADHERENT_ETIQUETTE_TYPE").' ';
|
print $langs->trans("DescADHERENT_ETIQUETTE_TYPE").' ';
|
||||||
|
|||||||
@ -145,6 +145,8 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
|||||||
|
|
||||||
// Show filter box
|
// Show filter box
|
||||||
/*print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
/*print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
|
|
||||||
print '<table class="border centpercent">';
|
print '<table class="border centpercent">';
|
||||||
print '<tr class="liste_titre"><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
|
print '<tr class="liste_titre"><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
|
||||||
print '<tr><td>'.$langs->trans("Member").'</td><td>';
|
print '<tr><td>'.$langs->trans("Member").'</td><td>';
|
||||||
|
|||||||
@ -297,7 +297,7 @@ if (!$rowid && $action != 'create' && $action != 'edit')
|
|||||||
print '<td class="center">'.yn($objp->vote).'</td>';
|
print '<td class="center">'.yn($objp->vote).'</td>';
|
||||||
print '<td class="center">'.$membertype->getLibStatut(5).'</td>';
|
print '<td class="center">'.$membertype->getLibStatut(5).'</td>';
|
||||||
if ($user->rights->adherent->configurer)
|
if ($user->rights->adherent->configurer)
|
||||||
print '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&rowid='.$objp->rowid.'">'.img_edit().'</a></td>';
|
print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=edit&rowid='.$objp->rowid.'">'.img_edit().'</a></td>';
|
||||||
else
|
else
|
||||||
print '<td class="right"> </td>';
|
print '<td class="right"> </td>';
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
@ -607,7 +607,7 @@ if ($rowid > 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION ['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print '<input class="flat" type="hidden" name="rowid" value="'.$object->id.'" size="12"></td>';
|
print '<input class="flat" type="hidden" name="rowid" value="'.$object->id.'" size="12"></td>';
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|||||||
@ -324,7 +324,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'" name="agenda">';
|
print '<form action="'.$_SERVER["PHP_SELF"].'" name="agenda">';
|
||||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
print '<input type="hidden" name="token" value="' . newToken() . '">';
|
||||||
print '<input type="hidden" name="action" value="set">';
|
print '<input type="hidden" name="action" value="set">';
|
||||||
|
|
||||||
print '<table class="noborder allwidth">'."\n";
|
print '<table class="noborder allwidth">'."\n";
|
||||||
|
|||||||
@ -180,7 +180,7 @@ $head=agenda_prepare_head();
|
|||||||
dol_fiche_head($head, 'reminders', $langs->trans("Agenda"), -1, 'action');
|
dol_fiche_head($head, 'reminders', $langs->trans("Agenda"), -1, 'action');
|
||||||
|
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'" name="agenda">';
|
print '<form action="'.$_SERVER["PHP_SELF"].'" name="agenda">';
|
||||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
print '<input type="hidden" name="token" value="' . newToken() . '">';
|
||||||
print '<input type="hidden" name="action" value="set">';
|
print '<input type="hidden" name="action" value="set">';
|
||||||
|
|
||||||
print '<table class="noborder allwidth">'."\n";
|
print '<table class="noborder allwidth">'."\n";
|
||||||
|
|||||||
@ -119,7 +119,7 @@ if (! empty($conf->global->CLICKTODIAL_URL))
|
|||||||
if (GETPOST('phonefortest')) $phonefortest=GETPOST('phonefortest');
|
if (GETPOST('phonefortest')) $phonefortest=GETPOST('phonefortest');
|
||||||
|
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
print '<input type="hidden" name="token" value="' . newToken() . '">';
|
||||||
print $langs->trans("LinkToTestClickToDial", $user->login).' : ';
|
print $langs->trans("LinkToTestClickToDial", $user->login).' : ';
|
||||||
print '<input class="flat" type="text" name="phonefortest" value="'.dol_escape_htmltag($phonefortest).'">';
|
print '<input class="flat" type="text" name="phonefortest" value="'.dol_escape_htmltag($phonefortest).'">';
|
||||||
print '<input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans("RefreshPhoneLink")).'">';
|
print '<input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans("RefreshPhoneLink")).'">';
|
||||||
|
|||||||
@ -437,15 +437,15 @@ $tabcond[8] = !empty($conf->societe->enabled);
|
|||||||
$tabcond[9] = true;
|
$tabcond[9] = true;
|
||||||
$tabcond[10] = true;
|
$tabcond[10] = true;
|
||||||
$tabcond[11] = (!empty($conf->societe->enabled));
|
$tabcond[11] = (!empty($conf->societe->enabled));
|
||||||
$tabcond[12] = (!empty($conf->commande->enabled) || !empty($conf->propal->enabled) || !empty($conf->facture->enabled) || !empty($conf->fournisseur->enabled));
|
$tabcond[12] = (!empty($conf->commande->enabled) || !empty($conf->propal->enabled) || !empty($conf->facture->enabled) || (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_invoice->enabled) || !empty($conf->supplier_order->enabled));
|
||||||
$tabcond[13] = (!empty($conf->commande->enabled) || !empty($conf->propal->enabled) || !empty($conf->facture->enabled) || !empty($conf->fournisseur->enabled));
|
$tabcond[13] = (!empty($conf->commande->enabled) || !empty($conf->propal->enabled) || !empty($conf->facture->enabled) || (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_invoice->enabled) || !empty($conf->supplier_order->enabled));
|
||||||
$tabcond[14] = (!empty($conf->product->enabled) && (!empty($conf->ecotax->enabled) || !empty($conf->global->MAIN_SHOW_ECOTAX_DICTIONNARY)));
|
$tabcond[14] = (!empty($conf->product->enabled) && (!empty($conf->ecotax->enabled) || !empty($conf->global->MAIN_SHOW_ECOTAX_DICTIONNARY)));
|
||||||
$tabcond[15] = true;
|
$tabcond[15] = true;
|
||||||
$tabcond[16] = (!empty($conf->societe->enabled) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS));
|
$tabcond[16] = (!empty($conf->societe->enabled) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS));
|
||||||
$tabcond[17] = (!empty($conf->deplacement->enabled) || !empty($conf->expensereport->enabled));
|
$tabcond[17] = (!empty($conf->deplacement->enabled) || !empty($conf->expensereport->enabled));
|
||||||
$tabcond[18] = !empty($conf->expedition->enabled) || !empty($conf->reception->enabled);
|
$tabcond[18] = !empty($conf->expedition->enabled) || !empty($conf->reception->enabled);
|
||||||
$tabcond[19] = !empty($conf->societe->enabled);
|
$tabcond[19] = !empty($conf->societe->enabled);
|
||||||
$tabcond[20] = !empty($conf->fournisseur->enabled);
|
$tabcond[20]= (! empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || ! empty($conf->supplier_order->enabled));
|
||||||
$tabcond[21] = !empty($conf->propal->enabled);
|
$tabcond[21] = !empty($conf->propal->enabled);
|
||||||
$tabcond[22] = (!empty($conf->commande->enabled) || !empty($conf->propal->enabled));
|
$tabcond[22] = (!empty($conf->commande->enabled) || !empty($conf->propal->enabled));
|
||||||
$tabcond[23] = true;
|
$tabcond[23] = true;
|
||||||
|
|||||||
@ -483,7 +483,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||||
|
|
||||||
// Filters
|
// Filters
|
||||||
print '<table class="border centpercent">';
|
print '<table class="border centpercent tableforfield">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Filters").'</td><td></td><td></td>';
|
print '<td>'.$langs->trans("Filters").'</td><td></td><td></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@ -562,7 +562,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
print '<div class="clearboth"></div><br>';
|
print '<div class="clearboth"></div><br>';
|
||||||
|
|
||||||
// Operations
|
// Operations
|
||||||
print '<table id="tablelines" class="noborder noshadow">';
|
print '<table id="tablelines" class="noborder noshadow tableforfield">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("EmailcollectorOperations").'</td><td></td><td></td><td></td>';
|
print '<td>'.$langs->trans("EmailcollectorOperations").'</td><td></td><td></td><td></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|||||||
@ -23,9 +23,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/admin/expedition.php
|
* \file htdocs/admin/export.php
|
||||||
* \ingroup expedition
|
* \ingroup export
|
||||||
* \brief Page d'administration/configuration du module Expedition
|
* \brief config Page module Export
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
@ -38,13 +38,15 @@ if (!$user->admin)
|
|||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$action = GETPOST('action', 'alpha');
|
$action = GETPOST('action', 'alpha');
|
||||||
$value = GETPOST('value', 'alpha');
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
|
if ($action == 'save') {
|
||||||
|
dolibarr_set_const($db, 'EXPORT_CSV_SEPARATOR_TO_USE', GETPOST('EXPORT_CSV_SEPARATOR_TO_USE', 'alphanohtml'));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -69,32 +71,38 @@ $head[$h][1] = $langs->trans("Setup");
|
|||||||
$head[$h][2] = 'setup';
|
$head[$h][2] = 'setup';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
dol_fiche_head($head, 'setup', $langs->trans("ExportsArea"), -1, "exports");
|
dol_fiche_head($head, 'setup', $langs->trans("ExportsArea"), -1, "technic");
|
||||||
|
|
||||||
|
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
||||||
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
|
print '<input type="hidden" name="action" value="save">';
|
||||||
|
|
||||||
print '<table class="noborder centpercent">';
|
print '<table class="noborder centpercent">';
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Parameters").'</td>'."\n";
|
print '<td>'.$langs->trans("Parameters").'</td>'."\n";
|
||||||
print '<td class="center" width="20"> </td>';
|
print '<td class="center" width="20"> </td>';
|
||||||
print '<td class="center" width="100"></td>'."\n";
|
print '<td class="center" width="100"></td>'."\n";
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
// Example with a yes / no select
|
// Example with a yes / no select
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$langs->trans("EXPORTS_SHARE_MODELS").'</td>';
|
print '<td>'.$langs->trans("EXPORTS_SHARE_MODELS").'</td>';
|
||||||
print '<td class="center" width="20"> </td>';
|
print '<td class="center" width="20"> </td>';
|
||||||
print '<td class="center" width="100">';
|
print '<td class="center" width="100">';
|
||||||
|
|
||||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
|
||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
|
||||||
print '<input type="hidden" name="action" value="set_EXPORTS_SHARE_MODELS">';
|
|
||||||
echo ajax_constantonoff('EXPORTS_SHARE_MODELS');
|
echo ajax_constantonoff('EXPORTS_SHARE_MODELS');
|
||||||
print '</form>';
|
|
||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
print '<tr class="oddeven">';
|
||||||
|
print '<td>'.$langs->trans("ExportCsvSeparator").'</td>';
|
||||||
|
print '<td width="60" align="center">'."<input size=\"3\" class=\"flat\" type=\"text\" name=\"EXPORT_CSV_SEPARATOR_TO_USE\" value=\"".(empty($conf->global->EXPORT_CSV_SEPARATOR_TO_USE) ? ',' : $conf->global->EXPORT_CSV_SEPARATOR_TO_USE)."\"></td>";
|
||||||
|
print '<td class="right"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
print '</form>';
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
// End of page
|
// End of page
|
||||||
|
|||||||
@ -57,7 +57,7 @@ $modules = array(
|
|||||||
$conditions = array(
|
$conditions = array(
|
||||||
'SOCIETE' => 1,
|
'SOCIETE' => 1,
|
||||||
'PRODUCTDESC' => (! empty($conf->product->enabled) || ! empty($conf->service->enabled)),
|
'PRODUCTDESC' => (! empty($conf->product->enabled) || ! empty($conf->service->enabled)),
|
||||||
'DETAILS' => (! empty($conf->facture->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->commande->enabled) || ! empty($conf->supplier_proposal->enabled) || ! empty($conf->fournisseur->enabled)),
|
'DETAILS' => (! empty($conf->facture->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->commande->enabled) || ! empty($conf->supplier_proposal->enabled) || ! empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || ! empty($conf->supplier_order->enabled) || ! empty($conf->supplier_invoice->enabled)),
|
||||||
'USERSIGN' => 1,
|
'USERSIGN' => 1,
|
||||||
'MAILING' => ! empty($conf->mailing->enabled),
|
'MAILING' => ! empty($conf->mailing->enabled),
|
||||||
'MAIL' => (! empty($conf->facture->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->commande->enabled)),
|
'MAIL' => (! empty($conf->facture->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->commande->enabled)),
|
||||||
@ -185,7 +185,7 @@ else
|
|||||||
print '<br>'."\n";
|
print '<br>'."\n";
|
||||||
|
|
||||||
print '<form name="formtest" method="POST" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
print '<form name="formtest" method="POST" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
print '<input type="hidden" name="token" value="' . newToken() . '">';
|
||||||
|
|
||||||
// Skins
|
// Skins
|
||||||
show_skin(null, 1);
|
show_skin(null, 1);
|
||||||
|
|||||||
100
htdocs/admin/import.php
Normal file
100
htdocs/admin/import.php
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
<?php
|
||||||
|
/* Copyright (C) 2003-2008 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||||
|
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||||
|
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||||
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
|
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
||||||
|
* Copyright (C) 2011-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
|
* Copyright (C) 2020 Floriazn Henry <florian.henry@atm-consulting.fr>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \file htdocs/admin/import.php
|
||||||
|
* \ingroup import
|
||||||
|
* \brief config page module import
|
||||||
|
*/
|
||||||
|
|
||||||
|
require '../main.inc.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||||
|
|
||||||
|
// Load translation files required by the page
|
||||||
|
$langs->loadLangs(array('admin', 'exports', 'other'));
|
||||||
|
|
||||||
|
if (!$user->admin)
|
||||||
|
accessforbidden();
|
||||||
|
|
||||||
|
$action = GETPOST('action', 'alpha');
|
||||||
|
$value = GETPOST('value', 'alpha');
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Actions
|
||||||
|
*/
|
||||||
|
|
||||||
|
include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* View
|
||||||
|
*/
|
||||||
|
|
||||||
|
$form = new Form($db);
|
||||||
|
|
||||||
|
$page_name = "ImportSetup";
|
||||||
|
llxHeader('', $langs->trans($page_name));
|
||||||
|
|
||||||
|
// Subheader
|
||||||
|
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||||
|
|
||||||
|
print load_fiche_titre($langs->trans($page_name), $linkback);
|
||||||
|
|
||||||
|
//$head = export_admin_prepare_head();
|
||||||
|
$h = 0;
|
||||||
|
$head = array();
|
||||||
|
$head[$h][0] = DOL_URL_ROOT.'/admin/import.php';
|
||||||
|
$head[$h][1] = $langs->trans("Setup");
|
||||||
|
$head[$h][2] = 'setup';
|
||||||
|
$h++;
|
||||||
|
|
||||||
|
dol_fiche_head($head, 'setup', $langs->trans("ImportArea"), -1, "technic");
|
||||||
|
|
||||||
|
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
||||||
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
|
print '<input type="hidden" name="action" value="setModuleOptions">';
|
||||||
|
print '<input type="hidden" name="param" value="IMPORT_CSV_SEPARATOR_TO_USE">';
|
||||||
|
|
||||||
|
print '<table class="noborder centpercent">';
|
||||||
|
print '<tr class="liste_titre">';
|
||||||
|
print '<td>'.$langs->trans("Parameters").'</td>'."\n";
|
||||||
|
print '<td class="center" width="20"> </td>';
|
||||||
|
print '<td class="center" width="100"></td>'."\n";
|
||||||
|
|
||||||
|
print '<tr class="oddeven">';
|
||||||
|
print '<td>'.$langs->trans("ImportCsvSeparator").' ('.$langs->trans("ByDefault").')</td>';
|
||||||
|
print '<td width="60" align="center">'."<input size=\"3\" class=\"flat\" type=\"text\" name=\"value\" value=\"".(empty($conf->global->IMPORT_CSV_SEPARATOR_TO_USE) ? ',' : $conf->global->IMPORT_CSV_SEPARATOR_TO_USE)."\"></td>";
|
||||||
|
print '<td class="right"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
print '</table>';
|
||||||
|
|
||||||
|
print '</form>';
|
||||||
|
|
||||||
|
dol_fiche_end();
|
||||||
|
|
||||||
|
// End of page
|
||||||
|
llxFooter();
|
||||||
|
$db->close();
|
||||||
@ -91,14 +91,6 @@ print '<br>';
|
|||||||
|
|
||||||
// Show info setup module
|
// Show info setup module
|
||||||
print img_picto('', 'puce').' '.$langs->trans("SetupDescription4", DOL_URL_ROOT.'/admin/modules.php?mainmenu=home', $langs->transnoentities("Setup"), $langs->transnoentities("Modules"));
|
print img_picto('', 'puce').' '.$langs->trans("SetupDescription4", DOL_URL_ROOT.'/admin/modules.php?mainmenu=home', $langs->transnoentities("Setup"), $langs->transnoentities("Modules"));
|
||||||
|
|
||||||
/*
|
|
||||||
$nbofactivatedmodules=count($conf->modules);
|
|
||||||
$moreinfo=$langs->trans("TotalNumberOfActivatedModules",($nbofactivatedmodules-1), count($modules));
|
|
||||||
if ($nbofactivatedmodules <= 1) $moreinfo .= ' '.img_warning($langs->trans("YouMustEnableOneModule"));
|
|
||||||
print '<br>'.$moreinfo;
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (count($conf->modules) <= (empty($conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING) ? 1 : $conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING)) // If only user module enabled
|
if (count($conf->modules) <= (empty($conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING) ? 1 : $conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING)) // If only user module enabled
|
||||||
{
|
{
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
|
|||||||
@ -162,8 +162,8 @@ if ($conf->expedition->enabled) $elementList['shipping_send'] = $langs->t
|
|||||||
if ($conf->reception->enabled) $elementList['reception_send'] = $langs->trans('MailToSendReception');
|
if ($conf->reception->enabled) $elementList['reception_send'] = $langs->trans('MailToSendReception');
|
||||||
if ($conf->ficheinter->enabled) $elementList['fichinter_send'] = $langs->trans('MailToSendIntervention');
|
if ($conf->ficheinter->enabled) $elementList['fichinter_send'] = $langs->trans('MailToSendIntervention');
|
||||||
if ($conf->supplier_proposal->enabled) $elementList['supplier_proposal_send'] = $langs->trans('MailToSendSupplierRequestForQuotation');
|
if ($conf->supplier_proposal->enabled) $elementList['supplier_proposal_send'] = $langs->trans('MailToSendSupplierRequestForQuotation');
|
||||||
if ($conf->fournisseur->enabled) $elementList['order_supplier_send'] = $langs->trans('MailToSendSupplierOrder');
|
if ($conf->fournisseur->enabled && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || $conf->supplier_order->enabled) $elementList['order_supplier_send'] = $langs->trans('MailToSendSupplierOrder');
|
||||||
if ($conf->fournisseur->enabled) $elementList['invoice_supplier_send'] = $langs->trans('MailToSendSupplierInvoice');
|
if ($conf->fournisseur->enabled && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || $conf->supplier_invoice->enabled) $elementList['invoice_supplier_send'] = $langs->trans('MailToSendSupplierInvoice');
|
||||||
if ($conf->societe->enabled) $elementList['thirdparty'] = $langs->trans('MailToThirdparty');
|
if ($conf->societe->enabled) $elementList['thirdparty'] = $langs->trans('MailToThirdparty');
|
||||||
if ($conf->adherent->enabled) $elementList['member'] = $langs->trans('MailToMember');
|
if ($conf->adherent->enabled) $elementList['member'] = $langs->trans('MailToMember');
|
||||||
if ($conf->contrat->enabled) $elementList['contract'] = $langs->trans('MailToSendContract');
|
if ($conf->contrat->enabled) $elementList['contract'] = $langs->trans('MailToSendContract');
|
||||||
|
|||||||
@ -930,7 +930,7 @@ if ($mode == 'marketplace')
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
<form method="POST" class="centpercent" id="searchFormList" action="<?php echo $dolistore->url ?>">
|
<form method="POST" class="centpercent" id="searchFormList" action="<?php echo $dolistore->url ?>">
|
||||||
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken'] ?>">
|
<input type="hidden" name="token" value="<?php echo newToken(); ?>">
|
||||||
<input type="hidden" name="mode" value="marketplace">
|
<input type="hidden" name="mode" value="marketplace">
|
||||||
<div class="divsearchfield"><?php echo $langs->trans('Keyword') ?>:
|
<div class="divsearchfield"><?php echo $langs->trans('Keyword') ?>:
|
||||||
<input name="search_keyword" placeholder="<?php echo $langs->trans('Chercher un module') ?>" id="search_keyword" type="text" size="50" value="<?php echo $options['search'] ?>"><br>
|
<input name="search_keyword" placeholder="<?php echo $langs->trans('Chercher un module') ?>" id="search_keyword" type="text" size="50" value="<?php echo $options['search'] ?>"><br>
|
||||||
|
|||||||
@ -213,7 +213,7 @@ $found=0;
|
|||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$langs->trans("ReStockOnBill").'</td>';
|
print '<td>'.$langs->trans("ReStockOnBill").'</td>';
|
||||||
print '<td class="right">';
|
print '<td class="right">';
|
||||||
if (! empty($conf->fournisseur->enabled))
|
if (! empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || ! empty($conf->supplier_order->enabled) || ! empty($conf->supplier_invoice->enabled))
|
||||||
{
|
{
|
||||||
if ($conf->use_javascript_ajax) {
|
if ($conf->use_javascript_ajax) {
|
||||||
print ajax_constantonoff('STOCK_CALCULATE_ON_SUPPLIER_BILL');
|
print ajax_constantonoff('STOCK_CALCULATE_ON_SUPPLIER_BILL');
|
||||||
@ -234,7 +234,7 @@ $found++;
|
|||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$langs->trans("ReStockOnValidateOrder").'</td>';
|
print '<td>'.$langs->trans("ReStockOnValidateOrder").'</td>';
|
||||||
print '<td class="right">';
|
print '<td class="right">';
|
||||||
if (! empty($conf->fournisseur->enabled))
|
if (! empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || ! empty($conf->supplier_order->enabled) || ! empty($conf->supplier_invoice->enabled))
|
||||||
{
|
{
|
||||||
if ($conf->use_javascript_ajax) {
|
if ($conf->use_javascript_ajax) {
|
||||||
print ajax_constantonoff('STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER');
|
print ajax_constantonoff('STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER');
|
||||||
|
|||||||
@ -86,31 +86,31 @@ print '</li>';
|
|||||||
if (preg_match('/^fr_/i', $langs->getDefaultLang()))
|
if (preg_match('/^fr_/i', $langs->getDefaultLang()))
|
||||||
{
|
{
|
||||||
print '<li>';
|
print '<li>';
|
||||||
print '<a target="_blank" href="http://www.dolibarr.fr/" rel="external">'.$langs->trans("OfficialWebSiteLocal", $langs->transnoentitiesnoconv("France")).'</a>';
|
print '<a target="_blank" href="https://www.dolibarr.fr/" rel="external">'.$langs->trans("OfficialWebSiteLocal", $langs->transnoentitiesnoconv("France")).'</a>';
|
||||||
print '</li>';
|
print '</li>';
|
||||||
}
|
}
|
||||||
if (preg_match('/^el_/i', $langs->getDefaultLang()))
|
if (preg_match('/^el_/i', $langs->getDefaultLang()))
|
||||||
{
|
{
|
||||||
print '<li>';
|
print '<li>';
|
||||||
print '<a target="_blank" href="http://www.dolibarr.gr/" rel="external">'.$langs->trans("OfficialWebSiteLocal", $langs->transnoentitiesnoconv("Greece")).'</a>';
|
print '<a target="_blank" href="https://www.dolibarr.gr/" rel="external">'.$langs->trans("OfficialWebSiteLocal", $langs->transnoentitiesnoconv("Greece")).'</a>';
|
||||||
print '</li>';
|
print '</li>';
|
||||||
}
|
}
|
||||||
if (preg_match('/^es_/i', $langs->getDefaultLang()))
|
if (preg_match('/^es_/i', $langs->getDefaultLang()))
|
||||||
{
|
{
|
||||||
print '<li>';
|
print '<li>';
|
||||||
print '<a target="_blank" href="http://www.dolibarr.es/" rel="external">'.$langs->trans("OfficialWebSiteLocal", $langs->transnoentitiesnoconv("Spain")).'</a>';
|
print '<a target="_blank" href="https://www.dolibarr.es/" rel="external">'.$langs->trans("OfficialWebSiteLocal", $langs->transnoentitiesnoconv("Spain")).'</a>';
|
||||||
print '</li>';
|
print '</li>';
|
||||||
}
|
}
|
||||||
if (preg_match('/^it_/i', $langs->getDefaultLang()))
|
if (preg_match('/^it_/i', $langs->getDefaultLang()))
|
||||||
{
|
{
|
||||||
print '<li>';
|
print '<li>';
|
||||||
print '<a target="_blank" href="http://www.dolibarr.it/" rel="external">'.$langs->trans("OfficialWebSiteLocal", $langs->transnoentitiesnoconv("Italy")).'</a>';
|
print '<a target="_blank" href="https://www.dolibarr.it/" rel="external">'.$langs->trans("OfficialWebSiteLocal", $langs->transnoentitiesnoconv("Italy")).'</a>';
|
||||||
print '</li>';
|
print '</li>';
|
||||||
}
|
}
|
||||||
if (preg_match('/^de_/i', $langs->getDefaultLang()))
|
if (preg_match('/^de_/i', $langs->getDefaultLang()))
|
||||||
{
|
{
|
||||||
print '<li>';
|
print '<li>';
|
||||||
print '<a target="_blank" href="http://www.dolibarr.de/" rel="external">'.$langs->trans("OfficialWebSiteLocal", $langs->transnoentitiesnoconv("Germany")).'</a>';
|
print '<a target="_blank" href="https://www.dolibarr.de/" rel="external">'.$langs->trans("OfficialWebSiteLocal", $langs->transnoentitiesnoconv("Germany")).'</a>';
|
||||||
print '</li>';
|
print '</li>';
|
||||||
}
|
}
|
||||||
print '<li>';
|
print '<li>';
|
||||||
|
|||||||
@ -53,10 +53,10 @@ print $langs->trans("YouMayFindPerfAdviceHere", 'https://wiki.dolibarr.org/index
|
|||||||
|
|
||||||
// Recupere la version de PHP
|
// Recupere la version de PHP
|
||||||
$phpversion=version_php();
|
$phpversion=version_php();
|
||||||
print "<br>PHP - ".$langs->trans("Version").": ".$phpversion."<br>\n";
|
print "<br><strong>PHP</strong> - ".$langs->trans("Version").": ".$phpversion."<br>\n";
|
||||||
|
|
||||||
// Recupere la version du serveur web
|
// Recupere la version du serveur web
|
||||||
print "<br>Web server - ".$langs->trans("Version").": ".$_SERVER["SERVER_SOFTWARE"]."<br>\n";
|
print "<br><strong>Web server</strong> - ".$langs->trans("Version").": ".$_SERVER["SERVER_SOFTWARE"]."<br>\n";
|
||||||
|
|
||||||
// XDebug
|
// XDebug
|
||||||
print '<br>';
|
print '<br>';
|
||||||
@ -65,8 +65,8 @@ $test=!function_exists('xdebug_is_enabled');
|
|||||||
if ($test) print img_picto('', 'tick.png').' '.$langs->trans("NotInstalled");
|
if ($test) print img_picto('', 'tick.png').' '.$langs->trans("NotInstalled");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print img_picto('', 'warning').' '.$langs->trans("XDebugInstalled");
|
print img_picto('', 'warning').' '.$langs->trans("ModuleActivated", $langs->transnoentities("XDebug"));
|
||||||
print ' '.$langs->trans("MoreInformation").' <a href="'.DOL_URL_ROOT.'/admin/system/xdebug.php'.'">XDebug admin page</a>';
|
print ' - '.$langs->trans("MoreInformation").' <a href="'.DOL_URL_ROOT.'/admin/system/xdebug.php'.'">XDebug admin page</a>';
|
||||||
}
|
}
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
|||||||
@ -147,13 +147,13 @@ dol_fiche_head($head, 'card', $langs->trans("MenuUsersAndGroups"), -1, 'user');
|
|||||||
|
|
||||||
print '<table class="noborder centpercent">';
|
print '<table class="noborder centpercent">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Description").'</td>';
|
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||||
print '<td align="center" width="20"> </td>';
|
print '<td align="center" width="20"> </td>';
|
||||||
print '<td align="center" width="100">'.$langs->trans("Value").'</td>'."\n";
|
print '<td align="center" width="100">'.$langs->trans("Value").'</td>'."\n";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
|
||||||
// Mail required for members
|
// Mail required for users
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$langs->trans("UserMailRequired").'</td>';
|
print '<td>'.$langs->trans("UserMailRequired").'</td>';
|
||||||
@ -206,6 +206,8 @@ else
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print load_fiche_titre($langs->trans("UsersDocModules"), '', '');
|
||||||
|
|
||||||
print '<table class="noborder centpercent">';
|
print '<table class="noborder centpercent">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Name").'</td>';
|
print '<td>'.$langs->trans("Name").'</td>';
|
||||||
|
|||||||
@ -152,6 +152,8 @@ else
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print load_fiche_titre($langs->trans("GroupsDocModules"), '', '');
|
||||||
|
|
||||||
print '<table class="noborder centpercent">';
|
print '<table class="noborder centpercent">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Name").'</td>';
|
print '<td>'.$langs->trans("Name").'</td>';
|
||||||
|
|||||||
@ -1401,6 +1401,39 @@ class Setup extends DolibarrApi
|
|||||||
return $this->_cleanObjectDatas($mysoc);
|
return $this->_cleanObjectDatas($mysoc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get value of a setup variables
|
||||||
|
*
|
||||||
|
* Note that conf variables that stores security key or password hashes can't be loaded with API.
|
||||||
|
*
|
||||||
|
* @url GET /conf
|
||||||
|
*
|
||||||
|
* @param string $confname Name of conf variable to get
|
||||||
|
* @return array|mixed Data without useless information
|
||||||
|
*
|
||||||
|
* @throws RestException 403 Forbidden
|
||||||
|
* @throws RestException 500 Error Bad or unknown value for constname
|
||||||
|
*/
|
||||||
|
public function getConf($confname)
|
||||||
|
{
|
||||||
|
global $conf;
|
||||||
|
|
||||||
|
if (!DolibarrApiAccess::$user->admin
|
||||||
|
&& (empty($conf->global->API_LOGIN_ALLOWED_FOR_ADMIN_CHECK) || DolibarrApiAccess::$user->login != $conf->global->API_LOGIN_ALLOWED_FOR_ADMIN_CHECK)) {
|
||||||
|
throw new RestException(403, 'Error API open to admin users only or to the login user defined with constant API_LOGIN_ALLOWED_FOR_ADMIN_CHECK');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! preg_match('/[^a-zA-Z0-9_]/', $confname) || ! isset($conf->global->$confname)) {
|
||||||
|
throw new RestException(500, 'Error Bad or unknown value for constname');
|
||||||
|
}
|
||||||
|
if (preg_match('/(_pass|password|secret|_key|key$)/i', $confname)) {
|
||||||
|
throw new RestException(403, 'Forbidden');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $conf->global->$confname;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Do a test of integrity for files and setup.
|
* Do a test of integrity for files and setup.
|
||||||
*
|
*
|
||||||
@ -1409,7 +1442,9 @@ class Setup extends DolibarrApi
|
|||||||
*
|
*
|
||||||
* @url GET checkintegrity
|
* @url GET checkintegrity
|
||||||
*
|
*
|
||||||
* @throws RestException
|
* @throws RestException 404 Signature file not found
|
||||||
|
* @throws RestException 500 Technical error
|
||||||
|
* @throws RestException 503 Forbidden
|
||||||
*/
|
*/
|
||||||
public function getCheckIntegrity($target)
|
public function getCheckIntegrity($target)
|
||||||
{
|
{
|
||||||
@ -1418,7 +1453,7 @@ class Setup extends DolibarrApi
|
|||||||
if (!DolibarrApiAccess::$user->admin
|
if (!DolibarrApiAccess::$user->admin
|
||||||
&& (empty($conf->global->API_LOGIN_ALLOWED_FOR_INTEGRITY_CHECK) || DolibarrApiAccess::$user->login != $conf->global->API_LOGIN_ALLOWED_FOR_INTEGRITY_CHECK))
|
&& (empty($conf->global->API_LOGIN_ALLOWED_FOR_INTEGRITY_CHECK) || DolibarrApiAccess::$user->login != $conf->global->API_LOGIN_ALLOWED_FOR_INTEGRITY_CHECK))
|
||||||
{
|
{
|
||||||
throw new RestException(503, 'Error API open to admin users only or to login user defined with constant API_LOGIN_ALLOWED_FOR_INTEGRITY_CHECK');
|
throw new RestException(503, 'Error API open to admin users only or to the login user defined with constant API_LOGIN_ALLOWED_FOR_INTEGRITY_CHECK');
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
|
|||||||
@ -546,7 +546,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
$result = $object->getLinesArray();
|
$result = $object->getLinesArray();
|
||||||
|
|
||||||
print ' <form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline') ? '#addline' : '#line_'.GETPOST('lineid', 'int')).'" method="POST">
|
print ' <form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline') ? '#addline' : '#line_'.GETPOST('lineid', 'int')).'" method="POST">
|
||||||
<input type="hidden" name="token" value="' . $_SESSION ['newtoken'].'">
|
<input type="hidden" name="token" value="' . newToken().'">
|
||||||
<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline').'">
|
<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline').'">
|
||||||
<input type="hidden" name="mode" value="">
|
<input type="hidden" name="mode" value="">
|
||||||
<input type="hidden" name="id" value="' . $object->id.'">
|
<input type="hidden" name="id" value="' . $object->id.'">
|
||||||
|
|||||||
@ -305,6 +305,7 @@ switch ($action)
|
|||||||
$payment->note=$langs->trans("Payment").' '.$langs->trans("Invoice").' '.$obj_facturation->numInvoice();
|
$payment->note=$langs->trans("Payment").' '.$langs->trans("Invoice").' '.$obj_facturation->numInvoice();
|
||||||
$payment->paiementid=$invoice->mode_reglement_id;
|
$payment->paiementid=$invoice->mode_reglement_id;
|
||||||
$payment->num_paiement='';
|
$payment->num_paiement='';
|
||||||
|
$payment->num_payment='';
|
||||||
|
|
||||||
$paiement_id = $payment->create($user);
|
$paiement_id = $payment->create($user);
|
||||||
if ($paiement_id > 0)
|
if ($paiement_id > 0)
|
||||||
|
|||||||
@ -243,7 +243,49 @@ class Categorie extends CommonObject
|
|||||||
*/
|
*/
|
||||||
public function __construct($db)
|
public function __construct($db)
|
||||||
{
|
{
|
||||||
|
global $hookmanager;
|
||||||
|
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
|
|
||||||
|
if (is_object($hookmanager)) {
|
||||||
|
$hookmanager->initHooks(array('category'));
|
||||||
|
$parameters = array();
|
||||||
|
$reshook = $hookmanager->executeHooks('constructCategory', $parameters, $this); // Note that $action and $object may have been modified by some hooks
|
||||||
|
if ($reshook >= 0 && !empty($hookmanager->resArray)) {
|
||||||
|
$mapList = $hookmanager->resArray;
|
||||||
|
$mapId = $mapList['id'];
|
||||||
|
$mapCode = $mapList['code'];
|
||||||
|
self::$MAP_ID_TO_CODE[$mapId] = $mapCode;
|
||||||
|
$this->MAP_ID[$mapCode] = $mapId;
|
||||||
|
$this->MAP_CAT_FK[$mapCode] = $mapList['cat_fk'];
|
||||||
|
$this->MAP_CAT_TABLE[$mapCode] = $mapList['cat_table'];
|
||||||
|
$this->MAP_OBJ_CLASS[$mapCode] = $mapList['obj_class'];
|
||||||
|
$this->MAP_OBJ_TABLE[$mapCode] = $mapList['obj_table'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get map list
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function getMapList()
|
||||||
|
{
|
||||||
|
$mapList = array();
|
||||||
|
|
||||||
|
foreach ($this->MAP_ID as $mapCode => $mapId) {
|
||||||
|
$mapList[] = array(
|
||||||
|
'id' => $mapId,
|
||||||
|
'code' => $mapCode,
|
||||||
|
'cat_fk' => $this->MAP_CAT_FK[$mapCode],
|
||||||
|
'cat_table' => $this->MAP_CAT_TABLE[$mapCode],
|
||||||
|
'obj_class' => $this->MAP_OBJ_CLASS[$mapCode],
|
||||||
|
'obj_table' => $this->MAP_OBJ_TABLE[$mapCode]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $mapList;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -40,6 +40,7 @@ $id = GETPOST('id', 'int');
|
|||||||
$type = (GETPOST('type', 'aZ09') ? GETPOST('type', 'aZ09') : Categorie::TYPE_PRODUCT);
|
$type = (GETPOST('type', 'aZ09') ? GETPOST('type', 'aZ09') : Categorie::TYPE_PRODUCT);
|
||||||
$catname = GETPOST('catname', 'alpha');
|
$catname = GETPOST('catname', 'alpha');
|
||||||
|
|
||||||
|
$categstatic = new Categorie($db);
|
||||||
if (is_numeric($type)) $type = Categorie::$MAP_ID_TO_CODE[$type]; // For backward compatibility
|
if (is_numeric($type)) $type = Categorie::$MAP_ID_TO_CODE[$type]; // For backward compatibility
|
||||||
|
|
||||||
|
|
||||||
@ -47,25 +48,13 @@ if (is_numeric($type)) $type = Categorie::$MAP_ID_TO_CODE[$type]; // For backwar
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$categstatic = new Categorie($db);
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
if ($type == Categorie::TYPE_PRODUCT) { $title=$langs->trans("ProductsCategoriesArea"); $typetext='product'; }
|
$typetext = $type;
|
||||||
elseif ($type == Categorie::TYPE_SUPPLIER) { $title=$langs->trans("SuppliersCategoriesArea"); $typetext='supplier'; }
|
if ($type == Categorie::TYPE_ACCOUNT) $title = $langs->trans('AccountsCategoriesArea');
|
||||||
elseif ($type == Categorie::TYPE_CUSTOMER) { $title=$langs->trans("CustomersCategoriesArea"); $typetext='customer'; }
|
elseif ($type == Categorie::TYPE_WAREHOUSE) $title = $langs->trans('StocksCategoriesArea');
|
||||||
elseif ($type == Categorie::TYPE_MEMBER) { $title=$langs->trans("MembersCategoriesArea"); $typetext='member'; }
|
elseif ($type == Categorie::TYPE_ACTIONCOMM) $title = $langs->trans('ActionCommCategoriesArea');
|
||||||
elseif ($type == Categorie::TYPE_CONTACT) { $title=$langs->trans("ContactsCategoriesArea"); $typetext='contact'; }
|
else $title = $langs->trans(ucfirst($type). 'sCategoriesArea');
|
||||||
elseif ($type == Categorie::TYPE_ACCOUNT) { $title=$langs->trans("AccountsCategoriesArea"); $typetext='bank_account'; }
|
|
||||||
elseif ($type == Categorie::TYPE_PROJECT) { $title=$langs->trans("ProjectsCategoriesArea"); $typetext='project'; }
|
|
||||||
elseif ($type == Categorie::TYPE_USER) { $title=$langs->trans("UsersCategoriesArea"); $typetext='user'; }
|
|
||||||
elseif ($type == Categorie::TYPE_WAREHOUSE) { $title=$langs->trans("StocksCategoriesArea"); $typetext='warehouse'; }
|
|
||||||
elseif ($type == Categorie::TYPE_ACTIONCOMM) {
|
|
||||||
$title = $langs->trans("ActionCommCategoriesArea");
|
|
||||||
$typetext = 'actioncomm';
|
|
||||||
} else {
|
|
||||||
$title = $langs->trans("CategoriesArea");
|
|
||||||
$typetext = 'unknown';
|
|
||||||
}
|
|
||||||
|
|
||||||
$arrayofjs=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.js', '/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js');
|
$arrayofjs=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.js', '/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js');
|
||||||
$arrayofcss=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css');
|
$arrayofcss=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css');
|
||||||
|
|||||||
@ -37,14 +37,12 @@ $langs->loadlangs(array('categories', 'bills'));
|
|||||||
|
|
||||||
|
|
||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
$ref = GETPOST('ref');
|
$label = GETPOST('label', 'alpha');
|
||||||
$type = GETPOST('type');
|
$type = GETPOST('type');
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$confirm = GETPOST('confirm');
|
$confirm = GETPOST('confirm');
|
||||||
|
|
||||||
if (is_numeric($type)) $type = Categorie::$MAP_ID_TO_CODE[$type]; // For backward compatibility
|
if ($id == '' && $label == '')
|
||||||
|
|
||||||
if ($id == "")
|
|
||||||
{
|
{
|
||||||
dol_print_error('', 'Missing parameter id');
|
dol_print_error('', 'Missing parameter id');
|
||||||
exit();
|
exit();
|
||||||
@ -54,13 +52,17 @@ if ($id == "")
|
|||||||
$result = restrictedArea($user, 'categorie', $id, '&category');
|
$result = restrictedArea($user, 'categorie', $id, '&category');
|
||||||
|
|
||||||
$object = new Categorie($db);
|
$object = new Categorie($db);
|
||||||
if ($id > 0)
|
$result = $object->fetch($id, $label, $type);
|
||||||
{
|
if ($result <= 0) {
|
||||||
$result = $object->fetch($id);
|
dol_print_error($db, $object->error); exit;
|
||||||
|
|
||||||
$upload_dir = $conf->categorie->multidir_output[$object->entity];
|
|
||||||
}
|
}
|
||||||
|
$object->fetch_optionals();
|
||||||
|
if ($result <= 0) {
|
||||||
|
dol_print_error($db, $object->error); exit;
|
||||||
|
}
|
||||||
|
$upload_dir = $conf->categorie->multidir_output[$object->entity];
|
||||||
|
|
||||||
|
if (is_numeric($type)) $type = Categorie::$MAP_ID_TO_CODE[$type]; // For backward compatibility
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
@ -126,7 +128,7 @@ if ($object->id)
|
|||||||
dol_fiche_head($head, 'photos', $title, -1, 'category');
|
dol_fiche_head($head, 'photos', $title, -1, 'category');
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.$type.'">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.$type.'">'.$langs->trans("BackToList").'</a>';
|
||||||
|
$object->next_prev_filter = ' type = ' . $object->type;
|
||||||
$object->ref = $object->label;
|
$object->ref = $object->label;
|
||||||
$morehtmlref='<br><div class="refidno"><a href="'.DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.$type.'">'.$langs->trans("Root").'</a> >> ';
|
$morehtmlref='<br><div class="refidno"><a href="'.DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.$type.'">'.$langs->trans("Root").'</a> >> ';
|
||||||
$ways = $object->print_all_ways(" >> ", '', 1);
|
$ways = $object->print_all_ways(" >> ", '', 1);
|
||||||
@ -136,7 +138,7 @@ if ($object->id)
|
|||||||
}
|
}
|
||||||
$morehtmlref.='</div>';
|
$morehtmlref.='</div>';
|
||||||
|
|
||||||
dol_banner_tab($object, 'ref', $linkback, ($user->socid?0:1), 'ref', 'ref', $morehtmlref, '', 0, '', '', 1);
|
dol_banner_tab($object, 'label', $linkback, ($user->socid?0:1), 'label', 'label', $morehtmlref, '&type=' . $type, 0, '', '', 1);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Confirmation de la suppression de photo
|
* Confirmation de la suppression de photo
|
||||||
|
|||||||
@ -36,18 +36,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
|||||||
$langs->loadLangs(array('categories', 'languages'));
|
$langs->loadLangs(array('categories', 'languages'));
|
||||||
|
|
||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
$ref = GETPOST('ref', 'alpha');
|
$label = GETPOST('label', 'alpha');
|
||||||
$action = GETPOST('action', 'alpha');
|
$action = GETPOST('action', 'alpha');
|
||||||
$cancel = GETPOST('cancel', 'alpha');
|
$cancel = GETPOST('cancel', 'alpha');
|
||||||
$type = GETPOST('type', 'aZ09');
|
$type = GETPOST('type', 'aZ09');
|
||||||
|
|
||||||
if (is_numeric($type)) $type = Categorie::$MAP_ID_TO_CODE[$type]; // For backward compatibility
|
if ($id == '' && $label == '')
|
||||||
|
|
||||||
// Security check
|
|
||||||
$fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : ''));
|
|
||||||
$fieldtype = (!empty($ref) ? 'ref' : 'rowid');
|
|
||||||
|
|
||||||
if ($id == "")
|
|
||||||
{
|
{
|
||||||
dol_print_error('', 'Missing parameter id');
|
dol_print_error('', 'Missing parameter id');
|
||||||
exit();
|
exit();
|
||||||
@ -57,7 +51,16 @@ if ($id == "")
|
|||||||
$result = restrictedArea($user, 'categorie', $id, '&category');
|
$result = restrictedArea($user, 'categorie', $id, '&category');
|
||||||
|
|
||||||
$object = new Categorie($db);
|
$object = new Categorie($db);
|
||||||
|
$result = $object->fetch($id, $label, $type);
|
||||||
|
if ($result <= 0) {
|
||||||
|
dol_print_error($db, $object->error); exit;
|
||||||
|
}
|
||||||
|
$object->fetch_optionals();
|
||||||
|
if ($result <= 0) {
|
||||||
|
dol_print_error($db, $object->error); exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is_numeric($type)) $type = Categorie::$MAP_ID_TO_CODE[$type]; // For backward compatibility
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
@ -159,8 +162,6 @@ $cancel != $langs->trans("Cancel") &&
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $object->fetch($id, $ref);
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
@ -197,7 +198,7 @@ if (!empty($object->multilangs))
|
|||||||
dol_fiche_head($head, 'translation', $title, -1, 'category');
|
dol_fiche_head($head, 'translation', $title, -1, 'category');
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.$type.'">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.$type.'">'.$langs->trans("BackToList").'</a>';
|
||||||
|
$object->next_prev_filter = ' type = ' . $object->type;
|
||||||
$object->ref = $object->label;
|
$object->ref = $object->label;
|
||||||
$morehtmlref = '<br><div class="refidno"><a href="'.DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.$type.'">'.$langs->trans("Root").'</a> >> ';
|
$morehtmlref = '<br><div class="refidno"><a href="'.DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.$type.'">'.$langs->trans("Root").'</a> >> ';
|
||||||
$ways = $object->print_all_ways(" >> ", '', 1);
|
$ways = $object->print_all_ways(" >> ", '', 1);
|
||||||
@ -207,7 +208,7 @@ foreach ($ways as $way)
|
|||||||
}
|
}
|
||||||
$morehtmlref .= '</div>';
|
$morehtmlref .= '</div>';
|
||||||
|
|
||||||
dol_banner_tab($object, 'ref', $linkback, ($user->socid ? 0 : 1), 'ref', 'ref', $morehtmlref, '', 0, '', '', 1);
|
dol_banner_tab($object, 'label', $linkback, ($user->socid ? 0 : 1), 'label', 'label', $morehtmlref, '&type=' . $type, 0, '', '', 1);
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
|||||||
@ -71,7 +71,7 @@ if ($id == "" && $label == "")
|
|||||||
$result = restrictedArea($user, 'categorie', $id, '&category');
|
$result = restrictedArea($user, 'categorie', $id, '&category');
|
||||||
|
|
||||||
$object = new Categorie($db);
|
$object = new Categorie($db);
|
||||||
$result = $object->fetch($id, $label);
|
$result = $object->fetch($id, $label, $type);
|
||||||
if ($result <= 0) {
|
if ($result <= 0) {
|
||||||
dol_print_error($db, $object->error); exit;
|
dol_print_error($db, $object->error); exit;
|
||||||
}
|
}
|
||||||
@ -80,7 +80,6 @@ if ($result <= 0) {
|
|||||||
dol_print_error($db, $object->error); exit;
|
dol_print_error($db, $object->error); exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$type = $object->type;
|
|
||||||
if (is_numeric($type)) $type = Categorie::$MAP_ID_TO_CODE[$type]; // For backward compatibility
|
if (is_numeric($type)) $type = Categorie::$MAP_ID_TO_CODE[$type]; // For backward compatibility
|
||||||
|
|
||||||
$extrafields = new ExtraFields($db);
|
$extrafields = new ExtraFields($db);
|
||||||
@ -222,8 +221,8 @@ $head = categories_prepare_head($object, $type);
|
|||||||
|
|
||||||
dol_fiche_head($head, 'card', $title, -1, 'category');
|
dol_fiche_head($head, 'card', $title, -1, 'category');
|
||||||
$backtolist = (GETPOST('backtolist') ? GETPOST('backtolist') : DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.$type);
|
$backtolist = (GETPOST('backtolist') ? GETPOST('backtolist') : DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.$type);
|
||||||
$linkback = '<a href="'.$backtolist.'\">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.$backtolist.'">'.$langs->trans("BackToList").'</a>';
|
||||||
$object->next_prev_filter=" type = ".$object->type;
|
$object->next_prev_filter = ' type = ' . $object->type;
|
||||||
$object->ref = $object->label;
|
$object->ref = $object->label;
|
||||||
$morehtmlref='<br><div class="refidno"><a href="'.DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.$type.'">'.$langs->trans("Root").'</a> >> ';
|
$morehtmlref='<br><div class="refidno"><a href="'.DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.$type.'">'.$langs->trans("Root").'</a> >> ';
|
||||||
$ways = $object->print_all_ways(" >> ", '', 1);
|
$ways = $object->print_all_ways(" >> ", '', 1);
|
||||||
@ -233,7 +232,7 @@ foreach ($ways as $way)
|
|||||||
}
|
}
|
||||||
$morehtmlref.='</div>';
|
$morehtmlref.='</div>';
|
||||||
|
|
||||||
dol_banner_tab($object, 'label', $linkback, ($user->socid?0:1), 'label', 'label', $morehtmlref, '', 0, '', '', 1);
|
dol_banner_tab($object, 'label', $linkback, ($user->socid?0:1), 'label', 'label', $morehtmlref, '&type=' . $type, 0, '', '', 1);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -248,7 +248,7 @@ $nav .= " (<a href=\"?year=".$nowyear."&month=".$nowmonth."&day="
|
|||||||
$picto = 'calendarweek';
|
$picto = 'calendarweek';
|
||||||
|
|
||||||
$nav .= ' <form name="dateselect" action="'.$_SERVER["PHP_SELF"].'?action=show_peruser'.$param.'">';
|
$nav .= ' <form name="dateselect" action="'.$_SERVER["PHP_SELF"].'?action=show_peruser'.$param.'">';
|
||||||
$nav .= '<input type="hidden" name="token" value="'.$_SESSION ['newtoken'].'">';
|
$nav .= '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
$nav .= '<input type="hidden" name="action" value="'.$action.'">';
|
$nav .= '<input type="hidden" name="action" value="'.$action.'">';
|
||||||
$nav .= '<input type="hidden" name="filtert" value="'.$filtert.'">';
|
$nav .= '<input type="hidden" name="filtert" value="'.$filtert.'">';
|
||||||
$nav .= '<input type="hidden" name="usergroup" value="'.$usergroup.'">';
|
$nav .= '<input type="hidden" name="usergroup" value="'.$usergroup.'">';
|
||||||
|
|||||||
@ -289,7 +289,7 @@ $nav .= " <a href=\"?year=".$next_year."&month=".$next_month."&da
|
|||||||
$nav .= " (<a href=\"?year=".$nowyear."&month=".$nowmonth."&day=".$nowday.$param."\">".$langs->trans("Today")."</a>)";
|
$nav .= " (<a href=\"?year=".$nowyear."&month=".$nowmonth."&day=".$nowday.$param."\">".$langs->trans("Today")."</a>)";
|
||||||
|
|
||||||
/*$nav.=' <form name="dateselect" action="'.$_SERVER["PHP_SELF"].'?action=show_peruser'.$param.'">';
|
/*$nav.=' <form name="dateselect" action="'.$_SERVER["PHP_SELF"].'?action=show_peruser'.$param.'">';
|
||||||
$nav.='<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
$nav.='<input type="hidden" name="token" value="' . newToken() . '">';
|
||||||
$nav.='<input type="hidden" name="action" value="' . $action . '">';
|
$nav.='<input type="hidden" name="action" value="' . $action . '">';
|
||||||
$nav.='<input type="hidden" name="filtert" value="' . $filtert . '">';
|
$nav.='<input type="hidden" name="filtert" value="' . $filtert . '">';
|
||||||
$nav.='<input type="hidden" name="usergroup" value="' . $usergroup . '">';
|
$nav.='<input type="hidden" name="usergroup" value="' . $usergroup . '">';
|
||||||
|
|||||||
@ -992,7 +992,7 @@ else
|
|||||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=settodraft&id='.$object->id.'">'.$langs->trans("SetToDraft").'</a>';
|
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=settodraft&id='.$object->id.'">'.$langs->trans("SetToDraft").'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($object->statut == 0 || $object->statut == 1) && $user->rights->mailing->creer)
|
if (($object->statut == 0 || $object->statut == 1 || $object->statut == 2) && $user->rights->mailing->creer)
|
||||||
{
|
{
|
||||||
if (!empty($conf->fckeditor->enabled) && !empty($conf->global->FCKEDITOR_ENABLE_MAILING))
|
if (!empty($conf->fckeditor->enabled) && !empty($conf->global->FCKEDITOR_ENABLE_MAILING))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -48,8 +48,8 @@ if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined,
|
|||||||
$offset = $limit * $page;
|
$offset = $limit * $page;
|
||||||
$pageprev = $page - 1;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
if (!$sortfield) $sortfield = "email";
|
if (!$sortfield) $sortfield = "mc.statut,email";
|
||||||
if (!$sortorder) $sortorder = "ASC";
|
if (!$sortorder) $sortorder = "DESC,ASC";
|
||||||
|
|
||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
$rowid = GETPOST('rowid', 'int');
|
$rowid = GETPOST('rowid', 'int');
|
||||||
|
|||||||
@ -1541,7 +1541,7 @@ if ($action == 'create')
|
|||||||
$object = new Propal($db);
|
$object = new Propal($db);
|
||||||
|
|
||||||
print '<form name="addprop" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
print '<form name="addprop" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION ['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print '<input type="hidden" name="action" value="add">';
|
print '<input type="hidden" name="action" value="add">';
|
||||||
if ($origin != 'project' && $originid) {
|
if ($origin != 'project' && $originid) {
|
||||||
print '<input type="hidden" name="origin" value="'.$origin.'">';
|
print '<input type="hidden" name="origin" value="'.$origin.'">';
|
||||||
@ -2052,7 +2052,7 @@ if ($action == 'create')
|
|||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
if ($object->statut == Propal::STATUS_DRAFT && $action == 'editdate' && $usercancreate) {
|
if ($object->statut == Propal::STATUS_DRAFT && $action == 'editdate' && $usercancreate) {
|
||||||
print '<form name="editdate" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
|
print '<form name="editdate" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION ['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print '<input type="hidden" name="action" value="setdate">';
|
print '<input type="hidden" name="action" value="setdate">';
|
||||||
print $form->selectDate($object->date, 're', '', '', 0, "editdate");
|
print $form->selectDate($object->date, 're', '', '', 0, "editdate");
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
||||||
@ -2078,7 +2078,7 @@ if ($action == 'create')
|
|||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
if ($object->statut == Propal::STATUS_DRAFT && $action == 'editecheance' && $usercancreate) {
|
if ($object->statut == Propal::STATUS_DRAFT && $action == 'editecheance' && $usercancreate) {
|
||||||
print '<form name="editecheance" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
|
print '<form name="editecheance" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION ['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print '<input type="hidden" name="action" value="setecheance">';
|
print '<input type="hidden" name="action" value="setecheance">';
|
||||||
print $form->selectDate($object->fin_validite, 'ech', '', '', '', "editecheance");
|
print $form->selectDate($object->fin_validite, 'ech', '', '', '', "editecheance");
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
||||||
@ -2412,7 +2412,7 @@ if ($action == 'create')
|
|||||||
$result = $object->getLinesArray();
|
$result = $object->getLinesArray();
|
||||||
|
|
||||||
print ' <form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline') ? '#addline' : '#line_'.GETPOST('lineid')).'" method="POST">
|
print ' <form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline') ? '#addline' : '#line_'.GETPOST('lineid')).'" method="POST">
|
||||||
<input type="hidden" name="token" value="' . $_SESSION ['newtoken'].'">
|
<input type="hidden" name="token" value="' . newToken().'">
|
||||||
<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline').'">
|
<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline').'">
|
||||||
<input type="hidden" name="mode" value="">
|
<input type="hidden" name="mode" value="">
|
||||||
<input type="hidden" name="id" value="' . $object->id.'">
|
<input type="hidden" name="id" value="' . $object->id.'">
|
||||||
|
|||||||
@ -302,7 +302,8 @@ if ($resql)
|
|||||||
print '<td>'.$companystatic->getNomUrl(1, 'customer').'</td>';
|
print '<td>'.$companystatic->getNomUrl(1, 'customer').'</td>';
|
||||||
|
|
||||||
print '<td>'.dol_print_date($db->jdate($obj->datec), 'day').'</td>';
|
print '<td>'.dol_print_date($db->jdate($obj->datec), 'day').'</td>';
|
||||||
print '<td class="right">'.$propalstatic->LibStatut($obj->fk_statut, 5).'</td>';
|
|
||||||
|
print '<td class="right">'.$propalstatic->LibStatut($obj->fk_statut, 3).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
@ -314,7 +315,7 @@ else dol_print_error($db);
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Opened proposals
|
* Open proposals
|
||||||
*/
|
*/
|
||||||
if (!empty($conf->propal->enabled) && $user->rights->propale->lire)
|
if (!empty($conf->propal->enabled) && $user->rights->propale->lire)
|
||||||
{
|
{
|
||||||
@ -381,9 +382,10 @@ if (!empty($conf->propal->enabled) && $user->rights->propale->lire)
|
|||||||
$companystatic->canvas = $obj->canvas;
|
$companystatic->canvas = $obj->canvas;
|
||||||
print '<td class="left">'.$companystatic->getNomUrl(1, 'customer', 44).'</td>'."\n";
|
print '<td class="left">'.$companystatic->getNomUrl(1, 'customer', 44).'</td>'."\n";
|
||||||
|
|
||||||
print '<td class="right">';
|
print '<td class="right">'.dol_print_date($db->jdate($obj->dp), 'day').'</td>'."\n";
|
||||||
print dol_print_date($db->jdate($obj->dp), 'day').'</td>'."\n";
|
|
||||||
print '<td class="right">'.price($obj->total_ttc).'</td>';
|
print '<td class="right">'.price($obj->total_ttc).'</td>';
|
||||||
|
|
||||||
print '<td align="center" width="14">'.$propalstatic->LibStatut($obj->fk_statut, 3).'</td>'."\n";
|
print '<td align="center" width="14">'.$propalstatic->LibStatut($obj->fk_statut, 3).'</td>'."\n";
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
$i++;
|
$i++;
|
||||||
|
|||||||
@ -242,7 +242,9 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
|||||||
//{
|
//{
|
||||||
// Show filter box
|
// Show filter box
|
||||||
print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||||
|
|
||||||
print '<table class="noborder centpercent">';
|
print '<table class="noborder centpercent">';
|
||||||
print '<tr class="liste_titre"><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
|
print '<tr class="liste_titre"><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
|
||||||
// Company
|
// Company
|
||||||
|
|||||||
@ -117,6 +117,9 @@ if (!empty($conf->expedition->enabled) && $conf->global->WAREHOUSE_ASK_WAREHOUSE
|
|||||||
if (empty($object->warehouse_id) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER)) $object->warehouse_id = $user->fk_warehouse;
|
if (empty($object->warehouse_id) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER)) $object->warehouse_id = $user->fk_warehouse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$error = 0;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
@ -1599,7 +1602,7 @@ if ($action == 'create' && $usercancreate)
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '<form name="crea_commande" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
print '<form name="crea_commande" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION ['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print '<input type="hidden" name="action" value="add">';
|
print '<input type="hidden" name="action" value="add">';
|
||||||
print '<input type="hidden" name="socid" value="'.$soc->id.'">'."\n";
|
print '<input type="hidden" name="socid" value="'.$soc->id.'">'."\n";
|
||||||
print '<input type="hidden" name="remise_percent" value="'.$soc->remise_percent.'">';
|
print '<input type="hidden" name="remise_percent" value="'.$soc->remise_percent.'">';
|
||||||
@ -2181,7 +2184,7 @@ if ($action == 'create' && $usercancreate)
|
|||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
if ($action == 'editdate') {
|
if ($action == 'editdate') {
|
||||||
print '<form name="setdate" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
|
print '<form name="setdate" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION ['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print '<input type="hidden" name="action" value="setdate">';
|
print '<input type="hidden" name="action" value="setdate">';
|
||||||
print $form->selectDate($object->date, 'order_', '', '', '', "setdate");
|
print $form->selectDate($object->date, 'order_', '', '', '', "setdate");
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
||||||
@ -2202,7 +2205,7 @@ if ($action == 'create' && $usercancreate)
|
|||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
if ($action == 'editdate_livraison') {
|
if ($action == 'editdate_livraison') {
|
||||||
print '<form name="setdate_livraison" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
|
print '<form name="setdate_livraison" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION ['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print '<input type="hidden" name="action" value="setdate_livraison">';
|
print '<input type="hidden" name="action" value="setdate_livraison">';
|
||||||
print $form->selectDate($object->date_livraison ? $object->date_livraison : - 1, 'liv_', '', '', '', "setdate_livraison");
|
print $form->selectDate($object->date_livraison ? $object->date_livraison : - 1, 'liv_', '', '', '', "setdate_livraison");
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
||||||
@ -2496,7 +2499,7 @@ if ($action == 'create' && $usercancreate)
|
|||||||
$result = $object->getLinesArray();
|
$result = $object->getLinesArray();
|
||||||
|
|
||||||
print '<form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline') ? '#addline' : '#line_'.GETPOST('lineid')).'" method="POST">
|
print '<form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline') ? '#addline' : '#line_'.GETPOST('lineid')).'" method="POST">
|
||||||
<input type="hidden" name="token" value="' . $_SESSION ['newtoken'].'">
|
<input type="hidden" name="token" value="' . newToken().'">
|
||||||
<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline').'">
|
<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline').'">
|
||||||
<input type="hidden" name="mode" value="">
|
<input type="hidden" name="mode" value="">
|
||||||
<input type="hidden" name="id" value="' . $object->id.'">';
|
<input type="hidden" name="id" value="' . $object->id.'">';
|
||||||
|
|||||||
@ -150,7 +150,8 @@ class Orders extends DolibarrApi
|
|||||||
* @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')"
|
* @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')"
|
||||||
* @return array Array of order objects
|
* @return array Array of order objects
|
||||||
*
|
*
|
||||||
* @throws RestException
|
* @throws RestException 404 Not found
|
||||||
|
* @throws RestException 503 Error
|
||||||
*/
|
*/
|
||||||
public function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $thirdparty_ids = '', $sqlfilters = '')
|
public function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $thirdparty_ids = '', $sqlfilters = '')
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3613,7 +3613,7 @@ class Commande extends CommonOrder
|
|||||||
if ($status == self::STATUS_CANCELED) {
|
if ($status == self::STATUS_CANCELED) {
|
||||||
$labelStatus = $langs->trans('StatusOrderCanceled');
|
$labelStatus = $langs->trans('StatusOrderCanceled');
|
||||||
$labelStatusShort = $langs->trans('StatusOrderCanceledShort');
|
$labelStatusShort = $langs->trans('StatusOrderCanceledShort');
|
||||||
$statusType = 'status5';
|
$statusType = 'status9';
|
||||||
}
|
}
|
||||||
elseif ($status == self::STATUS_DRAFT) {
|
elseif ($status == self::STATUS_DRAFT) {
|
||||||
$labelStatus = $langs->trans('StatusOrderDraft');
|
$labelStatus = $langs->trans('StatusOrderDraft');
|
||||||
@ -3628,7 +3628,7 @@ class Commande extends CommonOrder
|
|||||||
elseif ($status == self::STATUS_SHIPMENTONPROCESS) {
|
elseif ($status == self::STATUS_SHIPMENTONPROCESS) {
|
||||||
$labelStatus = $langs->trans('StatusOrderSentShort').$billedtext;
|
$labelStatus = $langs->trans('StatusOrderSentShort').$billedtext;
|
||||||
$labelStatusShort = $langs->trans('StatusOrderSentShort').$billedtext;
|
$labelStatusShort = $langs->trans('StatusOrderSentShort').$billedtext;
|
||||||
$statusType = 'status3';
|
$statusType = 'status4';
|
||||||
}
|
}
|
||||||
elseif ($status == self::STATUS_CLOSED && (!$billed && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) {
|
elseif ($status == self::STATUS_CLOSED && (!$billed && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) {
|
||||||
$labelStatus = $langs->trans('StatusOrderToBill');
|
$labelStatus = $langs->trans('StatusOrderToBill');
|
||||||
|
|||||||
@ -72,7 +72,6 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
|||||||
if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
|
if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
|
||||||
{
|
{
|
||||||
// Search customer orders
|
// Search customer orders
|
||||||
$var = false;
|
|
||||||
print '<form method="post" action="'.DOL_URL_ROOT.'/commande/list.php">';
|
print '<form method="post" action="'.DOL_URL_ROOT.'/commande/list.php">';
|
||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
@ -88,7 +87,7 @@ if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useles
|
|||||||
* Statistics
|
* Statistics
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$sql = "SELECT count(c.rowid), c.fk_statut";
|
$sql = "SELECT count(c.rowid) as nb, c.fk_statut as status";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
|
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||||
$sql .= ", ".MAIN_DB_PREFIX."commande as c";
|
$sql .= ", ".MAIN_DB_PREFIX."commande as c";
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
@ -117,7 +116,7 @@ if ($resql)
|
|||||||
//if ($row[1]!=-1 && ($row[1]!=3 || $row[2]!=1))
|
//if ($row[1]!=-1 && ($row[1]!=3 || $row[2]!=1))
|
||||||
{
|
{
|
||||||
if (! isset($vals[$row[1]])) $vals[$row[1]]=0;
|
if (! isset($vals[$row[1]])) $vals[$row[1]]=0;
|
||||||
$vals[$row[1].$bool]+=$row[0];
|
$vals[$row[1]]+=$row[0];
|
||||||
$totalinprocess+=$row[0];
|
$totalinprocess+=$row[0];
|
||||||
}
|
}
|
||||||
$total+=$row[0];
|
$total+=$row[0];
|
||||||
@ -125,13 +124,32 @@ if ($resql)
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
|
|
||||||
|
include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder nohover centpercent">';
|
print '<table class="noborder nohover centpercent">';
|
||||||
print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Statistics").' - '.$langs->trans("CustomersOrders").'</th></tr>'."\n";
|
print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Statistics").' - '.$langs->trans("CustomersOrders").'</th></tr>'."\n";
|
||||||
$listofstatus=array(0,1,2,3,-1);
|
$listofstatus=array(0,1,2,3,-1);
|
||||||
foreach ($listofstatus as $status)
|
foreach ($listofstatus as $status)
|
||||||
{
|
{
|
||||||
$dataseries[]=array($commandestatic->LibStatut($status, $bool, 1), (isset($vals[$status.$bool])?(int) $vals[$status.$bool]:0));
|
$dataseries[] = array($commandestatic->LibStatut($status, 0, 1, 1), (isset($vals[$status]) ? (int) $vals[$status] : 0));
|
||||||
|
if ($status == Commande::STATUS_DRAFT) $colorseries[$status] = '-'.$badgeStatus0;
|
||||||
|
if ($status == Commande::STATUS_VALIDATED) $colorseries[$status] = $badgeStatus1;
|
||||||
|
if ($status == Commande::STATUS_SHIPMENTONPROCESS) $colorseries[$status] = $badgeStatus4;
|
||||||
|
if ($status == Commande::STATUS_CLOSED && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)) $colorseries[$status] = $badgeStatus6;
|
||||||
|
if ($status == Commande::STATUS_CLOSED && (!empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) $colorseries[$status] = $badgeStatus6;
|
||||||
|
if ($status == Commande::STATUS_CANCELED) $colorseries[$status] = $badgeStatus9;
|
||||||
|
|
||||||
|
if (empty($conf->use_javascript_ajax))
|
||||||
|
{
|
||||||
|
print '<tr class="oddeven">';
|
||||||
|
print '<td>'.$commandestatic->LibStatut($status, 0, 0, 1).'</td>';
|
||||||
|
print '<td class="right"><a href="list.php?statut='.$status.'">'.(isset($vals[$status]) ? $vals[$status] : 0).' ';
|
||||||
|
print $commandestatic->LibStatut($status, 0, 3, 1);
|
||||||
|
print '</a></td>';
|
||||||
|
print "</tr>\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ($conf->use_javascript_ajax)
|
if ($conf->use_javascript_ajax)
|
||||||
{
|
{
|
||||||
@ -140,6 +158,7 @@ if ($resql)
|
|||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
|
||||||
$dolgraph = new DolGraph();
|
$dolgraph = new DolGraph();
|
||||||
$dolgraph->SetData($dataseries);
|
$dolgraph->SetData($dataseries);
|
||||||
|
$dolgraph->SetDataColor(array_values($colorseries));
|
||||||
$dolgraph->setShowLegend(2);
|
$dolgraph->setShowLegend(2);
|
||||||
$dolgraph->setShowPercent(1);
|
$dolgraph->setShowPercent(1);
|
||||||
$dolgraph->SetType(array('pie'));
|
$dolgraph->SetType(array('pie'));
|
||||||
@ -149,19 +168,6 @@ if ($resql)
|
|||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
foreach ($listofstatus as $status)
|
|
||||||
{
|
|
||||||
print '<tr class="oddeven">';
|
|
||||||
print '<td>'.$commandestatic->LibStatut($status, $bool, 0).'</td>';
|
|
||||||
print '<td class="right"><a href="list.php?viewstatut='.$status.'">'.(isset($vals[$status.$bool]) ? $vals[$status.$bool] : 0).' ';
|
|
||||||
print $commandestatic->LibStatut($status, $bool, 3);
|
|
||||||
print '</a>';
|
|
||||||
print '</td>';
|
|
||||||
print "</tr>\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//if ($totalinprocess != $total)
|
//if ($totalinprocess != $total)
|
||||||
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td class="right">'.$total.'</td></tr>';
|
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td class="right">'.$total.'</td></tr>';
|
||||||
print "</table></div><br>";
|
print "</table></div><br>";
|
||||||
@ -202,7 +208,6 @@ if (!empty($conf->commande->enabled))
|
|||||||
if ($num)
|
if ($num)
|
||||||
{
|
{
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$var = true;
|
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
@ -241,7 +246,7 @@ print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
|||||||
$max = 5;
|
$max = 5;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Last modified orders
|
* Lattest modified orders
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$sql = "SELECT c.rowid, c.entity, c.ref, c.fk_statut, c.facture, c.date_cloture as datec, c.tms as datem,";
|
$sql = "SELECT c.rowid, c.entity, c.ref, c.fk_statut, c.facture, c.date_cloture as datec, c.tms as datem,";
|
||||||
@ -272,7 +277,6 @@ if ($resql)
|
|||||||
if ($num)
|
if ($num)
|
||||||
{
|
{
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$var = true;
|
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
@ -311,7 +315,7 @@ if ($resql)
|
|||||||
print $companystatic->getNomUrl(1, 'company', 16);
|
print $companystatic->getNomUrl(1, 'company', 16);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>'.dol_print_date($db->jdate($obj->datem), 'day').'</td>';
|
print '<td>'.dol_print_date($db->jdate($obj->datem), 'day').'</td>';
|
||||||
print '<td class="right">'.$commandestatic->LibStatut($obj->fk_statut, $obj->facture, 5).'</td>';
|
print '<td class="right">'.$commandestatic->LibStatut($obj->fk_statut, $obj->facture, 3).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
@ -320,13 +324,14 @@ if ($resql)
|
|||||||
}
|
}
|
||||||
else dol_print_error($db);
|
else dol_print_error($db);
|
||||||
|
|
||||||
|
$max = 10;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Orders to process
|
* Orders to process
|
||||||
*/
|
*/
|
||||||
if (!empty($conf->commande->enabled))
|
if (!empty($conf->commande->enabled))
|
||||||
{
|
{
|
||||||
$sql = "SELECT c.rowid, c.entity, c.ref, c.fk_statut, c.facture, s.nom as name, s.rowid as socid";
|
$sql = "SELECT c.rowid, c.entity, c.ref, c.fk_statut, c.facture, c.date_commande as date, s.nom as name, s.rowid as socid";
|
||||||
$sql .= ", s.client";
|
$sql .= ", s.client";
|
||||||
$sql .= ", s.code_client";
|
$sql .= ", s.code_client";
|
||||||
$sql .= ", s.canvas";
|
$sql .= ", s.canvas";
|
||||||
@ -335,7 +340,7 @@ if (!empty($conf->commande->enabled))
|
|||||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
$sql .= " WHERE c.fk_soc = s.rowid";
|
$sql .= " WHERE c.fk_soc = s.rowid";
|
||||||
$sql .= " AND c.entity IN (".getEntity('commande').")";
|
$sql .= " AND c.entity IN (".getEntity('commande').")";
|
||||||
$sql .= " AND c.fk_statut = 1";
|
$sql .= " AND c.fk_statut = ".Commande::STATUS_VALIDATED;
|
||||||
if ($socid) $sql .= " AND c.fk_soc = ".$socid;
|
if ($socid) $sql .= " AND c.fk_soc = ".$socid;
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
|
if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
|
||||||
$sql .= " ORDER BY c.rowid DESC";
|
$sql .= " ORDER BY c.rowid DESC";
|
||||||
@ -344,16 +349,16 @@ if (!empty($conf->commande->enabled))
|
|||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder centpercent">';
|
print '<table class="noborder centpercent">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<th colspan="3">'.$langs->trans("OrdersToProcess").' <a href="'.DOL_URL_ROOT.'/commande/list.php?viewstatut=1"><span class="badge">'.$num.'</span></a></th></tr>';
|
print '<th colspan="4">'.$langs->trans("OrdersToProcess").' <a href="'.DOL_URL_ROOT.'/commande/list.php?viewstatut='.Commande::STATUS_VALIDATED.'"><span class="badge">'.$num.'</span></a></th></tr>';
|
||||||
|
|
||||||
if ($num)
|
if ($num)
|
||||||
{
|
{
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$var = true;
|
while ($i < $num && $i < $max)
|
||||||
while ($i < $num)
|
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
@ -390,11 +395,16 @@ if (!empty($conf->commande->enabled))
|
|||||||
print $companystatic->getNomUrl(1, 'company', 24);
|
print $companystatic->getNomUrl(1, 'company', 24);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td class="right">'.$commandestatic->LibStatut($obj->fk_statut, $obj->facture, 5).'</td>';
|
print '<td class="right">'.dol_print_date($db->jdate($obj->date), 'day').'</td>'."\n";
|
||||||
|
|
||||||
|
print '<td class="right">'.$commandestatic->LibStatut($obj->fk_statut, $obj->facture, 3).'</td>';
|
||||||
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
if ($i < $num) {
|
||||||
|
print '<tr><td><span class="opacitymedium">'.$langs->trans("More").'...</span></td><td></td><td></td><td></td></tr>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</table></div><br>";
|
print "</table></div><br>";
|
||||||
@ -403,11 +413,11 @@ if (!empty($conf->commande->enabled))
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Orders thar are in a shipping process
|
* Orders that are in process
|
||||||
*/
|
*/
|
||||||
if (!empty($conf->commande->enabled))
|
if (!empty($conf->commande->enabled))
|
||||||
{
|
{
|
||||||
$sql = "SELECT c.rowid, c.entity, c.ref, c.fk_statut, c.facture, s.nom as name, s.rowid as socid";
|
$sql = "SELECT c.rowid, c.entity, c.ref, c.fk_statut, c.facture, c.date_commande as date, s.nom as name, s.rowid as socid";
|
||||||
$sql .= ", s.client";
|
$sql .= ", s.client";
|
||||||
$sql .= ", s.code_client";
|
$sql .= ", s.code_client";
|
||||||
$sql .= ", s.canvas";
|
$sql .= ", s.canvas";
|
||||||
@ -416,7 +426,7 @@ if (!empty($conf->commande->enabled))
|
|||||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
$sql .= " WHERE c.fk_soc = s.rowid";
|
$sql .= " WHERE c.fk_soc = s.rowid";
|
||||||
$sql .= " AND c.entity IN (".getEntity('commande').")";
|
$sql .= " AND c.entity IN (".getEntity('commande').")";
|
||||||
$sql .= " AND c.fk_statut = 2 ";
|
$sql .= " AND c.fk_statut = ".Commande::STATUS_ACCEPTED;
|
||||||
if ($socid) $sql .= " AND c.fk_soc = ".$socid;
|
if ($socid) $sql .= " AND c.fk_soc = ".$socid;
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
|
if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
|
||||||
$sql .= " ORDER BY c.rowid DESC";
|
$sql .= " ORDER BY c.rowid DESC";
|
||||||
@ -429,13 +439,12 @@ if (!empty($conf->commande->enabled))
|
|||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder centpercent">';
|
print '<table class="noborder centpercent">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<th colspan="3">'.$langs->trans("OnProcessOrders").' <a href="'.DOL_URL_ROOT.'/commande/list.php?viewstatut=2"><span class="badge">'.$num.'</span></a></th></tr>';
|
print '<th colspan="4">'.$langs->trans("OnProcessOrders").' <a href="'.DOL_URL_ROOT.'/commande/list.php?viewstatut='.Commande::STATUS_ACCEPTED.'"><span class="badge">'.$num.'</span></a></th></tr>';
|
||||||
|
|
||||||
if ($num)
|
if ($num)
|
||||||
{
|
{
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$var = true;
|
while ($i < $num && $i < $max)
|
||||||
while ($i < $num)
|
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
@ -472,11 +481,16 @@ if (!empty($conf->commande->enabled))
|
|||||||
print $companystatic->getNomUrl(1, 'company');
|
print $companystatic->getNomUrl(1, 'company');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td class="right">'.$commandestatic->LibStatut($obj->fk_statut, $obj->facture, 5).'</td>';
|
print '<td class="right">'.dol_print_date($db->jdate($obj->date), 'day').'</td>'."\n";
|
||||||
|
|
||||||
|
print '<td class="right">'.$commandestatic->LibStatut($obj->fk_statut, $obj->facture, 3).'</td>';
|
||||||
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
if ($i < $num) {
|
||||||
|
print '<tr><td><span class="opacitymedium">'.$langs->trans("More").'...</span></td><td></td><td></td><td></td></tr>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
print "</table></div><br>";
|
print "</table></div><br>";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -255,7 +255,9 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
|||||||
|
|
||||||
// Show filter box
|
// Show filter box
|
||||||
print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||||
|
|
||||||
print '<table class="noborder centpercent">';
|
print '<table class="noborder centpercent">';
|
||||||
print '<tr class="liste_titre"><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
|
print '<tr class="liste_titre"><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
|
||||||
// Company
|
// Company
|
||||||
|
|||||||
@ -16,11 +16,17 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/compta/accounting-files.php
|
* \file htdocs/compta/accounting-files.php
|
||||||
* \ingroup compta
|
* \ingroup compta
|
||||||
* \brief Page to show portoflio and files of a thirdparty and download it
|
* \brief Page to show portoflio and files of a thirdparty and download it
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if ($_GET['action'] == 'dl' || $_POST['action'] == 'dl') { // To not replace token when downloading file
|
||||||
|
if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1');
|
||||||
|
}
|
||||||
|
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
@ -113,7 +119,7 @@ $error = 0;
|
|||||||
|
|
||||||
$filesarray = array();
|
$filesarray = array();
|
||||||
$result = false;
|
$result = false;
|
||||||
if (($action == "searchfiles" || $action == "dl")) {
|
if (($action == 'searchfiles' || $action == 'dl')) {
|
||||||
if (empty($date_start))
|
if (empty($date_start))
|
||||||
{
|
{
|
||||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DateStart")), null, 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DateStart")), null, 'errors');
|
||||||
@ -259,7 +265,7 @@ if (($action == "searchfiles" || $action == "dl")) {
|
|||||||
{
|
{
|
||||||
$result = true;
|
$result = true;
|
||||||
|
|
||||||
$files = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview\.png)$', '', SORT_ASC, 1);
|
$files = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', '', SORT_ASC, 1);
|
||||||
//var_dump($upload_dir);
|
//var_dump($upload_dir);
|
||||||
//var_dump($files);
|
//var_dump($files);
|
||||||
if (count($files) < 1)
|
if (count($files) < 1)
|
||||||
@ -512,7 +518,7 @@ if (!empty($date_start) && !empty($date_stop))
|
|||||||
$param .= '&'.$choice.'='.(GETPOST($choice, 'int') ? 1 : 0);
|
$param .= '&'.$choice.'='.(GETPOST($choice, 'int') ? 1 : 0);
|
||||||
}
|
}
|
||||||
print '<form name="dl" action="?action=dl" method="POST" >'."\n";
|
print '<form name="dl" action="?action=dl" method="POST" >'."\n";
|
||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
print '<input type="hidden" name="token" value="'.currentToken().'">';
|
||||||
|
|
||||||
echo dol_print_date($date_start, 'day')." - ".dol_print_date($date_stop, 'day');
|
echo dol_print_date($date_start, 'day')." - ".dol_print_date($date_stop, 'day');
|
||||||
|
|
||||||
|
|||||||
@ -1157,14 +1157,14 @@ if ($resql)
|
|||||||
} else {
|
} else {
|
||||||
$color = '#'.$conf->global->BANK_COLORIZE_MOVEMENT_COLOR1;
|
$color = '#'.$conf->global->BANK_COLORIZE_MOVEMENT_COLOR1;
|
||||||
}
|
}
|
||||||
$backgroundcolor = 'style="background-color: '.$color.';"';
|
$backgroundcolor = 'style="background: '.$color.';"';
|
||||||
} else {
|
} else {
|
||||||
if (empty($conf->global->BANK_COLORIZE_MOVEMENT_COLOR2)) {
|
if (empty($conf->global->BANK_COLORIZE_MOVEMENT_COLOR2)) {
|
||||||
$color = '#7fdb86';
|
$color = '#7fdb86';
|
||||||
} else {
|
} else {
|
||||||
$color = '#'.$conf->global->BANK_COLORIZE_MOVEMENT_COLOR2;
|
$color = '#'.$conf->global->BANK_COLORIZE_MOVEMENT_COLOR2;
|
||||||
}
|
}
|
||||||
$backgroundcolor = 'style="background-color: '.$color.';"';
|
$backgroundcolor = 'style="background: '.$color.';"';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '<tr class="oddeven" '.$backgroundcolor.'>';
|
print '<tr class="oddeven" '.$backgroundcolor.'>';
|
||||||
|
|||||||
@ -363,7 +363,7 @@ if ($action == "create" || $action == "start" || $action == 'close')
|
|||||||
print load_fiche_titre($langs->trans("CashControl")." - ".$langs->trans("New"), '', 'cash-register');
|
print load_fiche_titre($langs->trans("CashControl")." - ".$langs->trans("New"), '', 'cash-register');
|
||||||
|
|
||||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
print '<input type="hidden" name="token" value="' . newToken() . '">';
|
||||||
if ($action == 'start' && GETPOST('posnumber', 'int') != '' && GETPOST('posnumber', 'int') != '' && GETPOST('posnumber', 'int') != '-1')
|
if ($action == 'start' && GETPOST('posnumber', 'int') != '' && GETPOST('posnumber', 'int') != '' && GETPOST('posnumber', 'int') != '-1')
|
||||||
{
|
{
|
||||||
print '<input type="hidden" name="action" value="add">';
|
print '<input type="hidden" name="action" value="add">';
|
||||||
@ -680,7 +680,7 @@ if (empty($action) || $action == "view" || $action == "close")
|
|||||||
print '<center><iframe src="report.php?id='.$id.'" width="60%" height="800"></iframe></center>';
|
print '<center><iframe src="report.php?id='.$id.'" width="60%" height="800"></iframe></center>';
|
||||||
} else {
|
} else {
|
||||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'" name="formclose">';
|
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'" name="formclose">';
|
||||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
print '<input type="hidden" name="token" value="' . newToken() . '">';
|
||||||
if ($action == 'start' && GETPOST('posnumber', 'int') != '' && GETPOST('posnumber', 'int') != '' && GETPOST('posnumber', 'int') != '-1')
|
if ($action == 'start' && GETPOST('posnumber', 'int') != '' && GETPOST('posnumber', 'int') != '' && GETPOST('posnumber', 'int') != '-1')
|
||||||
{
|
{
|
||||||
print '<input type="hidden" name="action" value="add">';
|
print '<input type="hidden" name="action" value="add">';
|
||||||
|
|||||||
@ -281,7 +281,7 @@ if ($action == 'create')
|
|||||||
print '<td class="tdtop">'.$langs->trans('NotePublic').'</td>';
|
print '<td class="tdtop">'.$langs->trans('NotePublic').'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
|
|
||||||
$doleditor = new DolEditor('note_public', GETPOST('note_public', 'alpha'), '', 200, 'dolibarr_notes', 'In', false, true, true, ROWS_8, '90%');
|
$doleditor = new DolEditor('note_public', GETPOST('note_public', 'restricthtml'), '', 200, 'dolibarr_notes', 'In', false, true, true, ROWS_8, '90%');
|
||||||
print $doleditor->Create(1);
|
print $doleditor->Create(1);
|
||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@ -293,7 +293,7 @@ if ($action == 'create')
|
|||||||
print '<td class="tdtop">'.$langs->trans('NotePrivate').'</td>';
|
print '<td class="tdtop">'.$langs->trans('NotePrivate').'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
|
|
||||||
$doleditor = new DolEditor('note_private', GETPOST('note_private', 'alpha'), '', 200, 'dolibarr_notes', 'In', false, true, true, ROWS_8, '90%');
|
$doleditor = new DolEditor('note_private', GETPOST('note_private', 'restricthtml'), '', 200, 'dolibarr_notes', 'In', false, true, true, ROWS_8, '90%');
|
||||||
print $doleditor->Create(1);
|
print $doleditor->Create(1);
|
||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|||||||
@ -227,7 +227,9 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
|||||||
|
|
||||||
// Show filter box
|
// Show filter box
|
||||||
print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||||
|
|
||||||
print '<table class="border centpercent">';
|
print '<table class="border centpercent">';
|
||||||
print '<tr class="liste_titre"><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
|
print '<tr class="liste_titre"><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
|
||||||
// Company
|
// Company
|
||||||
|
|||||||
@ -1680,7 +1680,7 @@ else
|
|||||||
|
|
||||||
// Lines
|
// Lines
|
||||||
print ' <form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline') ? '#add' : '#line_'.GETPOST('lineid')).'" method="POST">
|
print ' <form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline') ? '#add' : '#line_'.GETPOST('lineid')).'" method="POST">
|
||||||
<input type="hidden" name="token" value="' . $_SESSION ['newtoken'].'">
|
<input type="hidden" name="token" value="' . newToken().'">
|
||||||
<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline').'">
|
<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline').'">
|
||||||
<input type="hidden" name="mode" value="">
|
<input type="hidden" name="mode" value="">
|
||||||
<input type="hidden" name="id" value="' . $object->id.'">
|
<input type="hidden" name="id" value="' . $object->id.'">
|
||||||
|
|||||||
@ -1713,6 +1713,16 @@ if (empty($reshook))
|
|||||||
$object->fk_facture_source = $_POST['situations'];
|
$object->fk_facture_source = $_POST['situations'];
|
||||||
$object->type = Facture::TYPE_SITUATION;
|
$object->type = Facture::TYPE_SITUATION;
|
||||||
|
|
||||||
|
|
||||||
|
$object->retained_warranty = GETPOST('retained_warranty', 'int');
|
||||||
|
$object->retained_warranty_fk_cond_reglement = GETPOST('retained_warranty_fk_cond_reglement', 'int');
|
||||||
|
|
||||||
|
$retained_warranty_date_limit = GETPOST('retained_warranty_date_limit');
|
||||||
|
if (!empty($retained_warranty_date_limit) && $db->jdate($retained_warranty_date_limit)) {
|
||||||
|
$object->retained_warranty_date_limit = $db->jdate($retained_warranty_date_limit);
|
||||||
|
}
|
||||||
|
$object->retained_warranty_date_limit = !empty($object->retained_warranty_date_limit) ? $object->retained_warranty_date_limit : $object->calculate_date_lim_reglement($object->retained_warranty_fk_cond_reglement);
|
||||||
|
|
||||||
if (!empty($origin) && !empty($originid))
|
if (!empty($origin) && !empty($originid))
|
||||||
{
|
{
|
||||||
$object->origin = $origin;
|
$object->origin = $origin;
|
||||||
@ -2555,7 +2565,12 @@ if (empty($reshook))
|
|||||||
$pa_ht = $originLine->pa_ht;
|
$pa_ht = $originLine->pa_ht;
|
||||||
$label = $originLine->label;
|
$label = $originLine->label;
|
||||||
$array_options = $originLine->array_options;
|
$array_options = $originLine->array_options;
|
||||||
|
if($object->type == Facture::TYPE_SITUATION){
|
||||||
|
$situation_percent = 0;
|
||||||
|
}
|
||||||
|
else{
|
||||||
$situation_percent = 100;
|
$situation_percent = 100;
|
||||||
|
}
|
||||||
$fk_prev_id = '';
|
$fk_prev_id = '';
|
||||||
$fk_unit = $originLine->fk_unit;
|
$fk_unit = $originLine->fk_unit;
|
||||||
$pu_ht_devise = $originLine->multicurrency_subprice;
|
$pu_ht_devise = $originLine->multicurrency_subprice;
|
||||||
@ -2839,7 +2854,7 @@ if ($action == 'create')
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '<form name="add" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
print '<form name="add" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION ['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print '<input type="hidden" name="action" value="add">';
|
print '<input type="hidden" name="action" value="add">';
|
||||||
if ($soc->id > 0) print '<input type="hidden" name="socid" value="'.$soc->id.'">'."\n";
|
if ($soc->id > 0) print '<input type="hidden" name="socid" value="'.$soc->id.'">'."\n";
|
||||||
print '<input name="ref" type="hidden" value="provisoire">';
|
print '<input name="ref" type="hidden" value="provisoire">';
|
||||||
@ -3035,7 +3050,7 @@ if ($action == 'create')
|
|||||||
// First situation invoice
|
// First situation invoice
|
||||||
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
|
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
|
||||||
$tmp = '<input id="radio_situation" type="radio" name="type" value="5"'.(GETPOST('type') == 5 ? ' checked' : '').'> ';
|
$tmp = '<input id="radio_situation" type="radio" name="type" value="5"'.(GETPOST('type') == 5 ? ' checked' : '').'> ';
|
||||||
$tmp = $tmp.'<label for="radio_situation invoice" >'.$langs->trans("InvoiceFirstSituationAsk").'</label>';
|
$tmp = $tmp.'<label for="radio_situation" >'.$langs->trans("InvoiceFirstSituationAsk").'</label>';
|
||||||
$desc = $form->textwithpicto($tmp, $langs->transnoentities("InvoiceFirstSituationDesc"), 1, 'help', '', 0, 3);
|
$desc = $form->textwithpicto($tmp, $langs->transnoentities("InvoiceFirstSituationDesc"), 1, 'help', '', 0, 3);
|
||||||
print $desc;
|
print $desc;
|
||||||
print '</div></div>';
|
print '</div></div>';
|
||||||
@ -3322,14 +3337,28 @@ if ($action == 'create')
|
|||||||
}
|
}
|
||||||
|
|
||||||
$retained_warranty = GETPOST('retained_warranty', 'int');
|
$retained_warranty = GETPOST('retained_warranty', 'int');
|
||||||
$retained_warranty = !empty($retained_warranty) ? $retained_warranty : $conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_PERCENT;
|
if(empty($retained_warranty)){
|
||||||
|
if(!empty($objectsrc->retained_warranty)){ // use previous situation value
|
||||||
|
$retained_warranty = $objectsrc->retained_warranty;
|
||||||
|
}else{
|
||||||
|
$retained_warranty = $conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_PERCENT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
print '<tr class="retained-warranty-line" style="'.$rwStyle.'" ><td class="nowrap">'.$langs->trans('RetainedWarranty').'</td><td colspan="2">';
|
print '<tr class="retained-warranty-line" style="'.$rwStyle.'" ><td class="nowrap">'.$langs->trans('RetainedWarranty').'</td><td colspan="2">';
|
||||||
print '<input id="new-situation-invoice-retained-warranty" name="retained_warranty" type="number" value="'.$retained_warranty.'" step="0.01" min="0" max="100" />%';
|
print '<input id="new-situation-invoice-retained-warranty" name="retained_warranty" type="number" value="'.$retained_warranty.'" step="0.01" min="0" max="100" />%';
|
||||||
|
|
||||||
// Retained warranty payment term
|
// Retained warranty payment term
|
||||||
print '<tr class="retained-warranty-line" style="'.$rwStyle.'" ><td class="nowrap">'.$langs->trans('PaymentConditionsShortRetainedWarranty').'</td><td colspan="2">';
|
print '<tr class="retained-warranty-line" style="'.$rwStyle.'" ><td class="nowrap">'.$langs->trans('PaymentConditionsShortRetainedWarranty').'</td><td colspan="2">';
|
||||||
$retained_warranty_fk_cond_reglement = GETPOST('retained_warranty_fk_cond_reglement', 'int');
|
$retained_warranty_fk_cond_reglement = GETPOST('retained_warranty_fk_cond_reglement', 'int');
|
||||||
$retained_warranty_fk_cond_reglement = !empty($retained_warranty_fk_cond_reglement) ? $retained_warranty_fk_cond_reglement : $conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID;
|
if(empty($retained_warranty_fk_cond_reglement)){
|
||||||
|
$retained_warranty_fk_cond_reglement = $conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID;
|
||||||
|
if(!empty($objectsrc->retained_warranty_fk_cond_reglement)){ // use previous situation value
|
||||||
|
$retained_warranty_fk_cond_reglement = $objectsrc->retained_warranty_fk_cond_reglement;
|
||||||
|
}else{
|
||||||
|
$retained_warranty_fk_cond_reglement = $conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID;
|
||||||
|
}
|
||||||
|
}
|
||||||
$form->select_conditions_paiements($retained_warranty_fk_cond_reglement, 'retained_warranty_fk_cond_reglement', -1, 1);
|
$form->select_conditions_paiements($retained_warranty_fk_cond_reglement, 'retained_warranty_fk_cond_reglement', -1, 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
@ -4430,7 +4459,7 @@ elseif ($id > 0 || !empty($ref))
|
|||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
if ($action == 'editrevenuestamp') {
|
if ($action == 'editrevenuestamp') {
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
|
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION ['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print '<input type="hidden" name="action" value="setrevenuestamp">';
|
print '<input type="hidden" name="action" value="setrevenuestamp">';
|
||||||
print '<input type="hidden" name="revenuestamp" id="revenuestamp_val" value="'.price2num($object->revenuestamp).'">';
|
print '<input type="hidden" name="revenuestamp" id="revenuestamp_val" value="'.price2num($object->revenuestamp).'">';
|
||||||
print $formother->select_revenue_stamp('', 'revenuestamp_type', $mysoc->country_code);
|
print $formother->select_revenue_stamp('', 'revenuestamp_type', $mysoc->country_code);
|
||||||
@ -4934,7 +4963,7 @@ elseif ($id > 0 || !empty($ref))
|
|||||||
}
|
}
|
||||||
|
|
||||||
print ' <form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline') ? '#addline' : '#line_'.GETPOST('lineid')).'" method="POST">
|
print ' <form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline') ? '#addline' : '#line_'.GETPOST('lineid')).'" method="POST">
|
||||||
<input type="hidden" name="token" value="' . $_SESSION ['newtoken'].'">
|
<input type="hidden" name="token" value="' . newToken().'">
|
||||||
<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline').'">
|
<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline').'">
|
||||||
<input type="hidden" name="mode" value="">
|
<input type="hidden" name="mode" value="">
|
||||||
<input type="hidden" name="id" value="' . $object->id.'">
|
<input type="hidden" name="id" value="' . $object->id.'">
|
||||||
|
|||||||
@ -158,7 +158,8 @@ class Invoices extends DolibarrApi
|
|||||||
* @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')"
|
* @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')"
|
||||||
* @return array Array of invoice objects
|
* @return array Array of invoice objects
|
||||||
*
|
*
|
||||||
* @throws RestException
|
* @throws RestException 404 Not found
|
||||||
|
* @throws RestException 503 Error
|
||||||
*/
|
*/
|
||||||
public function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $thirdparty_ids = '', $status = '', $sqlfilters = '')
|
public function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $thirdparty_ids = '', $status = '', $sqlfilters = '')
|
||||||
{
|
{
|
||||||
|
|||||||
@ -279,8 +279,8 @@ class Facture extends CommonInvoice
|
|||||||
'close_code' =>array('type'=>'varchar(16)', 'label'=>'EarlyClosingReason', 'enabled'=>1, 'visible'=>-1, 'position'=>105),
|
'close_code' =>array('type'=>'varchar(16)', 'label'=>'EarlyClosingReason', 'enabled'=>1, 'visible'=>-1, 'position'=>105),
|
||||||
'close_note' =>array('type'=>'varchar(128)', 'label'=>'EarlyClosingComment', 'enabled'=>1, 'visible'=>-1, 'position'=>110),
|
'close_note' =>array('type'=>'varchar(128)', 'label'=>'EarlyClosingComment', 'enabled'=>1, 'visible'=>-1, 'position'=>110),
|
||||||
'tva' =>array('type'=>'double(24,8)', 'label'=>'TotalVAT', 'enabled'=>1, 'visible'=>-1, 'position'=>115, 'isameasure'=>1),
|
'tva' =>array('type'=>'double(24,8)', 'label'=>'TotalVAT', 'enabled'=>1, 'visible'=>-1, 'position'=>115, 'isameasure'=>1),
|
||||||
'localtax1' =>array('type'=>'double(24,8)', 'label'=>'LocalTax1', 'enabled'=>1, 'visible'=>-1, 'position'=>120, 'isameasure'=>1),
|
'localtax1' =>array('type'=>'double(24,8)', 'label'=>'LT1', 'enabled'=>1, 'visible'=>-1, 'position'=>120, 'isameasure'=>1),
|
||||||
'localtax2' =>array('type'=>'double(24,8)', 'label'=>'LocalTax2', 'enabled'=>1, 'visible'=>-1, 'position'=>125, 'isameasure'=>1),
|
'localtax2' =>array('type'=>'double(24,8)', 'label'=>'LT2', 'enabled'=>1, 'visible'=>-1, 'position'=>125, 'isameasure'=>1),
|
||||||
'revenuestamp' =>array('type'=>'double(24,8)', 'label'=>'RevenueStamp', 'enabled'=>1, 'visible'=>-1, 'position'=>130, 'isameasure'=>1),
|
'revenuestamp' =>array('type'=>'double(24,8)', 'label'=>'RevenueStamp', 'enabled'=>1, 'visible'=>-1, 'position'=>130, 'isameasure'=>1),
|
||||||
'total' =>array('type'=>'double(24,8)', 'label'=>'TotalHT', 'enabled'=>1, 'visible'=>-1, 'position'=>135, 'isameasure'=>1),
|
'total' =>array('type'=>'double(24,8)', 'label'=>'TotalHT', 'enabled'=>1, 'visible'=>-1, 'position'=>135, 'isameasure'=>1),
|
||||||
'total_ttc' =>array('type'=>'double(24,8)', 'label'=>'TotalTTC', 'enabled'=>1, 'visible'=>-1, 'position'=>140, 'isameasure'=>1),
|
'total_ttc' =>array('type'=>'double(24,8)', 'label'=>'TotalTTC', 'enabled'=>1, 'visible'=>-1, 'position'=>140, 'isameasure'=>1),
|
||||||
@ -1067,6 +1067,11 @@ class Facture extends CommonInvoice
|
|||||||
$facture->situation_cycle_ref = $this->situation_cycle_ref;
|
$facture->situation_cycle_ref = $this->situation_cycle_ref;
|
||||||
$facture->situation_final = $this->situation_final;
|
$facture->situation_final = $this->situation_final;
|
||||||
|
|
||||||
|
$facture->retained_warranty = $this->retained_warranty;
|
||||||
|
$facture->retained_warranty_fk_cond_reglement = $this->retained_warranty_fk_cond_reglement;
|
||||||
|
$facture->retained_warranty_date_limit = $this->retained_warranty_date_limit;
|
||||||
|
|
||||||
|
|
||||||
// Loop on each line of new invoice
|
// Loop on each line of new invoice
|
||||||
foreach ($facture->lines as $i => $tmpline)
|
foreach ($facture->lines as $i => $tmpline)
|
||||||
{
|
{
|
||||||
@ -1647,8 +1652,8 @@ class Facture extends CommonInvoice
|
|||||||
$this->lines = array();
|
$this->lines = array();
|
||||||
|
|
||||||
$sql = 'SELECT l.rowid, l.fk_facture, l.fk_product, l.fk_parent_line, l.label as custom_label, l.description, l.product_type, l.price, l.qty, l.vat_src_code, l.tva_tx,';
|
$sql = 'SELECT l.rowid, l.fk_facture, l.fk_product, l.fk_parent_line, l.label as custom_label, l.description, l.product_type, l.price, l.qty, l.vat_src_code, l.tva_tx,';
|
||||||
$sql .= ' l.situation_percent, l.fk_prev_id,';
|
|
||||||
$sql .= ' l.localtax1_tx, l.localtax2_tx, l.localtax1_type, l.localtax2_type, l.remise_percent, l.fk_remise_except, l.subprice,';
|
$sql .= ' l.localtax1_tx, l.localtax2_tx, l.localtax1_type, l.localtax2_type, l.remise_percent, l.fk_remise_except, l.subprice,';
|
||||||
|
$sql .= ' l.situation_percent, l.fk_prev_id,';
|
||||||
$sql .= ' l.rang, l.special_code,';
|
$sql .= ' l.rang, l.special_code,';
|
||||||
$sql .= ' l.date_start as date_start, l.date_end as date_end,';
|
$sql .= ' l.date_start as date_start, l.date_end as date_end,';
|
||||||
$sql .= ' l.info_bits, l.total_ht, l.total_tva, l.total_localtax1, l.total_localtax2, l.total_ttc, l.fk_code_ventilation, l.fk_product_fournisseur_price as fk_fournprice, l.buy_price_ht as pa_ht,';
|
$sql .= ' l.info_bits, l.total_ht, l.total_tva, l.total_localtax1, l.total_localtax2, l.total_ttc, l.fk_code_ventilation, l.fk_product_fournisseur_price as fk_fournprice, l.buy_price_ht as pa_ht,';
|
||||||
@ -2251,10 +2256,10 @@ class Facture extends CommonInvoice
|
|||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Tag la facture comme paye completement (si close_code non renseigne) => this->fk_statut=2, this->paye=1
|
* Tag the invoice as paid completely (if close_code is filled) => this->fk_statut=2, this->paye=1
|
||||||
* ou partiellement (si close_code renseigne) + appel trigger BILL_PAYED => this->fk_statut=2, this->paye stay 0
|
* or partialy (if close_code filled) + appel trigger BILL_PAYED => this->fk_statut=2, this->paye stay 0
|
||||||
*
|
*
|
||||||
* @param User $user Objet utilisateur qui modifie
|
* @param User $user Object user that modify
|
||||||
* @param string $close_code Code renseigne si on classe a payee completement alors que paiement incomplet (cas escompte par exemple)
|
* @param string $close_code Code renseigne si on classe a payee completement alors que paiement incomplet (cas escompte par exemple)
|
||||||
* @param string $close_note Commentaire renseigne si on classe a payee alors que paiement incomplet (cas escompte par exemple)
|
* @param string $close_note Commentaire renseigne si on classe a payee alors que paiement incomplet (cas escompte par exemple)
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
|
|||||||
@ -235,7 +235,9 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
|||||||
|
|
||||||
// Show filter box
|
// Show filter box
|
||||||
print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||||
|
|
||||||
print '<table class="noborder centpercent">';
|
print '<table class="noborder centpercent">';
|
||||||
print '<tr class="liste_titre"><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
|
print '<tr class="liste_titre"><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
|
||||||
// Company
|
// Company
|
||||||
|
|||||||
@ -115,7 +115,7 @@ if (GETPOST("orphelins", "alpha"))
|
|||||||
{
|
{
|
||||||
// Payments not linked to an invoice. Should not happend. For debug only.
|
// Payments not linked to an invoice. Should not happend. For debug only.
|
||||||
$sql = "SELECT p.rowid, p.ref, p.datep as dp, p.amount,";
|
$sql = "SELECT p.rowid, p.ref, p.datep as dp, p.amount,";
|
||||||
$sql.= " p.statut, p.num_paiement,";
|
$sql.= " p.statut, p.num_paiement as num_payment,";
|
||||||
$sql.= " c.code as paiement_code";
|
$sql.= " c.code as paiement_code";
|
||||||
// Add fields from hooks
|
// Add fields from hooks
|
||||||
$parameters=array();
|
$parameters=array();
|
||||||
@ -133,7 +133,7 @@ if (GETPOST("orphelins", "alpha"))
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$sql = "SELECT DISTINCT p.rowid, p.ref, p.datep as dp, p.amount,"; // DISTINCT is to avoid duplicate when there is a link to sales representatives
|
$sql = "SELECT DISTINCT p.rowid, p.ref, p.datep as dp, p.amount,"; // DISTINCT is to avoid duplicate when there is a link to sales representatives
|
||||||
$sql.= " p.statut, p.num_paiement,";
|
$sql.= " p.statut, p.num_paiement as num_payment,";
|
||||||
$sql.= " c.code as paiement_code,";
|
$sql.= " c.code as paiement_code,";
|
||||||
$sql.= " ba.rowid as bid, ba.ref as bref, ba.label as blabel, ba.number, ba.account_number as account_number, ba.fk_accountancy_journal as accountancy_journal,";
|
$sql.= " ba.rowid as bid, ba.ref as bref, ba.label as blabel, ba.number, ba.account_number as account_number, ba.fk_accountancy_journal as accountancy_journal,";
|
||||||
$sql.= " s.rowid as socid, s.nom as name, s.email";
|
$sql.= " s.rowid as socid, s.nom as name, s.email";
|
||||||
@ -323,7 +323,7 @@ if ($resql)
|
|||||||
if (!$i) $totalarray['nbfield']++;
|
if (!$i) $totalarray['nbfield']++;
|
||||||
|
|
||||||
// Payment number
|
// Payment number
|
||||||
print '<td>'.$objp->num_paiement.'</td>';
|
print '<td>'.$objp->num_payment.'</td>';
|
||||||
if (!$i) $totalarray['nbfield']++;
|
if (!$i) $totalarray['nbfield']++;
|
||||||
|
|
||||||
// Account
|
// Account
|
||||||
|
|||||||
@ -64,7 +64,7 @@ if (! $sortfield) $sortfield="p.rowid";
|
|||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
$sql = "SELECT p.rowid, p.datep as dp, p.amount, p.statut";
|
$sql = "SELECT p.rowid, p.datep as dp, p.amount, p.statut";
|
||||||
$sql.=", c.libelle as paiement_type, p.num_paiement";
|
$sql.=", c.libelle as paiement_type, p.num_paiement as num_payment";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."paiement as p LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as c ON p.fk_paiement = c.id";
|
$sql.= " FROM ".MAIN_DB_PREFIX."paiement as p LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as c ON p.fk_paiement = c.id";
|
||||||
if ($socid)
|
if ($socid)
|
||||||
{
|
{
|
||||||
@ -119,7 +119,7 @@ if ($resql)
|
|||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td><a href="'.DOL_URL_ROOT.'/compta/paiement/card.php?id='.$objp->rowid.'">'.img_object($langs->trans("ShowPayment"), "payment").' '.$objp->rowid.'</a></td>';
|
print '<td><a href="'.DOL_URL_ROOT.'/compta/paiement/card.php?id='.$objp->rowid.'">'.img_object($langs->trans("ShowPayment"), "payment").' '.$objp->rowid.'</a></td>';
|
||||||
print '<td width="80" align="center">'.dol_print_date($db->jdate($objp->dp), 'day')."</td>\n";
|
print '<td width="80" align="center">'.dol_print_date($db->jdate($objp->dp), 'day')."</td>\n";
|
||||||
print "<td>$objp->paiement_type $objp->num_paiement</td>\n";
|
print "<td>$objp->paiement_type $objp->num_payment</td>\n";
|
||||||
print '<td class="right">'.price($objp->amount).'</td>';
|
print '<td class="right">'.price($objp->amount).'</td>';
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
|
|
||||||
|
|||||||
@ -108,9 +108,10 @@ if ($action == 'add_payment' || ($action == 'confirm_paiement' && $confirm == 'y
|
|||||||
$paiement->chid = $chid;
|
$paiement->chid = $chid;
|
||||||
$paiement->datepaye = $datepaye;
|
$paiement->datepaye = $datepaye;
|
||||||
$paiement->amounts = $amounts; // Tableau de montant
|
$paiement->amounts = $amounts; // Tableau de montant
|
||||||
$paiement->paiementtype = $_POST["paiementtype"];
|
$paiement->paiementtype = GETPOST("paiementtype", 'alphanohtml');
|
||||||
$paiement->num_paiement = $_POST["num_paiement"];
|
$paiement->num_payment = GETPOST("num_payment", 'alphanohtml');
|
||||||
$paiement->note = $_POST["note"];
|
$paiement->note = GETPOST("note", 'none');
|
||||||
|
$paiement->note_private = GETPOST("note", 'none');
|
||||||
|
|
||||||
if (!$error)
|
if (!$error)
|
||||||
{
|
{
|
||||||
@ -243,7 +244,7 @@ if ($action == 'create')
|
|||||||
print '<tr><td>'.$langs->trans('Numero');
|
print '<tr><td>'.$langs->trans('Numero');
|
||||||
print ' <em>('.$langs->trans("ChequeOrTransferNumber").')</em>';
|
print ' <em>('.$langs->trans("ChequeOrTransferNumber").')</em>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td><input name="num_paiement" type="text" value="'.GETPOST('num_paiement').'"></td></tr>'."\n";
|
print '<td><input name="num_payment" type="text" value="'.GETPOST('num_payment', 'alphanohtml').'"></td></tr>'."\n";
|
||||||
|
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td class="tdtop">'.$langs->trans("Comments").'</td>';
|
print '<td class="tdtop">'.$langs->trans("Comments").'</td>';
|
||||||
|
|||||||
@ -484,7 +484,7 @@ class BonPrelevement extends CommonObject
|
|||||||
$paiement->amounts = $cursoramounts; // Array with detail of dispatching of payments for each invoice
|
$paiement->amounts = $cursoramounts; // Array with detail of dispatching of payments for each invoice
|
||||||
$paiement->paiementid = 3; //
|
$paiement->paiementid = 3; //
|
||||||
$paiement->num_payment = $this->ref; // Set ref of direct debit note
|
$paiement->num_payment = $this->ref; // Set ref of direct debit note
|
||||||
$paiement->num_paiement = $this->ref; // For bacward compatibility
|
$paiement->num_paiement = $this->ref; // For backward compatibility
|
||||||
$paiement->id_prelevement = $this->id;
|
$paiement->id_prelevement = $this->id;
|
||||||
|
|
||||||
$paiement_id = $paiement->create($user);
|
$paiement_id = $paiement->create($user);
|
||||||
|
|||||||
@ -154,6 +154,7 @@ class RejetPrelevement
|
|||||||
$pai->datepaye = $date_rejet;
|
$pai->datepaye = $date_rejet;
|
||||||
$pai->paiementid = 3; // type of payment: withdrawal
|
$pai->paiementid = 3; // type of payment: withdrawal
|
||||||
$pai->num_paiement = $fac->ref;
|
$pai->num_paiement = $fac->ref;
|
||||||
|
$pai->num_payment = $fac->ref;
|
||||||
|
|
||||||
if ($pai->create($this->user) < 0) // we call with no_commit
|
if ($pai->create($this->user) < 0) // we call with no_commit
|
||||||
{
|
{
|
||||||
|
|||||||
@ -603,7 +603,7 @@ if ($id > 0)
|
|||||||
/*
|
/*
|
||||||
* Payments
|
* Payments
|
||||||
*/
|
*/
|
||||||
$sql = "SELECT p.rowid, p.num_paiement, datep as dp, p.amount,";
|
$sql = "SELECT p.rowid, p.num_paiement as num_payment, datep as dp, p.amount,";
|
||||||
$sql .= " c.code as type_code,c.libelle as paiement_type,";
|
$sql .= " c.code as type_code,c.libelle as paiement_type,";
|
||||||
$sql .= ' ba.rowid as baid, ba.ref as baref, ba.label, ba.number as banumber, ba.account_number, ba.currency_code as bacurrency_code, ba.fk_accountancy_journal';
|
$sql .= ' ba.rowid as baid, ba.ref as baref, ba.label, ba.number as banumber, ba.account_number, ba.currency_code as bacurrency_code, ba.fk_accountancy_journal';
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."paiementcharge as p";
|
$sql .= " FROM ".MAIN_DB_PREFIX."paiementcharge as p";
|
||||||
@ -647,7 +647,7 @@ if ($id > 0)
|
|||||||
print '<a href="'.DOL_URL_ROOT.'/compta/payment_sc/card.php?id='.$objp->rowid.'">'.img_object($langs->trans("Payment"), "payment").' '.$objp->rowid.'</a></td>';
|
print '<a href="'.DOL_URL_ROOT.'/compta/payment_sc/card.php?id='.$objp->rowid.'">'.img_object($langs->trans("Payment"), "payment").' '.$objp->rowid.'</a></td>';
|
||||||
print '<td>'.dol_print_date($db->jdate($objp->dp), 'day')."</td>\n";
|
print '<td>'.dol_print_date($db->jdate($objp->dp), 'day')."</td>\n";
|
||||||
$labeltype = $langs->trans("PaymentType".$objp->type_code) != ("PaymentType".$objp->type_code) ? $langs->trans("PaymentType".$objp->type_code) : $objp->paiement_type;
|
$labeltype = $langs->trans("PaymentType".$objp->type_code) != ("PaymentType".$objp->type_code) ? $langs->trans("PaymentType".$objp->type_code) : $objp->paiement_type;
|
||||||
print "<td>".$labeltype.' '.$objp->num_paiement."</td>\n";
|
print "<td>".$labeltype.' '.$objp->num_payment."</td>\n";
|
||||||
if (!empty($conf->banque->enabled))
|
if (!empty($conf->banque->enabled))
|
||||||
{
|
{
|
||||||
$bankaccountstatic->id = $objp->baid;
|
$bankaccountstatic->id = $objp->baid;
|
||||||
|
|||||||
@ -69,8 +69,17 @@ class PaymentSocialContribution extends CommonObject
|
|||||||
*/
|
*/
|
||||||
public $fk_typepaiement;
|
public $fk_typepaiement;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
* @deprecated
|
||||||
|
*/
|
||||||
public $num_paiement;
|
public $num_paiement;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $num_payment;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int ID
|
* @var int ID
|
||||||
*/
|
*/
|
||||||
@ -125,7 +134,8 @@ class PaymentSocialContribution extends CommonObject
|
|||||||
if (isset($this->fk_charge)) $this->fk_charge = (int) $this->fk_charge;
|
if (isset($this->fk_charge)) $this->fk_charge = (int) $this->fk_charge;
|
||||||
if (isset($this->amount)) $this->amount = trim($this->amount);
|
if (isset($this->amount)) $this->amount = trim($this->amount);
|
||||||
if (isset($this->fk_typepaiement)) $this->fk_typepaiement = (int) $this->fk_typepaiement;
|
if (isset($this->fk_typepaiement)) $this->fk_typepaiement = (int) $this->fk_typepaiement;
|
||||||
if (isset($this->num_paiement)) $this->num_paiement = trim($this->num_paiement);
|
if (isset($this->num_paiement)) $this->num_paiement = trim($this->num_paiement); // deprecated
|
||||||
|
if (isset($this->num_payment)) $this->num_payment = trim($this->num_payment);
|
||||||
if (isset($this->note)) $this->note = trim($this->note);
|
if (isset($this->note)) $this->note = trim($this->note);
|
||||||
if (isset($this->fk_bank)) $this->fk_bank = (int) $this->fk_bank;
|
if (isset($this->fk_bank)) $this->fk_bank = (int) $this->fk_bank;
|
||||||
if (isset($this->fk_user_creat)) $this->fk_user_creat = (int) $this->fk_user_creat;
|
if (isset($this->fk_user_creat)) $this->fk_user_creat = (int) $this->fk_user_creat;
|
||||||
@ -149,11 +159,11 @@ class PaymentSocialContribution extends CommonObject
|
|||||||
if ($totalamount != 0)
|
if ($totalamount != 0)
|
||||||
{
|
{
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."paiementcharge (fk_charge, datec, datep, amount,";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."paiementcharge (fk_charge, datec, datep, amount,";
|
||||||
$sql .= " fk_typepaiement, num_paiement, note, fk_user_creat, fk_bank)";
|
$sql .= " fk_typepaiement, num_paiement as num_payment, note, fk_user_creat, fk_bank)";
|
||||||
$sql .= " VALUES ($this->chid, '".$this->db->idate($now)."',";
|
$sql .= " VALUES ($this->chid, '".$this->db->idate($now)."',";
|
||||||
$sql .= " '".$this->db->idate($this->datepaye)."',";
|
$sql .= " '".$this->db->idate($this->datepaye)."',";
|
||||||
$sql .= " ".$totalamount.",";
|
$sql .= " ".$totalamount.",";
|
||||||
$sql .= " ".$this->paiementtype.", '".$this->db->escape($this->num_paiement)."', '".$this->db->escape($this->note)."', ".$user->id.",";
|
$sql .= " ".$this->paiementtype.", '".$this->db->escape($this->num_payment)."', '".$this->db->escape($this->note)."', ".$user->id.",";
|
||||||
$sql .= " 0)";
|
$sql .= " 0)";
|
||||||
|
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
@ -231,7 +241,7 @@ class PaymentSocialContribution extends CommonObject
|
|||||||
$sql.= " t.datep,";
|
$sql.= " t.datep,";
|
||||||
$sql.= " t.amount,";
|
$sql.= " t.amount,";
|
||||||
$sql.= " t.fk_typepaiement,";
|
$sql.= " t.fk_typepaiement,";
|
||||||
$sql.= " t.num_paiement,";
|
$sql.= " t.num_paiement as num_payment,";
|
||||||
$sql.= " t.note,";
|
$sql.= " t.note,";
|
||||||
$sql.= " t.fk_bank,";
|
$sql.= " t.fk_bank,";
|
||||||
$sql.= " t.fk_user_creat,";
|
$sql.= " t.fk_user_creat,";
|
||||||
@ -260,7 +270,8 @@ class PaymentSocialContribution extends CommonObject
|
|||||||
$this->datep = $this->db->jdate($obj->datep);
|
$this->datep = $this->db->jdate($obj->datep);
|
||||||
$this->amount = $obj->amount;
|
$this->amount = $obj->amount;
|
||||||
$this->fk_typepaiement = $obj->fk_typepaiement;
|
$this->fk_typepaiement = $obj->fk_typepaiement;
|
||||||
$this->num_paiement = $obj->num_paiement;
|
$this->num_paiement = $obj->num_payment;
|
||||||
|
$this->num_payment = $obj->num_payment;
|
||||||
$this->note = $obj->note;
|
$this->note = $obj->note;
|
||||||
$this->fk_bank = $obj->fk_bank;
|
$this->fk_bank = $obj->fk_bank;
|
||||||
$this->fk_user_creat = $obj->fk_user_creat;
|
$this->fk_user_creat = $obj->fk_user_creat;
|
||||||
@ -301,7 +312,8 @@ class PaymentSocialContribution extends CommonObject
|
|||||||
if (isset($this->fk_charge)) $this->fk_charge = (int) $this->fk_charge;
|
if (isset($this->fk_charge)) $this->fk_charge = (int) $this->fk_charge;
|
||||||
if (isset($this->amount)) $this->amount = trim($this->amount);
|
if (isset($this->amount)) $this->amount = trim($this->amount);
|
||||||
if (isset($this->fk_typepaiement)) $this->fk_typepaiement = (int) $this->fk_typepaiement;
|
if (isset($this->fk_typepaiement)) $this->fk_typepaiement = (int) $this->fk_typepaiement;
|
||||||
if (isset($this->num_paiement)) $this->num_paiement = trim($this->num_paiement);
|
if (isset($this->num_paiement)) $this->num_paiement = trim($this->num_paiement); // deprecated
|
||||||
|
if (isset($this->num_payment)) $this->num_payment = trim($this->num_payment);
|
||||||
if (isset($this->note)) $this->note = trim($this->note);
|
if (isset($this->note)) $this->note = trim($this->note);
|
||||||
if (isset($this->fk_bank)) $this->fk_bank = (int) $this->fk_bank;
|
if (isset($this->fk_bank)) $this->fk_bank = (int) $this->fk_bank;
|
||||||
if (isset($this->fk_user_creat)) $this->fk_user_creat = (int) $this->fk_user_creat;
|
if (isset($this->fk_user_creat)) $this->fk_user_creat = (int) $this->fk_user_creat;
|
||||||
@ -511,8 +523,9 @@ class PaymentSocialContribution extends CommonObject
|
|||||||
$this->datep = '';
|
$this->datep = '';
|
||||||
$this->amount = '';
|
$this->amount = '';
|
||||||
$this->fk_typepaiement = '';
|
$this->fk_typepaiement = '';
|
||||||
$this->num_paiement = '';
|
$this->num_payment = '';
|
||||||
$this->note = '';
|
$this->note_private = '';
|
||||||
|
$this->note_public = '';
|
||||||
$this->fk_bank = '';
|
$this->fk_bank = '';
|
||||||
$this->fk_user_creat = '';
|
$this->fk_user_creat = '';
|
||||||
$this->fk_user_modif = '';
|
$this->fk_user_modif = '';
|
||||||
|
|||||||
@ -218,7 +218,7 @@ $dolibarr_main_authentication='dolibarr';
|
|||||||
// 0 = No forced redirect
|
// 0 = No forced redirect
|
||||||
// 1 = Force redirect to https, until SCRIPT_URI start with https into response
|
// 1 = Force redirect to https, until SCRIPT_URI start with https into response
|
||||||
// 2 = Force redirect to https, until SERVER["HTTPS"] is 'on' into response
|
// 2 = Force redirect to https, until SERVER["HTTPS"] is 'on' into response
|
||||||
// 'https://my.domain.com' = Force reditect to https using this domain name.
|
// 'https://my.domain.com' = Force redirect to https using this domain name.
|
||||||
// Warning: If you enable this parameter, your web server must be configured to
|
// Warning: If you enable this parameter, your web server must be configured to
|
||||||
// respond URL with https protocol.
|
// respond URL with https protocol.
|
||||||
// According to your web server setup, some values may works and other not. Try
|
// According to your web server setup, some values may works and other not. Try
|
||||||
@ -226,7 +226,7 @@ $dolibarr_main_authentication='dolibarr';
|
|||||||
// Default value: 0
|
// Default value: 0
|
||||||
// Possible values: 0, 1, 2 or 'https://my.domain.com'
|
// Possible values: 0, 1, 2 or 'https://my.domain.com'
|
||||||
// Examples:
|
// Examples:
|
||||||
// $dolibarr_main_force_https='0';
|
// $dolibarr_main_force_https='1';
|
||||||
//
|
//
|
||||||
$dolibarr_main_force_https='0';
|
$dolibarr_main_force_https='0';
|
||||||
|
|
||||||
|
|||||||
@ -108,7 +108,7 @@ $userid = GETPOST('userid', 'int');
|
|||||||
$begin = GETPOST('begin');
|
$begin = GETPOST('begin');
|
||||||
if (!$sortorder) $sortorder = "ASC";
|
if (!$sortorder) $sortorder = "ASC";
|
||||||
if (!$sortfield) $sortfield = "p.lastname";
|
if (!$sortfield) $sortfield = "p.lastname";
|
||||||
if (empty($page) || $page < 0) { $page = 0; }
|
if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) { $page = 0; }
|
||||||
$offset = $limit * $page;
|
$offset = $limit * $page;
|
||||||
|
|
||||||
$titre = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("ListOfContacts") : $langs->trans("ListOfContactsAddresses"));
|
$titre = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("ListOfContacts") : $langs->trans("ListOfContactsAddresses"));
|
||||||
@ -497,11 +497,11 @@ print '<input type="hidden" name="token" value="'.newToken().'">';
|
|||||||
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
//print '<input type="hidden" name="page" value="'.$page.'">';
|
||||||
print '<input type="hidden" name="type" value="'.$type.'">';
|
print '<input type="hidden" name="type" value="'.$type.'">';
|
||||||
print '<input type="hidden" name="view" value="'.dol_escape_htmltag($view).'">';
|
print '<input type="hidden" name="view" value="'.dol_escape_htmltag($view).'">';
|
||||||
|
|
||||||
print_barre_liste($titre, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'address', 0, $newcardbutton, '', $limit);
|
print_barre_liste($titre, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'address', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||||
|
|
||||||
$topicmail = "Information";
|
$topicmail = "Information";
|
||||||
$modelmail = "contact";
|
$modelmail = "contact";
|
||||||
|
|||||||
@ -99,7 +99,8 @@ class Contracts extends DolibarrApi
|
|||||||
* @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')"
|
* @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')"
|
||||||
* @return array Array of contract objects
|
* @return array Array of contract objects
|
||||||
*
|
*
|
||||||
* @throws RestException
|
* @throws RestException 404 Not found
|
||||||
|
* @throws RestException 503 Error
|
||||||
*/
|
*/
|
||||||
public function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $thirdparty_ids = '', $sqlfilters = '')
|
public function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $thirdparty_ids = '', $sqlfilters = '')
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2785,7 +2785,7 @@ class ContratLigne extends CommonObjectLine
|
|||||||
elseif ($status == self::STATUS_CLOSED) { $labelStatus = $langs->trans("ServiceStatusClosed"); $labelStatusShort = $langs->trans("ServiceStatusClosed"); }
|
elseif ($status == self::STATUS_CLOSED) { $labelStatus = $langs->trans("ServiceStatusClosed"); $labelStatusShort = $langs->trans("ServiceStatusClosed"); }
|
||||||
|
|
||||||
$statusType = 'status'.$status;
|
$statusType = 'status'.$status;
|
||||||
if ($status == self::STATUS_OPEN && $expired == 1) $statusType = 'status3';
|
if ($status == self::STATUS_OPEN && $expired == 1) $statusType = 'status1';
|
||||||
if ($status == self::STATUS_CLOSED) $statusType = 'status6';
|
if ($status == self::STATUS_CLOSED) $statusType = 'status6';
|
||||||
|
|
||||||
$params = array(); $reg = array();
|
$params = array(); $reg = array();
|
||||||
|
|||||||
@ -109,7 +109,7 @@ $dataseries = array();
|
|||||||
$vals = array();
|
$vals = array();
|
||||||
|
|
||||||
// Search by status (except expired)
|
// Search by status (except expired)
|
||||||
$sql = "SELECT count(cd.rowid), cd.statut";
|
$sql = "SELECT count(cd.rowid) as nb, cd.statut as status";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
|
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||||
$sql .= ", ".MAIN_DB_PREFIX."contratdet as cd, ".MAIN_DB_PREFIX."contrat as c";
|
$sql .= ", ".MAIN_DB_PREFIX."contratdet as cd, ".MAIN_DB_PREFIX."contrat as c";
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
@ -126,16 +126,16 @@ if ($resql)
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$row = $db->fetch_row($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
if ($row)
|
if ($obj)
|
||||||
{
|
{
|
||||||
$nb[$row[1]] = $row[0];
|
$nb[$obj->status] = $obj->nb;
|
||||||
if ($row[1] != 5)
|
if ($obj->status != 5)
|
||||||
{
|
{
|
||||||
$vals[$row[1]] = $row[0];
|
$vals[$obj->status] = $obj->nb;
|
||||||
$totalinprocess += $row[0];
|
$totalinprocess += $obj->nb;
|
||||||
}
|
}
|
||||||
$total += $row[0];
|
$total += $obj->nb;
|
||||||
}
|
}
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
@ -146,7 +146,7 @@ else
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
// Search by status (only expired)
|
// Search by status (only expired)
|
||||||
$sql = "SELECT count(cd.rowid), cd.statut";
|
$sql = "SELECT count(cd.rowid) as nb, cd.statut as status";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
|
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||||
$sql .= ", ".MAIN_DB_PREFIX."contratdet as cd, ".MAIN_DB_PREFIX."contrat as c";
|
$sql .= ", ".MAIN_DB_PREFIX."contratdet as cd, ".MAIN_DB_PREFIX."contrat as c";
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
@ -165,16 +165,16 @@ if ($resql)
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$row = $db->fetch_row($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
if ($row)
|
if ($obj)
|
||||||
{
|
{
|
||||||
$nb[$row[1].true] = $row[0];
|
$nb[$obj->status.true] = $obj->nb;
|
||||||
if ($row[1] != 5)
|
if ($obj->status != 5)
|
||||||
{
|
{
|
||||||
$vals[$row[1]] = $row[0];
|
$vals[$obj->status.true] = $obj->nb;
|
||||||
$totalinprocess += $row[0];
|
$totalinprocess += $obj->nb;
|
||||||
}
|
}
|
||||||
$total += $row[0];
|
$total += $obj->nb;
|
||||||
}
|
}
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
@ -185,6 +185,10 @@ else
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$colorseries = array();
|
||||||
|
|
||||||
|
include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder nohover centpercent">';
|
print '<table class="noborder nohover centpercent">';
|
||||||
print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Statistics").' - '.$langs->trans("Services").'</th></tr>'."\n";
|
print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Statistics").' - '.$langs->trans("Services").'</th></tr>'."\n";
|
||||||
@ -192,6 +196,11 @@ $listofstatus = array(0, 4, 4, 5); $bool = false;
|
|||||||
foreach ($listofstatus as $status)
|
foreach ($listofstatus as $status)
|
||||||
{
|
{
|
||||||
$dataseries[] = array($staticcontratligne->LibStatut($status, 1, ($bool ? 1 : 0)), (isset($nb[$status.$bool]) ? (int) $nb[$status.$bool] : 0));
|
$dataseries[] = array($staticcontratligne->LibStatut($status, 1, ($bool ? 1 : 0)), (isset($nb[$status.$bool]) ? (int) $nb[$status.$bool] : 0));
|
||||||
|
if ($status == ContratLigne::STATUS_INITIAL) $colorseries[$status.$bool] = '-'.$badgeStatus0;
|
||||||
|
if ($status == ContratLigne::STATUS_OPEN && !$bool) $colorseries[$status.$bool] = $badgeStatus4;
|
||||||
|
if ($status == ContratLigne::STATUS_OPEN && $bool) $colorseries[$status.$bool] = $badgeStatus1;
|
||||||
|
if ($status == ContratLigne::STATUS_CLOSED) $colorseries[$status.$bool] = $badgeStatus6;
|
||||||
|
|
||||||
if (empty($conf->use_javascript_ajax))
|
if (empty($conf->use_javascript_ajax))
|
||||||
{
|
{
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
@ -209,6 +218,7 @@ if (!empty($conf->use_javascript_ajax))
|
|||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
|
||||||
$dolgraph = new DolGraph();
|
$dolgraph = new DolGraph();
|
||||||
$dolgraph->SetData($dataseries);
|
$dolgraph->SetData($dataseries);
|
||||||
|
$dolgraph->SetDataColor(array_values($colorseries));
|
||||||
$dolgraph->setShowLegend(2);
|
$dolgraph->setShowLegend(2);
|
||||||
$dolgraph->setShowPercent(1);
|
$dolgraph->setShowPercent(1);
|
||||||
$dolgraph->SetType(array('pie'));
|
$dolgraph->SetType(array('pie'));
|
||||||
|
|||||||
@ -1215,6 +1215,8 @@ if (!$error && $massaction == 'closed' && $objectclass == "Propal" && $permissio
|
|||||||
$db->rollback();
|
$db->rollback();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Delete record from mass action (massaction = 'delete' for direct delete, action/confirm='delete'/'yes' with a confirmation step before)
|
// Delete record from mass action (massaction = 'delete' for direct delete, action/confirm='delete'/'yes' with a confirmation step before)
|
||||||
if (!$error && ($massaction == 'delete' || ($action == 'delete' && $confirm == 'yes')) && $permissiontodelete)
|
if (!$error && ($massaction == 'delete' || ($action == 'delete' && $confirm == 'yes')) && $permissiontodelete)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -47,6 +47,11 @@ class CSMSFile
|
|||||||
public $message;
|
public $message;
|
||||||
public $nostop;
|
public $nostop;
|
||||||
|
|
||||||
|
public $socid;
|
||||||
|
public $contactid;
|
||||||
|
|
||||||
|
public $fk_project;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CSMSFile
|
* CSMSFile
|
||||||
@ -125,7 +130,12 @@ class CSMSFile
|
|||||||
$sms->class=$this->class;
|
$sms->class=$this->class;
|
||||||
$sms->nostop=$this->nostop;
|
$sms->nostop=$this->nostop;
|
||||||
|
|
||||||
|
$sms->socid=$this->socid;
|
||||||
|
$sms->contactid=$this->contactid;
|
||||||
|
$sms->project=$this->fk_project;
|
||||||
|
|
||||||
$res=$sms->SmsSend();
|
$res=$sms->SmsSend();
|
||||||
|
|
||||||
if ($res <= 0)
|
if ($res <= 0)
|
||||||
{
|
{
|
||||||
$this->error=$sms->error;
|
$this->error=$sms->error;
|
||||||
@ -155,7 +165,12 @@ class CSMSFile
|
|||||||
$sms->message=$this->message;
|
$sms->message=$this->message;
|
||||||
$sms->nostop=$this->nostop;
|
$sms->nostop=$this->nostop;
|
||||||
|
|
||||||
|
$sms->socid=$this->socid;
|
||||||
|
$sms->contactid=$this->contactid;
|
||||||
|
$sms->fk_project=$this->fk_project;
|
||||||
|
|
||||||
$res=$sms->SmsSend();
|
$res=$sms->SmsSend();
|
||||||
|
|
||||||
$this->error = $sms->error;
|
$this->error = $sms->error;
|
||||||
$this->errors = $sms->errors;
|
$this->errors = $sms->errors;
|
||||||
if ($res <= 0)
|
if ($res <= 0)
|
||||||
|
|||||||
@ -4083,6 +4083,7 @@ abstract class CommonObject
|
|||||||
|
|
||||||
// Output template part (modules that overwrite templates must declare this into descriptor)
|
// Output template part (modules that overwrite templates must declare this into descriptor)
|
||||||
// Use global variables + $dateSelector + $seller and $buyer
|
// Use global variables + $dateSelector + $seller and $buyer
|
||||||
|
// Note: This is deprecated. If you need to overwrite the tpl file, use instead the hook 'formAddObjectLine'.
|
||||||
$dirtpls = array_merge($conf->modules_parts['tpl'], array($defaulttpldir));
|
$dirtpls = array_merge($conf->modules_parts['tpl'], array($defaulttpldir));
|
||||||
foreach ($dirtpls as $module => $reldir)
|
foreach ($dirtpls as $module => $reldir)
|
||||||
{
|
{
|
||||||
@ -4125,7 +4126,7 @@ abstract class CommonObject
|
|||||||
*/
|
*/
|
||||||
public function printObjectLines($action, $seller, $buyer, $selected = 0, $dateSelector = 0, $defaulttpldir = '/core/tpl')
|
public function printObjectLines($action, $seller, $buyer, $selected = 0, $dateSelector = 0, $defaulttpldir = '/core/tpl')
|
||||||
{
|
{
|
||||||
global $conf, $hookmanager, $langs, $user, $object, $form, $extrafields;
|
global $conf, $hookmanager, $langs, $user, $form, $extrafields, $object;
|
||||||
// TODO We should not use global var for this
|
// TODO We should not use global var for this
|
||||||
global $inputalsopricewithtax, $usemargins, $disableedit, $disablemove, $disableremove, $outputalsopricetotalwithtax;
|
global $inputalsopricewithtax, $usemargins, $disableedit, $disablemove, $disableremove, $outputalsopricetotalwithtax;
|
||||||
|
|
||||||
@ -4149,6 +4150,7 @@ abstract class CommonObject
|
|||||||
{
|
{
|
||||||
// Output template part (modules that overwrite templates must declare this into descriptor)
|
// Output template part (modules that overwrite templates must declare this into descriptor)
|
||||||
// Use global variables + $dateSelector + $seller and $buyer
|
// Use global variables + $dateSelector + $seller and $buyer
|
||||||
|
// Note: This is deprecated. If you need to overwrite the tpl file, use instead the hook.
|
||||||
$dirtpls = array_merge($conf->modules_parts['tpl'], array($defaulttpldir));
|
$dirtpls = array_merge($conf->modules_parts['tpl'], array($defaulttpldir));
|
||||||
foreach ($dirtpls as $module => $reldir)
|
foreach ($dirtpls as $module => $reldir)
|
||||||
{
|
{
|
||||||
@ -4215,7 +4217,7 @@ abstract class CommonObject
|
|||||||
* @param string $buyer Object of buyer third party
|
* @param string $buyer Object of buyer third party
|
||||||
* @param int $selected Object line selected
|
* @param int $selected Object line selected
|
||||||
* @param Extrafields $extrafields Object of extrafields
|
* @param Extrafields $extrafields Object of extrafields
|
||||||
* @param string $defaulttpldir Directory where to find the template
|
* @param string $defaulttpldir Directory where to find the template (deprecated)
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function printObjectLine($action, $line, $var, $num, $i, $dateSelector, $seller, $buyer, $selected = 0, $extrafields = null, $defaulttpldir = '/core/tpl')
|
public function printObjectLine($action, $line, $var, $num, $i, $dateSelector, $seller, $buyer, $selected = 0, $extrafields = null, $defaulttpldir = '/core/tpl')
|
||||||
@ -4228,15 +4230,9 @@ abstract class CommonObject
|
|||||||
|
|
||||||
$element = $this->element;
|
$element = $this->element;
|
||||||
|
|
||||||
$text = ''; $description = ''; $type = 0;
|
$text = ''; $description = '';
|
||||||
|
|
||||||
// Show product and description
|
// Line in view mode
|
||||||
$type = (!empty($line->product_type) ? $line->product_type : $line->fk_product_type);
|
|
||||||
// Try to enhance type detection using date_start and date_end for free lines where type was not saved.
|
|
||||||
if (!empty($line->date_start)) $type = 1; // deprecated
|
|
||||||
if (!empty($line->date_end)) $type = 1; // deprecated
|
|
||||||
|
|
||||||
// Ligne en mode visu
|
|
||||||
if ($action != 'editline' || $selected != $line->id)
|
if ($action != 'editline' || $selected != $line->id)
|
||||||
{
|
{
|
||||||
// Product
|
// Product
|
||||||
@ -4287,6 +4283,7 @@ abstract class CommonObject
|
|||||||
|
|
||||||
// Output template part (modules that overwrite templates must declare this into descriptor)
|
// Output template part (modules that overwrite templates must declare this into descriptor)
|
||||||
// Use global variables + $dateSelector + $seller and $buyer
|
// Use global variables + $dateSelector + $seller and $buyer
|
||||||
|
// Note: This is deprecated. If you need to overwrite the tpl file, use instead the hook printObjectLine and printObjectSubLine.
|
||||||
$dirtpls = array_merge($conf->modules_parts['tpl'], array($defaulttpldir));
|
$dirtpls = array_merge($conf->modules_parts['tpl'], array($defaulttpldir));
|
||||||
foreach ($dirtpls as $module => $reldir)
|
foreach ($dirtpls as $module => $reldir)
|
||||||
{
|
{
|
||||||
@ -4312,12 +4309,12 @@ abstract class CommonObject
|
|||||||
if ($this->statut == 0 && $action == 'editline' && $selected == $line->id)
|
if ($this->statut == 0 && $action == 'editline' && $selected == $line->id)
|
||||||
{
|
{
|
||||||
$label = (!empty($line->label) ? $line->label : (($line->fk_product > 0) ? $line->product_label : ''));
|
$label = (!empty($line->label) ? $line->label : (($line->fk_product > 0) ? $line->product_label : ''));
|
||||||
$placeholder = ' placeholder="'.$langs->trans("Label").'"';
|
|
||||||
|
|
||||||
$line->pu_ttc = price2num($line->subprice * (1 + ($line->tva_tx / 100)), 'MU');
|
$line->pu_ttc = price2num($line->subprice * (1 + ($line->tva_tx / 100)), 'MU');
|
||||||
|
|
||||||
// Output template part (modules that overwrite templates must declare this into descriptor)
|
// Output template part (modules that overwrite templates must declare this into descriptor)
|
||||||
// Use global variables + $dateSelector + $seller and $buyer
|
// Use global variables + $dateSelector + $seller and $buyer
|
||||||
|
// Note: This is deprecated. If you need to overwrite the tpl file, use instead the hook printObjectLine and printObjectSubLine.
|
||||||
$dirtpls = array_merge($conf->modules_parts['tpl'], array($defaulttpldir));
|
$dirtpls = array_merge($conf->modules_parts['tpl'], array($defaulttpldir));
|
||||||
foreach ($dirtpls as $module => $reldir)
|
foreach ($dirtpls as $module => $reldir)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1944,6 +1944,10 @@ class ExtraFields
|
|||||||
{
|
{
|
||||||
$align = "right";
|
$align = "right";
|
||||||
}
|
}
|
||||||
|
elseif ($type == 'price')
|
||||||
|
{
|
||||||
|
$align="right";
|
||||||
|
}
|
||||||
elseif ($type == 'double')
|
elseif ($type == 'double')
|
||||||
{
|
{
|
||||||
$align = "right";
|
$align = "right";
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
/* Copyright (C) 2014-2020 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
|
* Copyright (C) 2020 OScss-Shop <support@oscss-shop.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
|
||||||
@ -381,13 +383,19 @@ class Fiscalyear extends CommonObject
|
|||||||
* @param int $dateend Date end to scan
|
* @param int $dateend Date end to scan
|
||||||
* @return string Number of entries
|
* @return string Number of entries
|
||||||
*/
|
*/
|
||||||
public function getAccountancyEntriesByFiscalYear($datestart, $dateend)
|
public function getAccountancyEntriesByFiscalYear($datestart = '', $dateend = '')
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
|
if(empty($datestart) )
|
||||||
|
$datestart = $this->date_start;
|
||||||
|
if(empty($dateend) )
|
||||||
|
$dateend = $this->date_end;
|
||||||
|
|
||||||
$sql = "SELECT count(DISTINCT piece_num) as nb";
|
$sql = "SELECT count(DISTINCT piece_num) as nb";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping";
|
$sql.= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping";
|
||||||
$sql.= " WHERE doc_date >= '".$datestart."' and doc_date <= '".$dateend."'";
|
$sql.= " WHERE entity IN (".getEntity('bookkeeping', 0).")";
|
||||||
|
$sql.= " AND doc_date >= '".$this->db->idate($datestart)."' and doc_date <= '".$this->db->idate($dateend)."'";
|
||||||
|
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
@ -407,13 +415,19 @@ class Fiscalyear extends CommonObject
|
|||||||
* @param int $dateend Date end to scan
|
* @param int $dateend Date end to scan
|
||||||
* @return string Number of movements
|
* @return string Number of movements
|
||||||
*/
|
*/
|
||||||
public function getAccountancyMovementsByFiscalYear($datestart, $dateend)
|
public function getAccountancyMovementsByFiscalYear($datestart = '', $dateend = '')
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
|
if(empty($datestart) )
|
||||||
|
$datestart = $this->date_start;
|
||||||
|
if(empty($dateend) )
|
||||||
|
$dateend = $this->date_end;
|
||||||
|
|
||||||
$sql = "SELECT count(rowid) as nb";
|
$sql = "SELECT count(rowid) as nb";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping ";
|
$sql.= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping ";
|
||||||
$sql.= " WHERE doc_date >= '".$datestart."' AND doc_date <= '".$dateend."'";
|
$sql.= " WHERE entity IN (".getEntity('bookkeeping', 0).")";
|
||||||
|
$sql.= " AND doc_date >= '".$this->db->idate($datestart)."' and doc_date <= '".$this->db->idate($dateend)."'";
|
||||||
|
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
|
|||||||
@ -316,6 +316,33 @@ class Form
|
|||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Output edit in place form
|
||||||
|
*
|
||||||
|
* @param string $fieldname Name of the field
|
||||||
|
* @param object $object Object
|
||||||
|
* @param boolean $perm Permission to allow button to edit parameter. Set it to 0 to have a not edited field.
|
||||||
|
* @param string $typeofdata Type of data ('string' by default, 'email', 'amount:99', 'numeric:99', 'text' or 'textarea:rows:cols', 'datepicker' ('day' do not work, don't know why), 'ckeditor:dolibarr_zzz:width:height:savemethod:1:rows:cols', 'select;xxx[:class]'...)
|
||||||
|
* @return string HTML code for the edit of alternative language
|
||||||
|
*/
|
||||||
|
public function widgetForTranslation($fieldname, $object, $perm, $typeofdata = 'string')
|
||||||
|
{
|
||||||
|
global $conf, $langs;
|
||||||
|
|
||||||
|
$result = '';
|
||||||
|
|
||||||
|
if (! empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE)) {
|
||||||
|
$result ='<div class="inline-block paddingleft field-'.$object->element.'-'.$fieldname.'">';
|
||||||
|
|
||||||
|
$s=picto_from_langcode($conf->global->PDF_USE_ALSO_LANGUAGE_CODE);
|
||||||
|
$result .= $s;
|
||||||
|
|
||||||
|
$result .= '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Output edit in place form
|
* Output edit in place form
|
||||||
*
|
*
|
||||||
@ -1618,7 +1645,7 @@ class Form
|
|||||||
public function select_dolusers($selected = '', $htmlname = 'userid', $show_empty = 0, $exclude = null, $disabled = 0, $include = '', $enableonly = '', $force_entity = '0', $maxlength = 0, $showstatus = 0, $morefilter = '', $show_every = 0, $enableonlytext = '', $morecss = '', $noactive = 0, $outputmode = 0, $multiple = false)
|
public function select_dolusers($selected = '', $htmlname = 'userid', $show_empty = 0, $exclude = null, $disabled = 0, $include = '', $enableonly = '', $force_entity = '0', $maxlength = 0, $showstatus = 0, $morefilter = '', $show_every = 0, $enableonlytext = '', $morecss = '', $noactive = 0, $outputmode = 0, $multiple = false)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $conf, $user, $langs;
|
global $conf, $user, $langs, $hookmanager;
|
||||||
|
|
||||||
// If no preselected user defined, we take current user
|
// If no preselected user defined, we take current user
|
||||||
if ((is_numeric($selected) && ($selected < -2 || empty($selected))) && empty($conf->global->SOCIETE_DISABLE_DEFAULT_SALESREPRESENTATIVE)) $selected = $user->id;
|
if ((is_numeric($selected) && ($selected < -2 || empty($selected))) && empty($conf->global->SOCIETE_DISABLE_DEFAULT_SALESREPRESENTATIVE)) $selected = $user->id;
|
||||||
@ -1679,6 +1706,10 @@ class Form
|
|||||||
if (!empty($conf->global->USER_HIDE_INACTIVE_IN_COMBOBOX) || $noactive) $sql .= " AND u.statut <> 0";
|
if (!empty($conf->global->USER_HIDE_INACTIVE_IN_COMBOBOX) || $noactive) $sql .= " AND u.statut <> 0";
|
||||||
if (!empty($morefilter)) $sql .= " ".$morefilter;
|
if (!empty($morefilter)) $sql .= " ".$morefilter;
|
||||||
|
|
||||||
|
//Add hook to filter on user (for exemple on usergroup define in custom modules)
|
||||||
|
$reshook = $hookmanager->executeHooks('addSQLWhereFilterOnSelectUsers', array(), $this, $action);
|
||||||
|
if (!empty($reshook)) $sql .= $hookmanager->resPrint;
|
||||||
|
|
||||||
if (empty($conf->global->MAIN_FIRSTNAME_NAME_POSITION)) // MAIN_FIRSTNAME_NAME_POSITION is 0 means firstname+lastname
|
if (empty($conf->global->MAIN_FIRSTNAME_NAME_POSITION)) // MAIN_FIRSTNAME_NAME_POSITION is 0 means firstname+lastname
|
||||||
{
|
{
|
||||||
$sql .= " ORDER BY u.firstname ASC";
|
$sql .= " ORDER BY u.firstname ASC";
|
||||||
@ -3510,11 +3541,11 @@ class Form
|
|||||||
* Return list of payment methods
|
* Return list of payment methods
|
||||||
* Constant MAIN_DEFAULT_PAYMENT_TYPE_ID can used to set default value but scope is all application, probably not what you want.
|
* Constant MAIN_DEFAULT_PAYMENT_TYPE_ID can used to set default value but scope is all application, probably not what you want.
|
||||||
*
|
*
|
||||||
* @param string $selected Id du mode de paiement pre-selectionne
|
* @param string $selected Id or code or preselected payment mode
|
||||||
* @param string $htmlname Nom de la zone select
|
* @param string $htmlname Name of select field
|
||||||
* @param string $filtertype To filter on field type in llx_c_paiement ('CRDT' or 'DBIT' or array('code'=>xx,'label'=>zz))
|
* @param string $filtertype To filter on field type in llx_c_paiement ('CRDT' or 'DBIT' or array('code'=>xx,'label'=>zz))
|
||||||
* @param int $format 0=id+libelle, 1=code+code, 2=code+libelle, 3=id+code
|
* @param int $format 0=id+label, 1=code+code, 2=code+label, 3=id+code
|
||||||
* @param int $empty 1=peut etre vide, 0 sinon
|
* @param int $empty 1=can be empty, 0 otherwise
|
||||||
* @param int $noadmininfo 0=Add admin info, 1=Disable admin info
|
* @param int $noadmininfo 0=Add admin info, 1=Disable admin info
|
||||||
* @param int $maxlength Max length of label
|
* @param int $maxlength Max length of label
|
||||||
* @param int $active Active or not, -1 = all
|
* @param int $active Active or not, -1 = all
|
||||||
@ -3555,9 +3586,12 @@ class Form
|
|||||||
elseif ($format == 1) print '<option value="'.$arraytypes['code'].'"';
|
elseif ($format == 1) print '<option value="'.$arraytypes['code'].'"';
|
||||||
elseif ($format == 2) print '<option value="'.$arraytypes['code'].'"';
|
elseif ($format == 2) print '<option value="'.$arraytypes['code'].'"';
|
||||||
elseif ($format == 3) print '<option value="'.$id.'"';
|
elseif ($format == 3) print '<option value="'.$id.'"';
|
||||||
// Si selected est text, on compare avec code, sinon avec id
|
// Print attribute selected or not
|
||||||
if (preg_match('/[a-z]/i', $selected) && $selected == $arraytypes['code']) print ' selected';
|
if ($format==1 || $format==2) {
|
||||||
elseif ($selected == $id) print ' selected';
|
if ($selected == $arraytypes['code']) print ' selected';
|
||||||
|
} else {
|
||||||
|
if ($selected == $id) print ' selected';
|
||||||
|
}
|
||||||
print '>';
|
print '>';
|
||||||
if ($format == 0) $value = ($maxlength ?dol_trunc($arraytypes['label'], $maxlength) : $arraytypes['label']);
|
if ($format == 0) $value = ($maxlength ?dol_trunc($arraytypes['label'], $maxlength) : $arraytypes['label']);
|
||||||
elseif ($format == 1) $value = $arraytypes['code'];
|
elseif ($format == 1) $value = $arraytypes['code'];
|
||||||
|
|||||||
@ -729,6 +729,7 @@ class FormCompany extends Form
|
|||||||
if (is_object($object) && method_exists($object, 'liste_type_contact'))
|
if (is_object($object) && method_exists($object, 'liste_type_contact'))
|
||||||
{
|
{
|
||||||
$lesTypes = $object->liste_type_contact($source, $sortorder, 0, 1);
|
$lesTypes = $object->liste_type_contact($source, $sortorder, 0, 1);
|
||||||
|
|
||||||
print '<select class="flat valignmiddle'.($morecss ? ' '.$morecss : '').'" name="'.$htmlname.'" id="'.$htmlname.'">';
|
print '<select class="flat valignmiddle'.($morecss ? ' '.$morecss : '').'" name="'.$htmlname.'" id="'.$htmlname.'">';
|
||||||
if ($showempty) print '<option value="0"></option>';
|
if ($showempty) print '<option value="0"></option>';
|
||||||
foreach ($lesTypes as $key=>$value)
|
foreach ($lesTypes as $key=>$value)
|
||||||
|
|||||||
@ -125,7 +125,7 @@ class FormFile
|
|||||||
$out .= '<input type="hidden" name="sortorder" value="'.GETPOST('sortorder', 'aZ09').'">';
|
$out .= '<input type="hidden" name="sortorder" value="'.GETPOST('sortorder', 'aZ09').'">';
|
||||||
}
|
}
|
||||||
|
|
||||||
$out .= '<table width="100%" class="nobordernopadding">';
|
$out .= '<table class="nobordernopadding cenpercent">';
|
||||||
$out .= '<tr>';
|
$out .= '<tr>';
|
||||||
|
|
||||||
if (!empty($options)) $out .= '<td>'.$options.'</td>';
|
if (!empty($options)) $out .= '<td>'.$options.'</td>';
|
||||||
@ -168,7 +168,7 @@ class FormFile
|
|||||||
$out .= '<input type="hidden" name="max_file_size" value="'.($maxmin * 1024).'">';
|
$out .= '<input type="hidden" name="max_file_size" value="'.($maxmin * 1024).'">';
|
||||||
}
|
}
|
||||||
|
|
||||||
$out .= '<input class="flat minwidth400" type="file"';
|
$out .= '<input class="flat minwidth400 maxwidth200onsmartphone" type="file"';
|
||||||
$out .= ((!empty($conf->global->MAIN_DISABLE_MULTIPLE_FILEUPLOAD) || $conf->browser->layout != 'classic') ? ' name="userfile"' : ' name="userfile[]" multiple');
|
$out .= ((!empty($conf->global->MAIN_DISABLE_MULTIPLE_FILEUPLOAD) || $conf->browser->layout != 'classic') ? ' name="userfile"' : ' name="userfile[]" multiple');
|
||||||
$out .= (empty($conf->global->MAIN_UPLOAD_DOC) || empty($perm) ? ' disabled' : '');
|
$out .= (empty($conf->global->MAIN_UPLOAD_DOC) || empty($perm) ? ' disabled' : '');
|
||||||
$out .= (!empty($accept) ? ' accept="'.$accept.'"' : ' accept=""');
|
$out .= (!empty($accept) ? ' accept="'.$accept.'"' : ' accept=""');
|
||||||
|
|||||||
@ -424,7 +424,7 @@ class FormOther
|
|||||||
public function select_salesrepresentatives($selected, $htmlname, $user, $showstatus = 0, $showempty = 1, $morecss = '', $norepresentative = 0)
|
public function select_salesrepresentatives($selected, $htmlname, $user, $showstatus = 0, $showempty = 1, $morecss = '', $norepresentative = 0)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $conf, $langs;
|
global $conf, $langs, $hookmanager;
|
||||||
|
|
||||||
$langs->load('users');
|
$langs->load('users');
|
||||||
|
|
||||||
@ -440,6 +440,9 @@ class FormOther
|
|||||||
$out .= $comboenhancement;
|
$out .= $comboenhancement;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$reshook = $hookmanager->executeHooks('addSQLWhereFilterOnSelectSalesRep', array(), $this, $action);
|
||||||
|
|
||||||
// Select each sales and print them in a select input
|
// Select each sales and print them in a select input
|
||||||
$out .= '<select class="flat'.($morecss ? ' '.$morecss : '').'" id="'.$htmlname.'" name="'.$htmlname.'">';
|
$out .= '<select class="flat'.($morecss ? ' '.$morecss : '').'" id="'.$htmlname.'" name="'.$htmlname.'">';
|
||||||
if ($showempty) $out .= '<option value="0"> </option>';
|
if ($showempty) $out .= '<option value="0"> </option>';
|
||||||
@ -464,6 +467,10 @@ class FormOther
|
|||||||
|
|
||||||
if (empty($user->rights->user->user->lire)) $sql_usr .= " AND u.rowid = ".$user->id;
|
if (empty($user->rights->user->user->lire)) $sql_usr .= " AND u.rowid = ".$user->id;
|
||||||
if (!empty($user->socid)) $sql_usr .= " AND u.fk_soc = ".$user->socid;
|
if (!empty($user->socid)) $sql_usr .= " AND u.fk_soc = ".$user->socid;
|
||||||
|
|
||||||
|
//Add hook to filter on user (for exemple on usergroup define in custom modules)
|
||||||
|
if (!empty($reshook)) $sql_usr .= $hookmanager->resArray[0];
|
||||||
|
|
||||||
// Add existing sales representatives of thirdparty of external user
|
// Add existing sales representatives of thirdparty of external user
|
||||||
if (empty($user->rights->user->user->lire) && $user->socid)
|
if (empty($user->rights->user->user->lire) && $user->socid)
|
||||||
{
|
{
|
||||||
@ -485,6 +492,9 @@ class FormOther
|
|||||||
}
|
}
|
||||||
|
|
||||||
$sql_usr .= " AND u2.rowid = sc.fk_user AND sc.fk_soc=".$user->socid;
|
$sql_usr .= " AND u2.rowid = sc.fk_user AND sc.fk_soc=".$user->socid;
|
||||||
|
|
||||||
|
//Add hook to filter on user (for exemple on usergroup define in custom modules)
|
||||||
|
if (!empty($reshook)) $sql_usr .= $hookmanager->resArray[1];
|
||||||
}
|
}
|
||||||
$sql_usr .= " ORDER BY statut DESC, lastname ASC"; // Do not use 'ORDER BY u.statut' here, not compatible with the UNION.
|
$sql_usr .= " ORDER BY statut DESC, lastname ASC"; // Do not use 'ORDER BY u.statut' here, not compatible with the UNION.
|
||||||
//print $sql_usr;exit;
|
//print $sql_usr;exit;
|
||||||
|
|||||||
@ -293,7 +293,7 @@ function limitChars(textarea, limit, infodiv)
|
|||||||
//var_dump($_REQUEST);exit;
|
//var_dump($_REQUEST);exit;
|
||||||
print $form->selectarray("receiver", $liste, GETPOST("receiver"), 1);
|
print $form->selectarray("receiver", $liste, GETPOST("receiver"), 1);
|
||||||
}
|
}
|
||||||
print ' '.$langs->trans("SmsInfoNumero");
|
print ' <span class="opacitymedium">'.$langs->trans("SmsInfoNumero").'</span>';
|
||||||
}
|
}
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2016 Sergio Sanchis <sergiosanchis@hotmail.com>
|
/* Copyright (C) 2016 Sergio Sanchis <sergiosanchis@hotmail.com>
|
||||||
* Copyright (C) 2017 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2017 Juanjo Menent <jmenent@2byte.es>
|
||||||
|
* Copyright (C) 2020 Destailleur Laurent <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -35,26 +36,9 @@ if (! ($_SERVER['HTTP_REFERER'] === $dolibarr_main_url_root . '/' || $_SERVER['H
|
|||||||
|
|
||||||
top_httphead('text/javascript; charset=UTF-8');
|
top_httphead('text/javascript; charset=UTF-8');
|
||||||
|
|
||||||
$nowtime = time();
|
|
||||||
//$nowtimeprevious = floor($nowtime / 60) * 60; // auto_check_events_not_before is rounded to previous minute
|
|
||||||
|
|
||||||
// TODO Try to make a solution with only a javascript timer that is easier. Difficulty is to avoid notification twice when.
|
|
||||||
/* session already started into main
|
|
||||||
session_cache_limiter('public');
|
|
||||||
header('Cache-Control: no-cache');
|
|
||||||
session_set_cookie_params(0, '/', null, false, true); // Add tag httponly on session cookie
|
|
||||||
session_start();*/
|
|
||||||
if (! isset($_SESSION['auto_check_events_not_before']))
|
|
||||||
{
|
|
||||||
print 'console.log("_SESSION[auto_check_events_not_before] is not set");'."\n";
|
|
||||||
// Round to eliminate the seconds
|
|
||||||
$_SESSION['auto_check_events_not_before'] = $nowtime;
|
|
||||||
}
|
|
||||||
print 'var nowtime = ' . $nowtime . ';' . "\n";
|
|
||||||
print 'var login = \'' . $_SESSION['dol_login'] . '\';' . "\n";
|
print 'var login = \'' . $_SESSION['dol_login'] . '\';' . "\n";
|
||||||
print 'var auto_check_events_not_before = '.$_SESSION['auto_check_events_not_before']. ';'."\n";
|
|
||||||
print 'var time_js_next_test = Math.max(nowtime, auto_check_events_not_before);'."\n";
|
|
||||||
print 'var time_auto_update = '.$conf->global->MAIN_BROWSER_NOTIFICATION_FREQUENCY.';'."\n"; // Always defined
|
print 'var time_auto_update = '.$conf->global->MAIN_BROWSER_NOTIFICATION_FREQUENCY.';'."\n"; // Always defined
|
||||||
|
print 'var time_js_next_test = (Date.now() + time_auto_update);'."\n";
|
||||||
?>
|
?>
|
||||||
|
|
||||||
/* Check if permission ok */
|
/* Check if permission ok */
|
||||||
@ -66,7 +50,7 @@ if (! ($_SERVER['HTTP_REFERER'] === $dolibarr_main_url_root . '/' || $_SERVER['H
|
|||||||
// We set a delay before launching first test so next check will arrive after the time_auto_update compared to previous one.
|
// We set a delay before launching first test so next check will arrive after the time_auto_update compared to previous one.
|
||||||
var time_first_execution = (time_auto_update - (nowtime - time_js_next_test)) * 1000; //need milliseconds
|
var time_first_execution = (time_auto_update - (nowtime - time_js_next_test)) * 1000; //need milliseconds
|
||||||
if (login != '') {
|
if (login != '') {
|
||||||
console.log("Launch browser notif check: setTimeout is set to launch 'first_execution' function after a wait of time_first_execution="+time_first_execution+". nowtime (time php page generation) = "+nowtime+" auto_check_events_not_before (val in session)= "+auto_check_events_not_before+" time_js_next_test (max now,auto_check_events_not_before) = "+time_js_next_test+" time_auto_update="+time_auto_update);
|
console.log("Launch browser notif check: setTimeout is set to launch 'first_execution' function after a wait of time_first_execution="+time_first_execution+". nowtime (time php page generation) = "+nowtime+" time_js_next_test = "+time_js_next_test+" time_auto_update="+time_auto_update);
|
||||||
setTimeout(first_execution, time_first_execution);
|
setTimeout(first_execution, time_first_execution);
|
||||||
} //first run auto check
|
} //first run auto check
|
||||||
|
|
||||||
|
|||||||
@ -120,6 +120,10 @@ function updateTotal(days,mode)
|
|||||||
total.setHours(0);
|
total.setHours(0);
|
||||||
total.setMinutes(0);
|
total.setMinutes(0);
|
||||||
var nbline = document.getElementById('numberOfLines').value;
|
var nbline = document.getElementById('numberOfLines').value;
|
||||||
|
var startline = 0;
|
||||||
|
if (document.getElementById('numberOfFirstLine')) {
|
||||||
|
startline = parseInt(document.getElementById('numberOfFirstLine').value);
|
||||||
|
}
|
||||||
for (var i=-1; i < nbline; i++)
|
for (var i=-1; i < nbline; i++)
|
||||||
{
|
{
|
||||||
var id='timespent['+i+']['+days+']';
|
var id='timespent['+i+']['+days+']';
|
||||||
@ -214,16 +218,26 @@ function updateTotal(days,mode)
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (total.getHours() || total.getMinutes()) jQuery('.totalDay'+days).addClass("bold");
|
var stringdays = days;
|
||||||
else jQuery('.totalDay'+days).removeClass("bold");
|
if (startline >= 1 && startline <= 9 && stringdays < 10) {
|
||||||
jQuery('.totalDay'+days).text(pad(total.getHours())+':'+pad(total.getMinutes()));
|
stringdays = '0'+stringdays;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (total.getHours() || total.getMinutes()) jQuery('.totalDay'+stringdays).addClass("bold");
|
||||||
|
else jQuery('.totalDay'+stringdays).removeClass("bold");
|
||||||
|
jQuery('.totalDay'+stringdays).text(pad(total.getHours())+':'+pad(total.getMinutes()));
|
||||||
|
|
||||||
var totalhour = 0;
|
var totalhour = 0;
|
||||||
var totalmin = 0;
|
var totalmin = 0;
|
||||||
for (var i=0; i<7; i++)
|
for (var i=0; i<7; i++)
|
||||||
{
|
{
|
||||||
|
stringdays = (i + startline);
|
||||||
|
if (startline >= 1 && startline <= 9 && stringdays < 10) {
|
||||||
|
stringdays = '0'+stringdays;
|
||||||
|
}
|
||||||
|
|
||||||
var taskTime= new Date(0);
|
var taskTime= new Date(0);
|
||||||
result=parseTime(jQuery('.totalDay'+i).text(),taskTime);
|
result=parseTime(jQuery('.totalDay'+stringdays).text(),taskTime);
|
||||||
if (result >= 0)
|
if (result >= 0)
|
||||||
{
|
{
|
||||||
totalhour = totalhour + taskTime.getHours();
|
totalhour = totalhour + taskTime.getHours();
|
||||||
@ -273,8 +287,14 @@ function updateTotal(days,mode)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (total) jQuery('.totalDay'+days).addClass("bold");
|
var stringdays = days;
|
||||||
else jQuery('.totalDay'+days).removeClass("bold");
|
if (startline >= 1 && startline <= 9 && stringdays < 10) {
|
||||||
jQuery('.totalDay'+days).text(total);
|
stringdays = '0'+stringdays;
|
||||||
|
console.log(stringdays);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (total) jQuery('.totalDay'+stringdays).addClass("bold");
|
||||||
|
else jQuery('.totalDay'+stringdays).removeClass("bold");
|
||||||
|
jQuery('.totalDay'+stringdays).text(total);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -59,7 +59,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
|
|||||||
|
|
||||||
// Filters
|
// Filters
|
||||||
//print '<form name="listactionsfilter" class="listactionsfilter" action="' . $_SERVER["PHP_SELF"] . '" method="get">';
|
//print '<form name="listactionsfilter" class="listactionsfilter" action="' . $_SERVER["PHP_SELF"] . '" method="get">';
|
||||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
print '<input type="hidden" name="token" value="' . newToken() . '">';
|
||||||
print '<input type="hidden" name="year" value="' . $year . '">';
|
print '<input type="hidden" name="year" value="' . $year . '">';
|
||||||
print '<input type="hidden" name="month" value="' . $month . '">';
|
print '<input type="hidden" name="month" value="' . $month . '">';
|
||||||
print '<input type="hidden" name="day" value="' . $day . '">';
|
print '<input type="hidden" name="day" value="' . $day . '">';
|
||||||
|
|||||||
@ -104,7 +104,9 @@ function societe_prepare_head(Societe $object)
|
|||||||
$h++;
|
$h++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!empty($conf->fournisseur->enabled) && $object->fournisseur && !empty($user->rights->fournisseur->lire))
|
$supplier_module_enabled = 0;
|
||||||
|
if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_proposal->enabled) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) $supplier_module_enabled=1;
|
||||||
|
if ($supplier_module_enabled == 1 && $object->fournisseur && !empty($user->rights->fournisseur->lire))
|
||||||
{
|
{
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/fourn/card.php?socid='.$object->id;
|
$head[$h][0] = DOL_URL_ROOT.'/fourn/card.php?socid='.$object->id;
|
||||||
$head[$h][1] = $langs->trans("Supplier");
|
$head[$h][1] = $langs->trans("Supplier");
|
||||||
@ -1317,6 +1319,8 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
|
|||||||
}
|
}
|
||||||
$sortfield_new = implode(',', $sortfield_new_list);
|
$sortfield_new = implode(',', $sortfield_new_list);
|
||||||
|
|
||||||
|
$sql = '';
|
||||||
|
|
||||||
if (!empty($conf->agenda->enabled))
|
if (!empty($conf->agenda->enabled))
|
||||||
{
|
{
|
||||||
// Recherche histo sur actioncomm
|
// Recherche histo sur actioncomm
|
||||||
@ -1468,6 +1472,8 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
|
|||||||
}
|
}
|
||||||
|
|
||||||
//TODO Add limit in nb of results
|
//TODO Add limit in nb of results
|
||||||
|
if ($sql)
|
||||||
|
{
|
||||||
$sql .= $db->order($sortfield_new, $sortorder);
|
$sql .= $db->order($sortfield_new, $sortorder);
|
||||||
dol_syslog("company.lib::show_actions_done", LOG_DEBUG);
|
dol_syslog("company.lib::show_actions_done", LOG_DEBUG);
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
@ -1548,6 +1554,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
|
|||||||
{
|
{
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!empty($conf->agenda->enabled) || (!empty($conf->mailing->enabled) && !empty($objcon->email)))
|
if (!empty($conf->agenda->enabled) || (!empty($conf->mailing->enabled) && !empty($objcon->email)))
|
||||||
{
|
{
|
||||||
@ -1731,7 +1738,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
|
|||||||
//$out.='<td>'.dol_trunc($histo[$key]['note'], 40).'</td>';
|
//$out.='<td>'.dol_trunc($histo[$key]['note'], 40).'</td>';
|
||||||
|
|
||||||
// Linked object
|
// Linked object
|
||||||
$out .= '<td>';
|
$out .= '<td class="nowraponall">';
|
||||||
if (isset($histo[$key]['elementtype']) && !empty($histo[$key]['fk_element']))
|
if (isset($histo[$key]['elementtype']) && !empty($histo[$key]['fk_element']))
|
||||||
{
|
{
|
||||||
$out .= dolGetElementUrl($histo[$key]['fk_element'], $histo[$key]['elementtype'], 1);
|
$out .= dolGetElementUrl($histo[$key]['fk_element'], $histo[$key]['elementtype'], 1);
|
||||||
@ -1781,9 +1788,9 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
|
|||||||
}
|
}
|
||||||
$out .= "</table>\n";
|
$out .= "</table>\n";
|
||||||
$out .= "</div>\n";
|
$out .= "</div>\n";
|
||||||
}
|
|
||||||
|
|
||||||
$out .= '</form>';
|
$out .= '</form>';
|
||||||
|
}
|
||||||
|
|
||||||
if ($noprint) return $out;
|
if ($noprint) return $out;
|
||||||
else print $out;
|
else print $out;
|
||||||
|
|||||||
@ -66,9 +66,9 @@ function getDoliDBInstance($type, $host, $user, $pass, $name, $port)
|
|||||||
* @param string $element Current element
|
* @param string $element Current element
|
||||||
* 'societe', 'socpeople', 'actioncomm', 'agenda', 'resource',
|
* 'societe', 'socpeople', 'actioncomm', 'agenda', 'resource',
|
||||||
* 'product', 'productprice', 'stock', 'bom', 'mo',
|
* 'product', 'productprice', 'stock', 'bom', 'mo',
|
||||||
* 'propal', 'supplier_proposal', 'invoice', 'facture_fourn', 'payment_various',
|
* 'propal', 'supplier_proposal', 'invoice', 'supplier_invoice', 'payment_various',
|
||||||
* 'categorie', 'bank_account', 'bank_account', 'adherent', 'user',
|
* 'categorie', 'bank_account', 'bank_account', 'adherent', 'user',
|
||||||
* 'commande', 'commande_fournisseur', 'expedition', 'intervention', 'survey',
|
* 'commande', 'supplier_order', 'expedition', 'intervention', 'survey',
|
||||||
* 'contract', 'tax', 'expensereport', 'holiday', 'multicurrency', 'project',
|
* 'contract', 'tax', 'expensereport', 'holiday', 'multicurrency', 'project',
|
||||||
* 'email_template', 'event', 'donation'
|
* 'email_template', 'event', 'donation'
|
||||||
* 'c_paiement', 'c_payment_term', ...
|
* 'c_paiement', 'c_payment_term', ...
|
||||||
@ -509,6 +509,7 @@ function GETPOST($paramname, $check = 'alphanohtml', $method = 0, $filter = null
|
|||||||
// We do this only if var is a GET. If it is a POST, may be we want to post the text with vars as the setup text.
|
// We do this only if var is a GET. If it is a POST, may be we want to post the text with vars as the setup text.
|
||||||
if (!is_array($out) && empty($_POST[$paramname]) && empty($noreplace))
|
if (!is_array($out) && empty($_POST[$paramname]) && empty($noreplace))
|
||||||
{
|
{
|
||||||
|
$reg = array();
|
||||||
$maxloop = 20; $loopnb = 0; // Protection against infinite loop
|
$maxloop = 20; $loopnb = 0; // Protection against infinite loop
|
||||||
while (preg_match('/__([A-Z0-9]+_?[A-Z0-9]+)__/i', $out, $reg) && ($loopnb < $maxloop)) // Detect '__ABCDEF__' as key 'ABCDEF' and '__ABC_DEF__' as key 'ABC_DEF'. Detection is also correct when 2 vars are side by side.
|
while (preg_match('/__([A-Z0-9]+_?[A-Z0-9]+)__/i', $out, $reg) && ($loopnb < $maxloop)) // Detect '__ABCDEF__' as key 'ABCDEF' and '__ABC_DEF__' as key 'ABC_DEF'. Detection is also correct when 2 vars are side by side.
|
||||||
{
|
{
|
||||||
@ -983,6 +984,16 @@ function dol_escape_js($stringtoescape, $mode = 0, $noescapebackslashn = 0)
|
|||||||
return strtr($stringtoescape, $substitjs);
|
return strtr($stringtoescape, $substitjs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns text escaped for inclusion into javascript code
|
||||||
|
*
|
||||||
|
* @param string $stringtoescape String to escape
|
||||||
|
* @return string Escaped string for json content.
|
||||||
|
*/
|
||||||
|
function dol_escape_json($stringtoescape)
|
||||||
|
{
|
||||||
|
return str_replace('"', '\"', $stringtoescape);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns text escaped for inclusion in HTML alt or title tags, or into values of HTML input fields.
|
* Returns text escaped for inclusion in HTML alt or title tags, or into values of HTML input fields.
|
||||||
@ -3294,6 +3305,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If we ask an image into $url/$mymodule/img (instead of default path)
|
// If we ask an image into $url/$mymodule/img (instead of default path)
|
||||||
|
$regs = array();
|
||||||
if (preg_match('/^([^@]+)@([^@]+)$/i', $picto, $regs)) {
|
if (preg_match('/^([^@]+)@([^@]+)$/i', $picto, $regs)) {
|
||||||
$picto = $regs[1];
|
$picto = $regs[1];
|
||||||
$path = $regs[2]; // $path is $mymodule
|
$path = $regs[2]; // $path is $mymodule
|
||||||
@ -3752,10 +3764,13 @@ function img_allow($allow, $titlealt = 'default')
|
|||||||
* Return image of a credit card according to its brand name
|
* Return image of a credit card according to its brand name
|
||||||
*
|
*
|
||||||
* @param string $brand Brand name of credit card
|
* @param string $brand Brand name of credit card
|
||||||
|
* @param string $morecss More CSS
|
||||||
* @return string Return img tag
|
* @return string Return img tag
|
||||||
*/
|
*/
|
||||||
function img_credit_card($brand)
|
function img_credit_card($brand, $morecss = null)
|
||||||
{
|
{
|
||||||
|
if (is_null($morecss)) $morecss = 'fa-2x';
|
||||||
|
|
||||||
if ($brand == 'visa' || $brand == 'Visa') {$brand = 'cc-visa'; }
|
if ($brand == 'visa' || $brand == 'Visa') {$brand = 'cc-visa'; }
|
||||||
elseif ($brand == 'mastercard' || $brand == 'MasterCard') {$brand = 'cc-mastercard'; }
|
elseif ($brand == 'mastercard' || $brand == 'MasterCard') {$brand = 'cc-mastercard'; }
|
||||||
elseif ($brand == 'amex' || $brand == 'American Express') {$brand = 'cc-amex'; }
|
elseif ($brand == 'amex' || $brand == 'American Express') {$brand = 'cc-amex'; }
|
||||||
@ -3764,7 +3779,7 @@ function img_credit_card($brand)
|
|||||||
elseif ($brand == 'diners' || $brand == 'Diners club') {$brand = 'cc-diners-club'; }
|
elseif ($brand == 'diners' || $brand == 'Diners club') {$brand = 'cc-diners-club'; }
|
||||||
elseif (!in_array($brand, array('cc-visa', 'cc-mastercard', 'cc-amex', 'cc-discover', 'cc-jcb', 'cc-diners-club'))) {$brand = 'credit-card'; }
|
elseif (!in_array($brand, array('cc-visa', 'cc-mastercard', 'cc-amex', 'cc-discover', 'cc-jcb', 'cc-diners-club'))) {$brand = 'credit-card'; }
|
||||||
|
|
||||||
return '<span class="fa fa-'.$brand.' fa-2x fa-fw"></span>';
|
return '<span class="fa fa-'.$brand.' fa-fw'.($morecss ? ' '.$morecss : '').'"></span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -4361,7 +4376,8 @@ function print_barre_liste($titre, $page, $file, $options = '', $sortfield = '',
|
|||||||
if ($cpt == $page)
|
if ($cpt == $page)
|
||||||
{
|
{
|
||||||
$pagelist .= '<li class="pagination"><input type="text" class="width25 center pageplusone" name="pageplusone" value="'.($page + 1).'"></li>';
|
$pagelist .= '<li class="pagination"><input type="text" class="width25 center pageplusone" name="pageplusone" value="'.($page + 1).'"></li>';
|
||||||
if (($cpt + 1) < $nbpages) $pagelist .= '/';
|
$pagelist .= '/';
|
||||||
|
//if (($cpt + 1) < $nbpages) $pagelist .= '/';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ($cpt == $page)
|
if ($cpt == $page)
|
||||||
@ -4386,9 +4402,9 @@ function print_barre_liste($titre, $page, $file, $options = '', $sortfield = '',
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//var_dump($page.' '.$cpt.' '.$nbpages);
|
//var_dump($page.' '.$cpt.' '.$nbpages);
|
||||||
if (($page + 1) < $nbpages) {
|
//if (($page + 1) < $nbpages) {
|
||||||
$pagelist .= '<li class="pagination"><a href="'.$file.'?page='.($nbpages - 1).$options.'">'.$nbpages.'</a></li>';
|
$pagelist .= '<li class="pagination"><a href="'.$file.'?page='.($nbpages - 1).$options.'">'.$nbpages.'</a></li>';
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -5649,7 +5665,7 @@ function dol_string_onlythesehtmltags($stringtoclean, $cleanalsosomestyles = 1)
|
|||||||
$allowed_tags_string = '<'.$allowed_tags_string.'>';
|
$allowed_tags_string = '<'.$allowed_tags_string.'>';
|
||||||
|
|
||||||
if ($cleanalsosomestyles) {
|
if ($cleanalsosomestyles) {
|
||||||
$stringtoclean = preg_replace('/position\s*:\s*(absolute|fixed)\s*!\s*important/', '', $stringtoclean); // Note: If hacker try to introduce css comment into string to avoid this, string should be encoded by the dol_htmlentitiesbr so be harmless
|
$stringtoclean = preg_replace('/position\s*:\s*(absolute|fixed)\s*!\s*important/', '', $stringtoclean); // Note: If hacker try to introduce css comment into string to bypass this regex, the string must also be encoded by the dol_htmlentitiesbr during output so it become harmless
|
||||||
}
|
}
|
||||||
|
|
||||||
$temp = strip_tags($stringtoclean, $allowed_tags_string);
|
$temp = strip_tags($stringtoclean, $allowed_tags_string);
|
||||||
@ -6462,6 +6478,7 @@ function make_substitutions($text, $substitutionarray, $outputlangs = null)
|
|||||||
// Make substitution for language keys: __(AnyTranslationKey)__ or __(AnyTranslationKey|langfile)__
|
// Make substitution for language keys: __(AnyTranslationKey)__ or __(AnyTranslationKey|langfile)__
|
||||||
if (is_object($outputlangs))
|
if (is_object($outputlangs))
|
||||||
{
|
{
|
||||||
|
$reg = array();
|
||||||
while (preg_match('/__\(([^\)]+)\)__/', $text, $reg))
|
while (preg_match('/__\(([^\)]+)\)__/', $text, $reg))
|
||||||
{
|
{
|
||||||
$msgishtml = 0;
|
$msgishtml = 0;
|
||||||
@ -6477,6 +6494,7 @@ function make_substitutions($text, $substitutionarray, $outputlangs = null)
|
|||||||
|
|
||||||
// Make substitution for constant keys.
|
// Make substitution for constant keys.
|
||||||
// Must be after the substitution of translation, so if the text of translation contains a string __[xxx]__, it is also converted.
|
// Must be after the substitution of translation, so if the text of translation contains a string __[xxx]__, it is also converted.
|
||||||
|
$reg = array();
|
||||||
while (preg_match('/__\[([^\]]+)\]__/', $text, $reg))
|
while (preg_match('/__\[([^\]]+)\]__/', $text, $reg))
|
||||||
{
|
{
|
||||||
$msgishtml = 0;
|
$msgishtml = 0;
|
||||||
@ -8411,16 +8429,16 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st
|
|||||||
|
|
||||||
// For backward compatibility. Image's filename are still in French, so we use this array to convert
|
// For backward compatibility. Image's filename are still in French, so we use this array to convert
|
||||||
$statusImg = array(
|
$statusImg = array(
|
||||||
'status0' => 'statut0'
|
'status0' => 'statut0',
|
||||||
,'status1' => 'statut1'
|
'status1' => 'statut1',
|
||||||
,'status2' => 'statut2'
|
'status2' => 'statut2',
|
||||||
,'status3' => 'statut3'
|
'status3' => 'statut3',
|
||||||
,'status4' => 'statut4'
|
'status4' => 'statut4',
|
||||||
,'status5' => 'statut5'
|
'status5' => 'statut5',
|
||||||
,'status6' => 'statut6'
|
'status6' => 'statut6',
|
||||||
,'status7' => 'statut7'
|
'status7' => 'statut7',
|
||||||
,'status8' => 'statut8'
|
'status8' => 'statut8',
|
||||||
,'status9' => 'statut9'
|
'status9' => 'statut9'
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!empty($statusImg[$statusType])) {
|
if (!empty($statusImg[$statusType])) {
|
||||||
@ -8823,7 +8841,8 @@ function isAFileWithExecutableContent($filename)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return new session token
|
* Return the value of token currently saved into session with name 'newtoken'.
|
||||||
|
* This token must be send by any POST as it will be used by next page for comparison with value in session.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@ -8831,3 +8850,13 @@ function newToken()
|
|||||||
{
|
{
|
||||||
return $_SESSION['newtoken'];
|
return $_SESSION['newtoken'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the value of token currently saved into session with name 'token'.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
function currentToken()
|
||||||
|
{
|
||||||
|
return $_SESSION['token'];
|
||||||
|
}
|
||||||
|
|||||||
@ -358,7 +358,7 @@ function project_admin_prepare_head()
|
|||||||
*/
|
*/
|
||||||
function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$taskrole, $projectsListId = '', $addordertick = 0, $projectidfortotallink = 0, $filterprogresscalc = '', $showbilltime = 0)
|
function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$taskrole, $projectsListId = '', $addordertick = 0, $projectidfortotallink = 0, $filterprogresscalc = '', $showbilltime = 0)
|
||||||
{
|
{
|
||||||
global $user, $bc, $langs, $conf, $db;
|
global $user, $langs, $conf, $db;
|
||||||
global $projectstatic, $taskstatic;
|
global $projectstatic, $taskstatic;
|
||||||
|
|
||||||
$lastprojectid = 0;
|
$lastprojectid = 0;
|
||||||
@ -450,7 +450,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
|
|||||||
$lastprojectid = $lines[$i]->fk_project;
|
$lastprojectid = $lines[$i]->fk_project;
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<tr '.$bc[$var].' id="row-'.$lines[$i]->id.'">'."\n";
|
print '<tr class="oddeven" id="row-'.$lines[$i]->id.'">'."\n";
|
||||||
|
|
||||||
$projectstatic->id = $lines[$i]->fk_project;
|
$projectstatic->id = $lines[$i]->fk_project;
|
||||||
$projectstatic->ref = $lines[$i]->projectref;
|
$projectstatic->ref = $lines[$i]->projectref;
|
||||||
@ -758,7 +758,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
|
|||||||
*/
|
*/
|
||||||
function projectLinesPerAction(&$inc, $parent, $fuser, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask, $preselectedday, &$isavailable, $oldprojectforbreak = 0)
|
function projectLinesPerAction(&$inc, $parent, $fuser, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask, $preselectedday, &$isavailable, $oldprojectforbreak = 0)
|
||||||
{
|
{
|
||||||
global $conf, $db, $user, $bc, $langs;
|
global $conf, $db, $user, $langs;
|
||||||
global $form, $formother, $projectstatic, $taskstatic, $thirdpartystatic;
|
global $form, $formother, $projectstatic, $taskstatic, $thirdpartystatic;
|
||||||
|
|
||||||
$lastprojectid = 0;
|
$lastprojectid = 0;
|
||||||
@ -830,7 +830,7 @@ function projectLinesPerAction(&$inc, $parent, $fuser, $lines, &$level, &$projec
|
|||||||
|
|
||||||
if (empty($oldprojectforbreak) || ($oldprojectforbreak != -1 && $oldprojectforbreak != $projectstatic->id))
|
if (empty($oldprojectforbreak) || ($oldprojectforbreak != -1 && $oldprojectforbreak != $projectstatic->id))
|
||||||
{
|
{
|
||||||
print '<tr class="oddeven trforbreak">'."\n";
|
print '<tr class="oddeven trforbreak nobold">'."\n";
|
||||||
print '<td colspan="11">';
|
print '<td colspan="11">';
|
||||||
print $projectstatic->getNomUrl(1, '', 0, $langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]);
|
print $projectstatic->getNomUrl(1, '', 0, $langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]);
|
||||||
if ($projectstatic->title)
|
if ($projectstatic->title)
|
||||||
@ -986,7 +986,7 @@ function projectLinesPerAction(&$inc, $parent, $fuser, $lines, &$level, &$projec
|
|||||||
*/
|
*/
|
||||||
function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask, $preselectedday, &$isavailable, $oldprojectforbreak = 0, $arrayfields = array(), $extrafields = null)
|
function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask, $preselectedday, &$isavailable, $oldprojectforbreak = 0, $arrayfields = array(), $extrafields = null)
|
||||||
{
|
{
|
||||||
global $conf, $db, $user, $bc, $langs;
|
global $conf, $db, $user, $langs;
|
||||||
global $form, $formother, $projectstatic, $taskstatic, $thirdpartystatic;
|
global $form, $formother, $projectstatic, $taskstatic, $thirdpartystatic;
|
||||||
|
|
||||||
$lastprojectid = 0;
|
$lastprojectid = 0;
|
||||||
@ -1177,15 +1177,12 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr
|
|||||||
// Ref
|
// Ref
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print '<!-- Task id = '.$lines[$i]->id.' -->';
|
print '<!-- Task id = '.$lines[$i]->id.' -->';
|
||||||
for ($k = 0; $k < $level; $k++) print " ";
|
for ($k = 0; $k < $level; $k++) print '<div class="marginleftonly">';
|
||||||
print $taskstatic->getNomUrl(1, 'withproject', 'time');
|
print $taskstatic->getNomUrl(1, 'withproject', 'time');
|
||||||
// Label task
|
// Label task
|
||||||
print '<br>';
|
print '<br>';
|
||||||
for ($k = 0; $k < $level; $k++) print " ";
|
print '<span class="opacitymedium">'.$taskstatic->label.'</a>';
|
||||||
print $taskstatic->label;
|
for ($k = 0; $k < $level; $k++) print "</div>";
|
||||||
//print "<br>";
|
|
||||||
//for ($k = 0 ; $k < $level ; $k++) print " ";
|
|
||||||
//print get_date_range($lines[$i]->date_start,$lines[$i]->date_end,'',$langs,0);
|
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
|
|
||||||
// TASK extrafields
|
// TASK extrafields
|
||||||
@ -1365,7 +1362,7 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr
|
|||||||
*/
|
*/
|
||||||
function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask, &$isavailable, $oldprojectforbreak = 0, $arrayfields = array(), $extrafields = null)
|
function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask, &$isavailable, $oldprojectforbreak = 0, $arrayfields = array(), $extrafields = null)
|
||||||
{
|
{
|
||||||
global $conf, $db, $user, $bc, $langs;
|
global $conf, $db, $user, $langs;
|
||||||
global $form, $formother, $projectstatic, $taskstatic, $thirdpartystatic;
|
global $form, $formother, $projectstatic, $taskstatic, $thirdpartystatic;
|
||||||
|
|
||||||
$numlines = count($lines);
|
$numlines = count($lines);
|
||||||
@ -1452,7 +1449,7 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
|
|||||||
if ($val['checked'] && substr($key, 0, 5) == 'efpt.') $addcolspan++;
|
if ($val['checked'] && substr($key, 0, 5) == 'efpt.') $addcolspan++;
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<tr class="oddeven trforbreak">'."\n";
|
print '<tr class="oddeven trforbreak nobold">'."\n";
|
||||||
print '<td colspan="'.(11 + $addcolspan).'">';
|
print '<td colspan="'.(11 + $addcolspan).'">';
|
||||||
print $projectstatic->getNomUrl(1, '', 0, '<strong>'.$langs->transnoentitiesnoconv("YourRole").':</strong> '.$projectsrole[$lines[$i]->fk_project]);
|
print $projectstatic->getNomUrl(1, '', 0, '<strong>'.$langs->transnoentitiesnoconv("YourRole").':</strong> '.$projectsrole[$lines[$i]->fk_project]);
|
||||||
if ($thirdpartystatic->id > 0) print ' - '.$thirdpartystatic->getNomUrl(1);
|
if ($thirdpartystatic->id > 0) print ' - '.$thirdpartystatic->getNomUrl(1);
|
||||||
@ -1556,16 +1553,12 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
|
|||||||
// Ref
|
// Ref
|
||||||
print '<td class="nowrap">';
|
print '<td class="nowrap">';
|
||||||
print '<!-- Task id = '.$lines[$i]->id.' -->';
|
print '<!-- Task id = '.$lines[$i]->id.' -->';
|
||||||
for ($k = 0; $k < $level; $k++) print " ";
|
for ($k = 0; $k < $level; $k++) print '<div class="marginleftonly">';
|
||||||
print $taskstatic->getNomUrl(1, 'withproject', 'time');
|
print $taskstatic->getNomUrl(1, 'withproject', 'time');
|
||||||
// Label task
|
// Label task
|
||||||
print '<br>';
|
print '<br>';
|
||||||
for ($k = 0; $k < $level; $k++) print " ";
|
print '<span class="opacitymedium">'.$taskstatic->label.'</span>';
|
||||||
//print $taskstatic->getNomUrl(0, 'withproject', 'time');
|
for ($k = 0; $k < $level; $k++) print "</div>";
|
||||||
print $taskstatic->label;
|
|
||||||
//print "<br>";
|
|
||||||
//for ($k = 0 ; $k < $level ; $k++) print " ";
|
|
||||||
//print get_date_range($lines[$i]->date_start,$lines[$i]->date_end,'',$langs,0);
|
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
|
|
||||||
// TASK extrafields
|
// TASK extrafields
|
||||||
@ -1732,7 +1725,7 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
|
|||||||
*/
|
*/
|
||||||
function projectLinesPerMonth(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask, &$isavailable, $oldprojectforbreak = 0, $TWeek = array())
|
function projectLinesPerMonth(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask, &$isavailable, $oldprojectforbreak = 0, $TWeek = array())
|
||||||
{
|
{
|
||||||
global $conf, $db, $user, $bc, $langs;
|
global $conf, $db, $user, $langs;
|
||||||
global $form, $formother, $projectstatic, $taskstatic, $thirdpartystatic;
|
global $form, $formother, $projectstatic, $taskstatic, $thirdpartystatic;
|
||||||
|
|
||||||
$numlines = count($lines);
|
$numlines = count($lines);
|
||||||
@ -1804,7 +1797,7 @@ function projectLinesPerMonth(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &
|
|||||||
|
|
||||||
if (empty($oldprojectforbreak) || ($oldprojectforbreak != -1 && $oldprojectforbreak != $projectstatic->id))
|
if (empty($oldprojectforbreak) || ($oldprojectforbreak != -1 && $oldprojectforbreak != $projectstatic->id))
|
||||||
{
|
{
|
||||||
print '<tr class="oddeven trforbreak">'."\n";
|
print '<tr class="oddeven trforbreak nobold">'."\n";
|
||||||
print '<td colspan="'.(6 + count($TWeek)).'">';
|
print '<td colspan="'.(6 + count($TWeek)).'">';
|
||||||
print $projectstatic->getNomUrl(1, '', 0, '<strong>'.$langs->transnoentitiesnoconv("YourRole").':</strong> '.$projectsrole[$lines[$i]->fk_project]);
|
print $projectstatic->getNomUrl(1, '', 0, '<strong>'.$langs->transnoentitiesnoconv("YourRole").':</strong> '.$projectsrole[$lines[$i]->fk_project]);
|
||||||
if ($thirdpartystatic->id > 0) print ' - '.$thirdpartystatic->getNomUrl(1);
|
if ($thirdpartystatic->id > 0) print ' - '.$thirdpartystatic->getNomUrl(1);
|
||||||
@ -1840,16 +1833,12 @@ function projectLinesPerMonth(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &
|
|||||||
// Ref
|
// Ref
|
||||||
print '<td class="nowrap">';
|
print '<td class="nowrap">';
|
||||||
print '<!-- Task id = '.$lines[$i]->id.' -->';
|
print '<!-- Task id = '.$lines[$i]->id.' -->';
|
||||||
for ($k = 0; $k < $level; $k++) print " ";
|
for ($k = 0; $k < $level; $k++) print '<div class="marginleftonly">';
|
||||||
print $taskstatic->getNomUrl(1, 'withproject', 'time');
|
print $taskstatic->getNomUrl(1, 'withproject', 'time');
|
||||||
// Label task
|
// Label task
|
||||||
print '<br>';
|
print '<br>';
|
||||||
for ($k = 0; $k < $level; $k++) print " ";
|
print '<span class="opacitymedium">'.$taskstatic->label.'</span>';
|
||||||
//print $taskstatic->getNomUrl(0, 'withproject', 'time');
|
for ($k = 0; $k < $level; $k++) print "</div>";
|
||||||
print $taskstatic->label;
|
|
||||||
//print "<br>";
|
|
||||||
//for ($k = 0 ; $k < $level ; $k++) print " ";
|
|
||||||
//print get_date_range($lines[$i]->date_start,$lines[$i]->date_end,'',$langs,0);
|
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
|
|
||||||
// Planned Workload
|
// Planned Workload
|
||||||
@ -1917,16 +1906,16 @@ function projectLinesPerMonth(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &
|
|||||||
$alttitle = $langs->trans("AddHereTimeSpentForWeek", $weekNb);
|
$alttitle = $langs->trans("AddHereTimeSpentForWeek", $weekNb);
|
||||||
|
|
||||||
|
|
||||||
$tableCell = '<td align="center" class="hide">';
|
$tableCell = '<td class="center hide weekend">';
|
||||||
$placeholder = '';
|
$placeholder = '';
|
||||||
if ($alreadyspent)
|
if ($alreadyspent)
|
||||||
{
|
{
|
||||||
$tableCell .= '<span class="timesheetalreadyrecorded" title="texttoreplace"><input type="text" class="center smallpadd" size="2" disabled id="timespent['.$inc.']['.$weekNb.']" name="task['.$lines[$i]->id.']['.$weekNb.']" value="'.$alreadyspent.'"></span>';
|
$tableCell .= '<span class="timesheetalreadyrecorded" title="texttoreplace"><input type="text" class="center smallpadd" size="2" disabled id="timespent['.$inc.']['.((int) $weekNb).']" name="task['.$lines[$i]->id.']['.$weekNb.']" value="'.$alreadyspent.'"></span>';
|
||||||
//$placeholder=' placeholder="00:00"';
|
//$placeholder=' placeholder="00:00"';
|
||||||
//$tableCell.='+';
|
//$tableCell.='+';
|
||||||
}
|
}
|
||||||
|
|
||||||
$tableCell .= '<input type="text" alt="'.($disabledtask ? '' : $alttitle).'" title="'.($disabledtask ? '' : $alttitle).'" '.($disabledtask ? 'disabled' : $placeholder).' class="center smallpadd" size="2" id="timeadded['.$inc.']['.$TFirstDay[$weekNb].']" name="task['.$lines[$i]->id.']['.$TFirstDay[$weekNb].']" value="" cols="2" maxlength="5"';
|
$tableCell .= '<input type="text" alt="'.($disabledtask ? '' : $alttitle).'" title="'.($disabledtask ? '' : $alttitle).'" '.($disabledtask ? 'disabled' : $placeholder).' class="center smallpadd" size="2" id="timeadded['.$inc.']['.((int) $weekNb).']" name="task['.$lines[$i]->id.']['.$TFirstDay[$weekNb].']" value="" cols="2" maxlength="5"';
|
||||||
$tableCell .= ' onkeypress="return regexEvent(this,event,\'timeChar\')"';
|
$tableCell .= ' onkeypress="return regexEvent(this,event,\'timeChar\')"';
|
||||||
$tableCell .= ' onkeyup="updateTotal('.$weekNb.',\''.$modeinput.'\')"';
|
$tableCell .= ' onkeyup="updateTotal('.$weekNb.',\''.$modeinput.'\')"';
|
||||||
$tableCell .= ' onblur="regexEvent(this,event,\''.$modeinput.'\'); updateTotal('.$weekNb.',\''.$modeinput.'\')" />';
|
$tableCell .= ' onblur="regexEvent(this,event,\''.$modeinput.'\'); updateTotal('.$weekNb.',\''.$modeinput.'\')" />';
|
||||||
@ -2029,7 +2018,7 @@ function searchTaskInChild(&$inc, $parent, &$lines, &$taskrole)
|
|||||||
*/
|
*/
|
||||||
function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks = 0, $status = -1, $listofoppstatus = array(), $hiddenfields = array())
|
function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks = 0, $status = -1, $listofoppstatus = array(), $hiddenfields = array())
|
||||||
{
|
{
|
||||||
global $langs, $conf, $user, $bc;
|
global $langs, $conf, $user;
|
||||||
global $theme_datacolor;
|
global $theme_datacolor;
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||||
|
|||||||
@ -268,12 +268,12 @@ function user_admin_prepare_head()
|
|||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/user/admin/user_extrafields.php';
|
$head[$h][0] = DOL_URL_ROOT.'/user/admin/user_extrafields.php';
|
||||||
$head[$h][1] = $langs->trans("ExtraFields");
|
$head[$h][1] = $langs->trans("ExtraFields")." (".$langs->trans("Users").")";
|
||||||
$head[$h][2] = 'attributes';
|
$head[$h][2] = 'attributes';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/user/admin/group_extrafields.php';
|
$head[$h][0] = DOL_URL_ROOT.'/user/admin/group_extrafields.php';
|
||||||
$head[$h][1] = $langs->trans("ExtraFields")." ".$langs->trans("Groups");
|
$head[$h][1] = $langs->trans("ExtraFields")." (".$langs->trans("Groups").")";
|
||||||
$head[$h][2] = 'attributes_group';
|
$head[$h][2] = 'attributes_group';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,6 @@
|
|||||||
* \brief Library for website module
|
* \brief Library for website module
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove PHP code part from a string.
|
* Remove PHP code part from a string.
|
||||||
*
|
*
|
||||||
@ -545,8 +544,8 @@ function getStructuredData($type, $data = array())
|
|||||||
$ret .= '{
|
$ret .= '{
|
||||||
"@context": "https://schema.org",
|
"@context": "https://schema.org",
|
||||||
"@type": "SoftwareApplication",
|
"@type": "SoftwareApplication",
|
||||||
"name": "'.$data['name'].'",
|
"name": "'.dol_escape_json($data['name']).'",
|
||||||
"operatingSystem": "'.$data['os'].'",
|
"operatingSystem": "'.dol_escape_json($data['os']).'",
|
||||||
"applicationCategory": "https://schema.org/GameApplication",
|
"applicationCategory": "https://schema.org/GameApplication",
|
||||||
"aggregateRating": {
|
"aggregateRating": {
|
||||||
"@type": "AggregateRating",
|
"@type": "AggregateRating",
|
||||||
@ -563,14 +562,24 @@ function getStructuredData($type, $data = array())
|
|||||||
}
|
}
|
||||||
elseif ($type == 'blogpost')
|
elseif ($type == 'blogpost')
|
||||||
{
|
{
|
||||||
if ($websitepage->fk_user_creat > 0)
|
if (! empty($websitepage->author_alias))
|
||||||
{
|
{
|
||||||
include_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
//include_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
||||||
$tmpuser = new User($db);
|
//$tmpuser = new User($db);
|
||||||
$restmpuser = $tmpuser->fetch($websitepage->fk_user_creat);
|
//$restmpuser = $tmpuser->fetch($websitepage->fk_user_creat);
|
||||||
|
|
||||||
|
$pageurl = $websitepage->pageurl;
|
||||||
|
$title = $websitepage->title;
|
||||||
|
$image = $websitepage->image;
|
||||||
|
$companyname = $mysoc->name;
|
||||||
|
$description = $websitepage->description;
|
||||||
|
|
||||||
|
$pageurl = str_replace('__WEBSITE_KEY__', $website->ref, $pageurl);
|
||||||
|
$title = str_replace('__WEBSITE_KEY__', $website->ref, $title);
|
||||||
|
$image = str_replace('__WEBSITE_KEY__', $website->ref, $image);
|
||||||
|
$companyname = str_replace('__WEBSITE_KEY__', $website->ref, $companyname);
|
||||||
|
$description = str_replace('__WEBSITE_KEY__', $website->ref, $description);
|
||||||
|
|
||||||
if ($restmpuser > 0)
|
|
||||||
{
|
|
||||||
$ret = '<!-- Add structured data for blog post -->'."\n";
|
$ret = '<!-- Add structured data for blog post -->'."\n";
|
||||||
$ret .= '<script type="application/ld+json">'."\n";
|
$ret .= '<script type="application/ld+json">'."\n";
|
||||||
$ret .= '{
|
$ret .= '{
|
||||||
@ -578,32 +587,31 @@ function getStructuredData($type, $data = array())
|
|||||||
"@type": "NewsArticle",
|
"@type": "NewsArticle",
|
||||||
"mainEntityOfPage": {
|
"mainEntityOfPage": {
|
||||||
"@type": "WebPage",
|
"@type": "WebPage",
|
||||||
"@id": "'.$websitepage->pageurl.'"
|
"@id": "'.dol_escape_json($pageurl).'"
|
||||||
},
|
},
|
||||||
"headline": "'.$websitepage->title.'",
|
"headline": "'.dol_escape_json($title).'",
|
||||||
"image": [
|
"image": [
|
||||||
"'.$websitepage->image.'"
|
"'.dol_escape_json($image).'"
|
||||||
],
|
],
|
||||||
"datePublished": "'.dol_print_date($websitepage->date_creation, 'dayhourrfc').'",
|
"datePublished": "'.dol_print_date($websitepage->date_creation, 'dayhourrfc').'",
|
||||||
"dateModified": "'.dol_print_date($websitepage->date_modification, 'dayhourrfc').'",
|
"dateModified": "'.dol_print_date($websitepage->date_modification, 'dayhourrfc').'",
|
||||||
"author": {
|
"author": {
|
||||||
"@type": "Person",
|
"@type": "Person",
|
||||||
"name": "'.$tmpuser->getFullName($weblangs).'"
|
"name": "'.dol_escape_json($websitepage->author_alias).'"
|
||||||
},
|
},
|
||||||
"publisher": {
|
"publisher": {
|
||||||
"@type": "Organization",
|
"@type": "Organization",
|
||||||
"name": "'.$mysoc->name.'",
|
"name": "'.dol_escape_json($companyname).'",
|
||||||
"logo": {
|
"logo": {
|
||||||
"@type": "ImageObject",
|
"@type": "ImageObject",
|
||||||
"url": "/viewimage.php?modulepart=mycompany&file=logos%2F'.urlencode($mysoc->logo).'"
|
"url": "/viewimage.php?modulepart=mycompany&file=logos%2F'.urlencode($mysoc->logo).'"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"description": "'.$websitepage->description.'"
|
"description": "'.dol_escape_json($description).'"
|
||||||
}'."\n";
|
}'."\n";
|
||||||
$ret .= '</script>'."\n";
|
$ret .= '</script>'."\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
elseif ($type == 'product')
|
elseif ($type == 'product')
|
||||||
{
|
{
|
||||||
$ret = '<!-- Add structured data for blog post -->'."\n";
|
$ret = '<!-- Add structured data for blog post -->'."\n";
|
||||||
@ -611,19 +619,19 @@ function getStructuredData($type, $data = array())
|
|||||||
$ret .= '{
|
$ret .= '{
|
||||||
"@context": "https://schema.org/",
|
"@context": "https://schema.org/",
|
||||||
"@type": "Product",
|
"@type": "Product",
|
||||||
"name": "'.$data['label'].'",
|
"name": "'.dol_escape_json($data['label']).'",
|
||||||
"image": [
|
"image": [
|
||||||
"'.$data['image'].'",
|
"'.dol_escape_json($data['image']).'",
|
||||||
],
|
],
|
||||||
"description": "'.$data['description'].'",
|
"description": "'.dol_escape_json($data['description']).'",
|
||||||
"sku": "'.$data['ref'].'",
|
"sku": "'.dol_escape_json($data['ref']).'",
|
||||||
"brand": {
|
"brand": {
|
||||||
"@type": "Thing",
|
"@type": "Thing",
|
||||||
"name": "'.$data['brand'].'"
|
"name": "'.dol_escape_json($data['brand']).'"
|
||||||
},
|
},
|
||||||
"author": {
|
"author": {
|
||||||
"@type": "Person",
|
"@type": "Person",
|
||||||
"name": "'.$data['author'].'"
|
"name": "'.dol_escape_json($data['author']).'"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"offers": {
|
"offers": {
|
||||||
@ -635,7 +643,7 @@ function getStructuredData($type, $data = array())
|
|||||||
"availability": "https://schema.org/InStock",
|
"availability": "https://schema.org/InStock",
|
||||||
"seller": {
|
"seller": {
|
||||||
"@type": "Organization",
|
"@type": "Organization",
|
||||||
"name": "'.$mysoc->name.'"
|
"name": "'.dol_escape_json($mysoc->name).'"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}'."\n";
|
}'."\n";
|
||||||
@ -644,17 +652,72 @@ function getStructuredData($type, $data = array())
|
|||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return HTML content to add structured data for an article, news or Blog Post.
|
||||||
|
*
|
||||||
|
* @return string HTML content
|
||||||
|
*/
|
||||||
|
function getSocialNetworkSharingLinks()
|
||||||
|
{
|
||||||
|
global $conf, $db, $hookmanager, $langs, $mysoc, $user, $website, $websitepage, $weblangs; // Very important. Required to have var available when running inluded containers.
|
||||||
|
|
||||||
|
$fullurl = $website->alias.'/'.$websitepage->pageurl.'.php';
|
||||||
|
$hashtags = trim(join(' #', array_map('trim', explode(',', $websitepage->keywords))));
|
||||||
|
|
||||||
|
$out = '<!-- section for social network sharing of page -->'."\n";
|
||||||
|
$out.= '<div class="dol-social-share">'."\n";
|
||||||
|
|
||||||
|
// Twitter
|
||||||
|
$out.= '<div class="dol-social-share-tw">'."\n";
|
||||||
|
$out.= '<a href="https://twitter.com/share" class="twitter-share-button" data-url="'.$fullurl.'" data-text="'.dol_escape_htmltag($websitepage->description).'" data-lang="'.$websitepage->lang.'" data-size="small" data-related="" data-hashtags="'.preg_replace('/^#/', '', $hashtags).'" data-count="horizontal">Tweet</a>';
|
||||||
|
$out.= '<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?\'http\':\'https\';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+\'://platform.twitter.com/widgets.js\';fjs.parentNode.insertBefore(js,fjs);}}(document, \'script\', \'twitter-wjs\');</script>';
|
||||||
|
$out.= '</div>'."\n";
|
||||||
|
|
||||||
|
// Reddit
|
||||||
|
$out.= '<div class="dol-social-share-reddit">'."\n";
|
||||||
|
$out.= '<a href="https://www.reddit.com/submit" target="_blank" onclick="window.location = \'https://www.reddit.com/submit?url='.$fullurl.'\'; return false">';
|
||||||
|
$out.= '<img src="https://www.reddit.com/static/spreddit7.gif" alt="Submit to reddit" border="0" /> </a>';
|
||||||
|
$out.= '</div>'."\n";
|
||||||
|
|
||||||
|
// Facebook
|
||||||
|
$out.= '<div class="dol-social-share-fbl">'."\n";
|
||||||
|
$out.= '<div id="fb-root"></div>'."\n";
|
||||||
|
$out.= '<script>(function(d, s, id) {
|
||||||
|
var js, fjs = d.getElementsByTagName(s)[0];
|
||||||
|
if (d.getElementById(id)) return;
|
||||||
|
js = d.createElement(s); js.id = id;
|
||||||
|
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.0&appId=dolibarr.org";
|
||||||
|
fjs.parentNode.insertBefore(js, fjs);
|
||||||
|
}(document, \'script\', \'facebook-jssdk\'));</script>
|
||||||
|
<fb:like
|
||||||
|
href="'.$fullurl.'"
|
||||||
|
layout="button_count"
|
||||||
|
show_faces="false"
|
||||||
|
width="90"
|
||||||
|
colorscheme="light"
|
||||||
|
share="1"
|
||||||
|
action="like" ></fb:like>'."\n";
|
||||||
|
$out.= '</div>'."\n";
|
||||||
|
|
||||||
|
$out.= "\n</div>\n";
|
||||||
|
$out.= '<!-- section end for social network sharing of page -->'."\n";
|
||||||
|
|
||||||
|
return $out;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return list of containers object that match a criteria.
|
* Return list of containers object that match a criteria.
|
||||||
* WARNING: This function can be used by websites.
|
* WARNING: This function can be used by websites.
|
||||||
*
|
*
|
||||||
* @param string $type Type of container to search into (Example: 'page')
|
* @param string $type Type of container to search into (Example: '', 'page', 'blogpost', 'page,blogpost', ...)
|
||||||
* @param string $algo Algorithm used for search (Example: 'meta' is searching into meta information like title and description, 'content', 'sitefiles', or any combination, ...)
|
* @param string $algo Algorithm used for search (Example: 'meta' is searching into meta information like title and description, 'content', 'sitefiles', or any combination 'meta,content,...')
|
||||||
* @param string $searchstring Search string
|
* @param string $searchstring Search string
|
||||||
* @param int $max Max number of answers
|
* @param int $max Max number of answers
|
||||||
|
* @param string $sortfield Sort Fields
|
||||||
|
* @param string $sortorder Sort order ('DESC' or 'ASC')
|
||||||
* @return string HTML content
|
* @return string HTML content
|
||||||
*/
|
*/
|
||||||
function getPagesFromSearchCriterias($type, $algo, $searchstring, $max = 25)
|
function getPagesFromSearchCriterias($type, $algo, $searchstring, $max = 25, $sortfield = 'date_creation', $sortorder = 'DESC')
|
||||||
{
|
{
|
||||||
global $conf, $db, $hookmanager, $langs, $mysoc, $user, $website, $websitepage, $weblangs; // Very important. Required to have var available when running inluded containers.
|
global $conf, $db, $hookmanager, $langs, $mysoc, $user, $website, $websitepage, $weblangs; // Very important. Required to have var available when running inluded containers.
|
||||||
|
|
||||||
@ -676,11 +739,17 @@ function getPagesFromSearchCriterias($type, $algo, $searchstring, $max = 25)
|
|||||||
$arrayresult['code'] = 'KO';
|
$arrayresult['code'] = 'KO';
|
||||||
$arrayresult['message'] = $weblangs->trans("ErrorSearchCriteriaTooSmall");
|
$arrayresult['message'] = $weblangs->trans("ErrorSearchCriteriaTooSmall");
|
||||||
}
|
}
|
||||||
elseif (!in_array($type, array('', 'page')))
|
else
|
||||||
{
|
{
|
||||||
|
$tmparrayoftype = explode(',', $type);
|
||||||
|
foreach($tmparrayoftype as $tmptype) {
|
||||||
|
if (!in_array($tmptype, array('', 'page', 'blogpost'))) {
|
||||||
$error++;
|
$error++;
|
||||||
$arrayresult['code'] = 'KO';
|
$arrayresult['code'] = 'KO';
|
||||||
$arrayresult['message'] = 'Bad value for parameter $type';
|
$arrayresult['message'] = 'Bad value for parameter type';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$searchdone = 0;
|
$searchdone = 0;
|
||||||
@ -690,7 +759,14 @@ function getPagesFromSearchCriterias($type, $algo, $searchstring, $max = 25)
|
|||||||
{
|
{
|
||||||
$sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.'website_page';
|
$sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.'website_page';
|
||||||
$sql .= " WHERE fk_website = ".$website->id;
|
$sql .= " WHERE fk_website = ".$website->id;
|
||||||
if ($type) $sql .= " AND type_container = '".$db->escape($type)."'";
|
if ($type) {
|
||||||
|
$tmparrayoftype = explode(',', $type);
|
||||||
|
$typestring = '';
|
||||||
|
foreach($tmparrayoftype as $tmptype) {
|
||||||
|
$typestring .= ($typestring ? ", ": "")."'".trim($tmptype)."'";
|
||||||
|
}
|
||||||
|
$sql .= " AND type_container IN (".$typestring.")";
|
||||||
|
}
|
||||||
$sql .= " AND (";
|
$sql .= " AND (";
|
||||||
$searchalgo = '';
|
$searchalgo = '';
|
||||||
if (preg_match('/meta/', $algo))
|
if (preg_match('/meta/', $algo))
|
||||||
@ -704,6 +780,7 @@ function getPagesFromSearchCriterias($type, $algo, $searchstring, $max = 25)
|
|||||||
}
|
}
|
||||||
$sql .= $searchalgo;
|
$sql .= $searchalgo;
|
||||||
$sql .= ")";
|
$sql .= ")";
|
||||||
|
$sql .= $db->order($sortfield, $sortorder);
|
||||||
$sql .= $db->plimit($max);
|
$sql .= $db->plimit($max);
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
@ -822,6 +899,7 @@ function getAllImages($object, $objectpage, $urltograb, &$tmp, &$action, $modify
|
|||||||
$urltograb = dirname($urltograb); // So urltograb is now http://www.nltechno.com or http://www.nltechno.com/dir1
|
$urltograb = dirname($urltograb); // So urltograb is now http://www.nltechno.com or http://www.nltechno.com/dir1
|
||||||
|
|
||||||
// Search X in "img...src=X"
|
// Search X in "img...src=X"
|
||||||
|
$regs = array();
|
||||||
preg_match_all('/<img([^\.\/]+)src="([^>"]+)"([^>]*)>/i', $tmp, $regs);
|
preg_match_all('/<img([^\.\/]+)src="([^>"]+)"([^>]*)>/i', $tmp, $regs);
|
||||||
|
|
||||||
foreach ($regs[0] as $key => $val)
|
foreach ($regs[0] as $key => $val)
|
||||||
|
|||||||
@ -49,7 +49,8 @@ function dolSaveMasterFile($filemaster)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Save content of a page on disk
|
* Save content of a page on disk.
|
||||||
|
* It can save file into root directory or into language subdirectory.
|
||||||
*
|
*
|
||||||
* @param string $filealias Full path of filename to generate
|
* @param string $filealias Full path of filename to generate
|
||||||
* @param Website $object Object website
|
* @param Website $object Object website
|
||||||
@ -98,7 +99,8 @@ function dolSavePageAlias($filealias, $object, $objectpage)
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Save content of a page on disk
|
* Save content of a page on disk.
|
||||||
|
* Page contents are always saved into root directory.
|
||||||
*
|
*
|
||||||
* @param string $filetpl Full path of filename to generate
|
* @param string $filetpl Full path of filename to generate
|
||||||
* @param Website $object Object website
|
* @param Website $object Object website
|
||||||
@ -113,6 +115,7 @@ function dolSavePageContent($filetpl, Website $object, WebsitePage $objectpage)
|
|||||||
// Now create the .tpl file (duplicate code with actions updatesource or updatecontent but we need this to save new header)
|
// Now create the .tpl file (duplicate code with actions updatesource or updatecontent but we need this to save new header)
|
||||||
dol_syslog("We regenerate the tpl page filetpl=".$filetpl);
|
dol_syslog("We regenerate the tpl page filetpl=".$filetpl);
|
||||||
|
|
||||||
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
dol_delete_file($filetpl);
|
dol_delete_file($filetpl);
|
||||||
|
|
||||||
$shortlangcode = '';
|
$shortlangcode = '';
|
||||||
@ -245,16 +248,17 @@ function dolSaveIndexPage($pathofwebsite, $fileindex, $filetpl, $filewrapper)
|
|||||||
$indexcontent .= "include_once './".basename($filetpl)."'\n";
|
$indexcontent .= "include_once './".basename($filetpl)."'\n";
|
||||||
$indexcontent .= '// END PHP ?>'."\n";
|
$indexcontent .= '// END PHP ?>'."\n";
|
||||||
$result1 = file_put_contents($fileindex, $indexcontent);
|
$result1 = file_put_contents($fileindex, $indexcontent);
|
||||||
if (!empty($conf->global->MAIN_UMASK))
|
if (!empty($conf->global->MAIN_UMASK)) {
|
||||||
@chmod($fileindex, octdec($conf->global->MAIN_UMASK));
|
@chmod($fileindex, octdec($conf->global->MAIN_UMASK));
|
||||||
|
}
|
||||||
dol_delete_file($filewrapper);
|
dol_delete_file($filewrapper);
|
||||||
|
|
||||||
$wrappercontent = file_get_contents(DOL_DOCUMENT_ROOT.'/website/samples/wrapper.html');
|
$wrappercontent = file_get_contents(DOL_DOCUMENT_ROOT.'/website/samples/wrapper.php');
|
||||||
|
|
||||||
$result2 = file_put_contents($filewrapper, $wrappercontent);
|
$result2 = file_put_contents($filewrapper, $wrappercontent);
|
||||||
if (!empty($conf->global->MAIN_UMASK))
|
if (!empty($conf->global->MAIN_UMASK)) {
|
||||||
@chmod($filewrapper, octdec($conf->global->MAIN_UMASK));
|
@chmod($filewrapper, octdec($conf->global->MAIN_UMASK));
|
||||||
|
}
|
||||||
|
|
||||||
return ($result1 && $result2);
|
return ($result1 && $result2);
|
||||||
}
|
}
|
||||||
@ -417,7 +421,6 @@ function dolSaveReadme($file, $content)
|
|||||||
function showWebsiteTemplates(Website $website)
|
function showWebsiteTemplates(Website $website)
|
||||||
{
|
{
|
||||||
global $conf, $langs, $db, $form;
|
global $conf, $langs, $db, $form;
|
||||||
global $bc;
|
|
||||||
|
|
||||||
$dirthemes = array('/doctemplates/websites');
|
$dirthemes = array('/doctemplates/websites');
|
||||||
if (!empty($conf->modules_parts['websitetemplates'])) // Using this feature slow down application
|
if (!empty($conf->modules_parts['websitetemplates'])) // Using this feature slow down application
|
||||||
|
|||||||
@ -330,12 +330,13 @@ function build_calfile($format, $title, $desc, $events_array, $outputfile)
|
|||||||
* @param string $format "rss"
|
* @param string $format "rss"
|
||||||
* @param string $title Title of export
|
* @param string $title Title of export
|
||||||
* @param string $desc Description of export
|
* @param string $desc Description of export
|
||||||
* @param array $events_array Array of events ("uid","startdate","summary","url","desc","author","category")
|
* @param array $events_array Array of events ("uid","startdate","summary","url","desc","author","category") or Array of WebsitePage
|
||||||
* @param string $outputfile Output file
|
* @param string $outputfile Output file
|
||||||
* @param string $filter (optional) Filter
|
* @param string $filter (optional) Filter
|
||||||
|
* @param string $url Url
|
||||||
* @return int < 0 if ko, Nb of events in file if ok
|
* @return int < 0 if ko, Nb of events in file if ok
|
||||||
*/
|
*/
|
||||||
function build_rssfile($format, $title, $desc, $events_array, $outputfile, $filter = "")
|
function build_rssfile($format, $title, $desc, $events_array, $outputfile, $filter = '', $url = '')
|
||||||
{
|
{
|
||||||
global $user, $conf, $langs;
|
global $user, $conf, $langs;
|
||||||
global $dolibarr_main_url_root;
|
global $dolibarr_main_url_root;
|
||||||
@ -355,7 +356,7 @@ function build_rssfile($format, $title, $desc, $events_array, $outputfile, $filt
|
|||||||
$date = date("r");
|
$date = date("r");
|
||||||
|
|
||||||
// Print header
|
// Print header
|
||||||
fwrite($fichier, '<?xml version="1.0" encoding="".$langs->charset_output.""?>');
|
fwrite($fichier, '<?xml version="1.0" encoding="'.$langs->charset_output.'"?>');
|
||||||
fwrite($fichier, "\n");
|
fwrite($fichier, "\n");
|
||||||
|
|
||||||
fwrite($fichier, '<rss version="2.0">');
|
fwrite($fichier, '<rss version="2.0">');
|
||||||
@ -363,19 +364,22 @@ function build_rssfile($format, $title, $desc, $events_array, $outputfile, $filt
|
|||||||
|
|
||||||
fwrite($fichier, "<channel>\n<title>".$title."</title>\n");
|
fwrite($fichier, "<channel>\n<title>".$title."</title>\n");
|
||||||
|
|
||||||
$form = "<description><![CDATA[".$desc.".]]></description>"."\n".
|
/*
|
||||||
|
fwrite($fichier, "<description><![CDATA[".$desc.".]]></description>"."\n".
|
||||||
// "<language>fr</language>"."\n".
|
// "<language>fr</language>"."\n".
|
||||||
"<copyright>Dolibarr</copyright>"."\n".
|
"<copyright>Dolibarr</copyright>"."\n".
|
||||||
"<lastBuildDate>".$date."</lastBuildDate>"."\n".
|
"<lastBuildDate>".$date."</lastBuildDate>"."\n".
|
||||||
"<generator>Dolibarr</generator>"."\n";
|
"<generator>Dolibarr</generator>"."\n");
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (empty($url)) {
|
||||||
// Define $urlwithroot
|
// Define $urlwithroot
|
||||||
$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));
|
||||||
|
|
||||||
$urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
|
$urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
|
||||||
//$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current
|
//$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current
|
||||||
|
|
||||||
$url = $urlwithroot."/public/agenda/agendaexport.php?format=rss&exportkey=".urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY);
|
$url = $urlwithroot."/public/agenda/agendaexport.php?format=rss&exportkey=".urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY);
|
||||||
|
}
|
||||||
|
|
||||||
fwrite($fichier, "<link><![CDATA[".$url."]]></link>"."\n");
|
fwrite($fichier, "<link><![CDATA[".$url."]]></link>"."\n");
|
||||||
|
|
||||||
@ -392,6 +396,19 @@ function build_rssfile($format, $title, $desc, $events_array, $outputfile, $filt
|
|||||||
|
|
||||||
if ($eventqualified)
|
if ($eventqualified)
|
||||||
{
|
{
|
||||||
|
if (is_object($event) && get_class($event) == 'WebsitePage') {
|
||||||
|
// Convert object into an array
|
||||||
|
$tmpevent = array();
|
||||||
|
$tmpevent['uid'] = $event->id;
|
||||||
|
$tmpevent['startdate'] = $event->date_creation;
|
||||||
|
$tmpevent['summary'] = $event->title;
|
||||||
|
$tmpevent['url'] = $event->urlpage.'.php';
|
||||||
|
$tmpevent['author'] = $event->author_alias ? $event->author_alias : 'unknown';
|
||||||
|
//$tmpevent['category'] = '';
|
||||||
|
|
||||||
|
$event = $tmpevent;
|
||||||
|
}
|
||||||
|
|
||||||
$uid = $event["uid"];
|
$uid = $event["uid"];
|
||||||
$startdate = $event["startdate"];
|
$startdate = $event["startdate"];
|
||||||
$summary = $event["summary"];
|
$summary = $event["summary"];
|
||||||
|
|||||||
@ -158,6 +158,11 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
|
|||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled && $leftmenu=="orders"', __HANDLER__, 'left', 1207__+MAX_llx_menu__, 'commercial', '', 1202__+MAX_llx_menu__, '/commande/list.php?mainmenu=commercial&leftmenu=orders&viewstatut=4', 'StatusOrderProcessed', 1, 'orders', '$user->rights->commande->lire', '', 2, 6, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled && $leftmenu=="orders"', __HANDLER__, 'left', 1207__+MAX_llx_menu__, 'commercial', '', 1202__+MAX_llx_menu__, '/commande/list.php?mainmenu=commercial&leftmenu=orders&viewstatut=4', 'StatusOrderProcessed', 1, 'orders', '$user->rights->commande->lire', '', 2, 6, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled && $leftmenu=="orders"', __HANDLER__, 'left', 1208__+MAX_llx_menu__, 'commercial', '', 1202__+MAX_llx_menu__, '/commande/list.php?mainmenu=commercial&leftmenu=orders&viewstatut=-1', 'StatusOrderCanceledShort', 1, 'orders', '$user->rights->commande->lire', '', 2, 7, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled && $leftmenu=="orders"', __HANDLER__, 'left', 1208__+MAX_llx_menu__, 'commercial', '', 1202__+MAX_llx_menu__, '/commande/list.php?mainmenu=commercial&leftmenu=orders&viewstatut=-1', 'StatusOrderCanceledShort', 1, 'orders', '$user->rights->commande->lire', '', 2, 7, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled', __HANDLER__, 'left', 1209__+MAX_llx_menu__, 'commercial', '', 1200__+MAX_llx_menu__, '/commande/stats/index.php?mainmenu=commercial&leftmenu=orders', 'Statistics', 1, 'orders', '$user->rights->commande->lire', '', 2, 4, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled', __HANDLER__, 'left', 1209__+MAX_llx_menu__, 'commercial', '', 1200__+MAX_llx_menu__, '/commande/stats/index.php?mainmenu=commercial&leftmenu=orders', 'Statistics', 1, 'orders', '$user->rights->commande->lire', '', 2, 4, __ENTITY__);
|
||||||
|
-- Commercial - Supplier's proposals
|
||||||
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_proposal->enabled', __HANDLER__, 'left', 1600__+MAX_llx_menu__, 'commercial', 'propals_supplier', 3__+MAX_llx_menu__, '/supplier_proposal/index.php?leftmenu=propals_supplier', 'SupplierProposalsShort', 0, 'supplier_proposal', '$user->rights->supplier_proposal->lire', '', 2, 4, __ENTITY__);
|
||||||
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_proposal->enabled', __HANDLER__, 'left', 1601__+MAX_llx_menu__, 'commercial', '', 1600__+MAX_llx_menu__, '/supplier_proposal/card.php?action=create&leftmenu=supplier_proposals', 'SupplierProposalNew', 1, 'supplier_proposal', '$user->rights->supplier_proposal->creer', '', 2, 0, __ENTITY__);
|
||||||
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_proposal->enabled', __HANDLER__, 'left', 1602__+MAX_llx_menu__, 'commercial', '', 1600__+MAX_llx_menu__, '/supplier_proposal/list.php?leftmenu=supplier_proposals', 'List', 1, 'supplier_proposal', '$user->rights->supplier_proposal->lire', '', 2, 1, __ENTITY__);
|
||||||
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_proposal->enabled', __HANDLER__, 'left', 1610__+MAX_llx_menu__, 'commercial', '', 1600__+MAX_llx_menu__, '/comm/propal/stats/index.php?leftmenu=supplier_proposals&mode=supplier', 'Statistics', 1, 'supplier_proposal', '$user->rights->supplier_proposal->lire', '', 2, 2, __ENTITY__);
|
||||||
-- Commercial - Supplier's orders
|
-- Commercial - Supplier's orders
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_order->enabled', __HANDLER__, 'left', 5100__+MAX_llx_menu__, 'commercial', 'orders_suppliers', 5__+MAX_llx_menu__, '/fourn/commande/index.php?mainmenu=commercial&leftmenu=orders_suppliers', 'SuppliersOrders', 0, 'orders', '$user->rights->fournisseur->commande->lire', '', 2, 6, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_order->enabled', __HANDLER__, 'left', 5100__+MAX_llx_menu__, 'commercial', 'orders_suppliers', 5__+MAX_llx_menu__, '/fourn/commande/index.php?mainmenu=commercial&leftmenu=orders_suppliers', 'SuppliersOrders', 0, 'orders', '$user->rights->fournisseur->commande->lire', '', 2, 6, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_order->enabled', __HANDLER__, 'left', 5101__+MAX_llx_menu__, 'commercial', '', 5100__+MAX_llx_menu__, '/fourn/commande/card.php?mainmenu=commercial&action=create&leftmenu=orders_suppliers', 'NewOrder', 1, 'orders', '$user->rights->fournisseur->commande->creer', '', 2, 0, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_order->enabled', __HANDLER__, 'left', 5101__+MAX_llx_menu__, 'commercial', '', 5100__+MAX_llx_menu__, '/fourn/commande/card.php?mainmenu=commercial&action=create&leftmenu=orders_suppliers', 'NewOrder', 1, 'orders', '$user->rights->fournisseur->commande->creer', '', 2, 0, __ENTITY__);
|
||||||
|
|||||||
@ -936,6 +936,16 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
|||||||
$newmenu->add("/commande/stats/index.php?leftmenu=orders", $langs->trans("Statistics"), 1, $user->rights->commande->lire);
|
$newmenu->add("/commande/stats/index.php?leftmenu=orders", $langs->trans("Statistics"), 1, $user->rights->commande->lire);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Supplier proposal
|
||||||
|
if (!empty($conf->supplier_proposal->enabled))
|
||||||
|
{
|
||||||
|
$langs->load("supplier_proposal");
|
||||||
|
$newmenu->add("/supplier_proposal/index.php?leftmenu=propals_supplier", $langs->trans("SupplierProposalsShort"), 0, $user->rights->supplier_proposal->lire, '', $mainmenu, 'propals_supplier', 300);
|
||||||
|
$newmenu->add("/supplier_proposal/card.php?action=create&leftmenu=supplier_proposals", $langs->trans("SupplierProposalNew"), 1, $user->rights->supplier_proposal->creer);
|
||||||
|
$newmenu->add("/supplier_proposal/list.php?leftmenu=supplier_proposals", $langs->trans("List"), 1, $user->rights->supplier_proposal->lire);
|
||||||
|
$newmenu->add("/comm/propal/stats/index.php?leftmenu=supplier_proposals&mode=supplier", $langs->trans("Statistics"), 1, $user->rights->supplier_proposal->lire);
|
||||||
|
}
|
||||||
|
|
||||||
// Suppliers orders
|
// Suppliers orders
|
||||||
if (!empty($conf->supplier_order->enabled))
|
if (!empty($conf->supplier_order->enabled))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -591,7 +591,7 @@ class pdf_merou extends ModelePdfExpedition
|
|||||||
$pdf->SetXY($Xoff, $Yoff);
|
$pdf->SetXY($Xoff, $Yoff);
|
||||||
$pdf->SetFont('', '', $default_font_size - 2);
|
$pdf->SetFont('', '', $default_font_size - 2);
|
||||||
$pdf->SetTextColor(0, 0, 0);
|
$pdf->SetTextColor(0, 0, 0);
|
||||||
$pdf->MultiCell(0, 3, $outputlangs->transnoentities("RefSending").': '.$outputlangs->convToOutputCharset($object->ref), '', 'R');
|
$pdf->MultiCell($this->page_largeur - $this->marge_droite - $Xoff, 3, $outputlangs->transnoentities("RefSending").': '.$outputlangs->convToOutputCharset($object->ref), '', 'R');
|
||||||
//$this->Code39($Xoff+43, $Yoff+1, $object->ref,$ext = true, $cks = false, $w = 0.4, $h = 4, $wide = true);
|
//$this->Code39($Xoff+43, $Yoff+1, $object->ref,$ext = true, $cks = false, $w = 0.4, $h = 4, $wide = true);
|
||||||
|
|
||||||
$origin = $object->origin;
|
$origin = $object->origin;
|
||||||
@ -627,9 +627,9 @@ class pdf_merou extends ModelePdfExpedition
|
|||||||
{
|
{
|
||||||
$Yoff += 3;
|
$Yoff += 3;
|
||||||
$posy = $Yoff;
|
$posy = $Yoff;
|
||||||
$pdf->SetXY(100, $posy);
|
$pdf->SetXY($Xoff, $posy);
|
||||||
$pdf->SetTextColor(0, 0, 0);
|
$pdf->SetTextColor(0, 0, 0);
|
||||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("CustomerCode")." : ".$outputlangs->transnoentities($object->thirdparty->code_client), '', 'R');
|
$pdf->MultiCell($this->page_largeur - $this->marge_droite - $Xoff, 3, $outputlangs->transnoentities("CustomerCode")." : ".$outputlangs->transnoentities($object->thirdparty->code_client), '', 'R');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Date delivery
|
// Date delivery
|
||||||
|
|||||||
@ -161,7 +161,7 @@ class modBanque extends DolibarrModules
|
|||||||
"s.nom"=>"company","s.code_compta"=>"company","s.code_compta_fournisseur"=>"company"
|
"s.nom"=>"company","s.code_compta"=>"company","s.code_compta_fournisseur"=>"company"
|
||||||
);
|
);
|
||||||
$this->export_special_array[$r]=array('-b.amount'=>'NULLIFNEG','b.amount'=>'NULLIFNEG');
|
$this->export_special_array[$r]=array('-b.amount'=>'NULLIFNEG','b.amount'=>'NULLIFNEG');
|
||||||
if (empty($conf->fournisseur->enabled))
|
if (empty($conf->fournisseur->enabled) && !empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || empty($conf->supplier_order->enabled) || empty($conf->supplier_invoice->enabled))
|
||||||
{
|
{
|
||||||
unset($this->export_fields_array[$r]['s.code_compta_fournisseur']);
|
unset($this->export_fields_array[$r]['s.code_compta_fournisseur']);
|
||||||
unset($this->export_entities_array[$r]['s.code_compta_fournisseur']);
|
unset($this->export_entities_array[$r]['s.code_compta_fournisseur']);
|
||||||
|
|||||||
@ -193,14 +193,20 @@ class modContrat extends DolibarrModules
|
|||||||
'p.rowid'=>'List:product:label','p.ref'=>'Text','p.label'=>'Text');
|
'p.rowid'=>'List:product:label','p.ref'=>'Text','p.label'=>'Text');
|
||||||
|
|
||||||
|
|
||||||
|
$keyforselect='contrat'; $keyforelement='contract'; $keyforaliasextra='coextra';
|
||||||
|
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
|
||||||
|
$keyforselect='contratdet'; $keyforelement='contract_line'; $keyforaliasextra='codextra';
|
||||||
|
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
|
||||||
|
|
||||||
$this->export_sql_start[$r]='SELECT DISTINCT ';
|
$this->export_sql_start[$r]='SELECT DISTINCT ';
|
||||||
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'societe as s';
|
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'societe as s';
|
||||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as c on s.fk_pays = c.rowid,';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as c on s.fk_pays = c.rowid';
|
||||||
$this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'contrat as co,';
|
$this->export_sql_end[$r] .=' INNER JOIN '.MAIN_DB_PREFIX.'contrat as co ON co.fk_soc = s.rowid';
|
||||||
$this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'contratdet as cod';
|
$this->export_sql_end[$r] .=' INNER JOIN '.MAIN_DB_PREFIX.'contratdet as cod ON co.rowid = cod.fk_contrat';
|
||||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (cod.fk_product = p.rowid)';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON (cod.fk_product = p.rowid)';
|
||||||
$this->export_sql_end[$r] .=' WHERE co.fk_soc = s.rowid and co.rowid = cod.fk_contrat';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'contrat_extrafields as coextra on (co.rowid = coextra.fk_object)';
|
||||||
$this->export_sql_end[$r] .=' AND co.entity IN ('.getEntity('contract').')';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'contratdet_extrafields as codextra on (cod.rowid = codextra.fk_object)';
|
||||||
|
$this->export_sql_end[$r] .=' WHERE co.entity IN ('.getEntity('contract').')';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -216,7 +216,7 @@ class modFacture extends DolibarrModules
|
|||||||
's.code_compta_fournisseur'=>'SupplierAccountancyCode', 's.tva_intra'=>'VATIntra',
|
's.code_compta_fournisseur'=>'SupplierAccountancyCode', 's.tva_intra'=>'VATIntra',
|
||||||
'f.rowid'=>"InvoiceId", 'f.ref'=>"InvoiceRef", 'f.ref_client'=>'RefCustomer',
|
'f.rowid'=>"InvoiceId", 'f.ref'=>"InvoiceRef", 'f.ref_client'=>'RefCustomer',
|
||||||
'f.type'=>"Type", 'f.datec'=>"InvoiceDateCreation", 'f.datef'=>"DateInvoice", 'f.date_lim_reglement'=>"DateDue", 'f.total'=>"TotalHT",
|
'f.type'=>"Type", 'f.datec'=>"InvoiceDateCreation", 'f.datef'=>"DateInvoice", 'f.date_lim_reglement'=>"DateDue", 'f.total'=>"TotalHT",
|
||||||
'f.total_ttc'=>"TotalTTC", 'f.tva'=>"TotalVAT", 'f.localtax1'=>'LocalTax1', 'f.localtax2'=>'LocalTax2', 'f.paye'=>"InvoicePaidCompletely", 'f.fk_statut'=>'InvoiceStatus', 'f.close_code'=>'EarlyClosingReason', 'f.close_note'=>'EarlyClosingComment',
|
'f.total_ttc'=>"TotalTTC", 'f.tva'=>"TotalVAT", 'f.localtax1'=>'LT1', 'f.localtax2'=>'LT2', 'f.paye'=>"InvoicePaidCompletely", 'f.fk_statut'=>'InvoiceStatus', 'f.close_code'=>'EarlyClosingReason', 'f.close_note'=>'EarlyClosingComment',
|
||||||
'none.rest'=>'Rest',
|
'none.rest'=>'Rest',
|
||||||
'f.note_private'=>"NotePrivate", 'f.note_public'=>"NotePublic", 'f.fk_user_author'=>'CreatedById', 'uc.login'=>'CreatedByLogin',
|
'f.note_private'=>"NotePrivate", 'f.note_public'=>"NotePublic", 'f.fk_user_author'=>'CreatedById', 'uc.login'=>'CreatedByLogin',
|
||||||
'f.fk_user_valid'=>'ValidatedById', 'uv.login'=>'ValidatedByLogin', 'pj.ref'=>'ProjectRef', 'pj.title'=>'ProjectLabel', 'fd.rowid'=>'LineId', 'fd.description'=>"LineDescription",
|
'f.fk_user_valid'=>'ValidatedById', 'uv.login'=>'ValidatedByLogin', 'pj.ref'=>'ProjectRef', 'pj.title'=>'ProjectLabel', 'fd.rowid'=>'LineId', 'fd.description'=>"LineDescription",
|
||||||
@ -303,7 +303,7 @@ class modFacture extends DolibarrModules
|
|||||||
's.code_compta_fournisseur'=>'SupplierAccountancyCode', 's.tva_intra'=>'VATIntra',
|
's.code_compta_fournisseur'=>'SupplierAccountancyCode', 's.tva_intra'=>'VATIntra',
|
||||||
'f.rowid'=>"InvoiceId", 'f.ref'=>"InvoiceRef", 'f.ref_client'=>'RefCustomer',
|
'f.rowid'=>"InvoiceId", 'f.ref'=>"InvoiceRef", 'f.ref_client'=>'RefCustomer',
|
||||||
'f.type'=>"Type", 'f.datec'=>"InvoiceDateCreation", 'f.datef'=>"DateInvoice", 'f.date_lim_reglement'=>"DateDue", 'f.total'=>"TotalHT",
|
'f.type'=>"Type", 'f.datec'=>"InvoiceDateCreation", 'f.datef'=>"DateInvoice", 'f.date_lim_reglement'=>"DateDue", 'f.total'=>"TotalHT",
|
||||||
'f.total_ttc'=>"TotalTTC", 'f.tva'=>"TotalVAT", 'f.localtax1'=>'LocalTax1', 'f.localtax2'=>'LocalTax2', 'f.paye'=>"InvoicePaidCompletely", 'f.fk_statut'=>'InvoiceStatus', 'f.close_code'=>'EarlyClosingReason', 'f.close_note'=>'EarlyClosingComment',
|
'f.total_ttc'=>"TotalTTC", 'f.tva'=>"TotalVAT", 'f.localtax1'=>'LT1', 'f.localtax2'=>'LT2', 'f.paye'=>"InvoicePaidCompletely", 'f.fk_statut'=>'InvoiceStatus', 'f.close_code'=>'EarlyClosingReason', 'f.close_note'=>'EarlyClosingComment',
|
||||||
'none.rest'=>'Rest',
|
'none.rest'=>'Rest',
|
||||||
'f.note_private'=>"NotePrivate", 'f.note_public'=>"NotePublic", 'f.fk_user_author'=>'CreatedById', 'uc.login'=>'CreatedByLogin',
|
'f.note_private'=>"NotePrivate", 'f.note_public'=>"NotePublic", 'f.fk_user_author'=>'CreatedById', 'uc.login'=>'CreatedByLogin',
|
||||||
'f.fk_user_valid'=>'ValidatedById', 'uv.login'=>'ValidatedByLogin', 'pj.ref'=>'ProjectRef', 'pj.title'=>'ProjectLabel', 'p.rowid'=>'PaymentId', 'p.ref'=>'PaymentRef',
|
'f.fk_user_valid'=>'ValidatedById', 'uv.login'=>'ValidatedByLogin', 'pj.ref'=>'ProjectRef', 'pj.title'=>'ProjectLabel', 'p.rowid'=>'PaymentId', 'p.ref'=>'PaymentRef',
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user