Merge remote branch 'upstream/develop' into charges
This commit is contained in:
commit
cf8fb5c230
@ -287,10 +287,13 @@ script:
|
|||||||
php upgrade.php 3.9.0 4.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade390400.log
|
php upgrade.php 3.9.0 4.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade390400.log
|
||||||
php upgrade2.php 3.9.0 4.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL > $TRAVIS_BUILD_DIR/upgrade390400-2.log
|
php upgrade2.php 3.9.0 4.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL > $TRAVIS_BUILD_DIR/upgrade390400-2.log
|
||||||
php step5.php 3.9.0 4.0.0 > $TRAVIS_BUILD_DIR/upgrade390400-3.log
|
php step5.php 3.9.0 4.0.0 > $TRAVIS_BUILD_DIR/upgrade390400-3.log
|
||||||
|
php upgrade.php 4.0.0 5.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade400500.log
|
||||||
|
php upgrade2.php 4.0.0 5.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL > $TRAVIS_BUILD_DIR/upgrade400500-2.log
|
||||||
|
php step5.php 4.0.0 5.0.0 > $TRAVIS_BUILD_DIR/upgrade400500-3.log
|
||||||
cd -
|
cd -
|
||||||
set +e
|
set +e
|
||||||
echo
|
echo
|
||||||
#cat $TRAVIS_BUILD_DIR/upgrade390400-2.log
|
#cat $TRAVIS_BUILD_DIR/upgrade400500-2.log
|
||||||
#cat /tmp/dolibarr_install.log
|
#cat /tmp/dolibarr_install.log
|
||||||
|
|
||||||
- |
|
- |
|
||||||
|
|||||||
@ -170,7 +170,7 @@ source_file = htdocs/langs/en_US/interventions.lang
|
|||||||
source_lang = en_US
|
source_lang = en_US
|
||||||
type = MOZILLAPROPERTIES
|
type = MOZILLAPROPERTIES
|
||||||
|
|
||||||
[dolibarr.languages]
|
[dolibarr.languages-not-res]
|
||||||
file_filter = htdocs/langs/<lang>/languages.lang
|
file_filter = htdocs/langs/<lang>/languages.lang
|
||||||
source_file = htdocs/langs/en_US/languages.lang
|
source_file = htdocs/langs/en_US/languages.lang
|
||||||
source_lang = en_US
|
source_lang = en_US
|
||||||
|
|||||||
@ -40,7 +40,7 @@ jQuery blockUI 2.70.0 GPL and MIT License Yes
|
|||||||
jQuery Colorpicker 1.1 MIT License Yes JS library for color picker for a defined list of colors
|
jQuery Colorpicker 1.1 MIT License Yes JS library for color picker for a defined list of colors
|
||||||
jQuery DataTables 1.9.4 BSD Yes JS library for tables output
|
jQuery DataTables 1.9.4 BSD Yes JS library for tables output
|
||||||
jQuery FileUpload 5.0.3 GPL and MIT License Yes JS library to upload files
|
jQuery FileUpload 5.0.3 GPL and MIT License Yes JS library to upload files
|
||||||
jQuery Flot 0.7 MIT License Yes JS library to build graph
|
jQuery Flot 0.8.3 MIT License Yes JS library to build graph
|
||||||
jQuery JCrop 0.9.8 GPL and MIT License Yes JS library plugin Crop (to crop images)
|
jQuery JCrop 0.9.8 GPL and MIT License Yes JS library plugin Crop (to crop images)
|
||||||
jQuery Jeditable 1.7.1 GPL and MIT License Yes JS library plugin jeditable (to edit in place)
|
jQuery Jeditable 1.7.1 GPL and MIT License Yes JS library plugin jeditable (to edit in place)
|
||||||
jQuery jNotify 1.1.00 Apache Software License 2.0 Yes JS library plugin jNotify (to use ajax popups)
|
jQuery jNotify 1.1.00 Apache Software License 2.0 Yes JS library plugin jNotify (to use ajax popups)
|
||||||
|
|||||||
@ -12,7 +12,7 @@ Upgrading to any other version or any other database system is abolutely require
|
|||||||
make a Dolibarr upgrade.
|
make a Dolibarr upgrade.
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 4.0 compared to 3.9.* *****
|
***** ChangeLog for 4.0.0 compared to 3.9.* *****
|
||||||
For users:
|
For users:
|
||||||
|
|
||||||
NEW: Add reccuring invoice feature and automatic generation of invoices.
|
NEW: Add reccuring invoice feature and automatic generation of invoices.
|
||||||
|
|||||||
@ -20,7 +20,7 @@ DoYouWantToStart=Vol iniciar el proc
|
|||||||
TechnicalParameters=Paràmetres tècnics
|
TechnicalParameters=Paràmetres tècnics
|
||||||
IfFirstInstall=Si es tracta de la primera instal lació, haurà d'especificar alguns paràmetres tècnics. Si no els entén, no sabeu o va a procedir a una actualització, deixi els camps amb els valors proposats per defecte.
|
IfFirstInstall=Si es tracta de la primera instal lació, haurà d'especificar alguns paràmetres tècnics. Si no els entén, no sabeu o va a procedir a una actualització, deixi els camps amb els valors proposats per defecte.
|
||||||
|
|
||||||
; WARNING !!! STRINGS HERE MUST BE LOWER THAN 60 CHARACTERS
|
; WARNING !!! STRINGS HERE MUST BE LOWER THAN 70 CHARACTERS
|
||||||
SMTPServer=Servidor SMTP (El seu o el del seu ISP, únicament primera instal.lació) :
|
SMTPServer=Servidor SMTP (El seu o el del seu ISP, únicament primera instal.lació) :
|
||||||
ApachePort=Puerto Apache (únicament primera instal.lació, normalment és el 80) :
|
ApachePort=Puerto Apache (únicament primera instal.lació, normalment és el 80) :
|
||||||
MySqlPort=Puerto Mysql (únicament primera instal.lació, normalment és el 3306) :
|
MySqlPort=Puerto Mysql (únicament primera instal.lació, normalment és el 3306) :
|
||||||
@ -31,6 +31,7 @@ FailedToDeleteLock=FailedToDeleteLock=Error en l'eliminaci
|
|||||||
PortAlreadyInUse=Sembla que el port %1 ja està sent utilitzat. Es recomana cancel·lar, tornar enrere i especificar un altre valor per al port% 2. Cancel·lar i escollir un altre valor?
|
PortAlreadyInUse=Sembla que el port %1 ja està sent utilitzat. Es recomana cancel·lar, tornar enrere i especificar un altre valor per al port% 2. Cancel·lar i escollir un altre valor?
|
||||||
|
|
||||||
FirefoxDetected=S'ha detectat Firefox al seu ordinador. Voleu activar per defecte com a navegador per Dolibarr?
|
FirefoxDetected=S'ha detectat Firefox al seu ordinador. Voleu activar per defecte com a navegador per Dolibarr?
|
||||||
|
ChromeDetected=S'ha detectat Chrome al seu ordinador. Voleu activar per defecte com a navegador per Dolibarr?
|
||||||
ChooseDefaultBrowser=Esculli el seu navegador per defecte. Si no està segur, simplement feu clic a Obrir:
|
ChooseDefaultBrowser=Esculli el seu navegador per defecte. Si no està segur, simplement feu clic a Obrir:
|
||||||
|
|
||||||
LaunchNow=Llançar ara Dolibarr
|
LaunchNow=Llançar ara Dolibarr
|
||||||
|
|||||||
@ -31,6 +31,7 @@ FailedToDeleteLock=Failed to delete the file %1/www/dolibarr/install.lock. You c
|
|||||||
PortAlreadyInUse=Port %1 seems to be already in use. You should cancel to go back and choose another value for %2 port. Cancel choice and choose another value ?
|
PortAlreadyInUse=Port %1 seems to be already in use. You should cancel to go back and choose another value for %2 port. Cancel choice and choose another value ?
|
||||||
|
|
||||||
FirefoxDetected=Firefox has been detected on your computer. Would you like to use it as the default browser for Dolibarr ?
|
FirefoxDetected=Firefox has been detected on your computer. Would you like to use it as the default browser for Dolibarr ?
|
||||||
|
ChromeDetected=Chrome has been detected on your computer. Would you like to use it as the default browser for Dolibarr ?
|
||||||
ChooseDefaultBrowser=Please choose your default browser. If you are not sure, just click Open :
|
ChooseDefaultBrowser=Please choose your default browser. If you are not sure, just click Open :
|
||||||
|
|
||||||
LaunchNow=Launch Dolibarr now
|
LaunchNow=Launch Dolibarr now
|
||||||
|
|||||||
@ -21,10 +21,10 @@ TechnicalParameters=Param
|
|||||||
IfFirstInstall=S'il s'agit de la première installation, merci de spécifier ces quelques paramètres techniques. Si vous ne les comprennez pas, êtes non sûr, ou procédez à une mise à jour, laissez les champs avec les valeurs proposées par défaut.
|
IfFirstInstall=S'il s'agit de la première installation, merci de spécifier ces quelques paramètres techniques. Si vous ne les comprennez pas, êtes non sûr, ou procédez à une mise à jour, laissez les champs avec les valeurs proposées par défaut.
|
||||||
|
|
||||||
|
|
||||||
; WARNING !!! STRINGS FOR THIS 4 STRINGS MUST BE LOWER THAN 60 CHARACTERS
|
; WARNING !!! STRINGS FOR THIS 4 STRINGS MUST BE LOWER THAN 70 CHARACTERS
|
||||||
SMTPServer=Serveur SMTP (le votre ou celui de votre FAI, première installation uniquement) :
|
SMTPServer=Serveur SMTP (le votre ou de votre FAI, première installation uniquement):
|
||||||
ApachePort=Port Apache (première installation uniquement, le choix standard est 80) :
|
ApachePort=Port Apache (première installation uniquement, le choix standard est 80):
|
||||||
MySqlPort=Port Mysql (première installation uniquement, le choix standard est 3306) :
|
MySqlPort=Port Mysql (première installation uniquement, le choix standard est 3306):
|
||||||
MySqlPassword=Mot de passe serveur+base MySql de root (première installation uniquement):
|
MySqlPassword=Mot de passe serveur+base MySql de root (première installation uniquement):
|
||||||
|
|
||||||
FailedToDeleteLock=Echec de la suppression du fichier %1/www/dolibarr/install.lock. Vous pouvez ignorer l'avertissement mais il est possible que vous deviez le supprimer manuellement plus tard. Dans ce cas, cela vous sera signalé. Cliquez sur OK pour continuer...
|
FailedToDeleteLock=Echec de la suppression du fichier %1/www/dolibarr/install.lock. Vous pouvez ignorer l'avertissement mais il est possible que vous deviez le supprimer manuellement plus tard. Dans ce cas, cela vous sera signalé. Cliquez sur OK pour continuer...
|
||||||
@ -32,6 +32,7 @@ FailedToDeleteLock=Echec de la suppression du fichier %1/www/dolibarr/install.lo
|
|||||||
PortAlreadyInUse=Le port %1 semble déjà utilisé. Il est recommandé d'annuler pour revenir en arrière et spécifier une autre valeur pour le port %2. Annuler le choix et choisir une autre valeur ?
|
PortAlreadyInUse=Le port %1 semble déjà utilisé. Il est recommandé d'annuler pour revenir en arrière et spécifier une autre valeur pour le port %2. Annuler le choix et choisir une autre valeur ?
|
||||||
|
|
||||||
FirefoxDetected=Firefox a été détecté sur votre ordinateur. Voulez-vous en faire votre navigateur par défaut pour Dolibarr ?
|
FirefoxDetected=Firefox a été détecté sur votre ordinateur. Voulez-vous en faire votre navigateur par défaut pour Dolibarr ?
|
||||||
|
ChromeDetected=Chrome a été détecté sur votre ordinateur. Voulez-vous en faire votre navigateur par défaut pour Dolibarr ?
|
||||||
ChooseDefaultBrowser=Merci de choisir votre navigateur par défaut. Si vous n'êtes pas sûr, cliquez simplement sur Ouvrir :
|
ChooseDefaultBrowser=Merci de choisir votre navigateur par défaut. Si vous n'êtes pas sûr, cliquez simplement sur Ouvrir :
|
||||||
|
|
||||||
LaunchNow=Lancer Dolibarr maintenant
|
LaunchNow=Lancer Dolibarr maintenant
|
||||||
|
|||||||
@ -20,7 +20,7 @@ DoYouWantToStart=
|
|||||||
TechnicalParameters=Parámetros técnicos
|
TechnicalParameters=Parámetros técnicos
|
||||||
IfFirstInstall=Si se trata de la primera instalación, deberá especificar algunos parámetros técnicos. Si no los entiende, no está seguro o va a proceder a una actualización, deje los campos con los valores propuestos por defecto.
|
IfFirstInstall=Si se trata de la primera instalación, deberá especificar algunos parámetros técnicos. Si no los entiende, no está seguro o va a proceder a una actualización, deje los campos con los valores propuestos por defecto.
|
||||||
|
|
||||||
; WARNING !!! STRINGS HERE MUST BE LOWER THAN 60 CHARACTERS
|
; WARNING !!! STRINGS HERE MUST BE LOWER THAN 70 CHARACTERS
|
||||||
SMTPServer=Servidor SMTP (El suyo o el de su ISP, únicamente primera instalación) :
|
SMTPServer=Servidor SMTP (El suyo o el de su ISP, únicamente primera instalación) :
|
||||||
ApachePort=Puerto Apache (únicamente primera instalación, normalmente es el 80) :
|
ApachePort=Puerto Apache (únicamente primera instalación, normalmente es el 80) :
|
||||||
MySqlPort=Puerto Mysql (únicamente primera instalación, normalmente es el 3306) :
|
MySqlPort=Puerto Mysql (únicamente primera instalación, normalmente es el 3306) :
|
||||||
@ -31,6 +31,7 @@ FailedToDeleteLock=Error en la eliminaci
|
|||||||
PortAlreadyInUse=Parece que el puerto %1 ya esta siendo usado. Se recomienda cancelar, volver atras y especificar otro valor para el puerto %2. ¿Cancelar y escojer otro valor?
|
PortAlreadyInUse=Parece que el puerto %1 ya esta siendo usado. Se recomienda cancelar, volver atras y especificar otro valor para el puerto %2. ¿Cancelar y escojer otro valor?
|
||||||
|
|
||||||
FirefoxDetected=Se ha detectado Firefox en su ordenador. Desea activarlo por defecto como navegador para Dolibarr ?
|
FirefoxDetected=Se ha detectado Firefox en su ordenador. Desea activarlo por defecto como navegador para Dolibarr ?
|
||||||
|
ChromeDetected=Se ha detectado Chrome en su ordenador. Desea activarlo por defecto como navegador para Dolibarr ?
|
||||||
ChooseDefaultBrowser=Escoja su navegador por defecto. Si no está seguro, simplementa haga clic en Abrir :
|
ChooseDefaultBrowser=Escoja su navegador por defecto. Si no está seguro, simplementa haga clic en Abrir :
|
||||||
|
|
||||||
LaunchNow=Lanzar ahora Dolibarr
|
LaunchNow=Lanzar ahora Dolibarr
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
Alias /dolibarr "WAMPROOT/www/dolibarr/htdocs/"
|
Alias /dolibarr "WAMPROOT/www/dolibarr/htdocs/"
|
||||||
|
|
||||||
# NOTE:
|
# NOTE FOR APACHE 2.2:
|
||||||
# To restrict access to dolibarr from outside set lines
|
# To restrict access to dolibarr from outside set lines
|
||||||
#
|
#
|
||||||
# Order Deny,Allow
|
# Order Deny,Allow
|
||||||
@ -12,10 +12,21 @@ Alias /dolibarr "WAMPROOT/www/dolibarr/htdocs/"
|
|||||||
# Order Allow,Deny
|
# Order Allow,Deny
|
||||||
# Allow from all
|
# Allow from all
|
||||||
#
|
#
|
||||||
|
# NOTE FOR APACHE 2.3:
|
||||||
|
# To restrict access to dolibarr from outside set lines
|
||||||
|
#
|
||||||
|
# <RequireAny>
|
||||||
|
# Require ip 127.0.0.1
|
||||||
|
# Require host localhost
|
||||||
|
# <RequireAny>
|
||||||
|
#
|
||||||
|
# instead of
|
||||||
|
#
|
||||||
|
# Require all granted
|
||||||
|
#
|
||||||
|
|
||||||
<Directory "WAMPROOT/www/dolibarr/htdocs/">
|
<Directory "WAMPROOT/www/dolibarr/htdocs/">
|
||||||
Options Indexes FollowSymLinks MultiViews
|
Options Indexes FollowSymLinks MultiViews
|
||||||
AllowOverride all
|
AllowOverride all
|
||||||
Order Allow,Deny
|
Require all granted
|
||||||
Allow from all
|
|
||||||
</Directory>
|
</Directory>
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
@ -99,17 +99,18 @@ Source: "build\exe\doliwamp\builddemosslfiles.bat.install"; DestDir: "{app}\"; F
|
|||||||
Source: "build\exe\doliwamp\UsedPort.exe"; DestDir: "{app}\"; Flags: ignoreversion;
|
Source: "build\exe\doliwamp\UsedPort.exe"; DestDir: "{app}\"; Flags: ignoreversion;
|
||||||
; PhpMyAdmin, Apache, Php, Mysql
|
; PhpMyAdmin, Apache, Php, Mysql
|
||||||
; Put here path of Wampserver applications
|
; Put here path of Wampserver applications
|
||||||
; Value OK: apache 2.2.6, php 5.2.5 (5.2.11, 5.3.0 and 5.3.1 fails if php_exif, php_pgsql, php_zip is on), mysql 5.0.45 or 5.1.36
|
; 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 or 5.1.36
|
; Value OK: apache 2.2.11, php 5.3.0 (if no php_exif, php_pgsql, php_zip), mysql 5.0.45
|
||||||
|
; Value ???: 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)
|
||||||
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:\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:\Program Files\Wamp\bin\mysql\mysql5.6.17\*.*"; DestDir: "{app}\bin\mysql\mysql5.6.17"; 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"
|
||||||
; Dolibarr
|
; Dolibarr
|
||||||
Source: "htdocs\*.*"; DestDir: "{app}\www\dolibarr\htdocs"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,custom\*,custom2\*,documents\*,includes\ckeditor\_source\*,includes\savant\*,includes\phpmailer\*,jquery\plugins\template\*,nltechno*\*,PHPExcel\Shared\PDF\*,PHPExcel\Shared\PCLZip\*,tcpdf\fonts\dejavu-fonts-ttf-2.33\*,tcpdf\fonts\freefont-20100919\*,tcpdf\fonts\utils\*,*\conf.php,*\conf.php.mysql,*\conf.php.old,*\conf.php.postgres,*\conf.php.sav,*\install.forced.php"
|
Source: "htdocs\*.*"; DestDir: "{app}\www\dolibarr\htdocs"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,custom\*,custom2\*,documents\*,includes\ckeditor\_source\*,includes\savant\*,includes\phpmailer\*,jquery\plugins\template\*,nltechno*\*,PHPExcel\Shared\PDF\*,PHPExcel\Shared\PCLZip\*,tcpdf\fonts\dejavu-fonts-ttf-2.33\*,tcpdf\fonts\freefont-20100919\*,tcpdf\fonts\utils\*,*\conf.php,*\conf.php.mysql,*\conf.php.old,*\conf.php.postgres,*\conf.php.sav,*\install.forced.php"
|
||||||
Source: "dev\*.*"; DestDir: "{app}\www\dolibarr\dev"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,dbmodel\*,fpdf\*,initdata\*,iso-normes\*,licence\*,phpcheckstyle\*,phpunit\*,samples\*,test\*,uml\*,vagrant\*,xdebug\*"
|
Source: "dev\*.*"; DestDir: "{app}\www\dolibarr\dev"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,dbmodel\*,fpdf\*,initdata\*,initdemo\*,iso-normes\*,licence\*,phpcheckstyle\*,phpunit\*,samples\*,test\*,uml\*,vagrant\*,xdebug\*"
|
||||||
Source: "doc\*.*"; DestDir: "{app}\www\dolibarr\doc"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,wiki\*,plaquette\*,dev\*,images\dolibarr_screenshot2.png,images\dolibarr_screenshot3.png,images\dolibarr_screenshot4.png,images\dolibarr_screenshot5.png,images\dolibarr_screenshot6.png,images\dolibarr_screenshot7.png,images\dolibarr_screenshot8.png,images\dolibarr_screenshot9.png,images\dolibarr_screenshot10.png,images\dolibarr_screenshot11.png,images\dolibarr_screenshot12.png"
|
Source: "doc\*.*"; DestDir: "{app}\www\dolibarr\doc"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,wiki\*,plaquette\*,dev\*,images\dolibarr_screenshot2.png,images\dolibarr_screenshot3.png,images\dolibarr_screenshot4.png,images\dolibarr_screenshot5.png,images\dolibarr_screenshot6.png,images\dolibarr_screenshot7.png,images\dolibarr_screenshot8.png,images\dolibarr_screenshot9.png,images\dolibarr_screenshot10.png,images\dolibarr_screenshot11.png,images\dolibarr_screenshot12.png"
|
||||||
Source: "scripts\*.*"; DestDir: "{app}\www\dolibarr\scripts"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,product\materiel.net.php,product\import-product.php"
|
Source: "scripts\*.*"; DestDir: "{app}\www\dolibarr\scripts"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,product\materiel.net.php,product\import-product.php"
|
||||||
Source: "*.*"; DestDir: "{app}\www\dolibarr"; Flags: ignoreversion; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,default.properties,install.lock"
|
Source: "*.*"; DestDir: "{app}\www\dolibarr"; Flags: ignoreversion; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,default.properties,install.lock"
|
||||||
@ -118,8 +119,8 @@ Source: "build\exe\doliwamp\phpmyadmin.conf.install"; DestDir: "{app}\alias"; Fl
|
|||||||
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\my.ini.install"; DestDir: "{app}\bin\mysql\mysql5.5.12"; 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.6.17"; Flags: ignoreversion;
|
Source: "build\exe\doliwamp\php.ini.install"; DestDir: "{app}\bin\php\php5.5.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;
|
||||||
@ -145,6 +146,12 @@ Name: "{userdesktop}\Dolibarr Help center"; Filename: "{app}\rundolihelp.bat"; W
|
|||||||
;Name: "{userstartup}\DoliWamp server"; Filename: "{app}\startdoliwamp.bat"; WorkingDir: "{app}"; Flags: runminimized; IconFilename: {app}\www\dolibarr\doc\images\dolibarr.ico
|
;Name: "{userstartup}\DoliWamp server"; Filename: "{app}\startdoliwamp.bat"; WorkingDir: "{app}"; Flags: runminimized; IconFilename: {app}\www\dolibarr\doc\images\dolibarr.ico
|
||||||
|
|
||||||
|
|
||||||
|
[Registry]
|
||||||
|
; Add "run as admin" flag. Same than command line: reg add "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "<Path to your exe>" /t REG_SZ /d RUNASADMIN
|
||||||
|
Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\"; ValueType: String; ValueName: "{app}\startdoliwamp.bat"; ValueData: "RUNASADMIN"; Flags: uninsdeletekeyifempty uninsdeletevalue;
|
||||||
|
Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\"; ValueType: String; ValueName: "{app}\stopdoliwamp.bat"; ValueData: "RUNASADMIN"; Flags: uninsdeletekeyifempty uninsdeletevalue;
|
||||||
|
|
||||||
|
|
||||||
[Code]
|
[Code]
|
||||||
|
|
||||||
//variables globales
|
//variables globales
|
||||||
@ -197,7 +204,7 @@ 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' ;
|
||||||
mysqlVersion := '5.6.17';
|
mysqlVersion := '5.0.45';
|
||||||
phpmyadminVersion := '4.1.14';
|
phpmyadminVersion := '4.1.14';
|
||||||
|
|
||||||
smtpServer := 'localhost';
|
smtpServer := 'localhost';
|
||||||
@ -255,14 +262,13 @@ begin
|
|||||||
|
|
||||||
// Prepare an object calle "Page" of type wpInstalling.
|
// Prepare an object calle "Page" of type wpInstalling.
|
||||||
// Object will be show later in NextButtonClick function.
|
// Object will be show later in NextButtonClick function.
|
||||||
Page := CreateInputQueryPage(wpInstalling,
|
Page := CreateInputQueryPage(wpInstalling, CustomMessage('TechnicalParameters'), '', CustomMessage('IfFirstInstall'));
|
||||||
CustomMessage('TechnicalParameters'), '',
|
|
||||||
CustomMessage('IfFirstInstall'));
|
|
||||||
|
|
||||||
// TODO Add control differently if first install or update
|
// TODO Add control differently if first install or update
|
||||||
if firstinstall
|
if firstinstall
|
||||||
then
|
then
|
||||||
begin
|
begin
|
||||||
|
// False means it's not a password edit
|
||||||
Page.Add(CustomMessage('SMTPServer'), False);
|
Page.Add(CustomMessage('SMTPServer'), False);
|
||||||
Page.Add(CustomMessage('ApachePort'), False);
|
Page.Add(CustomMessage('ApachePort'), False);
|
||||||
Page.Add(CustomMessage('MySqlPort'), False);
|
Page.Add(CustomMessage('MySqlPort'), False);
|
||||||
@ -270,6 +276,7 @@ begin
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
|
// False means it's not a password edit
|
||||||
Page.Add(CustomMessage('SMTPServer'), False);
|
Page.Add(CustomMessage('SMTPServer'), False);
|
||||||
Page.Add(CustomMessage('ApachePort'), False);
|
Page.Add(CustomMessage('ApachePort'), False);
|
||||||
Page.Add(CustomMessage('MySqlPort'), False);
|
Page.Add(CustomMessage('MySqlPort'), False);
|
||||||
@ -309,8 +316,7 @@ function NextButtonClick(CurPageID: Integer): Boolean;
|
|||||||
var myResult: Integer;
|
var myResult: Integer;
|
||||||
var res: Boolean;
|
var res: Boolean;
|
||||||
var paramok: Boolean;
|
var paramok: Boolean;
|
||||||
var datadirold: String;
|
var datadir: String;
|
||||||
var datadirnew: String;
|
|
||||||
var exedirold: String;
|
var exedirold: String;
|
||||||
var exedirnew: String;
|
var exedirnew: String;
|
||||||
var themessage: String;
|
var themessage: String;
|
||||||
@ -329,10 +335,22 @@ begin
|
|||||||
winPath := ExpandConstant('{win}');
|
winPath := ExpandConstant('{win}');
|
||||||
pathWithSlashes := path;
|
pathWithSlashes := path;
|
||||||
StringChange (pathWithSlashes, '\','/');
|
StringChange (pathWithSlashes, '\','/');
|
||||||
datadirold := pathWithSlashes+'/bin/mysql/mysql5.6.17/data';
|
datadir := pathWithSlashes+'/bin/mysql/data';
|
||||||
datadirnew := pathWithSlashes+'/bin/mysql/data';
|
exedirold := pathWithSlashes+'/bin/mysql/mysql5.0.45';
|
||||||
exedirold := pathWithSlashes+'/bin/mysql/mysql5.6.17';
|
exedirnew := pathWithSlashes+'/bin/mysql/mysql5.0.45';
|
||||||
exedirnew := pathWithSlashes+'/bin/mysql/mysql5.6.17';
|
|
||||||
|
|
||||||
|
//----------------------------------------------
|
||||||
|
// Test if msvcr110 DLL has been installed
|
||||||
|
//----------------------------------------------
|
||||||
|
|
||||||
|
if not FileExists ('c:/windows/system32/msvcr110.dll') and not FileExists ('c:/windows/sysWOW64/msvcr110.dll') and not FileExists ('c:/winnt/system32/msvcr110.dll') and not FileExists ('c:/winnt/sysWOW64/msvcr110.dll') then
|
||||||
|
begin
|
||||||
|
// TODO Copy file or ask to install package ?
|
||||||
|
//CustomMessage('YouWillInstallDoliWamp')+#13#13
|
||||||
|
MsgBox('The package vcredist_x86.exe must have been installed first. It seems it is not. Please install it first from <a href="http://ccc">http://www.microsoft.com/en-us/download/details.aspx?id=30679</a> then restart DoliWamp installation/upgrade.',mbInformation,MB_OK);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
// If we have a new database version, we should only copy old my.ini file into new directory
|
// If we have a new database version, we should only copy old my.ini file into new directory
|
||||||
// and change only all basedir= strings to use new version. Like this, data dir is still correct.
|
// and change only all basedir= strings to use new version. Like this, data dir is still correct.
|
||||||
@ -522,13 +540,29 @@ begin
|
|||||||
begin
|
begin
|
||||||
//navigateur
|
//navigateur
|
||||||
browser := 'iexplore.exe';
|
browser := 'iexplore.exe';
|
||||||
if FileExists (pfPath+'/Mozilla Firefox/firefox.exe') then
|
|
||||||
|
if browser = 'iexplore.exe' then
|
||||||
begin
|
begin
|
||||||
if MsgBox(CustomMessage('FirefoxDetected'),mbConfirmation,MB_YESNO) = IDYES then
|
if FileExists (pfPath+'/Google/Chrome/Application/chrome.exe') then
|
||||||
begin
|
begin
|
||||||
browser := pfPath+'/Mozilla Firefox/firefox.exe';
|
if MsgBox(CustomMessage('ChromeDetected'),mbConfirmation,MB_YESNO) = IDYES then
|
||||||
|
begin
|
||||||
|
browser := pfPath+'/Google/Chrome/Application/chrome.exe';
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
if browser = 'iexplore.exe' then
|
||||||
|
begin
|
||||||
|
if FileExists (pfPath+'/Mozilla Firefox/firefox.exe') then
|
||||||
|
begin
|
||||||
|
if MsgBox(CustomMessage('FirefoxDetected'),mbConfirmation,MB_YESNO) = IDYES then
|
||||||
|
begin
|
||||||
|
browser := pfPath+'/Mozilla Firefox/firefox.exe';
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
if browser = 'iexplore.exe' then
|
if browser = 'iexplore.exe' then
|
||||||
begin
|
begin
|
||||||
if FileExists (pfPath+'/Internet Explorer/iexplore.exe') then
|
if FileExists (pfPath+'/Internet Explorer/iexplore.exe') then
|
||||||
@ -593,14 +627,28 @@ begin
|
|||||||
destFile := pathWithSlashes+'/alias/dolibarr.conf';
|
destFile := pathWithSlashes+'/alias/dolibarr.conf';
|
||||||
srcFile := pathWithSlashes+'/alias/dolibarr.conf.install';
|
srcFile := pathWithSlashes+'/alias/dolibarr.conf.install';
|
||||||
|
|
||||||
if not FileExists (destFile) and FileExists(srcFile) then
|
if FileExists(srcFile) then
|
||||||
begin
|
begin
|
||||||
LoadStringFromFile (srcFile, srcContents);
|
if not FileExists (destFile) then
|
||||||
|
begin
|
||||||
|
LoadStringFromFile (srcFile, srcContents);
|
||||||
|
|
||||||
StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
|
StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
|
||||||
StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
|
StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
|
||||||
|
|
||||||
SaveStringToFile(destFile, srcContents, False);
|
SaveStringToFile(destFile, srcContents, False);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
// We must replace to use format 2.4 of apache
|
||||||
|
DeleteFile(destFile);
|
||||||
|
LoadStringFromFile (srcFile, srcContents);
|
||||||
|
|
||||||
|
StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
|
||||||
|
StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
|
||||||
|
|
||||||
|
SaveStringToFile(destFile, srcContents, False);
|
||||||
|
end
|
||||||
end
|
end
|
||||||
DeleteFile(srcFile);
|
DeleteFile(srcFile);
|
||||||
|
|
||||||
@ -614,13 +662,24 @@ begin
|
|||||||
destFile := pathWithSlashes+'/apps/phpmyadmin'+phpmyadminVersion+'/config.inc.php';
|
destFile := pathWithSlashes+'/apps/phpmyadmin'+phpmyadminVersion+'/config.inc.php';
|
||||||
srcFile := pathWithSlashes+'/apps/phpmyadmin'+phpmyadminVersion+'/config.inc.php.install';
|
srcFile := pathWithSlashes+'/apps/phpmyadmin'+phpmyadminVersion+'/config.inc.php.install';
|
||||||
|
|
||||||
if not FileExists (destFile) and FileExists (srcFile) then
|
if FileExists(srcFile) then
|
||||||
begin
|
begin
|
||||||
// sinon on prends le fichier par defaut
|
if not FileExists (destFile) then
|
||||||
LoadStringFromFile (srcFile, srcContents);
|
begin
|
||||||
StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
|
LoadStringFromFile (srcFile, srcContents);
|
||||||
StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
|
StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
|
||||||
SaveStringToFile(destFile,srcContents, False);
|
StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
|
||||||
|
SaveStringToFile(destFile,srcContents, False);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
// We must replace to use format 2.4 of apache
|
||||||
|
DeleteFile(destFile);
|
||||||
|
LoadStringFromFile (srcFile, srcContents);
|
||||||
|
StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
|
||||||
|
StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
|
||||||
|
SaveStringToFile(destFile,srcContents, False);
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@ -663,7 +722,7 @@ begin
|
|||||||
//installDir et version de php
|
//installDir et version de php
|
||||||
StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
|
StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
|
||||||
StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
|
StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
|
||||||
StringChangeEx (srcContents, 'WAMPMYSQLVERSION', myport, True);
|
StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
|
||||||
|
|
||||||
SaveStringToFile(destFile,srcContents, False);
|
SaveStringToFile(destFile,srcContents, False);
|
||||||
end
|
end
|
||||||
@ -737,6 +796,7 @@ begin
|
|||||||
LoadStringFromFile (srcFile, srcContents);
|
LoadStringFromFile (srcFile, srcContents);
|
||||||
|
|
||||||
//version de apache et mysql
|
//version de apache et mysql
|
||||||
|
StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
|
||||||
StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
|
StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
|
||||||
StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
|
StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
|
||||||
|
|
||||||
@ -745,27 +805,6 @@ begin
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------
|
|
||||||
// Create file install_services_auto.bat (always)
|
|
||||||
//----------------------------------------------
|
|
||||||
|
|
||||||
destFile := pathWithSlashes+'/install_services_auto.bat';
|
|
||||||
srcFile := pathWithSlashes+'/install_services_auto.bat.install';
|
|
||||||
|
|
||||||
if FileExists (srcFile) then
|
|
||||||
begin
|
|
||||||
LoadStringFromFile (srcFile, srcContents);
|
|
||||||
|
|
||||||
//version de apache et mysql
|
|
||||||
StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
|
|
||||||
StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
|
|
||||||
|
|
||||||
SaveStringToFile(destFile,srcContents, False);
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------
|
//----------------------------------------------
|
||||||
// Create file uninstall_services.bat (always)
|
// Create file uninstall_services.bat (always)
|
||||||
//----------------------------------------------
|
//----------------------------------------------
|
||||||
@ -778,6 +817,7 @@ begin
|
|||||||
LoadStringFromFile (srcFile, srcContents);
|
LoadStringFromFile (srcFile, srcContents);
|
||||||
|
|
||||||
//version de apache et mysql
|
//version de apache et mysql
|
||||||
|
StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
|
||||||
StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
|
StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
|
||||||
StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
|
StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
|
||||||
|
|
||||||
@ -966,7 +1006,6 @@ end;
|
|||||||
procedure DeinitializeSetup();
|
procedure DeinitializeSetup();
|
||||||
begin
|
begin
|
||||||
// DeleteFile(path+'\install_services.bat');
|
// DeleteFile(path+'\install_services.bat');
|
||||||
// DeleteFile(path+'\install_services_auto.bat');
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -1003,7 +1042,7 @@ Filename: "{app}\rundoliwamp.bat"; Description: {cm:LaunchNow}; Flags: shellexec
|
|||||||
|
|
||||||
[UninstallDelete]
|
[UninstallDelete]
|
||||||
Type: files; Name: "{app}\*.*"
|
Type: files; Name: "{app}\*.*"
|
||||||
Type: files; Name: "{app}\bin\mysql\mysql5.6.17\*.*"
|
Type: files; Name: "{app}\bin\mysql\mysql5.0.45\*.*"
|
||||||
Type: filesandordirs; Name: "{app}\alias"
|
Type: filesandordirs; Name: "{app}\alias"
|
||||||
Type: filesandordirs; Name: "{app}\apps"
|
Type: filesandordirs; Name: "{app}\apps"
|
||||||
Type: filesandordirs; Name: "{app}\bin\apache"
|
Type: filesandordirs; Name: "{app}\bin\apache"
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 3.2 KiB |
@ -66,19 +66,23 @@ Listen WAMPAPACHEPORT
|
|||||||
#
|
#
|
||||||
LoadModule actions_module modules/mod_actions.so
|
LoadModule actions_module modules/mod_actions.so
|
||||||
LoadModule alias_module modules/mod_alias.so
|
LoadModule alias_module modules/mod_alias.so
|
||||||
|
LoadModule allowmethods_module modules/mod_allowmethods.so
|
||||||
LoadModule asis_module modules/mod_asis.so
|
LoadModule asis_module modules/mod_asis.so
|
||||||
LoadModule auth_basic_module modules/mod_auth_basic.so
|
LoadModule auth_basic_module modules/mod_auth_basic.so
|
||||||
#LoadModule auth_digest_module modules/mod_auth_digest.so
|
#LoadModule auth_digest_module modules/mod_auth_digest.so
|
||||||
#LoadModule authn_anon_module modules/mod_authn_anon.so
|
#LoadModule authn_anon_module modules/mod_authn_anon.so
|
||||||
#LoadModule authn_dbm_module modules/mod_authn_dbm.so
|
#LoadModule authn_dbm_module modules/mod_authn_dbm.so
|
||||||
LoadModule authn_default_module modules/mod_authn_default.so
|
|
||||||
LoadModule authn_file_module modules/mod_authn_file.so
|
LoadModule authn_file_module modules/mod_authn_file.so
|
||||||
|
LoadModule authz_core_module modules/mod_authz_core.so
|
||||||
#LoadModule authz_dbm_module modules/mod_authz_dbm.so
|
#LoadModule authz_dbm_module modules/mod_authz_dbm.so
|
||||||
LoadModule authz_default_module modules/mod_authz_default.so
|
#LoadModule authz_default_module modules/mod_authz_default.so
|
||||||
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
|
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
|
||||||
LoadModule authz_host_module modules/mod_authz_host.so
|
LoadModule authz_host_module modules/mod_authz_host.so
|
||||||
LoadModule authz_user_module modules/mod_authz_user.so
|
LoadModule authz_user_module modules/mod_authz_user.so
|
||||||
LoadModule autoindex_module modules/mod_autoindex.so
|
LoadModule autoindex_module modules/mod_autoindex.so
|
||||||
|
LoadModule buffer_module modules/mod_buffer.so
|
||||||
|
LoadModule cache_module modules/mod_cache.so
|
||||||
|
LoadModule cache_disk_module modules/mod_cache_disk.so
|
||||||
#LoadModule cern_meta_module modules/mod_cern_meta.so
|
#LoadModule cern_meta_module modules/mod_cern_meta.so
|
||||||
LoadModule cgi_module modules/mod_cgi.so
|
LoadModule cgi_module modules/mod_cgi.so
|
||||||
#LoadModule dav_module modules/mod_dav.so
|
#LoadModule dav_module modules/mod_dav.so
|
||||||
@ -96,23 +100,23 @@ LoadModule isapi_module modules/mod_isapi.so
|
|||||||
LoadModule log_config_module modules/mod_log_config.so
|
LoadModule log_config_module modules/mod_log_config.so
|
||||||
LoadModule mime_module modules/mod_mime.so
|
LoadModule mime_module modules/mod_mime.so
|
||||||
#LoadModule mime_magic_module modules/mod_mime_magic.so
|
#LoadModule mime_magic_module modules/mod_mime_magic.so
|
||||||
|
LoadModule negotiation_module modules/mod_negotiation.so
|
||||||
#LoadModule proxy_module modules/mod_proxy.so
|
#LoadModule proxy_module modules/mod_proxy.so
|
||||||
#LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
|
#LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
|
||||||
#LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
|
#LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
|
||||||
#LoadModule proxy_connect_module modules/mod_proxy_connect.so
|
#LoadModule proxy_connect_module modules/mod_proxy_connect.so
|
||||||
#LoadModule proxy_http_module modules/mod_proxy_http.so
|
#LoadModule proxy_http_module modules/mod_proxy_http.so
|
||||||
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
|
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
|
||||||
LoadModule negotiation_module modules/mod_negotiation.so
|
|
||||||
LoadModule rewrite_module modules/mod_rewrite.so
|
LoadModule rewrite_module modules/mod_rewrite.so
|
||||||
LoadModule setenvif_module modules/mod_setenvif.so
|
LoadModule setenvif_module modules/mod_setenvif.so
|
||||||
#LoadModule speling_module modules/mod_speling.so
|
#LoadModule speling_module modules/mod_speling.so
|
||||||
|
#LoadModule ssl_module modules/mod_ssl.so
|
||||||
LoadModule status_module modules/mod_status.so
|
LoadModule status_module modules/mod_status.so
|
||||||
#LoadModule unique_id_module modules/mod_unique_id.so
|
#LoadModule unique_id_module modules/mod_unique_id.so
|
||||||
LoadModule userdir_module modules/mod_userdir.so
|
LoadModule userdir_module modules/mod_userdir.so
|
||||||
#LoadModule usertrack_module modules/mod_usertrack.so
|
#LoadModule usertrack_module modules/mod_usertrack.so
|
||||||
LoadModule vhost_alias_module modules/mod_vhost_alias.so
|
LoadModule vhost_alias_module modules/mod_vhost_alias.so
|
||||||
#LoadModule ssl_module modules/mod_ssl.so
|
LoadModule php5_module "WAMPROOT/bin/php/phpWAMPPHPVERSION/php5apache2_4.dll"
|
||||||
LoadModule php5_module "WAMPROOT/bin/php/phpWAMPPHPVERSION/php5apache2_2.dll"
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# ExtendedStatus controls whether Apache will generate "full" status
|
# ExtendedStatus controls whether Apache will generate "full" status
|
||||||
@ -123,9 +127,9 @@ ExtendedStatus On
|
|||||||
|
|
||||||
<Location /server-status>
|
<Location /server-status>
|
||||||
SetHandler server-status
|
SetHandler server-status
|
||||||
Order Deny,Allow
|
Require local
|
||||||
Deny from all
|
#Require ip 1.2.3.4
|
||||||
Allow from localhost, 127.0.0.1
|
#Require host 1.2.3.4
|
||||||
</Location>
|
</Location>
|
||||||
|
|
||||||
|
|
||||||
@ -211,9 +215,7 @@ KeepAliveTimeout 30
|
|||||||
<Directory />
|
<Directory />
|
||||||
Options FollowSymLinks
|
Options FollowSymLinks
|
||||||
AllowOverride None
|
AllowOverride None
|
||||||
Order deny,allow
|
Require all denied
|
||||||
Deny from all
|
|
||||||
Satisfy all
|
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -253,9 +255,10 @@ KeepAliveTimeout 30
|
|||||||
# Controls who can get stuff from this server.
|
# Controls who can get stuff from this server.
|
||||||
#
|
#
|
||||||
# onlineoffline tag - don't remove
|
# onlineoffline tag - don't remove
|
||||||
Order Deny,Allow
|
<RequireAny>
|
||||||
Deny from all
|
Require ip 127.0.0.1
|
||||||
Allow from 127.0.0.1
|
Require host localhost
|
||||||
|
</RequireAny>
|
||||||
|
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
@ -272,8 +275,7 @@ KeepAliveTimeout 30
|
|||||||
# viewed by Web clients.
|
# viewed by Web clients.
|
||||||
#
|
#
|
||||||
<FilesMatch "^\.ht">
|
<FilesMatch "^\.ht">
|
||||||
Order allow,deny
|
Require all denied
|
||||||
Deny from all
|
|
||||||
</FilesMatch>
|
</FilesMatch>
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -359,8 +361,7 @@ LogLevel warn
|
|||||||
<Directory "cgi-bin">
|
<Directory "cgi-bin">
|
||||||
AllowOverride None
|
AllowOverride None
|
||||||
Options None
|
Options None
|
||||||
Order allow,deny
|
Require all granted
|
||||||
Allow from all
|
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -410,7 +411,7 @@ LogLevel warn
|
|||||||
# keep browsers from trying to display binary files as though they are
|
# keep browsers from trying to display binary files as though they are
|
||||||
# text.
|
# text.
|
||||||
#
|
#
|
||||||
DefaultType text/plain
|
#DefaultType text/plain
|
||||||
|
|
||||||
<IfModule mime_module>
|
<IfModule mime_module>
|
||||||
#
|
#
|
||||||
|
|||||||
@ -8,6 +8,8 @@ echo ---- Execute install_services.bat >> doliwamp.log 2>>&1
|
|||||||
REM NET STOP doliwampapache
|
REM NET STOP doliwampapache
|
||||||
REM NET STOP doliwampmysqld
|
REM NET STOP doliwampmysqld
|
||||||
|
|
||||||
|
cd "WAMPROOT"
|
||||||
|
|
||||||
REM Apache x.x
|
REM Apache x.x
|
||||||
.\bin\apache\apacheWAMPAPACHEVERSION\bin\httpd.exe -k install -n doliwampapache
|
.\bin\apache\apacheWAMPAPACHEVERSION\bin\httpd.exe -k install -n doliwampapache
|
||||||
REM reg add HKLM\SYSTEM\CurrentControlSet\Services\doliwampapache /V Start /t REG_DWORD /d 3 /f
|
REM reg add HKLM\SYSTEM\CurrentControlSet\Services\doliwampapache /V Start /t REG_DWORD /d 3 /f
|
||||||
@ -19,3 +21,5 @@ REM Mysql 5.1+
|
|||||||
REM .\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld.exe --install doliwampmysqld
|
REM .\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld.exe --install doliwampmysqld
|
||||||
|
|
||||||
echo ---- End script >> doliwamp.log 2>>&1
|
echo ---- End script >> doliwamp.log 2>>&1
|
||||||
|
|
||||||
|
REM pause
|
||||||
|
|||||||
@ -77,10 +77,6 @@ log-error=WAMPROOT/logs/mysql.log
|
|||||||
#Path to the database root
|
#Path to the database root
|
||||||
datadir=WAMPROOT/bin/mysql/data
|
datadir=WAMPROOT/bin/mysql/data
|
||||||
|
|
||||||
# The default character set that will be used when a new schema or table is
|
|
||||||
# created and no character set is defined
|
|
||||||
default-character-set=latin1
|
|
||||||
|
|
||||||
# The default storage engine that will be used when create new tables when
|
# The default storage engine that will be used when create new tables when
|
||||||
default-storage-engine=INNODB
|
default-storage-engine=INNODB
|
||||||
|
|
||||||
@ -101,13 +97,6 @@ max_connections=255
|
|||||||
# slowdown instead of a performance improvement.
|
# slowdown instead of a performance improvement.
|
||||||
query_cache_size=8M
|
query_cache_size=8M
|
||||||
|
|
||||||
# The number of open tables for all threads. Increasing this value
|
|
||||||
# increases the number of file descriptors that mysqld requires.
|
|
||||||
# Therefore you have to make sure to set the amount of open files
|
|
||||||
# allowed to at least 4096 in the variable "open-files-limit" in
|
|
||||||
# section [mysqld_safe]
|
|
||||||
table_cache=510
|
|
||||||
|
|
||||||
# Maximum size for internal (in-memory) temporary tables. If a table
|
# Maximum size for internal (in-memory) temporary tables. If a table
|
||||||
# grows larger than this value, it is automatically converted to disk
|
# grows larger than this value, it is automatically converted to disk
|
||||||
# based table This limitation is for a single table. There can be many
|
# based table This limitation is for a single table. There can be many
|
||||||
@ -125,18 +114,6 @@ thread_cache_size=12
|
|||||||
|
|
||||||
#*** MyISAM Specific options
|
#*** MyISAM Specific options
|
||||||
|
|
||||||
# The maximum size of the temporary file MySQL is allowed to use while
|
|
||||||
# recreating the index (during REPAIR, ALTER TABLE or LOAD DATA INFILE.
|
|
||||||
# If the file-size would be bigger than this, the index will be created
|
|
||||||
# through the key cache (which is slower).
|
|
||||||
myisam_max_sort_file_size=100G
|
|
||||||
|
|
||||||
# If the temporary file used for fast index creation would be bigger
|
|
||||||
# than using the key cache by the amount specified here, then prefer the
|
|
||||||
# key cache method. This is mainly used to force long character keys in
|
|
||||||
# large tables to use the slower key cache method to create the index.
|
|
||||||
myisam_max_extra_sort_file_size=100G
|
|
||||||
|
|
||||||
# If the temporary file used for fast index creation would be bigger
|
# If the temporary file used for fast index creation would be bigger
|
||||||
# than using the key cache by the amount specified here, then prefer the
|
# than using the key cache by the amount specified here, then prefer the
|
||||||
# key cache method. This is mainly used to force long character keys in
|
# key cache method. This is mainly used to force long character keys in
|
||||||
@ -170,13 +147,6 @@ sort_buffer_size=203K
|
|||||||
# and speed up some things.
|
# and speed up some things.
|
||||||
#skip-innodb
|
#skip-innodb
|
||||||
|
|
||||||
# Additional memory pool that is used by InnoDB to store metadata
|
|
||||||
# information. If InnoDB requires more memory for this purpose it will
|
|
||||||
# start to allocate it from the OS. As this is fast enough on most
|
|
||||||
# recent operating systems, you normally do not need to change this
|
|
||||||
# value. SHOW INNODB STATUS will display the current amount used.
|
|
||||||
innodb_additional_mem_pool_size=2M
|
|
||||||
|
|
||||||
# If set to 1, InnoDB will flush (fsync) the transaction logs to the
|
# If set to 1, InnoDB will flush (fsync) the transaction logs to the
|
||||||
# disk at each commit, which offers full ACID behavior. If you are
|
# disk at each commit, which offers full ACID behavior. If you are
|
||||||
# willing to compromise this safety, and you are running small
|
# willing to compromise this safety, and you are running small
|
||||||
@ -226,7 +196,7 @@ port=WAMPMYSQLPORT
|
|||||||
|
|
||||||
|
|
||||||
#Path to installation directory. All paths are usually resolved relative to this.
|
#Path to installation directory. All paths are usually resolved relative to this.
|
||||||
basedir=WAMPROOT/bin/mysql/mysql5.6.17
|
basedir=WAMPROOT/bin/mysql/mysqlWAMPMYSQLVERSION
|
||||||
|
|
||||||
#log file
|
#log file
|
||||||
log-error=WAMPROOT/logs/mysql.log
|
log-error=WAMPROOT/logs/mysql.log
|
||||||
@ -234,10 +204,6 @@ log-error=WAMPROOT/logs/mysql.log
|
|||||||
#Path to the database root
|
#Path to the database root
|
||||||
datadir=WAMPROOT/bin/mysql/data
|
datadir=WAMPROOT/bin/mysql/data
|
||||||
|
|
||||||
# The default character set that will be used when a new schema or table is
|
|
||||||
# created and no character set is defined
|
|
||||||
default-character-set=latin1
|
|
||||||
|
|
||||||
# The default storage engine that will be used when create new tables when
|
# The default storage engine that will be used when create new tables when
|
||||||
default-storage-engine=INNODB
|
default-storage-engine=INNODB
|
||||||
|
|
||||||
@ -258,13 +224,6 @@ max_connections=255
|
|||||||
# slowdown instead of a performance improvement.
|
# slowdown instead of a performance improvement.
|
||||||
query_cache_size=8M
|
query_cache_size=8M
|
||||||
|
|
||||||
# The number of open tables for all threads. Increasing this value
|
|
||||||
# increases the number of file descriptors that mysqld requires.
|
|
||||||
# Therefore you have to make sure to set the amount of open files
|
|
||||||
# allowed to at least 4096 in the variable "open-files-limit" in
|
|
||||||
# section [mysqld_safe]
|
|
||||||
table_cache=510
|
|
||||||
|
|
||||||
# Maximum size for internal (in-memory) temporary tables. If a table
|
# Maximum size for internal (in-memory) temporary tables. If a table
|
||||||
# grows larger than this value, it is automatically converted to disk
|
# grows larger than this value, it is automatically converted to disk
|
||||||
# based table This limitation is for a single table. There can be many
|
# based table This limitation is for a single table. There can be many
|
||||||
@ -282,18 +241,6 @@ thread_cache_size=12
|
|||||||
|
|
||||||
#*** MyISAM Specific options
|
#*** MyISAM Specific options
|
||||||
|
|
||||||
# The maximum size of the temporary file MySQL is allowed to use while
|
|
||||||
# recreating the index (during REPAIR, ALTER TABLE or LOAD DATA INFILE.
|
|
||||||
# If the file-size would be bigger than this, the index will be created
|
|
||||||
# through the key cache (which is slower).
|
|
||||||
myisam_max_sort_file_size=100G
|
|
||||||
|
|
||||||
# If the temporary file used for fast index creation would be bigger
|
|
||||||
# than using the key cache by the amount specified here, then prefer the
|
|
||||||
# key cache method. This is mainly used to force long character keys in
|
|
||||||
# large tables to use the slower key cache method to create the index.
|
|
||||||
myisam_max_extra_sort_file_size=100G
|
|
||||||
|
|
||||||
# If the temporary file used for fast index creation would be bigger
|
# If the temporary file used for fast index creation would be bigger
|
||||||
# than using the key cache by the amount specified here, then prefer the
|
# than using the key cache by the amount specified here, then prefer the
|
||||||
# key cache method. This is mainly used to force long character keys in
|
# key cache method. This is mainly used to force long character keys in
|
||||||
@ -327,13 +274,6 @@ sort_buffer_size=203K
|
|||||||
# and speed up some things.
|
# and speed up some things.
|
||||||
#skip-innodb
|
#skip-innodb
|
||||||
|
|
||||||
# Additional memory pool that is used by InnoDB to store metadata
|
|
||||||
# information. If InnoDB requires more memory for this purpose it will
|
|
||||||
# start to allocate it from the OS. As this is fast enough on most
|
|
||||||
# recent operating systems, you normally do not need to change this
|
|
||||||
# value. SHOW INNODB STATUS will display the current amount used.
|
|
||||||
innodb_additional_mem_pool_size=2M
|
|
||||||
|
|
||||||
# If set to 1, InnoDB will flush (fsync) the transaction logs to the
|
# If set to 1, InnoDB will flush (fsync) the transaction logs to the
|
||||||
# disk at each commit, which offers full ACID behavior. If you are
|
# disk at each commit, which offers full ACID behavior. If you are
|
||||||
# willing to compromise this safety, and you are running small
|
# willing to compromise this safety, and you are running small
|
||||||
|
|||||||
@ -1,22 +1,35 @@
|
|||||||
Alias /phpmyadmin "WAMPROOT/apps/phpmyadminWAMPPHPMYADMINVERSION/"
|
Alias /phpmyadmin "WAMPROOT/apps/phpmyadminWAMPPHPMYADMINVERSION/"
|
||||||
|
|
||||||
# to give access to phpmyadmin from outside
|
# NOTE FOR APACHE 2.2:
|
||||||
# replace the lines
|
# To grant access to dolibarr from outside set lines
|
||||||
#
|
#
|
||||||
# Order Deny,Allow
|
# Order Allow,Deny
|
||||||
|
# Allow from all
|
||||||
|
#
|
||||||
|
# instead of
|
||||||
|
#
|
||||||
|
# Order Deny,Allow
|
||||||
# Deny from all
|
# Deny from all
|
||||||
# Allow from 127.0.0.1
|
# Allow from 127.0.0.1
|
||||||
#
|
#
|
||||||
# by
|
# NOTE FOR APACHE 2.3:
|
||||||
|
# To grant access to dolibarr from outside set lines
|
||||||
#
|
#
|
||||||
# Order Allow,Deny
|
# Require all granted
|
||||||
# Allow from all
|
#
|
||||||
|
# instead of
|
||||||
|
#
|
||||||
|
# <RequireAny>
|
||||||
|
# Require ip 127.0.0.1
|
||||||
|
# Require host localhost
|
||||||
|
# <RequireAny>
|
||||||
#
|
#
|
||||||
|
|
||||||
<Directory "WAMPROOT/apps/phpmyadminWAMPPHPMYADMINVERSION/">
|
<Directory "WAMPROOT/apps/phpmyadminWAMPPHPMYADMINVERSION/">
|
||||||
Options Indexes FollowSymLinks MultiViews
|
Options Indexes FollowSymLinks MultiViews
|
||||||
AllowOverride all
|
AllowOverride all
|
||||||
Order Deny,Allow
|
<RequireAny>
|
||||||
Deny from all
|
Require ip 127.0.0.1
|
||||||
Allow from 127.0.0.1
|
Require host localhost
|
||||||
|
</RequireAny>
|
||||||
</Directory>
|
</Directory>
|
||||||
@ -10,9 +10,11 @@ NET START doliwampapache >> doliwamp.log 2>>&1
|
|||||||
echo NET START doliwampmysqld >> doliwamp.log 2>>&1
|
echo NET START doliwampmysqld >> doliwamp.log 2>>&1
|
||||||
NET START doliwampmysqld >> doliwamp.log 2>>&1
|
NET START doliwampmysqld >> doliwamp.log 2>>&1
|
||||||
|
|
||||||
|
REM You can also check logs into c:/dolibarr/logs if start fails
|
||||||
|
|
||||||
echo Please wait...
|
echo Please wait...
|
||||||
echo ---- End script >> doliwamp.log 2>>&1
|
echo ---- End script >> doliwamp.log 2>>&1
|
||||||
|
|
||||||
REM sleep is not a Windows commande
|
REM sleep is not a Windows commande
|
||||||
REM sleep 1
|
REM sleep 2
|
||||||
ping 1.1.1.1 -n 1 -w 1000 > nul
|
ping 127.0.0.1 -n 2 -w 1000 > nul
|
||||||
|
|||||||
@ -13,5 +13,6 @@ echo
|
|||||||
|
|
||||||
echo Running Mysql as user process (this process does not return so we use "start")
|
echo Running Mysql as user process (this process does not return so we use "start")
|
||||||
start WAMPROOT\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld-nt.exe --defaults-file=WAMPROOT\bin\mysql\mysqlWAMPMYSQLVERSION\my.ini --console
|
start WAMPROOT\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld-nt.exe --defaults-file=WAMPROOT\bin\mysql\mysqlWAMPMYSQLVERSION\my.ini --console
|
||||||
|
REM start WAMPROOT\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld.exe --defaults-file=WAMPROOT\bin\mysql\mysqlWAMPMYSQLVERSION\my.ini --console
|
||||||
|
|
||||||
pause
|
pause
|
||||||
@ -15,4 +15,6 @@ echo ---- End script >> doliwamp.log 2>>&1
|
|||||||
|
|
||||||
REM sleep is not a Windows command
|
REM sleep is not a Windows command
|
||||||
REM sleep 1
|
REM sleep 1
|
||||||
ping 1.1.1.1 -n 1 -w 1000 > nul
|
ping 1.1.1.1 -n 1 -w 1000 > nul
|
||||||
|
|
||||||
|
REM pause
|
||||||
|
|||||||
@ -3,10 +3,19 @@ REM --------------------------------------------------------
|
|||||||
REM This script install Apache and Mysql DoliWamp services
|
REM This script install Apache and Mysql DoliWamp services
|
||||||
REM --------------------------------------------------------
|
REM --------------------------------------------------------
|
||||||
|
|
||||||
|
cd "WAMPROOT"
|
||||||
|
|
||||||
echo ---- Execute uninstall_services.bat >> doliwamp.log 2>>&1
|
echo ---- Execute uninstall_services.bat >> doliwamp.log 2>>&1
|
||||||
NET STOP doliwampapache
|
NET STOP doliwampapache
|
||||||
.\bin\apache\apacheWAMPAPACHEVERSION\bin\httpd.exe -k uninstall -n doliwampapache
|
.\bin\apache\apacheWAMPAPACHEVERSION\bin\httpd.exe -k uninstall -n doliwampapache
|
||||||
|
|
||||||
NET STOP doliwampmysqld
|
NET STOP doliwampmysqld
|
||||||
|
REM Mysql 5.0-
|
||||||
.\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld-nt.exe --remove doliwampmysqld
|
.\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld-nt.exe --remove doliwampmysqld
|
||||||
|
REM Mysql 5.1+
|
||||||
|
REM .\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld.exe --remove doliwampmysqld
|
||||||
|
|
||||||
REM wampmanager.exe -quit -id={doliwampserver}
|
REM wampmanager.exe -quit -id={doliwampserver}
|
||||||
echo ---- End script >> doliwamp.log 2>>&1
|
echo ---- End script >> doliwamp.log 2>>&1
|
||||||
|
|
||||||
|
REM pause
|
||||||
|
|||||||
@ -53,7 +53,7 @@ if (-d "/usr/src/RPM") { $RPMDIR="/usr/src/RPM"; } # mandrake
|
|||||||
|
|
||||||
|
|
||||||
use vars qw/ $REVISION $VERSION /;
|
use vars qw/ $REVISION $VERSION /;
|
||||||
$VERSION="3.3";
|
$VERSION="4.0";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -356,6 +356,7 @@ if ($nboftargetok) {
|
|||||||
# Test that the ChangeLog is ok
|
# Test that the ChangeLog is ok
|
||||||
$TMPBUILDTOCHECKCHANGELOG=$BUILD;
|
$TMPBUILDTOCHECKCHANGELOG=$BUILD;
|
||||||
$TMPBUILDTOCHECKCHANGELOG =~ s/\-rc\d*//;
|
$TMPBUILDTOCHECKCHANGELOG =~ s/\-rc\d*//;
|
||||||
|
$TMPBUILDTOCHECKCHANGELOG =~ s/\-beta\d*//;
|
||||||
print "Check if ChangeLog is ok for version $MAJOR.$MINOR\.$TMPBUILDTOCHECKCHANGELOG\n";
|
print "Check if ChangeLog is ok for version $MAJOR.$MINOR\.$TMPBUILDTOCHECKCHANGELOG\n";
|
||||||
$ret=`grep "ChangeLog for $MAJOR.$MINOR\.$TMPBUILDTOCHECKCHANGELOG" "$SOURCE/ChangeLog" 2>&1`;
|
$ret=`grep "ChangeLog for $MAJOR.$MINOR\.$TMPBUILDTOCHECKCHANGELOG" "$SOURCE/ChangeLog" 2>&1`;
|
||||||
if (! $ret)
|
if (! $ret)
|
||||||
@ -458,6 +459,7 @@ if ($nboftargetok) {
|
|||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/codetemplates`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/codetemplates`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/dbmodel`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/dbmodel`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/initdata`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/initdata`;
|
||||||
|
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/initdemo`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/iso-normes`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/iso-normes`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/ldap`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/ldap`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/licence`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/licence`;
|
||||||
@ -1121,7 +1123,7 @@ if ($nboftargetok) {
|
|||||||
{
|
{
|
||||||
if ($CHOOSEDPUBLISH{$target} < 0) { next; }
|
if ($CHOOSEDPUBLISH{$target} < 0) { next; }
|
||||||
|
|
||||||
print "\nList of files to publish\n";
|
print "\nList of files to publish (BUILD=$BUILD)\n";
|
||||||
%filestoscansf=(
|
%filestoscansf=(
|
||||||
"$DESTI/package_rpm_generic/$FILENAMERPM"=>'Dolibarr installer for Fedora-Redhat-Mandriva-Opensuse (DoliRpm)',
|
"$DESTI/package_rpm_generic/$FILENAMERPM"=>'Dolibarr installer for Fedora-Redhat-Mandriva-Opensuse (DoliRpm)',
|
||||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'Dolibarr installer for Debian-Ubuntu (DoliDeb)',
|
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'Dolibarr installer for Debian-Ubuntu (DoliDeb)',
|
||||||
@ -1136,6 +1138,22 @@ if ($nboftargetok) {
|
|||||||
"$DESTI/standard/$FILENAMETGZ.tgz"=>'standard',
|
"$DESTI/standard/$FILENAMETGZ.tgz"=>'standard',
|
||||||
"$DESTI/standard/$FILENAMETGZ.zip"=>'standard'
|
"$DESTI/standard/$FILENAMETGZ.zip"=>'standard'
|
||||||
);
|
);
|
||||||
|
if ($target eq 'ASSO' && $BUILD =~ /[a-z]/i) { # Not stable
|
||||||
|
%filestoscansf=(
|
||||||
|
"$DESTI/$FILENAMERPM"=>'Dolibarr installer for Fedora-Redhat-Mandriva-Opensuse (DoliRpm)',
|
||||||
|
"$DESTI/${FILENAMEDEB}_all.deb"=>'Dolibarr installer for Debian-Ubuntu (DoliDeb)',
|
||||||
|
"$DESTI/$FILENAMEEXEDOLIWAMP.exe"=>'Dolibarr installer for Windows (DoliWamp)',
|
||||||
|
"$DESTI/$FILENAMETGZ.tgz"=>'Dolibarr ERP-CRM',
|
||||||
|
"$DESTI/$FILENAMETGZ.zip"=>'Dolibarr ERP-CRM'
|
||||||
|
);
|
||||||
|
%filestoscanstableasso=(
|
||||||
|
"$DESTI/$FILENAMERPM"=>'',
|
||||||
|
"$DESTI/${FILENAMEDEB}_all.deb"=>'',
|
||||||
|
"$DESTI/$FILENAMEEXEDOLIWAMP.exe"=>'',
|
||||||
|
"$DESTI/$FILENAMETGZ.tgz"=>'',
|
||||||
|
"$DESTI/$FILENAMETGZ.zip"=>''
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
use POSIX qw/strftime/;
|
use POSIX qw/strftime/;
|
||||||
foreach my $file (sort keys %filestoscansf)
|
foreach my $file (sort keys %filestoscansf)
|
||||||
|
|||||||
@ -1,195 +1,195 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<PADGEN_PML>
|
<PADGEN_PML>
|
||||||
<AppVerInfo>PADGen 3.1.1.47</AppVerInfo>
|
<AppVerInfo>PADGen 3.1.1.47</AppVerInfo>
|
||||||
<CompanyName />
|
<CompanyName />
|
||||||
<Program_Info>
|
<Program_Info>
|
||||||
<Program_Name>DoliWamp</Program_Name>
|
<Program_Name>DoliWamp</Program_Name>
|
||||||
<Program_Version>3.5.0</Program_Version>
|
<Program_Version>3.5.0</Program_Version>
|
||||||
<Program_Release_Month>01</Program_Release_Month>
|
<Program_Release_Month>01</Program_Release_Month>
|
||||||
<Program_Release_Day>01</Program_Release_Day>
|
<Program_Release_Day>01</Program_Release_Day>
|
||||||
<Program_Release_Year>2014</Program_Release_Year>
|
<Program_Release_Year>2014</Program_Release_Year>
|
||||||
<Program_Cost_Dollars />
|
<Program_Cost_Dollars />
|
||||||
<Program_Cost_Other_Code />
|
<Program_Cost_Other_Code />
|
||||||
<Program_Cost_Other />
|
<Program_Cost_Other />
|
||||||
<Program_Type>Freeware</Program_Type>
|
<Program_Type>Freeware</Program_Type>
|
||||||
<Program_Release_Status>Major Update</Program_Release_Status>
|
<Program_Release_Status>Major Update</Program_Release_Status>
|
||||||
<Program_Install_Support>Install and Uninstall</Program_Install_Support>
|
<Program_Install_Support>Install and Uninstall</Program_Install_Support>
|
||||||
<Program_OS_Support>Win2000,Win7 x32,Win7 x64,Win98,WinOther,WinServer,WinVista,WinVista x64,WinXP,Other</Program_OS_Support>
|
<Program_OS_Support>Win2000,Win7 x32,Win7 x64,Win98,WinOther,WinServer,WinVista,WinVista x64,WinXP,Other</Program_OS_Support>
|
||||||
<Program_Language>English,Arabic,Catalan,Chinese,Dutch,Finnish,French,German,Icelandic,Italian,Norwegian,Polish,Portuguese,Romanian,Russian,Slovenian,Spanish,Swedish,Turkish</Program_Language>
|
<Program_Language>English,Arabic,Catalan,Chinese,Dutch,Finnish,French,German,Icelandic,Italian,Norwegian,Polish,Portuguese,Romanian,Russian,Slovenian,Spanish,Swedish,Turkish</Program_Language>
|
||||||
<Program_Change_Info>http://www.dolibarr.org</Program_Change_Info>
|
<Program_Change_Info>http://www.dolibarr.org</Program_Change_Info>
|
||||||
<Program_Specific_Category>Business</Program_Specific_Category>
|
<Program_Specific_Category>Business</Program_Specific_Category>
|
||||||
<Program_Category_Class>Business::Accounting & Finance</Program_Category_Class>
|
<Program_Category_Class>Business::Accounting & Finance</Program_Category_Class>
|
||||||
<Program_System_Requirements>None</Program_System_Requirements>
|
<Program_System_Requirements>None</Program_System_Requirements>
|
||||||
<File_Info>
|
<File_Info>
|
||||||
<File_Size_Bytes>26048004</File_Size_Bytes>
|
<File_Size_Bytes>26048004</File_Size_Bytes>
|
||||||
<File_Size_K>25437</File_Size_K>
|
<File_Size_K>25437</File_Size_K>
|
||||||
<File_Size_MB>24.84</File_Size_MB>
|
<File_Size_MB>24.84</File_Size_MB>
|
||||||
</File_Info>
|
</File_Info>
|
||||||
<Expire_Info>
|
<Expire_Info>
|
||||||
<Has_Expire_Info>N</Has_Expire_Info>
|
<Has_Expire_Info>N</Has_Expire_Info>
|
||||||
<Expire_Count />
|
<Expire_Count />
|
||||||
<Expire_Based_On>Days</Expire_Based_On>
|
<Expire_Based_On>Days</Expire_Based_On>
|
||||||
<Expire_Other_Info />
|
<Expire_Other_Info />
|
||||||
<Expire_Month />
|
<Expire_Month />
|
||||||
<Expire_Day />
|
<Expire_Day />
|
||||||
<Expire_Year />
|
<Expire_Year />
|
||||||
</Expire_Info>
|
</Expire_Info>
|
||||||
</Program_Info>
|
</Program_Info>
|
||||||
<Program_Descriptions>
|
<Program_Descriptions>
|
||||||
<English>
|
<English>
|
||||||
<Keywords>doliwamp, dolibarr, erp, crm, invoices, commercial proposals, orders, accounting, stock, products, agenda, bank, business, company, foundation, management</Keywords>
|
<Keywords>doliwamp, dolibarr, erp, crm, invoices, commercial proposals, orders, accounting, stock, products, agenda, bank, business, company, foundation, management</Keywords>
|
||||||
<Char_Desc_45>DoliWamp, Dolibarr ERP/CRM for Windows</Char_Desc_45>
|
<Char_Desc_45>DoliWamp, Dolibarr ERP/CRM for Windows</Char_Desc_45>
|
||||||
<Char_Desc_80>DoliWamp, the easy to use Dolibarr for Windows to manage your company,foundation</Char_Desc_80>
|
<Char_Desc_80>DoliWamp, the easy to use Dolibarr for Windows to manage your company,foundation</Char_Desc_80>
|
||||||
<Char_Desc_250>DoliWamp is the Dolibarr ERP/CRM for Windows, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs.</Char_Desc_250>
|
<Char_Desc_250>DoliWamp is the Dolibarr ERP/CRM for Windows, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs.</Char_Desc_250>
|
||||||
<Char_Desc_450>DoliWamp is the Dolibarr ERP/CRM autoinstaller for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. Dolibarr ERP/CRM is a software package built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations.</Char_Desc_450>
|
<Char_Desc_450>DoliWamp is the Dolibarr ERP/CRM autoinstaller for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. Dolibarr ERP/CRM is a software package built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations.</Char_Desc_450>
|
||||||
<Char_Desc_2000>DoliWamp is the Dolibarr ERP/CRM for Windows. Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations (You can manage or follow contacts, invoices, orders, commercial proposals, products, stock management, agenda, mass emailings, members of a foundation, bank accounts...). Based on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems), you can install it as a standalone program or use it from anywhere with any web browser. Dolibarr is an OpenSource project. It differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: Simple to install, Simple to use, Simple to develop.
|
<Char_Desc_2000>DoliWamp is the Dolibarr ERP/CRM for Windows. Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations (You can manage or follow contacts, invoices, orders, commercial proposals, products, stock management, agenda, mass emailings, members of a foundation, bank accounts...). Based on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems), you can install it as a standalone program or use it from anywhere with any web browser. Dolibarr is an OpenSource project. It differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: Simple to install, Simple to use, Simple to develop.
|
||||||
DoliWamp is the auto-installer for Windows users with no technical knowledge to install Dolibarr ERP/CRM and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file.</Char_Desc_2000>
|
DoliWamp is the auto-installer for Windows users with no technical knowledge to install Dolibarr ERP/CRM and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file.</Char_Desc_2000>
|
||||||
</English>
|
</English>
|
||||||
<French>
|
<French>
|
||||||
<Keywords>doliwamp, dolibarr, erp, crm, factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations, entreprises, PME, TPE</Keywords>
|
<Keywords>doliwamp, dolibarr, erp, crm, factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations, entreprises, PME, TPE</Keywords>
|
||||||
<Char_Desc_45>DoliWamp, Dolibarr ERP/CRM pour Windows</Char_Desc_45>
|
<Char_Desc_45>DoliWamp, Dolibarr ERP/CRM pour Windows</Char_Desc_45>
|
||||||
<Char_Desc_80>DoliWamp, la distribution de Dolibarr pour gérer votre entreprise ou association</Char_Desc_80>
|
<Char_Desc_80>DoliWamp, la distribution de Dolibarr pour gérer votre entreprise ou association</Char_Desc_80>
|
||||||
<Char_Desc_250>DoliWamp est la version spécialisée pour Windows de Dolibarr ERP-CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_250>
|
<Char_Desc_250>DoliWamp est la version spécialisée pour Windows de Dolibarr ERP-CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_250>
|
||||||
<Char_Desc_450>DoliWamp est la version spécialisée pour Windows de Dolibarr ERP-CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_450>
|
<Char_Desc_450>DoliWamp est la version spécialisée pour Windows de Dolibarr ERP-CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_450>
|
||||||
<Char_Desc_2000>DoliWamp est la version spécialisée pour Windows de Dolibarr ERP-CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_2000>
|
<Char_Desc_2000>DoliWamp est la version spécialisée pour Windows de Dolibarr ERP-CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_2000>
|
||||||
</French>
|
</French>
|
||||||
<Italian>
|
<Italian>
|
||||||
<Keywords>doliwamp, dolibarr, erp, crm, gestionale, medie imprese, fondazioni</Keywords>
|
<Keywords>doliwamp, dolibarr, erp, crm, gestionale, medie imprese, fondazioni</Keywords>
|
||||||
<Char_Desc_45>DoliWamp, Dolibarr ERP/CRM per Windows</Char_Desc_45>
|
<Char_Desc_45>DoliWamp, Dolibarr ERP/CRM per Windows</Char_Desc_45>
|
||||||
<Char_Desc_80>Gestionale open source e gratuito per piccole e medie imprese, fondazioni</Char_Desc_80>
|
<Char_Desc_80>Gestionale open source e gratuito per piccole e medie imprese, fondazioni</Char_Desc_80>
|
||||||
<Char_Desc_250>Dolibarr è un a gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività.</Char_Desc_250>
|
<Char_Desc_250>Dolibarr è un a gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività.</Char_Desc_250>
|
||||||
<Char_Desc_450>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_450>
|
<Char_Desc_450>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_450>
|
||||||
<Char_Desc_2000>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibar è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_2000>
|
<Char_Desc_2000>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibar è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_2000>
|
||||||
</Italian>
|
</Italian>
|
||||||
</Program_Descriptions>
|
</Program_Descriptions>
|
||||||
<Web_Info>
|
<Web_Info>
|
||||||
<Application_URLs>
|
<Application_URLs>
|
||||||
<Application_Info_URL>http://www.nltechno.com/pages/dolibarrwinbin.php</Application_Info_URL>
|
<Application_Info_URL>http://www.nltechno.com/pages/dolibarrwinbin.php</Application_Info_URL>
|
||||||
<Application_Order_URL>http://www.nltechno.com/pages/dolibarrwinbin.php</Application_Order_URL>
|
<Application_Order_URL>http://www.nltechno.com/pages/dolibarrwinbin.php</Application_Order_URL>
|
||||||
<Application_Screenshot_URL>http://www.dolibarr.org/images/dolibarr_screenshot1.png</Application_Screenshot_URL>
|
<Application_Screenshot_URL>http://www.dolibarr.org/images/dolibarr_screenshot1.png</Application_Screenshot_URL>
|
||||||
<Application_Icon_URL>http://www.dolibarr.org/images/dolibarr.gif</Application_Icon_URL>
|
<Application_Icon_URL>http://www.dolibarr.org/images/dolibarr.gif</Application_Icon_URL>
|
||||||
<Application_XML_File_URL>http://www.dolibarr.org/files/pad_doliwamp.xml</Application_XML_File_URL>
|
<Application_XML_File_URL>http://www.dolibarr.org/files/pad_doliwamp.xml</Application_XML_File_URL>
|
||||||
</Application_URLs>
|
</Application_URLs>
|
||||||
<Download_URLs>
|
<Download_URLs>
|
||||||
<Primary_Download_URL>http://www.dolibarr.org/files/doliwamp.exe</Primary_Download_URL>
|
<Primary_Download_URL>http://www.dolibarr.org/files/doliwamp.exe</Primary_Download_URL>
|
||||||
<Secondary_Download_URL>http://www.dolibarr.org/files/doliwamp.exe</Secondary_Download_URL>
|
<Secondary_Download_URL>http://www.dolibarr.org/files/doliwamp.exe</Secondary_Download_URL>
|
||||||
<Additional_Download_URL_1 />
|
<Additional_Download_URL_1 />
|
||||||
<Additional_Download_URL_2 />
|
<Additional_Download_URL_2 />
|
||||||
</Download_URLs>
|
</Download_URLs>
|
||||||
</Web_Info>
|
</Web_Info>
|
||||||
<Permissions>
|
<Permissions>
|
||||||
<Distribution_Permissions>GNU GPL</Distribution_Permissions>
|
<Distribution_Permissions>GNU GPL</Distribution_Permissions>
|
||||||
<EULA>GNU GPL</EULA>
|
<EULA>GNU GPL</EULA>
|
||||||
</Permissions>
|
</Permissions>
|
||||||
<Affiliates>
|
<Affiliates>
|
||||||
<Affiliates_FORM>Y</Affiliates_FORM>
|
<Affiliates_FORM>Y</Affiliates_FORM>
|
||||||
<Affiliates_VERSION>1.4</Affiliates_VERSION>
|
<Affiliates_VERSION>1.4</Affiliates_VERSION>
|
||||||
<Affiliates_URL>http://pad.asp-software.org/extensions/Affiliates.htm</Affiliates_URL>
|
<Affiliates_URL>http://pad.asp-software.org/extensions/Affiliates.htm</Affiliates_URL>
|
||||||
<Affiliates_Information_Page />
|
<Affiliates_Information_Page />
|
||||||
<Affiliates_Avangate_Order_Page />
|
<Affiliates_Avangate_Order_Page />
|
||||||
<Affiliates_Avangate_Vendor_ID />
|
<Affiliates_Avangate_Vendor_ID />
|
||||||
<Affiliates_Avangate_Product_ID />
|
<Affiliates_Avangate_Product_ID />
|
||||||
<Affiliates_Avangate_Maximum_Commission_Rate />
|
<Affiliates_Avangate_Maximum_Commission_Rate />
|
||||||
<Affiliates_BMTMicro_Order_Page />
|
<Affiliates_BMTMicro_Order_Page />
|
||||||
<Affiliates_BMTMicro_Vendor_ID />
|
<Affiliates_BMTMicro_Vendor_ID />
|
||||||
<Affiliates_BMTMicro_Product_ID />
|
<Affiliates_BMTMicro_Product_ID />
|
||||||
<Affiliates_BMTMicro_Maximum_Commission_Rate />
|
<Affiliates_BMTMicro_Maximum_Commission_Rate />
|
||||||
<Affiliates_Cleverbridge_Order_Page />
|
<Affiliates_Cleverbridge_Order_Page />
|
||||||
<Affiliates_Cleverbridge_Vendor_ID />
|
<Affiliates_Cleverbridge_Vendor_ID />
|
||||||
<Affiliates_Cleverbridge_Product_ID />
|
<Affiliates_Cleverbridge_Product_ID />
|
||||||
<Affiliates_Cleverbridge_Maximum_Commission_Rate />
|
<Affiliates_Cleverbridge_Maximum_Commission_Rate />
|
||||||
<Affiliates_clixGalore_Order_Page />
|
<Affiliates_clixGalore_Order_Page />
|
||||||
<Affiliates_clixGalore_Vendor_ID />
|
<Affiliates_clixGalore_Vendor_ID />
|
||||||
<Affiliates_clixGalore_Product_ID />
|
<Affiliates_clixGalore_Product_ID />
|
||||||
<Affiliates_clixGalore_Maximum_Commission_Rate />
|
<Affiliates_clixGalore_Maximum_Commission_Rate />
|
||||||
<Affiliates_CommissionJunction_Order_Page />
|
<Affiliates_CommissionJunction_Order_Page />
|
||||||
<Affiliates_CommissionJunction_Vendor_ID />
|
<Affiliates_CommissionJunction_Vendor_ID />
|
||||||
<Affiliates_CommissionJunction_Product_ID />
|
<Affiliates_CommissionJunction_Product_ID />
|
||||||
<Affiliates_CommissionJunction_Maximum_Commission_Rate />
|
<Affiliates_CommissionJunction_Maximum_Commission_Rate />
|
||||||
<Affiliates_DigiBuy_Order_Page />
|
<Affiliates_DigiBuy_Order_Page />
|
||||||
<Affiliates_DigiBuy_Vendor_ID />
|
<Affiliates_DigiBuy_Vendor_ID />
|
||||||
<Affiliates_DigiBuy_Product_ID />
|
<Affiliates_DigiBuy_Product_ID />
|
||||||
<Affiliates_DigiBuy_Maximum_Commission_Rate />
|
<Affiliates_DigiBuy_Maximum_Commission_Rate />
|
||||||
<Affiliates_DigitalCandle_Order_Page />
|
<Affiliates_DigitalCandle_Order_Page />
|
||||||
<Affiliates_DigitalCandle_Vendor_ID />
|
<Affiliates_DigitalCandle_Vendor_ID />
|
||||||
<Affiliates_DigitalCandle_Product_ID />
|
<Affiliates_DigitalCandle_Product_ID />
|
||||||
<Affiliates_DigitalCandle_Maximum_Commission_Rate />
|
<Affiliates_DigitalCandle_Maximum_Commission_Rate />
|
||||||
<Affiliates_Emetrix_Order_Page />
|
<Affiliates_Emetrix_Order_Page />
|
||||||
<Affiliates_Emetrix_Vendor_ID />
|
<Affiliates_Emetrix_Vendor_ID />
|
||||||
<Affiliates_Emetrix_Product_ID />
|
<Affiliates_Emetrix_Product_ID />
|
||||||
<Affiliates_Emetrix_Maximum_Commission_Rate />
|
<Affiliates_Emetrix_Maximum_Commission_Rate />
|
||||||
<Affiliates_eSellerate_Order_Page />
|
<Affiliates_eSellerate_Order_Page />
|
||||||
<Affiliates_eSellerate_Vendor_ID />
|
<Affiliates_eSellerate_Vendor_ID />
|
||||||
<Affiliates_eSellerate_Product_ID />
|
<Affiliates_eSellerate_Product_ID />
|
||||||
<Affiliates_eSellerate_Maximum_Commission_Rate />
|
<Affiliates_eSellerate_Maximum_Commission_Rate />
|
||||||
<Affiliates_Kagi_Order_Page />
|
<Affiliates_Kagi_Order_Page />
|
||||||
<Affiliates_Kagi_Vendor_ID />
|
<Affiliates_Kagi_Vendor_ID />
|
||||||
<Affiliates_Kagi_Product_ID />
|
<Affiliates_Kagi_Product_ID />
|
||||||
<Affiliates_Kagi_Maximum_Commission_Rate />
|
<Affiliates_Kagi_Maximum_Commission_Rate />
|
||||||
<Affiliates_LinkShare_Order_Page />
|
<Affiliates_LinkShare_Order_Page />
|
||||||
<Affiliates_LinkShare_Vendor_ID />
|
<Affiliates_LinkShare_Vendor_ID />
|
||||||
<Affiliates_LinkShare_Product_ID />
|
<Affiliates_LinkShare_Product_ID />
|
||||||
<Affiliates_LinkShare_Maximum_Commission_Rate />
|
<Affiliates_LinkShare_Maximum_Commission_Rate />
|
||||||
<Affiliates_NorthStarSol_Order_Page />
|
<Affiliates_NorthStarSol_Order_Page />
|
||||||
<Affiliates_NorthStarSol_Vendor_ID />
|
<Affiliates_NorthStarSol_Vendor_ID />
|
||||||
<Affiliates_NorthStarSol_Product_ID />
|
<Affiliates_NorthStarSol_Product_ID />
|
||||||
<Affiliates_NorthStarSol_Maximum_Commission_Rate />
|
<Affiliates_NorthStarSol_Maximum_Commission_Rate />
|
||||||
<Affiliates_OneNetworkDirect_Order_Page />
|
<Affiliates_OneNetworkDirect_Order_Page />
|
||||||
<Affiliates_OneNetworkDirect_Vendor_ID />
|
<Affiliates_OneNetworkDirect_Vendor_ID />
|
||||||
<Affiliates_OneNetworkDirect_Product_ID />
|
<Affiliates_OneNetworkDirect_Product_ID />
|
||||||
<Affiliates_OneNetworkDirect_Maximum_Commission_Rate />
|
<Affiliates_OneNetworkDirect_Maximum_Commission_Rate />
|
||||||
<Affiliates_Order1_Order_Page />
|
<Affiliates_Order1_Order_Page />
|
||||||
<Affiliates_Order1_Vendor_ID />
|
<Affiliates_Order1_Vendor_ID />
|
||||||
<Affiliates_Order1_Product_ID />
|
<Affiliates_Order1_Product_ID />
|
||||||
<Affiliates_Order1_Maximum_Commission_Rate />
|
<Affiliates_Order1_Maximum_Commission_Rate />
|
||||||
<Affiliates_Osolis_Order_Page />
|
<Affiliates_Osolis_Order_Page />
|
||||||
<Affiliates_Osolis_Vendor_ID />
|
<Affiliates_Osolis_Vendor_ID />
|
||||||
<Affiliates_Osolis_Product_ID />
|
<Affiliates_Osolis_Product_ID />
|
||||||
<Affiliates_Osolis_Maximum_Commission_Rate />
|
<Affiliates_Osolis_Maximum_Commission_Rate />
|
||||||
<Affiliates_Plimus_Order_Page />
|
<Affiliates_Plimus_Order_Page />
|
||||||
<Affiliates_Plimus_Vendor_ID />
|
<Affiliates_Plimus_Vendor_ID />
|
||||||
<Affiliates_Plimus_Product_ID />
|
<Affiliates_Plimus_Product_ID />
|
||||||
<Affiliates_Plimus_Maximum_Commission_Rate />
|
<Affiliates_Plimus_Maximum_Commission_Rate />
|
||||||
<Affiliates_Regnet_Order_Page />
|
<Affiliates_Regnet_Order_Page />
|
||||||
<Affiliates_Regnet_Vendor_ID />
|
<Affiliates_Regnet_Vendor_ID />
|
||||||
<Affiliates_Regnet_Product_ID />
|
<Affiliates_Regnet_Product_ID />
|
||||||
<Affiliates_Regnet_Maximum_Commission_Rate />
|
<Affiliates_Regnet_Maximum_Commission_Rate />
|
||||||
<Affiliates_Regnow_Order_Page />
|
<Affiliates_Regnow_Order_Page />
|
||||||
<Affiliates_Regnow_Vendor_ID />
|
<Affiliates_Regnow_Vendor_ID />
|
||||||
<Affiliates_Regnow_Product_ID />
|
<Affiliates_Regnow_Product_ID />
|
||||||
<Affiliates_Regnow_Maximum_Commission_Rate />
|
<Affiliates_Regnow_Maximum_Commission_Rate />
|
||||||
<Affiliates_Regsoft_Order_Page />
|
<Affiliates_Regsoft_Order_Page />
|
||||||
<Affiliates_Regsoft_Vendor_ID />
|
<Affiliates_Regsoft_Vendor_ID />
|
||||||
<Affiliates_Regsoft_Product_ID />
|
<Affiliates_Regsoft_Product_ID />
|
||||||
<Affiliates_Regsoft_Maximum_Commission_Rate />
|
<Affiliates_Regsoft_Maximum_Commission_Rate />
|
||||||
<Affiliates_ShareIt_Order_Page />
|
<Affiliates_ShareIt_Order_Page />
|
||||||
<Affiliates_ShareIt_Vendor_ID />
|
<Affiliates_ShareIt_Vendor_ID />
|
||||||
<Affiliates_ShareIt_Product_ID />
|
<Affiliates_ShareIt_Product_ID />
|
||||||
<Affiliates_ShareIt_Maximum_Commission_Rate />
|
<Affiliates_ShareIt_Maximum_Commission_Rate />
|
||||||
<Affiliates_Shareasale_Order_Page />
|
<Affiliates_Shareasale_Order_Page />
|
||||||
<Affiliates_Shareasale_Vendor_ID />
|
<Affiliates_Shareasale_Vendor_ID />
|
||||||
<Affiliates_Shareasale_Product_ID />
|
<Affiliates_Shareasale_Product_ID />
|
||||||
<Affiliates_Shareasale_Maximum_Commission_Rate />
|
<Affiliates_Shareasale_Maximum_Commission_Rate />
|
||||||
<Affiliates_SWReg_Order_Page />
|
<Affiliates_SWReg_Order_Page />
|
||||||
<Affiliates_SWReg_Vendor_ID />
|
<Affiliates_SWReg_Vendor_ID />
|
||||||
<Affiliates_SWReg_Product_ID />
|
<Affiliates_SWReg_Product_ID />
|
||||||
<Affiliates_SWReg_Maximum_Commission_Rate />
|
<Affiliates_SWReg_Maximum_Commission_Rate />
|
||||||
<Affiliates_V-Share_Order_Page />
|
<Affiliates_V-Share_Order_Page />
|
||||||
<Affiliates_V-Share_Vendor_ID />
|
<Affiliates_V-Share_Vendor_ID />
|
||||||
<Affiliates_V-Share_Product_ID />
|
<Affiliates_V-Share_Product_ID />
|
||||||
<Affiliates_V-Share_Maximum_Commission_Rate />
|
<Affiliates_V-Share_Maximum_Commission_Rate />
|
||||||
<Affiliates_VFree_Order_Page />
|
<Affiliates_VFree_Order_Page />
|
||||||
<Affiliates_VFree_Vendor_ID />
|
<Affiliates_VFree_Vendor_ID />
|
||||||
<Affiliates_VFree_Product_ID />
|
<Affiliates_VFree_Product_ID />
|
||||||
<Affiliates_VFree_Maximum_Commission_Rate />
|
<Affiliates_VFree_Maximum_Commission_Rate />
|
||||||
<Affiliates_Yaskifo_Order_Page />
|
<Affiliates_Yaskifo_Order_Page />
|
||||||
<Affiliates_Yaskifo_Vendor_ID />
|
<Affiliates_Yaskifo_Vendor_ID />
|
||||||
<Affiliates_Yaskifo_Product_ID />
|
<Affiliates_Yaskifo_Product_ID />
|
||||||
<Affiliates_Yaskifo_Maximum_Commission_Rate />
|
<Affiliates_Yaskifo_Maximum_Commission_Rate />
|
||||||
</Affiliates>
|
</Affiliates>
|
||||||
<ASP>
|
<ASP>
|
||||||
<ASP_FORM>Y</ASP_FORM>
|
<ASP_FORM>Y</ASP_FORM>
|
||||||
<ASP_Member>N</ASP_Member>
|
<ASP_Member>N</ASP_Member>
|
||||||
<ASP_Member_Number />
|
<ASP_Member_Number />
|
||||||
</ASP>
|
</ASP>
|
||||||
</PADGEN_PML>
|
</PADGEN_PML>
|
||||||
|
|||||||
@ -1,202 +1,202 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<PADGEN_PML>
|
<PADGEN_PML>
|
||||||
<AppVerInfo>PADGen 3.1.1.47</AppVerInfo>
|
<AppVerInfo>PADGen 3.1.1.47</AppVerInfo>
|
||||||
<CompanyName />
|
<CompanyName />
|
||||||
<Program_Info>
|
<Program_Info>
|
||||||
<Program_Name>Dolibarr</Program_Name>
|
<Program_Name>Dolibarr</Program_Name>
|
||||||
<Program_Version>3.5.0</Program_Version>
|
<Program_Version>3.5.0</Program_Version>
|
||||||
<Program_Release_Month>01</Program_Release_Month>
|
<Program_Release_Month>01</Program_Release_Month>
|
||||||
<Program_Release_Day>01</Program_Release_Day>
|
<Program_Release_Day>01</Program_Release_Day>
|
||||||
<Program_Release_Year>2014</Program_Release_Year>
|
<Program_Release_Year>2014</Program_Release_Year>
|
||||||
<Program_Cost_Dollars />
|
<Program_Cost_Dollars />
|
||||||
<Program_Cost_Other_Code />
|
<Program_Cost_Other_Code />
|
||||||
<Program_Cost_Other />
|
<Program_Cost_Other />
|
||||||
<Program_Type>Freeware</Program_Type>
|
<Program_Type>Freeware</Program_Type>
|
||||||
<Program_Release_Status>Major Update</Program_Release_Status>
|
<Program_Release_Status>Major Update</Program_Release_Status>
|
||||||
<Program_Install_Support>No Install Support</Program_Install_Support>
|
<Program_Install_Support>No Install Support</Program_Install_Support>
|
||||||
<Program_OS_Support>Linux,Mac OS X,Mac Other,Unix,Win2000,Win7 x32,Win7 x64,Win98,WinOther,WinServer,WinVista,WinVista x64,WinXP,Other</Program_OS_Support>
|
<Program_OS_Support>Linux,Mac OS X,Mac Other,Unix,Win2000,Win7 x32,Win7 x64,Win98,WinOther,WinServer,WinVista,WinVista x64,WinXP,Other</Program_OS_Support>
|
||||||
<Program_Language>English,Arabic,Catalan,Chinese,Danish,Dutch,Finnish,French,German,Greek,Icelandic,Italian,Norwegian,Polish,Portuguese,Romanian,Russian,Slovenian,Spanish,Swedish,Turkish</Program_Language>
|
<Program_Language>English,Arabic,Catalan,Chinese,Danish,Dutch,Finnish,French,German,Greek,Icelandic,Italian,Norwegian,Polish,Portuguese,Romanian,Russian,Slovenian,Spanish,Swedish,Turkish</Program_Language>
|
||||||
<Program_Change_Info>http://www.dolibarr.org</Program_Change_Info>
|
<Program_Change_Info>http://www.dolibarr.org</Program_Change_Info>
|
||||||
<Program_Specific_Category>Business</Program_Specific_Category>
|
<Program_Specific_Category>Business</Program_Specific_Category>
|
||||||
<Program_Category_Class>Business::Accounting & Finance</Program_Category_Class>
|
<Program_Category_Class>Business::Accounting & Finance</Program_Category_Class>
|
||||||
<Program_System_Requirements>None</Program_System_Requirements>
|
<Program_System_Requirements>None</Program_System_Requirements>
|
||||||
<File_Info>
|
<File_Info>
|
||||||
<File_Size_Bytes>9359175</File_Size_Bytes>
|
<File_Size_Bytes>9359175</File_Size_Bytes>
|
||||||
<File_Size_K>9139</File_Size_K>
|
<File_Size_K>9139</File_Size_K>
|
||||||
<File_Size_MB>8.93</File_Size_MB>
|
<File_Size_MB>8.93</File_Size_MB>
|
||||||
</File_Info>
|
</File_Info>
|
||||||
<Expire_Info>
|
<Expire_Info>
|
||||||
<Has_Expire_Info>N</Has_Expire_Info>
|
<Has_Expire_Info>N</Has_Expire_Info>
|
||||||
<Expire_Count />
|
<Expire_Count />
|
||||||
<Expire_Based_On>Days</Expire_Based_On>
|
<Expire_Based_On>Days</Expire_Based_On>
|
||||||
<Expire_Other_Info />
|
<Expire_Other_Info />
|
||||||
<Expire_Month />
|
<Expire_Month />
|
||||||
<Expire_Day />
|
<Expire_Day />
|
||||||
<Expire_Year />
|
<Expire_Year />
|
||||||
</Expire_Info>
|
</Expire_Info>
|
||||||
</Program_Info>
|
</Program_Info>
|
||||||
<Program_Descriptions>
|
<Program_Descriptions>
|
||||||
<English>
|
<English>
|
||||||
<Keywords>dolibarr, erp, crm, invoices, commercial proposals, orders, accounting, stock, products, agenda, bank, business, company, foundation, management, sme, doliwamp</Keywords>
|
<Keywords>dolibarr, erp, crm, invoices, commercial proposals, orders, accounting, stock, products, agenda, bank, business, company, foundation, management, sme, doliwamp</Keywords>
|
||||||
<Char_Desc_45>Dolibarr ERP & CRM</Char_Desc_45>
|
<Char_Desc_45>Dolibarr ERP & CRM</Char_Desc_45>
|
||||||
<Char_Desc_80>Dolibarr ERP & CRM, the easy to use open source software to manage your activity</Char_Desc_80>
|
<Char_Desc_80>Dolibarr ERP & CRM, the easy to use open source software to manage your activity</Char_Desc_80>
|
||||||
<Char_Desc_250>Dolibarr ERP & CRM, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs to follow.</Char_Desc_250>
|
<Char_Desc_250>Dolibarr ERP & CRM, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs to follow.</Char_Desc_250>
|
||||||
<Char_Desc_450>Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or medium companies, freelancers or foundations. We can say Dolibarr is an ERP or CRM. Dolibarr is also available with an auto-installer for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. See DoliWamp software for this.</Char_Desc_450>
|
<Char_Desc_450>Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or medium companies, freelancers or foundations. We can say Dolibarr is an ERP or CRM. Dolibarr is also available with an auto-installer for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. See DoliWamp software for this.</Char_Desc_450>
|
||||||
<Char_Desc_2000>Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple:
|
<Char_Desc_2000>Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple:
|
||||||
Simple to install
|
Simple to install
|
||||||
Simple to use
|
Simple to use
|
||||||
Simple to develop
|
Simple to develop
|
||||||
Note that Dolibarr is also available with an auto-installer for Windows or Ubuntu users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. This version is called DoliWamp (for Windows) or DoliBuntu (for Ubuntu/Debian).</Char_Desc_2000>
|
Note that Dolibarr is also available with an auto-installer for Windows or Ubuntu users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. This version is called DoliWamp (for Windows) or DoliBuntu (for Ubuntu/Debian).</Char_Desc_2000>
|
||||||
</English>
|
</English>
|
||||||
<Italian>
|
<Italian>
|
||||||
<Keywords>erp, crm, gestionale, medie imprese, fondazioni</Keywords>
|
<Keywords>erp, crm, gestionale, medie imprese, fondazioni</Keywords>
|
||||||
<Char_Desc_45>Gestionale open source e gratuito</Char_Desc_45>
|
<Char_Desc_45>Gestionale open source e gratuito</Char_Desc_45>
|
||||||
<Char_Desc_80>Gestionale open source e gratuito per piccole e medie imprese, fondazioni</Char_Desc_80>
|
<Char_Desc_80>Gestionale open source e gratuito per piccole e medie imprese, fondazioni</Char_Desc_80>
|
||||||
<Char_Desc_250>Dolibarr è un a gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività.</Char_Desc_250>
|
<Char_Desc_250>Dolibarr è un a gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività.</Char_Desc_250>
|
||||||
<Char_Desc_450>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_450>
|
<Char_Desc_450>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_450>
|
||||||
<Char_Desc_2000>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibar è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_2000>
|
<Char_Desc_2000>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibar è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_2000>
|
||||||
</Italian>
|
</Italian>
|
||||||
<French>
|
<French>
|
||||||
<Keywords>dolibarr, erp, crm, invoices, commercial proposals, orders, accounting, stock, products, agenda, bank, business, company, foundation, management, sme, doliwamp</Keywords>
|
<Keywords>dolibarr, erp, crm, invoices, commercial proposals, orders, accounting, stock, products, agenda, bank, business, company, foundation, management, sme, doliwamp</Keywords>
|
||||||
<Char_Desc_45>Dolibarr ERP & CRM</Char_Desc_45>
|
<Char_Desc_45>Dolibarr ERP & CRM</Char_Desc_45>
|
||||||
<Char_Desc_80>Dolibarr ERP & CRM, le gestionnaire simple pour gérer votre activité</Char_Desc_80>
|
<Char_Desc_80>Dolibarr ERP & CRM, le gestionnaire simple pour gérer votre activité</Char_Desc_80>
|
||||||
<Char_Desc_250>Dolibarr ERP & CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_250>
|
<Char_Desc_250>Dolibarr ERP & CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_250>
|
||||||
<Char_Desc_450>Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP).</Char_Desc_450>
|
<Char_Desc_450>Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP).</Char_Desc_450>
|
||||||
<Char_Desc_2000>Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP). Dolibarr vient compléter les offres déjà nombreuses de logiciels de cette catégorie (comme OpenBravo, OpenERP, SugarCRM, Neogia, Compiere, etc.) mais se démarque par le fait qu'ici tout est fait pour offrir de la simplicité (règle des 3 S):
|
<Char_Desc_2000>Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP). Dolibarr vient compléter les offres déjà nombreuses de logiciels de cette catégorie (comme OpenBravo, OpenERP, SugarCRM, Neogia, Compiere, etc.) mais se démarque par le fait qu'ici tout est fait pour offrir de la simplicité (règle des 3 S):
|
||||||
Simple pour l'installation (avec au choix des installeurs clé en main pour ceux qui ignorent comment installer un serveur Web, ou une installation manuelle)
|
Simple pour l'installation (avec au choix des installeurs clé en main pour ceux qui ignorent comment installer un serveur Web, ou une installation manuelle)
|
||||||
Simple pour l'utilisation (fonctions modulaires pour ne pas surcharger les menus, informations claires à la saisie)
|
Simple pour l'utilisation (fonctions modulaires pour ne pas surcharger les menus, informations claires à la saisie)
|
||||||
Simple pour le développement (pas de frameworks lourds).
|
Simple pour le développement (pas de frameworks lourds).
|
||||||
Dolibarr intègre en effet sa propre architecture (design patterns) permettant à tout développeur d'être tout de suite opérationnel sans connaissances particulières autre que le PHP. </Char_Desc_2000>
|
Dolibarr intègre en effet sa propre architecture (design patterns) permettant à tout développeur d'être tout de suite opérationnel sans connaissances particulières autre que le PHP. </Char_Desc_2000>
|
||||||
</French>
|
</French>
|
||||||
</Program_Descriptions>
|
</Program_Descriptions>
|
||||||
<Web_Info>
|
<Web_Info>
|
||||||
<Application_URLs>
|
<Application_URLs>
|
||||||
<Application_Info_URL>http://www.dolibarr.org</Application_Info_URL>
|
<Application_Info_URL>http://www.dolibarr.org</Application_Info_URL>
|
||||||
<Application_Order_URL>http://www.dolibarr.org</Application_Order_URL>
|
<Application_Order_URL>http://www.dolibarr.org</Application_Order_URL>
|
||||||
<Application_Screenshot_URL>http://www.dolibarr.org/images/dolibarr_screenshot1.png</Application_Screenshot_URL>
|
<Application_Screenshot_URL>http://www.dolibarr.org/images/dolibarr_screenshot1.png</Application_Screenshot_URL>
|
||||||
<Application_Icon_URL>http://www.dolibarr.org/images/dolibarr.gif</Application_Icon_URL>
|
<Application_Icon_URL>http://www.dolibarr.org/images/dolibarr.gif</Application_Icon_URL>
|
||||||
<Application_XML_File_URL>http://www.dolibarr.org/files/pad_dolibarr.xml</Application_XML_File_URL>
|
<Application_XML_File_URL>http://www.dolibarr.org/files/pad_dolibarr.xml</Application_XML_File_URL>
|
||||||
</Application_URLs>
|
</Application_URLs>
|
||||||
<Download_URLs>
|
<Download_URLs>
|
||||||
<Primary_Download_URL>http://www.dolibarr.org/files/dolibarr.tgz</Primary_Download_URL>
|
<Primary_Download_URL>http://www.dolibarr.org/files/dolibarr.tgz</Primary_Download_URL>
|
||||||
<Secondary_Download_URL>http://www.dolibarr.org/files/dolibarr.tgz</Secondary_Download_URL>
|
<Secondary_Download_URL>http://www.dolibarr.org/files/dolibarr.tgz</Secondary_Download_URL>
|
||||||
<Additional_Download_URL_1 />
|
<Additional_Download_URL_1 />
|
||||||
<Additional_Download_URL_2 />
|
<Additional_Download_URL_2 />
|
||||||
</Download_URLs>
|
</Download_URLs>
|
||||||
</Web_Info>
|
</Web_Info>
|
||||||
<Permissions>
|
<Permissions>
|
||||||
<Distribution_Permissions>GNU GPL</Distribution_Permissions>
|
<Distribution_Permissions>GNU GPL</Distribution_Permissions>
|
||||||
<EULA>GNU GPL</EULA>
|
<EULA>GNU GPL</EULA>
|
||||||
</Permissions>
|
</Permissions>
|
||||||
<Affiliates>
|
<Affiliates>
|
||||||
<Affiliates_FORM>Y</Affiliates_FORM>
|
<Affiliates_FORM>Y</Affiliates_FORM>
|
||||||
<Affiliates_VERSION>1.4</Affiliates_VERSION>
|
<Affiliates_VERSION>1.4</Affiliates_VERSION>
|
||||||
<Affiliates_URL>http://pad.asp-software.org/extensions/Affiliates.htm</Affiliates_URL>
|
<Affiliates_URL>http://pad.asp-software.org/extensions/Affiliates.htm</Affiliates_URL>
|
||||||
<Affiliates_Information_Page />
|
<Affiliates_Information_Page />
|
||||||
<Affiliates_Avangate_Order_Page />
|
<Affiliates_Avangate_Order_Page />
|
||||||
<Affiliates_Avangate_Vendor_ID />
|
<Affiliates_Avangate_Vendor_ID />
|
||||||
<Affiliates_Avangate_Product_ID />
|
<Affiliates_Avangate_Product_ID />
|
||||||
<Affiliates_Avangate_Maximum_Commission_Rate />
|
<Affiliates_Avangate_Maximum_Commission_Rate />
|
||||||
<Affiliates_BMTMicro_Order_Page />
|
<Affiliates_BMTMicro_Order_Page />
|
||||||
<Affiliates_BMTMicro_Vendor_ID />
|
<Affiliates_BMTMicro_Vendor_ID />
|
||||||
<Affiliates_BMTMicro_Product_ID />
|
<Affiliates_BMTMicro_Product_ID />
|
||||||
<Affiliates_BMTMicro_Maximum_Commission_Rate />
|
<Affiliates_BMTMicro_Maximum_Commission_Rate />
|
||||||
<Affiliates_Cleverbridge_Order_Page />
|
<Affiliates_Cleverbridge_Order_Page />
|
||||||
<Affiliates_Cleverbridge_Vendor_ID />
|
<Affiliates_Cleverbridge_Vendor_ID />
|
||||||
<Affiliates_Cleverbridge_Product_ID />
|
<Affiliates_Cleverbridge_Product_ID />
|
||||||
<Affiliates_Cleverbridge_Maximum_Commission_Rate />
|
<Affiliates_Cleverbridge_Maximum_Commission_Rate />
|
||||||
<Affiliates_clixGalore_Order_Page />
|
<Affiliates_clixGalore_Order_Page />
|
||||||
<Affiliates_clixGalore_Vendor_ID />
|
<Affiliates_clixGalore_Vendor_ID />
|
||||||
<Affiliates_clixGalore_Product_ID />
|
<Affiliates_clixGalore_Product_ID />
|
||||||
<Affiliates_clixGalore_Maximum_Commission_Rate />
|
<Affiliates_clixGalore_Maximum_Commission_Rate />
|
||||||
<Affiliates_CommissionJunction_Order_Page />
|
<Affiliates_CommissionJunction_Order_Page />
|
||||||
<Affiliates_CommissionJunction_Vendor_ID />
|
<Affiliates_CommissionJunction_Vendor_ID />
|
||||||
<Affiliates_CommissionJunction_Product_ID />
|
<Affiliates_CommissionJunction_Product_ID />
|
||||||
<Affiliates_CommissionJunction_Maximum_Commission_Rate />
|
<Affiliates_CommissionJunction_Maximum_Commission_Rate />
|
||||||
<Affiliates_DigiBuy_Order_Page />
|
<Affiliates_DigiBuy_Order_Page />
|
||||||
<Affiliates_DigiBuy_Vendor_ID />
|
<Affiliates_DigiBuy_Vendor_ID />
|
||||||
<Affiliates_DigiBuy_Product_ID />
|
<Affiliates_DigiBuy_Product_ID />
|
||||||
<Affiliates_DigiBuy_Maximum_Commission_Rate />
|
<Affiliates_DigiBuy_Maximum_Commission_Rate />
|
||||||
<Affiliates_DigitalCandle_Order_Page />
|
<Affiliates_DigitalCandle_Order_Page />
|
||||||
<Affiliates_DigitalCandle_Vendor_ID />
|
<Affiliates_DigitalCandle_Vendor_ID />
|
||||||
<Affiliates_DigitalCandle_Product_ID />
|
<Affiliates_DigitalCandle_Product_ID />
|
||||||
<Affiliates_DigitalCandle_Maximum_Commission_Rate />
|
<Affiliates_DigitalCandle_Maximum_Commission_Rate />
|
||||||
<Affiliates_Emetrix_Order_Page />
|
<Affiliates_Emetrix_Order_Page />
|
||||||
<Affiliates_Emetrix_Vendor_ID />
|
<Affiliates_Emetrix_Vendor_ID />
|
||||||
<Affiliates_Emetrix_Product_ID />
|
<Affiliates_Emetrix_Product_ID />
|
||||||
<Affiliates_Emetrix_Maximum_Commission_Rate />
|
<Affiliates_Emetrix_Maximum_Commission_Rate />
|
||||||
<Affiliates_eSellerate_Order_Page />
|
<Affiliates_eSellerate_Order_Page />
|
||||||
<Affiliates_eSellerate_Vendor_ID />
|
<Affiliates_eSellerate_Vendor_ID />
|
||||||
<Affiliates_eSellerate_Product_ID />
|
<Affiliates_eSellerate_Product_ID />
|
||||||
<Affiliates_eSellerate_Maximum_Commission_Rate />
|
<Affiliates_eSellerate_Maximum_Commission_Rate />
|
||||||
<Affiliates_Kagi_Order_Page />
|
<Affiliates_Kagi_Order_Page />
|
||||||
<Affiliates_Kagi_Vendor_ID />
|
<Affiliates_Kagi_Vendor_ID />
|
||||||
<Affiliates_Kagi_Product_ID />
|
<Affiliates_Kagi_Product_ID />
|
||||||
<Affiliates_Kagi_Maximum_Commission_Rate />
|
<Affiliates_Kagi_Maximum_Commission_Rate />
|
||||||
<Affiliates_LinkShare_Order_Page />
|
<Affiliates_LinkShare_Order_Page />
|
||||||
<Affiliates_LinkShare_Vendor_ID />
|
<Affiliates_LinkShare_Vendor_ID />
|
||||||
<Affiliates_LinkShare_Product_ID />
|
<Affiliates_LinkShare_Product_ID />
|
||||||
<Affiliates_LinkShare_Maximum_Commission_Rate />
|
<Affiliates_LinkShare_Maximum_Commission_Rate />
|
||||||
<Affiliates_NorthStarSol_Order_Page />
|
<Affiliates_NorthStarSol_Order_Page />
|
||||||
<Affiliates_NorthStarSol_Vendor_ID />
|
<Affiliates_NorthStarSol_Vendor_ID />
|
||||||
<Affiliates_NorthStarSol_Product_ID />
|
<Affiliates_NorthStarSol_Product_ID />
|
||||||
<Affiliates_NorthStarSol_Maximum_Commission_Rate />
|
<Affiliates_NorthStarSol_Maximum_Commission_Rate />
|
||||||
<Affiliates_OneNetworkDirect_Order_Page />
|
<Affiliates_OneNetworkDirect_Order_Page />
|
||||||
<Affiliates_OneNetworkDirect_Vendor_ID />
|
<Affiliates_OneNetworkDirect_Vendor_ID />
|
||||||
<Affiliates_OneNetworkDirect_Product_ID />
|
<Affiliates_OneNetworkDirect_Product_ID />
|
||||||
<Affiliates_OneNetworkDirect_Maximum_Commission_Rate />
|
<Affiliates_OneNetworkDirect_Maximum_Commission_Rate />
|
||||||
<Affiliates_Order1_Order_Page />
|
<Affiliates_Order1_Order_Page />
|
||||||
<Affiliates_Order1_Vendor_ID />
|
<Affiliates_Order1_Vendor_ID />
|
||||||
<Affiliates_Order1_Product_ID />
|
<Affiliates_Order1_Product_ID />
|
||||||
<Affiliates_Order1_Maximum_Commission_Rate />
|
<Affiliates_Order1_Maximum_Commission_Rate />
|
||||||
<Affiliates_Osolis_Order_Page />
|
<Affiliates_Osolis_Order_Page />
|
||||||
<Affiliates_Osolis_Vendor_ID />
|
<Affiliates_Osolis_Vendor_ID />
|
||||||
<Affiliates_Osolis_Product_ID />
|
<Affiliates_Osolis_Product_ID />
|
||||||
<Affiliates_Osolis_Maximum_Commission_Rate />
|
<Affiliates_Osolis_Maximum_Commission_Rate />
|
||||||
<Affiliates_Plimus_Order_Page />
|
<Affiliates_Plimus_Order_Page />
|
||||||
<Affiliates_Plimus_Vendor_ID />
|
<Affiliates_Plimus_Vendor_ID />
|
||||||
<Affiliates_Plimus_Product_ID />
|
<Affiliates_Plimus_Product_ID />
|
||||||
<Affiliates_Plimus_Maximum_Commission_Rate />
|
<Affiliates_Plimus_Maximum_Commission_Rate />
|
||||||
<Affiliates_Regnet_Order_Page />
|
<Affiliates_Regnet_Order_Page />
|
||||||
<Affiliates_Regnet_Vendor_ID />
|
<Affiliates_Regnet_Vendor_ID />
|
||||||
<Affiliates_Regnet_Product_ID />
|
<Affiliates_Regnet_Product_ID />
|
||||||
<Affiliates_Regnet_Maximum_Commission_Rate />
|
<Affiliates_Regnet_Maximum_Commission_Rate />
|
||||||
<Affiliates_Regnow_Order_Page />
|
<Affiliates_Regnow_Order_Page />
|
||||||
<Affiliates_Regnow_Vendor_ID />
|
<Affiliates_Regnow_Vendor_ID />
|
||||||
<Affiliates_Regnow_Product_ID />
|
<Affiliates_Regnow_Product_ID />
|
||||||
<Affiliates_Regnow_Maximum_Commission_Rate />
|
<Affiliates_Regnow_Maximum_Commission_Rate />
|
||||||
<Affiliates_Regsoft_Order_Page />
|
<Affiliates_Regsoft_Order_Page />
|
||||||
<Affiliates_Regsoft_Vendor_ID />
|
<Affiliates_Regsoft_Vendor_ID />
|
||||||
<Affiliates_Regsoft_Product_ID />
|
<Affiliates_Regsoft_Product_ID />
|
||||||
<Affiliates_Regsoft_Maximum_Commission_Rate />
|
<Affiliates_Regsoft_Maximum_Commission_Rate />
|
||||||
<Affiliates_ShareIt_Order_Page />
|
<Affiliates_ShareIt_Order_Page />
|
||||||
<Affiliates_ShareIt_Vendor_ID />
|
<Affiliates_ShareIt_Vendor_ID />
|
||||||
<Affiliates_ShareIt_Product_ID />
|
<Affiliates_ShareIt_Product_ID />
|
||||||
<Affiliates_ShareIt_Maximum_Commission_Rate />
|
<Affiliates_ShareIt_Maximum_Commission_Rate />
|
||||||
<Affiliates_Shareasale_Order_Page />
|
<Affiliates_Shareasale_Order_Page />
|
||||||
<Affiliates_Shareasale_Vendor_ID />
|
<Affiliates_Shareasale_Vendor_ID />
|
||||||
<Affiliates_Shareasale_Product_ID />
|
<Affiliates_Shareasale_Product_ID />
|
||||||
<Affiliates_Shareasale_Maximum_Commission_Rate />
|
<Affiliates_Shareasale_Maximum_Commission_Rate />
|
||||||
<Affiliates_SWReg_Order_Page />
|
<Affiliates_SWReg_Order_Page />
|
||||||
<Affiliates_SWReg_Vendor_ID />
|
<Affiliates_SWReg_Vendor_ID />
|
||||||
<Affiliates_SWReg_Product_ID />
|
<Affiliates_SWReg_Product_ID />
|
||||||
<Affiliates_SWReg_Maximum_Commission_Rate />
|
<Affiliates_SWReg_Maximum_Commission_Rate />
|
||||||
<Affiliates_V-Share_Order_Page />
|
<Affiliates_V-Share_Order_Page />
|
||||||
<Affiliates_V-Share_Vendor_ID />
|
<Affiliates_V-Share_Vendor_ID />
|
||||||
<Affiliates_V-Share_Product_ID />
|
<Affiliates_V-Share_Product_ID />
|
||||||
<Affiliates_V-Share_Maximum_Commission_Rate />
|
<Affiliates_V-Share_Maximum_Commission_Rate />
|
||||||
<Affiliates_VFree_Order_Page />
|
<Affiliates_VFree_Order_Page />
|
||||||
<Affiliates_VFree_Vendor_ID />
|
<Affiliates_VFree_Vendor_ID />
|
||||||
<Affiliates_VFree_Product_ID />
|
<Affiliates_VFree_Product_ID />
|
||||||
<Affiliates_VFree_Maximum_Commission_Rate />
|
<Affiliates_VFree_Maximum_Commission_Rate />
|
||||||
<Affiliates_Yaskifo_Order_Page />
|
<Affiliates_Yaskifo_Order_Page />
|
||||||
<Affiliates_Yaskifo_Vendor_ID />
|
<Affiliates_Yaskifo_Vendor_ID />
|
||||||
<Affiliates_Yaskifo_Product_ID />
|
<Affiliates_Yaskifo_Product_ID />
|
||||||
<Affiliates_Yaskifo_Maximum_Commission_Rate />
|
<Affiliates_Yaskifo_Maximum_Commission_Rate />
|
||||||
</Affiliates>
|
</Affiliates>
|
||||||
<ASP>
|
<ASP>
|
||||||
<ASP_FORM>Y</ASP_FORM>
|
<ASP_FORM>Y</ASP_FORM>
|
||||||
<ASP_Member>N</ASP_Member>
|
<ASP_Member>N</ASP_Member>
|
||||||
<ASP_Member_Number />
|
<ASP_Member_Number />
|
||||||
</ASP>
|
</ASP>
|
||||||
</PADGEN_PML>
|
</PADGEN_PML>
|
||||||
|
|||||||
@ -1,232 +1,232 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<XML_DIZ_INFO>
|
<XML_DIZ_INFO>
|
||||||
<MASTER_PAD_VERSION_INFO>
|
<MASTER_PAD_VERSION_INFO>
|
||||||
<MASTER_PAD_VERSION>3.11</MASTER_PAD_VERSION>
|
<MASTER_PAD_VERSION>3.11</MASTER_PAD_VERSION>
|
||||||
<MASTER_PAD_EDITOR>PADGen 3.1.1.47 http://www.padgen.org</MASTER_PAD_EDITOR>
|
<MASTER_PAD_EDITOR>PADGen 3.1.1.47 http://www.padgen.org</MASTER_PAD_EDITOR>
|
||||||
<MASTER_PAD_INFO>Portable Application Description, or PAD for short, is a data set that is used by shareware authors to disseminate information to anyone interested in their software products. To find out more go to http://pad.asp-software.org</MASTER_PAD_INFO>
|
<MASTER_PAD_INFO>Portable Application Description, or PAD for short, is a data set that is used by shareware authors to disseminate information to anyone interested in their software products. To find out more go to http://pad.asp-software.org</MASTER_PAD_INFO>
|
||||||
</MASTER_PAD_VERSION_INFO>
|
</MASTER_PAD_VERSION_INFO>
|
||||||
<Company_Info>
|
<Company_Info>
|
||||||
<Company_Name>Dolibarr team</Company_Name>
|
<Company_Name>Dolibarr team</Company_Name>
|
||||||
<Address_1>11 rue raymond Queneau</Address_1>
|
<Address_1>11 rue raymond Queneau</Address_1>
|
||||||
<Address_2 />
|
<Address_2 />
|
||||||
<City_Town>Rueil Malmaison</City_Town>
|
<City_Town>Rueil Malmaison</City_Town>
|
||||||
<State_Province />
|
<State_Province />
|
||||||
<Zip_Postal_Code>92500</Zip_Postal_Code>
|
<Zip_Postal_Code>92500</Zip_Postal_Code>
|
||||||
<Country>FRANCE</Country>
|
<Country>FRANCE</Country>
|
||||||
<Company_WebSite_URL>http://www.dolibarr.org</Company_WebSite_URL>
|
<Company_WebSite_URL>http://www.dolibarr.org</Company_WebSite_URL>
|
||||||
<Contact_Info>
|
<Contact_Info>
|
||||||
<Author_First_Name>Dolibarr team</Author_First_Name>
|
<Author_First_Name>Dolibarr team</Author_First_Name>
|
||||||
<Author_Last_Name>Dolibarr team</Author_Last_Name>
|
<Author_Last_Name>Dolibarr team</Author_Last_Name>
|
||||||
<Author_Email>dolibarr-dev@nongnu.org</Author_Email>
|
<Author_Email>dolibarr-dev@nongnu.org</Author_Email>
|
||||||
<Contact_First_Name>Dolibarr team</Contact_First_Name>
|
<Contact_First_Name>Dolibarr team</Contact_First_Name>
|
||||||
<Contact_Last_Name>Dolibarr team</Contact_Last_Name>
|
<Contact_Last_Name>Dolibarr team</Contact_Last_Name>
|
||||||
<Contact_Email>dolibarr-dev@nongnu.org</Contact_Email>
|
<Contact_Email>dolibarr-dev@nongnu.org</Contact_Email>
|
||||||
</Contact_Info>
|
</Contact_Info>
|
||||||
<Support_Info>
|
<Support_Info>
|
||||||
<Sales_Email>dolibarr-dev@nongnu.org</Sales_Email>
|
<Sales_Email>dolibarr-dev@nongnu.org</Sales_Email>
|
||||||
<Support_Email>dolibarr-dev@nongnu.org</Support_Email>
|
<Support_Email>dolibarr-dev@nongnu.org</Support_Email>
|
||||||
<General_Email>dolibarr-dev@nongnu.org</General_Email>
|
<General_Email>dolibarr-dev@nongnu.org</General_Email>
|
||||||
<Sales_Phone />
|
<Sales_Phone />
|
||||||
<Support_Phone />
|
<Support_Phone />
|
||||||
<General_Phone />
|
<General_Phone />
|
||||||
<Fax_Phone />
|
<Fax_Phone />
|
||||||
</Support_Info>
|
</Support_Info>
|
||||||
</Company_Info>
|
</Company_Info>
|
||||||
<Program_Info>
|
<Program_Info>
|
||||||
<Program_Name>Dolibarr</Program_Name>
|
<Program_Name>Dolibarr</Program_Name>
|
||||||
<Program_Version>3.5</Program_Version>
|
<Program_Version>3.5</Program_Version>
|
||||||
<Program_Release_Month>01</Program_Release_Month>
|
<Program_Release_Month>01</Program_Release_Month>
|
||||||
<Program_Release_Day>01</Program_Release_Day>
|
<Program_Release_Day>01</Program_Release_Day>
|
||||||
<Program_Release_Year>2014</Program_Release_Year>
|
<Program_Release_Year>2014</Program_Release_Year>
|
||||||
<Program_Cost_Dollars />
|
<Program_Cost_Dollars />
|
||||||
<Program_Cost_Other_Code />
|
<Program_Cost_Other_Code />
|
||||||
<Program_Cost_Other />
|
<Program_Cost_Other />
|
||||||
<Program_Type>Freeware</Program_Type>
|
<Program_Type>Freeware</Program_Type>
|
||||||
<Program_Release_Status>Major Update</Program_Release_Status>
|
<Program_Release_Status>Major Update</Program_Release_Status>
|
||||||
<Program_Install_Support>No Install Support</Program_Install_Support>
|
<Program_Install_Support>No Install Support</Program_Install_Support>
|
||||||
<Program_OS_Support>Linux,Mac OS X,Mac Other,Unix,Win2000,Win7 x32,Win7 x64,Win98,WinOther,WinServer,WinVista,WinVista x64,WinXP,Other</Program_OS_Support>
|
<Program_OS_Support>Linux,Mac OS X,Mac Other,Unix,Win2000,Win7 x32,Win7 x64,Win98,WinOther,WinServer,WinVista,WinVista x64,WinXP,Other</Program_OS_Support>
|
||||||
<Program_Language>English,Arabic,Catalan,Chinese,Danish,Dutch,Finnish,French,German,Greek,Icelandic,Italian,Norwegian,Polish,Portuguese,Romanian,Russian,Slovenian,Spanish,Swedish,Turkish</Program_Language>
|
<Program_Language>English,Arabic,Catalan,Chinese,Danish,Dutch,Finnish,French,German,Greek,Icelandic,Italian,Norwegian,Polish,Portuguese,Romanian,Russian,Slovenian,Spanish,Swedish,Turkish</Program_Language>
|
||||||
<Program_Change_Info>Increase performances, Setup process is easier, Reduce number of clicks required to use software</Program_Change_Info>
|
<Program_Change_Info>Increase performances, Setup process is easier, Reduce number of clicks required to use software</Program_Change_Info>
|
||||||
<Program_Specific_Category>Business</Program_Specific_Category>
|
<Program_Specific_Category>Business</Program_Specific_Category>
|
||||||
<Program_Category_Class>Business::Accounting & Finance</Program_Category_Class>
|
<Program_Category_Class>Business::Accounting & Finance</Program_Category_Class>
|
||||||
<Program_System_Requirements>None</Program_System_Requirements>
|
<Program_System_Requirements>None</Program_System_Requirements>
|
||||||
<File_Info>
|
<File_Info>
|
||||||
<File_Size_Bytes>18037439</File_Size_Bytes>
|
<File_Size_Bytes>18037439</File_Size_Bytes>
|
||||||
<File_Size_K>18037</File_Size_K>
|
<File_Size_K>18037</File_Size_K>
|
||||||
<File_Size_MB>18.03</File_Size_MB>
|
<File_Size_MB>18.03</File_Size_MB>
|
||||||
</File_Info>
|
</File_Info>
|
||||||
<Expire_Info>
|
<Expire_Info>
|
||||||
<Has_Expire_Info>N</Has_Expire_Info>
|
<Has_Expire_Info>N</Has_Expire_Info>
|
||||||
<Expire_Count />
|
<Expire_Count />
|
||||||
<Expire_Based_On>Days</Expire_Based_On>
|
<Expire_Based_On>Days</Expire_Based_On>
|
||||||
<Expire_Other_Info />
|
<Expire_Other_Info />
|
||||||
<Expire_Month />
|
<Expire_Month />
|
||||||
<Expire_Day />
|
<Expire_Day />
|
||||||
<Expire_Year />
|
<Expire_Year />
|
||||||
</Expire_Info>
|
</Expire_Info>
|
||||||
</Program_Info>
|
</Program_Info>
|
||||||
<Program_Descriptions>
|
<Program_Descriptions>
|
||||||
<English>
|
<English>
|
||||||
<Keywords>dolibarr, erp, crm, invoices, commercial proposals, orders, accounting, stock, products, agenda, bank, business, company, foundation, management, sme, doliwamp</Keywords>
|
<Keywords>dolibarr, erp, crm, invoices, commercial proposals, orders, accounting, stock, products, agenda, bank, business, company, foundation, management, sme, doliwamp</Keywords>
|
||||||
<Char_Desc_45>Dolibarr ERP & CRM</Char_Desc_45>
|
<Char_Desc_45>Dolibarr ERP & CRM</Char_Desc_45>
|
||||||
<Char_Desc_80>Dolibarr ERP & CRM, the easy to use open source software to manage your activity</Char_Desc_80>
|
<Char_Desc_80>Dolibarr ERP & CRM, the easy to use open source software to manage your activity</Char_Desc_80>
|
||||||
<Char_Desc_250>Dolibarr ERP & CRM, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs to manage.</Char_Desc_250>
|
<Char_Desc_250>Dolibarr ERP & CRM, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs to manage.</Char_Desc_250>
|
||||||
<Char_Desc_450>Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or medium companies, freelancers or foundations. We can say Dolibarr is an ERP or CRM. Dolibarr is also available with an auto-installer for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. See DoliWamp software for this.</Char_Desc_450>
|
<Char_Desc_450>Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or medium companies, freelancers or foundations. We can say Dolibarr is an ERP or CRM. Dolibarr is also available with an auto-installer for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. See DoliWamp software for this.</Char_Desc_450>
|
||||||
<Char_Desc_2000>Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple:
|
<Char_Desc_2000>Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple:
|
||||||
Simple to install
|
Simple to install
|
||||||
Simple to use
|
Simple to use
|
||||||
Simple to develop
|
Simple to develop
|
||||||
Note that Dolibarr is also available with an auto-installer for Windows or Ubuntu users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. This version is called DoliWamp (for Windows) or DoliBuntu (for Ubuntu/Debian).</Char_Desc_2000>
|
Note that Dolibarr is also available with an auto-installer for Windows or Ubuntu users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. This version is called DoliWamp (for Windows) or DoliBuntu (for Ubuntu/Debian).</Char_Desc_2000>
|
||||||
</English>
|
</English>
|
||||||
<French>
|
<French>
|
||||||
<Keywords>dolibarr, erp, crm, invoices, commercial proposals, orders, accounting, stock, products, agenda, bank, business, company, foundation, management, sme, doliwamp</Keywords>
|
<Keywords>dolibarr, erp, crm, invoices, commercial proposals, orders, accounting, stock, products, agenda, bank, business, company, foundation, management, sme, doliwamp</Keywords>
|
||||||
<Char_Desc_45>Dolibarr ERP & CRM</Char_Desc_45>
|
<Char_Desc_45>Dolibarr ERP & CRM</Char_Desc_45>
|
||||||
<Char_Desc_80>Dolibarr ERP & CRM, le gestionnaire simple pour gérer votre activité</Char_Desc_80>
|
<Char_Desc_80>Dolibarr ERP & CRM, le gestionnaire simple pour gérer votre activité</Char_Desc_80>
|
||||||
<Char_Desc_250>Dolibarr ERP & CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_250>
|
<Char_Desc_250>Dolibarr ERP & CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_250>
|
||||||
<Char_Desc_450>Dolibarr ERP & CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP).</Char_Desc_450>
|
<Char_Desc_450>Dolibarr ERP & CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP).</Char_Desc_450>
|
||||||
<Char_Desc_2000>Dolibarr ERP & CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP). Dolibarr vient compléter les offres déjà nombreuses de logiciels de cette catégorie (comme OpenBravo, OpenERP, SugarCRM, Neogia, Compiere, etc.) mais se démarque par le fait qu'ici tout est fait pour offrir de la simplicité (règle des 3 S):
|
<Char_Desc_2000>Dolibarr ERP & CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP). Dolibarr vient compléter les offres déjà nombreuses de logiciels de cette catégorie (comme OpenBravo, OpenERP, SugarCRM, Neogia, Compiere, etc.) mais se démarque par le fait qu'ici tout est fait pour offrir de la simplicité (règle des 3 S):
|
||||||
Simple pour l'installation (avec au choix des installeurs clé en main pour ceux qui ignorent comment installer un serveur Web, ou une installation manuelle)
|
Simple pour l'installation (avec au choix des installeurs clé en main pour ceux qui ignorent comment installer un serveur Web, ou une installation manuelle)
|
||||||
Simple pour l'utilisation (fonctions modulaires pour ne pas surcharger les menus, informations claires à la saisie)
|
Simple pour l'utilisation (fonctions modulaires pour ne pas surcharger les menus, informations claires à la saisie)
|
||||||
Simple pour le développement (pas de frameworks lourds).
|
Simple pour le développement (pas de frameworks lourds).
|
||||||
Dolibarr intègre en effet sa propre architecture (design patterns) permettant à tout développeur d'être tout de suite opérationnel sans connaissances particulières autre que le PHP. </Char_Desc_2000>
|
Dolibarr intègre en effet sa propre architecture (design patterns) permettant à tout développeur d'être tout de suite opérationnel sans connaissances particulières autre que le PHP. </Char_Desc_2000>
|
||||||
</French>
|
</French>
|
||||||
<Italian>
|
<Italian>
|
||||||
<Keywords>erp, crm, gestionale, medie imprese, fondazioni</Keywords>
|
<Keywords>erp, crm, gestionale, medie imprese, fondazioni</Keywords>
|
||||||
<Char_Desc_45>Gestionale open source e gratuito</Char_Desc_45>
|
<Char_Desc_45>Gestionale open source e gratuito</Char_Desc_45>
|
||||||
<Char_Desc_80>Gestionale open source e gratuito per piccole e medie imprese, fondazioni</Char_Desc_80>
|
<Char_Desc_80>Gestionale open source e gratuito per piccole e medie imprese, fondazioni</Char_Desc_80>
|
||||||
<Char_Desc_250>Dolibarr è un a gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività.</Char_Desc_250>
|
<Char_Desc_250>Dolibarr è un a gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività.</Char_Desc_250>
|
||||||
<Char_Desc_450>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_450>
|
<Char_Desc_450>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_450>
|
||||||
<Char_Desc_2000>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibar è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_2000>
|
<Char_Desc_2000>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibar è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_2000>
|
||||||
</Italian>
|
</Italian>
|
||||||
</Program_Descriptions>
|
</Program_Descriptions>
|
||||||
<Web_Info>
|
<Web_Info>
|
||||||
<Application_URLs>
|
<Application_URLs>
|
||||||
<Application_Info_URL>http://www.dolibarr.org</Application_Info_URL>
|
<Application_Info_URL>http://www.dolibarr.org</Application_Info_URL>
|
||||||
<Application_Order_URL>http://www.dolibarr.org</Application_Order_URL>
|
<Application_Order_URL>http://www.dolibarr.org</Application_Order_URL>
|
||||||
<Application_Screenshot_URL>http://www.dolibarr.org/images/dolibarr_screenshot1.png</Application_Screenshot_URL>
|
<Application_Screenshot_URL>http://www.dolibarr.org/images/dolibarr_screenshot1.png</Application_Screenshot_URL>
|
||||||
<Application_Icon_URL>http://www.dolibarr.org/images/dolibarr.gif</Application_Icon_URL>
|
<Application_Icon_URL>http://www.dolibarr.org/images/dolibarr.gif</Application_Icon_URL>
|
||||||
<Application_XML_File_URL>http://www.dolibarr.org/files/pad_dolibarr.xml</Application_XML_File_URL>
|
<Application_XML_File_URL>http://www.dolibarr.org/files/pad_dolibarr.xml</Application_XML_File_URL>
|
||||||
</Application_URLs>
|
</Application_URLs>
|
||||||
<Download_URLs>
|
<Download_URLs>
|
||||||
<Primary_Download_URL>http://www.dolibarr.org/files/dolibarr.tgz</Primary_Download_URL>
|
<Primary_Download_URL>http://www.dolibarr.org/files/dolibarr.tgz</Primary_Download_URL>
|
||||||
<Secondary_Download_URL>http://www.dolibarr.org/files/dolibarr.tgz</Secondary_Download_URL>
|
<Secondary_Download_URL>http://www.dolibarr.org/files/dolibarr.tgz</Secondary_Download_URL>
|
||||||
<Additional_Download_URL_1 />
|
<Additional_Download_URL_1 />
|
||||||
<Additional_Download_URL_2 />
|
<Additional_Download_URL_2 />
|
||||||
</Download_URLs>
|
</Download_URLs>
|
||||||
</Web_Info>
|
</Web_Info>
|
||||||
<Permissions>
|
<Permissions>
|
||||||
<Distribution_Permissions>GNU GPL</Distribution_Permissions>
|
<Distribution_Permissions>GNU GPL</Distribution_Permissions>
|
||||||
<EULA>GNU GPL</EULA>
|
<EULA>GNU GPL</EULA>
|
||||||
</Permissions>
|
</Permissions>
|
||||||
<Affiliates>
|
<Affiliates>
|
||||||
<Affiliates_FORM>Y</Affiliates_FORM>
|
<Affiliates_FORM>Y</Affiliates_FORM>
|
||||||
<Affiliates_VERSION>1.4</Affiliates_VERSION>
|
<Affiliates_VERSION>1.4</Affiliates_VERSION>
|
||||||
<Affiliates_URL>http://pad.asp-software.org/extensions/Affiliates.htm</Affiliates_URL>
|
<Affiliates_URL>http://pad.asp-software.org/extensions/Affiliates.htm</Affiliates_URL>
|
||||||
<Affiliates_Information_Page />
|
<Affiliates_Information_Page />
|
||||||
<Affiliates_Avangate_Order_Page />
|
<Affiliates_Avangate_Order_Page />
|
||||||
<Affiliates_Avangate_Vendor_ID />
|
<Affiliates_Avangate_Vendor_ID />
|
||||||
<Affiliates_Avangate_Product_ID />
|
<Affiliates_Avangate_Product_ID />
|
||||||
<Affiliates_Avangate_Maximum_Commission_Rate />
|
<Affiliates_Avangate_Maximum_Commission_Rate />
|
||||||
<Affiliates_BMTMicro_Order_Page />
|
<Affiliates_BMTMicro_Order_Page />
|
||||||
<Affiliates_BMTMicro_Vendor_ID />
|
<Affiliates_BMTMicro_Vendor_ID />
|
||||||
<Affiliates_BMTMicro_Product_ID />
|
<Affiliates_BMTMicro_Product_ID />
|
||||||
<Affiliates_BMTMicro_Maximum_Commission_Rate />
|
<Affiliates_BMTMicro_Maximum_Commission_Rate />
|
||||||
<Affiliates_Cleverbridge_Order_Page />
|
<Affiliates_Cleverbridge_Order_Page />
|
||||||
<Affiliates_Cleverbridge_Vendor_ID />
|
<Affiliates_Cleverbridge_Vendor_ID />
|
||||||
<Affiliates_Cleverbridge_Product_ID />
|
<Affiliates_Cleverbridge_Product_ID />
|
||||||
<Affiliates_Cleverbridge_Maximum_Commission_Rate />
|
<Affiliates_Cleverbridge_Maximum_Commission_Rate />
|
||||||
<Affiliates_clixGalore_Order_Page />
|
<Affiliates_clixGalore_Order_Page />
|
||||||
<Affiliates_clixGalore_Vendor_ID />
|
<Affiliates_clixGalore_Vendor_ID />
|
||||||
<Affiliates_clixGalore_Product_ID />
|
<Affiliates_clixGalore_Product_ID />
|
||||||
<Affiliates_clixGalore_Maximum_Commission_Rate />
|
<Affiliates_clixGalore_Maximum_Commission_Rate />
|
||||||
<Affiliates_CommissionJunction_Order_Page />
|
<Affiliates_CommissionJunction_Order_Page />
|
||||||
<Affiliates_CommissionJunction_Vendor_ID />
|
<Affiliates_CommissionJunction_Vendor_ID />
|
||||||
<Affiliates_CommissionJunction_Product_ID />
|
<Affiliates_CommissionJunction_Product_ID />
|
||||||
<Affiliates_CommissionJunction_Maximum_Commission_Rate />
|
<Affiliates_CommissionJunction_Maximum_Commission_Rate />
|
||||||
<Affiliates_DigiBuy_Order_Page />
|
<Affiliates_DigiBuy_Order_Page />
|
||||||
<Affiliates_DigiBuy_Vendor_ID />
|
<Affiliates_DigiBuy_Vendor_ID />
|
||||||
<Affiliates_DigiBuy_Product_ID />
|
<Affiliates_DigiBuy_Product_ID />
|
||||||
<Affiliates_DigiBuy_Maximum_Commission_Rate />
|
<Affiliates_DigiBuy_Maximum_Commission_Rate />
|
||||||
<Affiliates_DigitalCandle_Order_Page />
|
<Affiliates_DigitalCandle_Order_Page />
|
||||||
<Affiliates_DigitalCandle_Vendor_ID />
|
<Affiliates_DigitalCandle_Vendor_ID />
|
||||||
<Affiliates_DigitalCandle_Product_ID />
|
<Affiliates_DigitalCandle_Product_ID />
|
||||||
<Affiliates_DigitalCandle_Maximum_Commission_Rate />
|
<Affiliates_DigitalCandle_Maximum_Commission_Rate />
|
||||||
<Affiliates_Emetrix_Order_Page />
|
<Affiliates_Emetrix_Order_Page />
|
||||||
<Affiliates_Emetrix_Vendor_ID />
|
<Affiliates_Emetrix_Vendor_ID />
|
||||||
<Affiliates_Emetrix_Product_ID />
|
<Affiliates_Emetrix_Product_ID />
|
||||||
<Affiliates_Emetrix_Maximum_Commission_Rate />
|
<Affiliates_Emetrix_Maximum_Commission_Rate />
|
||||||
<Affiliates_eSellerate_Order_Page />
|
<Affiliates_eSellerate_Order_Page />
|
||||||
<Affiliates_eSellerate_Vendor_ID />
|
<Affiliates_eSellerate_Vendor_ID />
|
||||||
<Affiliates_eSellerate_Product_ID />
|
<Affiliates_eSellerate_Product_ID />
|
||||||
<Affiliates_eSellerate_Maximum_Commission_Rate />
|
<Affiliates_eSellerate_Maximum_Commission_Rate />
|
||||||
<Affiliates_Kagi_Order_Page />
|
<Affiliates_Kagi_Order_Page />
|
||||||
<Affiliates_Kagi_Vendor_ID />
|
<Affiliates_Kagi_Vendor_ID />
|
||||||
<Affiliates_Kagi_Product_ID />
|
<Affiliates_Kagi_Product_ID />
|
||||||
<Affiliates_Kagi_Maximum_Commission_Rate />
|
<Affiliates_Kagi_Maximum_Commission_Rate />
|
||||||
<Affiliates_LinkShare_Order_Page />
|
<Affiliates_LinkShare_Order_Page />
|
||||||
<Affiliates_LinkShare_Vendor_ID />
|
<Affiliates_LinkShare_Vendor_ID />
|
||||||
<Affiliates_LinkShare_Product_ID />
|
<Affiliates_LinkShare_Product_ID />
|
||||||
<Affiliates_LinkShare_Maximum_Commission_Rate />
|
<Affiliates_LinkShare_Maximum_Commission_Rate />
|
||||||
<Affiliates_NorthStarSol_Order_Page />
|
<Affiliates_NorthStarSol_Order_Page />
|
||||||
<Affiliates_NorthStarSol_Vendor_ID />
|
<Affiliates_NorthStarSol_Vendor_ID />
|
||||||
<Affiliates_NorthStarSol_Product_ID />
|
<Affiliates_NorthStarSol_Product_ID />
|
||||||
<Affiliates_NorthStarSol_Maximum_Commission_Rate />
|
<Affiliates_NorthStarSol_Maximum_Commission_Rate />
|
||||||
<Affiliates_OneNetworkDirect_Order_Page />
|
<Affiliates_OneNetworkDirect_Order_Page />
|
||||||
<Affiliates_OneNetworkDirect_Vendor_ID />
|
<Affiliates_OneNetworkDirect_Vendor_ID />
|
||||||
<Affiliates_OneNetworkDirect_Product_ID />
|
<Affiliates_OneNetworkDirect_Product_ID />
|
||||||
<Affiliates_OneNetworkDirect_Maximum_Commission_Rate />
|
<Affiliates_OneNetworkDirect_Maximum_Commission_Rate />
|
||||||
<Affiliates_Order1_Order_Page />
|
<Affiliates_Order1_Order_Page />
|
||||||
<Affiliates_Order1_Vendor_ID />
|
<Affiliates_Order1_Vendor_ID />
|
||||||
<Affiliates_Order1_Product_ID />
|
<Affiliates_Order1_Product_ID />
|
||||||
<Affiliates_Order1_Maximum_Commission_Rate />
|
<Affiliates_Order1_Maximum_Commission_Rate />
|
||||||
<Affiliates_Osolis_Order_Page />
|
<Affiliates_Osolis_Order_Page />
|
||||||
<Affiliates_Osolis_Vendor_ID />
|
<Affiliates_Osolis_Vendor_ID />
|
||||||
<Affiliates_Osolis_Product_ID />
|
<Affiliates_Osolis_Product_ID />
|
||||||
<Affiliates_Osolis_Maximum_Commission_Rate />
|
<Affiliates_Osolis_Maximum_Commission_Rate />
|
||||||
<Affiliates_Plimus_Order_Page />
|
<Affiliates_Plimus_Order_Page />
|
||||||
<Affiliates_Plimus_Vendor_ID />
|
<Affiliates_Plimus_Vendor_ID />
|
||||||
<Affiliates_Plimus_Product_ID />
|
<Affiliates_Plimus_Product_ID />
|
||||||
<Affiliates_Plimus_Maximum_Commission_Rate />
|
<Affiliates_Plimus_Maximum_Commission_Rate />
|
||||||
<Affiliates_Regnet_Order_Page />
|
<Affiliates_Regnet_Order_Page />
|
||||||
<Affiliates_Regnet_Vendor_ID />
|
<Affiliates_Regnet_Vendor_ID />
|
||||||
<Affiliates_Regnet_Product_ID />
|
<Affiliates_Regnet_Product_ID />
|
||||||
<Affiliates_Regnet_Maximum_Commission_Rate />
|
<Affiliates_Regnet_Maximum_Commission_Rate />
|
||||||
<Affiliates_Regnow_Order_Page />
|
<Affiliates_Regnow_Order_Page />
|
||||||
<Affiliates_Regnow_Vendor_ID />
|
<Affiliates_Regnow_Vendor_ID />
|
||||||
<Affiliates_Regnow_Product_ID />
|
<Affiliates_Regnow_Product_ID />
|
||||||
<Affiliates_Regnow_Maximum_Commission_Rate />
|
<Affiliates_Regnow_Maximum_Commission_Rate />
|
||||||
<Affiliates_Regsoft_Order_Page />
|
<Affiliates_Regsoft_Order_Page />
|
||||||
<Affiliates_Regsoft_Vendor_ID />
|
<Affiliates_Regsoft_Vendor_ID />
|
||||||
<Affiliates_Regsoft_Product_ID />
|
<Affiliates_Regsoft_Product_ID />
|
||||||
<Affiliates_Regsoft_Maximum_Commission_Rate />
|
<Affiliates_Regsoft_Maximum_Commission_Rate />
|
||||||
<Affiliates_ShareIt_Order_Page />
|
<Affiliates_ShareIt_Order_Page />
|
||||||
<Affiliates_ShareIt_Vendor_ID />
|
<Affiliates_ShareIt_Vendor_ID />
|
||||||
<Affiliates_ShareIt_Product_ID />
|
<Affiliates_ShareIt_Product_ID />
|
||||||
<Affiliates_ShareIt_Maximum_Commission_Rate />
|
<Affiliates_ShareIt_Maximum_Commission_Rate />
|
||||||
<Affiliates_Shareasale_Order_Page />
|
<Affiliates_Shareasale_Order_Page />
|
||||||
<Affiliates_Shareasale_Vendor_ID />
|
<Affiliates_Shareasale_Vendor_ID />
|
||||||
<Affiliates_Shareasale_Product_ID />
|
<Affiliates_Shareasale_Product_ID />
|
||||||
<Affiliates_Shareasale_Maximum_Commission_Rate />
|
<Affiliates_Shareasale_Maximum_Commission_Rate />
|
||||||
<Affiliates_SWReg_Order_Page />
|
<Affiliates_SWReg_Order_Page />
|
||||||
<Affiliates_SWReg_Vendor_ID />
|
<Affiliates_SWReg_Vendor_ID />
|
||||||
<Affiliates_SWReg_Product_ID />
|
<Affiliates_SWReg_Product_ID />
|
||||||
<Affiliates_SWReg_Maximum_Commission_Rate />
|
<Affiliates_SWReg_Maximum_Commission_Rate />
|
||||||
<Affiliates_V-Share_Order_Page />
|
<Affiliates_V-Share_Order_Page />
|
||||||
<Affiliates_V-Share_Vendor_ID />
|
<Affiliates_V-Share_Vendor_ID />
|
||||||
<Affiliates_V-Share_Product_ID />
|
<Affiliates_V-Share_Product_ID />
|
||||||
<Affiliates_V-Share_Maximum_Commission_Rate />
|
<Affiliates_V-Share_Maximum_Commission_Rate />
|
||||||
<Affiliates_VFree_Order_Page />
|
<Affiliates_VFree_Order_Page />
|
||||||
<Affiliates_VFree_Vendor_ID />
|
<Affiliates_VFree_Vendor_ID />
|
||||||
<Affiliates_VFree_Product_ID />
|
<Affiliates_VFree_Product_ID />
|
||||||
<Affiliates_VFree_Maximum_Commission_Rate />
|
<Affiliates_VFree_Maximum_Commission_Rate />
|
||||||
<Affiliates_Yaskifo_Order_Page />
|
<Affiliates_Yaskifo_Order_Page />
|
||||||
<Affiliates_Yaskifo_Vendor_ID />
|
<Affiliates_Yaskifo_Vendor_ID />
|
||||||
<Affiliates_Yaskifo_Product_ID />
|
<Affiliates_Yaskifo_Product_ID />
|
||||||
<Affiliates_Yaskifo_Maximum_Commission_Rate />
|
<Affiliates_Yaskifo_Maximum_Commission_Rate />
|
||||||
</Affiliates>
|
</Affiliates>
|
||||||
<ASP>
|
<ASP>
|
||||||
<ASP_FORM>Y</ASP_FORM>
|
<ASP_FORM>Y</ASP_FORM>
|
||||||
<ASP_Member>N</ASP_Member>
|
<ASP_Member>N</ASP_Member>
|
||||||
<ASP_Member_Number />
|
<ASP_Member_Number />
|
||||||
</ASP>
|
</ASP>
|
||||||
</XML_DIZ_INFO>
|
</XML_DIZ_INFO>
|
||||||
|
|||||||
@ -1,225 +1,225 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<XML_DIZ_INFO>
|
<XML_DIZ_INFO>
|
||||||
<MASTER_PAD_VERSION_INFO>
|
<MASTER_PAD_VERSION_INFO>
|
||||||
<MASTER_PAD_VERSION>3.11</MASTER_PAD_VERSION>
|
<MASTER_PAD_VERSION>3.11</MASTER_PAD_VERSION>
|
||||||
<MASTER_PAD_EDITOR>PADGen 3.1.1.47 http://www.padgen.org</MASTER_PAD_EDITOR>
|
<MASTER_PAD_EDITOR>PADGen 3.1.1.47 http://www.padgen.org</MASTER_PAD_EDITOR>
|
||||||
<MASTER_PAD_INFO>Portable Application Description, or PAD for short, is a data set that is used by shareware authors to disseminate information to anyone interested in their software products. To find out more go to http://pad.asp-software.org</MASTER_PAD_INFO>
|
<MASTER_PAD_INFO>Portable Application Description, or PAD for short, is a data set that is used by shareware authors to disseminate information to anyone interested in their software products. To find out more go to http://pad.asp-software.org</MASTER_PAD_INFO>
|
||||||
</MASTER_PAD_VERSION_INFO>
|
</MASTER_PAD_VERSION_INFO>
|
||||||
<Company_Info>
|
<Company_Info>
|
||||||
<Company_Name>NLTechno</Company_Name>
|
<Company_Name>NLTechno</Company_Name>
|
||||||
<Address_1>11 Rue raymond Queneau</Address_1>
|
<Address_1>11 Rue raymond Queneau</Address_1>
|
||||||
<Address_2 />
|
<Address_2 />
|
||||||
<City_Town>Rueil Malmaison</City_Town>
|
<City_Town>Rueil Malmaison</City_Town>
|
||||||
<State_Province />
|
<State_Province />
|
||||||
<Zip_Postal_Code>92500</Zip_Postal_Code>
|
<Zip_Postal_Code>92500</Zip_Postal_Code>
|
||||||
<Country>FRANCE</Country>
|
<Country>FRANCE</Country>
|
||||||
<Company_WebSite_URL>http://www.nltechno.com</Company_WebSite_URL>
|
<Company_WebSite_URL>http://www.nltechno.com</Company_WebSite_URL>
|
||||||
<Contact_Info>
|
<Contact_Info>
|
||||||
<Author_First_Name>NLTechno</Author_First_Name>
|
<Author_First_Name>NLTechno</Author_First_Name>
|
||||||
<Author_Last_Name>NLTechno</Author_Last_Name>
|
<Author_Last_Name>NLTechno</Author_Last_Name>
|
||||||
<Author_Email>contact@nltechno.com</Author_Email>
|
<Author_Email>contact@nltechno.com</Author_Email>
|
||||||
<Contact_First_Name>NLTechno</Contact_First_Name>
|
<Contact_First_Name>NLTechno</Contact_First_Name>
|
||||||
<Contact_Last_Name>NLTechno</Contact_Last_Name>
|
<Contact_Last_Name>NLTechno</Contact_Last_Name>
|
||||||
<Contact_Email>contact@nltechno.com</Contact_Email>
|
<Contact_Email>contact@nltechno.com</Contact_Email>
|
||||||
</Contact_Info>
|
</Contact_Info>
|
||||||
<Support_Info>
|
<Support_Info>
|
||||||
<Sales_Email>support@nltechno.com</Sales_Email>
|
<Sales_Email>support@nltechno.com</Sales_Email>
|
||||||
<Support_Email>support@nltechno.com</Support_Email>
|
<Support_Email>support@nltechno.com</Support_Email>
|
||||||
<General_Email>support@nltechno.com</General_Email>
|
<General_Email>support@nltechno.com</General_Email>
|
||||||
<Sales_Phone />
|
<Sales_Phone />
|
||||||
<Support_Phone />
|
<Support_Phone />
|
||||||
<General_Phone />
|
<General_Phone />
|
||||||
<Fax_Phone />
|
<Fax_Phone />
|
||||||
</Support_Info>
|
</Support_Info>
|
||||||
</Company_Info>
|
</Company_Info>
|
||||||
<Program_Info>
|
<Program_Info>
|
||||||
<Program_Name>DoliWamp</Program_Name>
|
<Program_Name>DoliWamp</Program_Name>
|
||||||
<Program_Version>3.5</Program_Version>
|
<Program_Version>3.5</Program_Version>
|
||||||
<Program_Release_Month>01</Program_Release_Month>
|
<Program_Release_Month>01</Program_Release_Month>
|
||||||
<Program_Release_Day>01</Program_Release_Day>
|
<Program_Release_Day>01</Program_Release_Day>
|
||||||
<Program_Release_Year>2014</Program_Release_Year>
|
<Program_Release_Year>2014</Program_Release_Year>
|
||||||
<Program_Cost_Dollars />
|
<Program_Cost_Dollars />
|
||||||
<Program_Cost_Other_Code />
|
<Program_Cost_Other_Code />
|
||||||
<Program_Cost_Other />
|
<Program_Cost_Other />
|
||||||
<Program_Type>Freeware</Program_Type>
|
<Program_Type>Freeware</Program_Type>
|
||||||
<Program_Release_Status>Major Update</Program_Release_Status>
|
<Program_Release_Status>Major Update</Program_Release_Status>
|
||||||
<Program_Install_Support>Install and Uninstall</Program_Install_Support>
|
<Program_Install_Support>Install and Uninstall</Program_Install_Support>
|
||||||
<Program_OS_Support>Win2000,Win7 x32,Win7 x64,Win98,WinOther,WinServer,WinVista,WinVista x64,WinXP,Other</Program_OS_Support>
|
<Program_OS_Support>Win2000,Win7 x32,Win7 x64,Win98,WinOther,WinServer,WinVista,WinVista x64,WinXP,Other</Program_OS_Support>
|
||||||
<Program_Language>English,Arabic,Catalan,Chinese,Dutch,Finnish,French,German,Icelandic,Italian,Norwegian,Polish,Portuguese,Romanian,Russian,Slovenian,Spanish,Swedish,Turkish</Program_Language>
|
<Program_Language>English,Arabic,Catalan,Chinese,Dutch,Finnish,French,German,Icelandic,Italian,Norwegian,Polish,Portuguese,Romanian,Russian,Slovenian,Spanish,Swedish,Turkish</Program_Language>
|
||||||
<Program_Change_Info>Increase performances, Setup process is easier, Reduce number of clicks required to use software</Program_Change_Info>
|
<Program_Change_Info>Increase performances, Setup process is easier, Reduce number of clicks required to use software</Program_Change_Info>
|
||||||
<Program_Specific_Category>Business</Program_Specific_Category>
|
<Program_Specific_Category>Business</Program_Specific_Category>
|
||||||
<Program_Category_Class>Business::Accounting & Finance</Program_Category_Class>
|
<Program_Category_Class>Business::Accounting & Finance</Program_Category_Class>
|
||||||
<Program_System_Requirements>None</Program_System_Requirements>
|
<Program_System_Requirements>None</Program_System_Requirements>
|
||||||
<File_Info>
|
<File_Info>
|
||||||
<File_Size_Bytes>26048004</File_Size_Bytes>
|
<File_Size_Bytes>26048004</File_Size_Bytes>
|
||||||
<File_Size_K>25437</File_Size_K>
|
<File_Size_K>25437</File_Size_K>
|
||||||
<File_Size_MB>24.84</File_Size_MB>
|
<File_Size_MB>24.84</File_Size_MB>
|
||||||
</File_Info>
|
</File_Info>
|
||||||
<Expire_Info>
|
<Expire_Info>
|
||||||
<Has_Expire_Info>N</Has_Expire_Info>
|
<Has_Expire_Info>N</Has_Expire_Info>
|
||||||
<Expire_Count />
|
<Expire_Count />
|
||||||
<Expire_Based_On>Days</Expire_Based_On>
|
<Expire_Based_On>Days</Expire_Based_On>
|
||||||
<Expire_Other_Info />
|
<Expire_Other_Info />
|
||||||
<Expire_Month />
|
<Expire_Month />
|
||||||
<Expire_Day />
|
<Expire_Day />
|
||||||
<Expire_Year />
|
<Expire_Year />
|
||||||
</Expire_Info>
|
</Expire_Info>
|
||||||
</Program_Info>
|
</Program_Info>
|
||||||
<Program_Descriptions>
|
<Program_Descriptions>
|
||||||
<English>
|
<English>
|
||||||
<Keywords>doliwamp, dolibarr, erp, crm, invoices, commercial proposals, orders, accounting, stock, products, agenda, bank, business, company, foundation, management</Keywords>
|
<Keywords>doliwamp, dolibarr, erp, crm, invoices, commercial proposals, orders, accounting, stock, products, agenda, bank, business, company, foundation, management</Keywords>
|
||||||
<Char_Desc_45>DoliWamp, Dolibarr ERP/CRM for Windows</Char_Desc_45>
|
<Char_Desc_45>DoliWamp, Dolibarr ERP/CRM for Windows</Char_Desc_45>
|
||||||
<Char_Desc_80>DoliWamp, the easy to use Dolibarr for Windows to manage your company,foundation</Char_Desc_80>
|
<Char_Desc_80>DoliWamp, the easy to use Dolibarr for Windows to manage your company,foundation</Char_Desc_80>
|
||||||
<Char_Desc_250>DoliWamp is the Dolibarr ERP/CRM for Windows, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs.</Char_Desc_250>
|
<Char_Desc_250>DoliWamp is the Dolibarr ERP/CRM for Windows, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs.</Char_Desc_250>
|
||||||
<Char_Desc_450>DoliWamp is the Dolibarr ERP/CRM autoinstaller for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. Dolibarr ERP/CRM is a software package built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations.</Char_Desc_450>
|
<Char_Desc_450>DoliWamp is the Dolibarr ERP/CRM autoinstaller for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. Dolibarr ERP/CRM is a software package built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations.</Char_Desc_450>
|
||||||
<Char_Desc_2000>DoliWamp is the Dolibarr ERP/CRM for Windows. Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations (You can manage or follow contacts, invoices, orders, commercial proposals, products, stock management, agenda, mass emailings, members of a foundation, bank accounts...). Based on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems), you can install it as a standalone program or use it from anywhere with any web browser. Dolibarr is an OpenSource project. It differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: Simple to install, Simple to use, Simple to develop.
|
<Char_Desc_2000>DoliWamp is the Dolibarr ERP/CRM for Windows. Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations (You can manage or follow contacts, invoices, orders, commercial proposals, products, stock management, agenda, mass emailings, members of a foundation, bank accounts...). Based on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems), you can install it as a standalone program or use it from anywhere with any web browser. Dolibarr is an OpenSource project. It differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: Simple to install, Simple to use, Simple to develop.
|
||||||
DoliWamp is the auto-installer for Windows users with no technical knowledge to install Dolibarr ERP/CRM and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file.</Char_Desc_2000>
|
DoliWamp is the auto-installer for Windows users with no technical knowledge to install Dolibarr ERP/CRM and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file.</Char_Desc_2000>
|
||||||
</English>
|
</English>
|
||||||
<French>
|
<French>
|
||||||
<Keywords>doliwamp, dolibarr, erp, crm, factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations, entreprises, PME, TPE</Keywords>
|
<Keywords>doliwamp, dolibarr, erp, crm, factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations, entreprises, PME, TPE</Keywords>
|
||||||
<Char_Desc_45>DoliWamp, Dolibarr ERP/CRM pour Windows</Char_Desc_45>
|
<Char_Desc_45>DoliWamp, Dolibarr ERP/CRM pour Windows</Char_Desc_45>
|
||||||
<Char_Desc_80>DoliWamp, la distribution de Dolibarr pour gérer votre entreprise ou association</Char_Desc_80>
|
<Char_Desc_80>DoliWamp, la distribution de Dolibarr pour gérer votre entreprise ou association</Char_Desc_80>
|
||||||
<Char_Desc_250>DoliWamp est la version spécialisée pour Windows de Dolibarr ERP-CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_250>
|
<Char_Desc_250>DoliWamp est la version spécialisée pour Windows de Dolibarr ERP-CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_250>
|
||||||
<Char_Desc_450>DoliWamp est la version spécialisée pour Windows de Dolibarr ERP-CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_450>
|
<Char_Desc_450>DoliWamp est la version spécialisée pour Windows de Dolibarr ERP-CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_450>
|
||||||
<Char_Desc_2000>DoliWamp est la version spécialisée pour Windows de Dolibarr ERP-CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_2000>
|
<Char_Desc_2000>DoliWamp est la version spécialisée pour Windows de Dolibarr ERP-CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_2000>
|
||||||
</French>
|
</French>
|
||||||
<Italian>
|
<Italian>
|
||||||
<Keywords>doliwamp, dolibarr, erp, crm, gestionale, medie imprese, fondazioni</Keywords>
|
<Keywords>doliwamp, dolibarr, erp, crm, gestionale, medie imprese, fondazioni</Keywords>
|
||||||
<Char_Desc_45>DoliWamp, Dolibarr ERP/CRM per Windows</Char_Desc_45>
|
<Char_Desc_45>DoliWamp, Dolibarr ERP/CRM per Windows</Char_Desc_45>
|
||||||
<Char_Desc_80>Gestionale open source e gratuito per piccole e medie imprese, fondazioni</Char_Desc_80>
|
<Char_Desc_80>Gestionale open source e gratuito per piccole e medie imprese, fondazioni</Char_Desc_80>
|
||||||
<Char_Desc_250>Dolibarr è un a gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività.</Char_Desc_250>
|
<Char_Desc_250>Dolibarr è un a gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività.</Char_Desc_250>
|
||||||
<Char_Desc_450>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_450>
|
<Char_Desc_450>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_450>
|
||||||
<Char_Desc_2000>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibar è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_2000>
|
<Char_Desc_2000>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibar è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_2000>
|
||||||
</Italian>
|
</Italian>
|
||||||
</Program_Descriptions>
|
</Program_Descriptions>
|
||||||
<Web_Info>
|
<Web_Info>
|
||||||
<Application_URLs>
|
<Application_URLs>
|
||||||
<Application_Info_URL>http://www.nltechno.com/doliwamp/</Application_Info_URL>
|
<Application_Info_URL>http://www.nltechno.com/doliwamp/</Application_Info_URL>
|
||||||
<Application_Order_URL>http://www.nltechno.com/doliwamp/</Application_Order_URL>
|
<Application_Order_URL>http://www.nltechno.com/doliwamp/</Application_Order_URL>
|
||||||
<Application_Screenshot_URL>http://www.dolibarr.org/images/dolibarr_screenshot1.png</Application_Screenshot_URL>
|
<Application_Screenshot_URL>http://www.dolibarr.org/images/dolibarr_screenshot1.png</Application_Screenshot_URL>
|
||||||
<Application_Icon_URL>http://www.dolibarr.org/images/dolibarr.gif</Application_Icon_URL>
|
<Application_Icon_URL>http://www.dolibarr.org/images/dolibarr.gif</Application_Icon_URL>
|
||||||
<Application_XML_File_URL>http://www.dolibarr.org/files/pad_doliwamp.xml</Application_XML_File_URL>
|
<Application_XML_File_URL>http://www.dolibarr.org/files/pad_doliwamp.xml</Application_XML_File_URL>
|
||||||
</Application_URLs>
|
</Application_URLs>
|
||||||
<Download_URLs>
|
<Download_URLs>
|
||||||
<Primary_Download_URL>http://www.dolibarr.org/files/doliwamp.exe</Primary_Download_URL>
|
<Primary_Download_URL>http://www.dolibarr.org/files/doliwamp.exe</Primary_Download_URL>
|
||||||
<Secondary_Download_URL>http://www.dolibarr.org/files/doliwamp.exe</Secondary_Download_URL>
|
<Secondary_Download_URL>http://www.dolibarr.org/files/doliwamp.exe</Secondary_Download_URL>
|
||||||
<Additional_Download_URL_1 />
|
<Additional_Download_URL_1 />
|
||||||
<Additional_Download_URL_2 />
|
<Additional_Download_URL_2 />
|
||||||
</Download_URLs>
|
</Download_URLs>
|
||||||
</Web_Info>
|
</Web_Info>
|
||||||
<Permissions>
|
<Permissions>
|
||||||
<Distribution_Permissions>GNU GPL</Distribution_Permissions>
|
<Distribution_Permissions>GNU GPL</Distribution_Permissions>
|
||||||
<EULA>GNU GPL</EULA>
|
<EULA>GNU GPL</EULA>
|
||||||
</Permissions>
|
</Permissions>
|
||||||
<Affiliates>
|
<Affiliates>
|
||||||
<Affiliates_FORM>Y</Affiliates_FORM>
|
<Affiliates_FORM>Y</Affiliates_FORM>
|
||||||
<Affiliates_VERSION>1.4</Affiliates_VERSION>
|
<Affiliates_VERSION>1.4</Affiliates_VERSION>
|
||||||
<Affiliates_URL>http://pad.asp-software.org/extensions/Affiliates.htm</Affiliates_URL>
|
<Affiliates_URL>http://pad.asp-software.org/extensions/Affiliates.htm</Affiliates_URL>
|
||||||
<Affiliates_Information_Page />
|
<Affiliates_Information_Page />
|
||||||
<Affiliates_Avangate_Order_Page />
|
<Affiliates_Avangate_Order_Page />
|
||||||
<Affiliates_Avangate_Vendor_ID />
|
<Affiliates_Avangate_Vendor_ID />
|
||||||
<Affiliates_Avangate_Product_ID />
|
<Affiliates_Avangate_Product_ID />
|
||||||
<Affiliates_Avangate_Maximum_Commission_Rate />
|
<Affiliates_Avangate_Maximum_Commission_Rate />
|
||||||
<Affiliates_BMTMicro_Order_Page />
|
<Affiliates_BMTMicro_Order_Page />
|
||||||
<Affiliates_BMTMicro_Vendor_ID />
|
<Affiliates_BMTMicro_Vendor_ID />
|
||||||
<Affiliates_BMTMicro_Product_ID />
|
<Affiliates_BMTMicro_Product_ID />
|
||||||
<Affiliates_BMTMicro_Maximum_Commission_Rate />
|
<Affiliates_BMTMicro_Maximum_Commission_Rate />
|
||||||
<Affiliates_Cleverbridge_Order_Page />
|
<Affiliates_Cleverbridge_Order_Page />
|
||||||
<Affiliates_Cleverbridge_Vendor_ID />
|
<Affiliates_Cleverbridge_Vendor_ID />
|
||||||
<Affiliates_Cleverbridge_Product_ID />
|
<Affiliates_Cleverbridge_Product_ID />
|
||||||
<Affiliates_Cleverbridge_Maximum_Commission_Rate />
|
<Affiliates_Cleverbridge_Maximum_Commission_Rate />
|
||||||
<Affiliates_clixGalore_Order_Page />
|
<Affiliates_clixGalore_Order_Page />
|
||||||
<Affiliates_clixGalore_Vendor_ID />
|
<Affiliates_clixGalore_Vendor_ID />
|
||||||
<Affiliates_clixGalore_Product_ID />
|
<Affiliates_clixGalore_Product_ID />
|
||||||
<Affiliates_clixGalore_Maximum_Commission_Rate />
|
<Affiliates_clixGalore_Maximum_Commission_Rate />
|
||||||
<Affiliates_CommissionJunction_Order_Page />
|
<Affiliates_CommissionJunction_Order_Page />
|
||||||
<Affiliates_CommissionJunction_Vendor_ID />
|
<Affiliates_CommissionJunction_Vendor_ID />
|
||||||
<Affiliates_CommissionJunction_Product_ID />
|
<Affiliates_CommissionJunction_Product_ID />
|
||||||
<Affiliates_CommissionJunction_Maximum_Commission_Rate />
|
<Affiliates_CommissionJunction_Maximum_Commission_Rate />
|
||||||
<Affiliates_DigiBuy_Order_Page />
|
<Affiliates_DigiBuy_Order_Page />
|
||||||
<Affiliates_DigiBuy_Vendor_ID />
|
<Affiliates_DigiBuy_Vendor_ID />
|
||||||
<Affiliates_DigiBuy_Product_ID />
|
<Affiliates_DigiBuy_Product_ID />
|
||||||
<Affiliates_DigiBuy_Maximum_Commission_Rate />
|
<Affiliates_DigiBuy_Maximum_Commission_Rate />
|
||||||
<Affiliates_DigitalCandle_Order_Page />
|
<Affiliates_DigitalCandle_Order_Page />
|
||||||
<Affiliates_DigitalCandle_Vendor_ID />
|
<Affiliates_DigitalCandle_Vendor_ID />
|
||||||
<Affiliates_DigitalCandle_Product_ID />
|
<Affiliates_DigitalCandle_Product_ID />
|
||||||
<Affiliates_DigitalCandle_Maximum_Commission_Rate />
|
<Affiliates_DigitalCandle_Maximum_Commission_Rate />
|
||||||
<Affiliates_Emetrix_Order_Page />
|
<Affiliates_Emetrix_Order_Page />
|
||||||
<Affiliates_Emetrix_Vendor_ID />
|
<Affiliates_Emetrix_Vendor_ID />
|
||||||
<Affiliates_Emetrix_Product_ID />
|
<Affiliates_Emetrix_Product_ID />
|
||||||
<Affiliates_Emetrix_Maximum_Commission_Rate />
|
<Affiliates_Emetrix_Maximum_Commission_Rate />
|
||||||
<Affiliates_eSellerate_Order_Page />
|
<Affiliates_eSellerate_Order_Page />
|
||||||
<Affiliates_eSellerate_Vendor_ID />
|
<Affiliates_eSellerate_Vendor_ID />
|
||||||
<Affiliates_eSellerate_Product_ID />
|
<Affiliates_eSellerate_Product_ID />
|
||||||
<Affiliates_eSellerate_Maximum_Commission_Rate />
|
<Affiliates_eSellerate_Maximum_Commission_Rate />
|
||||||
<Affiliates_Kagi_Order_Page />
|
<Affiliates_Kagi_Order_Page />
|
||||||
<Affiliates_Kagi_Vendor_ID />
|
<Affiliates_Kagi_Vendor_ID />
|
||||||
<Affiliates_Kagi_Product_ID />
|
<Affiliates_Kagi_Product_ID />
|
||||||
<Affiliates_Kagi_Maximum_Commission_Rate />
|
<Affiliates_Kagi_Maximum_Commission_Rate />
|
||||||
<Affiliates_LinkShare_Order_Page />
|
<Affiliates_LinkShare_Order_Page />
|
||||||
<Affiliates_LinkShare_Vendor_ID />
|
<Affiliates_LinkShare_Vendor_ID />
|
||||||
<Affiliates_LinkShare_Product_ID />
|
<Affiliates_LinkShare_Product_ID />
|
||||||
<Affiliates_LinkShare_Maximum_Commission_Rate />
|
<Affiliates_LinkShare_Maximum_Commission_Rate />
|
||||||
<Affiliates_NorthStarSol_Order_Page />
|
<Affiliates_NorthStarSol_Order_Page />
|
||||||
<Affiliates_NorthStarSol_Vendor_ID />
|
<Affiliates_NorthStarSol_Vendor_ID />
|
||||||
<Affiliates_NorthStarSol_Product_ID />
|
<Affiliates_NorthStarSol_Product_ID />
|
||||||
<Affiliates_NorthStarSol_Maximum_Commission_Rate />
|
<Affiliates_NorthStarSol_Maximum_Commission_Rate />
|
||||||
<Affiliates_OneNetworkDirect_Order_Page />
|
<Affiliates_OneNetworkDirect_Order_Page />
|
||||||
<Affiliates_OneNetworkDirect_Vendor_ID />
|
<Affiliates_OneNetworkDirect_Vendor_ID />
|
||||||
<Affiliates_OneNetworkDirect_Product_ID />
|
<Affiliates_OneNetworkDirect_Product_ID />
|
||||||
<Affiliates_OneNetworkDirect_Maximum_Commission_Rate />
|
<Affiliates_OneNetworkDirect_Maximum_Commission_Rate />
|
||||||
<Affiliates_Order1_Order_Page />
|
<Affiliates_Order1_Order_Page />
|
||||||
<Affiliates_Order1_Vendor_ID />
|
<Affiliates_Order1_Vendor_ID />
|
||||||
<Affiliates_Order1_Product_ID />
|
<Affiliates_Order1_Product_ID />
|
||||||
<Affiliates_Order1_Maximum_Commission_Rate />
|
<Affiliates_Order1_Maximum_Commission_Rate />
|
||||||
<Affiliates_Osolis_Order_Page />
|
<Affiliates_Osolis_Order_Page />
|
||||||
<Affiliates_Osolis_Vendor_ID />
|
<Affiliates_Osolis_Vendor_ID />
|
||||||
<Affiliates_Osolis_Product_ID />
|
<Affiliates_Osolis_Product_ID />
|
||||||
<Affiliates_Osolis_Maximum_Commission_Rate />
|
<Affiliates_Osolis_Maximum_Commission_Rate />
|
||||||
<Affiliates_Plimus_Order_Page />
|
<Affiliates_Plimus_Order_Page />
|
||||||
<Affiliates_Plimus_Vendor_ID />
|
<Affiliates_Plimus_Vendor_ID />
|
||||||
<Affiliates_Plimus_Product_ID />
|
<Affiliates_Plimus_Product_ID />
|
||||||
<Affiliates_Plimus_Maximum_Commission_Rate />
|
<Affiliates_Plimus_Maximum_Commission_Rate />
|
||||||
<Affiliates_Regnet_Order_Page />
|
<Affiliates_Regnet_Order_Page />
|
||||||
<Affiliates_Regnet_Vendor_ID />
|
<Affiliates_Regnet_Vendor_ID />
|
||||||
<Affiliates_Regnet_Product_ID />
|
<Affiliates_Regnet_Product_ID />
|
||||||
<Affiliates_Regnet_Maximum_Commission_Rate />
|
<Affiliates_Regnet_Maximum_Commission_Rate />
|
||||||
<Affiliates_Regnow_Order_Page />
|
<Affiliates_Regnow_Order_Page />
|
||||||
<Affiliates_Regnow_Vendor_ID />
|
<Affiliates_Regnow_Vendor_ID />
|
||||||
<Affiliates_Regnow_Product_ID />
|
<Affiliates_Regnow_Product_ID />
|
||||||
<Affiliates_Regnow_Maximum_Commission_Rate />
|
<Affiliates_Regnow_Maximum_Commission_Rate />
|
||||||
<Affiliates_Regsoft_Order_Page />
|
<Affiliates_Regsoft_Order_Page />
|
||||||
<Affiliates_Regsoft_Vendor_ID />
|
<Affiliates_Regsoft_Vendor_ID />
|
||||||
<Affiliates_Regsoft_Product_ID />
|
<Affiliates_Regsoft_Product_ID />
|
||||||
<Affiliates_Regsoft_Maximum_Commission_Rate />
|
<Affiliates_Regsoft_Maximum_Commission_Rate />
|
||||||
<Affiliates_ShareIt_Order_Page />
|
<Affiliates_ShareIt_Order_Page />
|
||||||
<Affiliates_ShareIt_Vendor_ID />
|
<Affiliates_ShareIt_Vendor_ID />
|
||||||
<Affiliates_ShareIt_Product_ID />
|
<Affiliates_ShareIt_Product_ID />
|
||||||
<Affiliates_ShareIt_Maximum_Commission_Rate />
|
<Affiliates_ShareIt_Maximum_Commission_Rate />
|
||||||
<Affiliates_Shareasale_Order_Page />
|
<Affiliates_Shareasale_Order_Page />
|
||||||
<Affiliates_Shareasale_Vendor_ID />
|
<Affiliates_Shareasale_Vendor_ID />
|
||||||
<Affiliates_Shareasale_Product_ID />
|
<Affiliates_Shareasale_Product_ID />
|
||||||
<Affiliates_Shareasale_Maximum_Commission_Rate />
|
<Affiliates_Shareasale_Maximum_Commission_Rate />
|
||||||
<Affiliates_SWReg_Order_Page />
|
<Affiliates_SWReg_Order_Page />
|
||||||
<Affiliates_SWReg_Vendor_ID />
|
<Affiliates_SWReg_Vendor_ID />
|
||||||
<Affiliates_SWReg_Product_ID />
|
<Affiliates_SWReg_Product_ID />
|
||||||
<Affiliates_SWReg_Maximum_Commission_Rate />
|
<Affiliates_SWReg_Maximum_Commission_Rate />
|
||||||
<Affiliates_V-Share_Order_Page />
|
<Affiliates_V-Share_Order_Page />
|
||||||
<Affiliates_V-Share_Vendor_ID />
|
<Affiliates_V-Share_Vendor_ID />
|
||||||
<Affiliates_V-Share_Product_ID />
|
<Affiliates_V-Share_Product_ID />
|
||||||
<Affiliates_V-Share_Maximum_Commission_Rate />
|
<Affiliates_V-Share_Maximum_Commission_Rate />
|
||||||
<Affiliates_VFree_Order_Page />
|
<Affiliates_VFree_Order_Page />
|
||||||
<Affiliates_VFree_Vendor_ID />
|
<Affiliates_VFree_Vendor_ID />
|
||||||
<Affiliates_VFree_Product_ID />
|
<Affiliates_VFree_Product_ID />
|
||||||
<Affiliates_VFree_Maximum_Commission_Rate />
|
<Affiliates_VFree_Maximum_Commission_Rate />
|
||||||
<Affiliates_Yaskifo_Order_Page />
|
<Affiliates_Yaskifo_Order_Page />
|
||||||
<Affiliates_Yaskifo_Vendor_ID />
|
<Affiliates_Yaskifo_Vendor_ID />
|
||||||
<Affiliates_Yaskifo_Product_ID />
|
<Affiliates_Yaskifo_Product_ID />
|
||||||
<Affiliates_Yaskifo_Maximum_Commission_Rate />
|
<Affiliates_Yaskifo_Maximum_Commission_Rate />
|
||||||
</Affiliates>
|
</Affiliates>
|
||||||
<ASP>
|
<ASP>
|
||||||
<ASP_FORM>Y</ASP_FORM>
|
<ASP_FORM>Y</ASP_FORM>
|
||||||
<ASP_Member>N</ASP_Member>
|
<ASP_Member>N</ASP_Member>
|
||||||
<ASP_Member_Number />
|
<ASP_Member_Number />
|
||||||
</ASP>
|
</ASP>
|
||||||
</XML_DIZ_INFO>
|
</XML_DIZ_INFO>
|
||||||
|
|||||||
@ -192,6 +192,7 @@ done >>%{name}.lang
|
|||||||
%_datadir/dolibarr/htdocs/loan
|
%_datadir/dolibarr/htdocs/loan
|
||||||
%_datadir/dolibarr/htdocs/mailmanspip
|
%_datadir/dolibarr/htdocs/mailmanspip
|
||||||
%_datadir/dolibarr/htdocs/margin
|
%_datadir/dolibarr/htdocs/margin
|
||||||
|
%_datadir/dolibarr/htdocs/multicurrency
|
||||||
%_datadir/dolibarr/htdocs/opensurvey
|
%_datadir/dolibarr/htdocs/opensurvey
|
||||||
%_datadir/dolibarr/htdocs/paybox
|
%_datadir/dolibarr/htdocs/paybox
|
||||||
%_datadir/dolibarr/htdocs/paypal
|
%_datadir/dolibarr/htdocs/paypal
|
||||||
@ -206,6 +207,7 @@ done >>%{name}.lang
|
|||||||
%_datadir/dolibarr/htdocs/theme
|
%_datadir/dolibarr/htdocs/theme
|
||||||
%_datadir/dolibarr/htdocs/user
|
%_datadir/dolibarr/htdocs/user
|
||||||
%_datadir/dolibarr/htdocs/webservices
|
%_datadir/dolibarr/htdocs/webservices
|
||||||
|
%_datadir/dolibarr/htdocs/websites
|
||||||
%_datadir/dolibarr/htdocs/*.ico
|
%_datadir/dolibarr/htdocs/*.ico
|
||||||
%_datadir/dolibarr/htdocs/*.patch
|
%_datadir/dolibarr/htdocs/*.patch
|
||||||
%_datadir/dolibarr/htdocs/*.php
|
%_datadir/dolibarr/htdocs/*.php
|
||||||
|
|||||||
@ -272,6 +272,7 @@ done >>%{name}.lang
|
|||||||
%_datadir/dolibarr/htdocs/loan
|
%_datadir/dolibarr/htdocs/loan
|
||||||
%_datadir/dolibarr/htdocs/mailmanspip
|
%_datadir/dolibarr/htdocs/mailmanspip
|
||||||
%_datadir/dolibarr/htdocs/margin
|
%_datadir/dolibarr/htdocs/margin
|
||||||
|
%_datadir/dolibarr/htdocs/multicurrency
|
||||||
%_datadir/dolibarr/htdocs/opensurvey
|
%_datadir/dolibarr/htdocs/opensurvey
|
||||||
%_datadir/dolibarr/htdocs/paybox
|
%_datadir/dolibarr/htdocs/paybox
|
||||||
%_datadir/dolibarr/htdocs/paypal
|
%_datadir/dolibarr/htdocs/paypal
|
||||||
@ -286,6 +287,7 @@ done >>%{name}.lang
|
|||||||
%_datadir/dolibarr/htdocs/theme
|
%_datadir/dolibarr/htdocs/theme
|
||||||
%_datadir/dolibarr/htdocs/user
|
%_datadir/dolibarr/htdocs/user
|
||||||
%_datadir/dolibarr/htdocs/webservices
|
%_datadir/dolibarr/htdocs/webservices
|
||||||
|
%_datadir/dolibarr/htdocs/websites
|
||||||
%_datadir/dolibarr/htdocs/*.ico
|
%_datadir/dolibarr/htdocs/*.ico
|
||||||
%_datadir/dolibarr/htdocs/*.patch
|
%_datadir/dolibarr/htdocs/*.patch
|
||||||
%_datadir/dolibarr/htdocs/*.php
|
%_datadir/dolibarr/htdocs/*.php
|
||||||
|
|||||||
@ -189,6 +189,7 @@ done >>%{name}.lang
|
|||||||
%_datadir/dolibarr/htdocs/loan
|
%_datadir/dolibarr/htdocs/loan
|
||||||
%_datadir/dolibarr/htdocs/mailmanspip
|
%_datadir/dolibarr/htdocs/mailmanspip
|
||||||
%_datadir/dolibarr/htdocs/margin
|
%_datadir/dolibarr/htdocs/margin
|
||||||
|
%_datadir/dolibarr/htdocs/multicurrency
|
||||||
%_datadir/dolibarr/htdocs/opensurvey
|
%_datadir/dolibarr/htdocs/opensurvey
|
||||||
%_datadir/dolibarr/htdocs/paybox
|
%_datadir/dolibarr/htdocs/paybox
|
||||||
%_datadir/dolibarr/htdocs/paypal
|
%_datadir/dolibarr/htdocs/paypal
|
||||||
@ -203,6 +204,7 @@ done >>%{name}.lang
|
|||||||
%_datadir/dolibarr/htdocs/theme
|
%_datadir/dolibarr/htdocs/theme
|
||||||
%_datadir/dolibarr/htdocs/user
|
%_datadir/dolibarr/htdocs/user
|
||||||
%_datadir/dolibarr/htdocs/webservices
|
%_datadir/dolibarr/htdocs/webservices
|
||||||
|
%_datadir/dolibarr/htdocs/websites
|
||||||
%_datadir/dolibarr/htdocs/*.ico
|
%_datadir/dolibarr/htdocs/*.ico
|
||||||
%_datadir/dolibarr/htdocs/*.patch
|
%_datadir/dolibarr/htdocs/*.patch
|
||||||
%_datadir/dolibarr/htdocs/*.php
|
%_datadir/dolibarr/htdocs/*.php
|
||||||
|
|||||||
@ -200,6 +200,7 @@ done >>%{name}.lang
|
|||||||
%_datadir/dolibarr/htdocs/loan
|
%_datadir/dolibarr/htdocs/loan
|
||||||
%_datadir/dolibarr/htdocs/mailmanspip
|
%_datadir/dolibarr/htdocs/mailmanspip
|
||||||
%_datadir/dolibarr/htdocs/margin
|
%_datadir/dolibarr/htdocs/margin
|
||||||
|
%_datadir/dolibarr/htdocs/multicurrency
|
||||||
%_datadir/dolibarr/htdocs/opensurvey
|
%_datadir/dolibarr/htdocs/opensurvey
|
||||||
%_datadir/dolibarr/htdocs/paybox
|
%_datadir/dolibarr/htdocs/paybox
|
||||||
%_datadir/dolibarr/htdocs/paypal
|
%_datadir/dolibarr/htdocs/paypal
|
||||||
@ -214,6 +215,7 @@ done >>%{name}.lang
|
|||||||
%_datadir/dolibarr/htdocs/theme
|
%_datadir/dolibarr/htdocs/theme
|
||||||
%_datadir/dolibarr/htdocs/user
|
%_datadir/dolibarr/htdocs/user
|
||||||
%_datadir/dolibarr/htdocs/webservices
|
%_datadir/dolibarr/htdocs/webservices
|
||||||
|
%_datadir/dolibarr/htdocs/websites
|
||||||
%_datadir/dolibarr/htdocs/*.ico
|
%_datadir/dolibarr/htdocs/*.ico
|
||||||
%_datadir/dolibarr/htdocs/*.patch
|
%_datadir/dolibarr/htdocs/*.patch
|
||||||
%_datadir/dolibarr/htdocs/*.php
|
%_datadir/dolibarr/htdocs/*.php
|
||||||
|
|||||||
@ -1,2 +1 @@
|
|||||||
Order allow,deny
|
Require all granted
|
||||||
Deny from all
|
|
||||||
|
|||||||
@ -90,7 +90,7 @@ class modMyModule extends DolibarrModules
|
|||||||
// 'models' => 0, // Set this to 1 if module has its own models directory (core/modules/xxx)
|
// 'models' => 0, // Set this to 1 if module has its own models directory (core/modules/xxx)
|
||||||
// 'css' => array('/mymodule/css/mymodule.css.php'), // Set this to relative path of css file if module has its own css file
|
// 'css' => array('/mymodule/css/mymodule.css.php'), // Set this to relative path of css file if module has its own css file
|
||||||
// 'js' => array('/mymodule/js/mymodule.js'), // Set this to relative path of js file if module must load a js on all pages
|
// 'js' => array('/mymodule/js/mymodule.js'), // Set this to relative path of js file if module must load a js on all pages
|
||||||
// 'hooks' => array('hookcontext1','hookcontext2') // Set here all hooks context managed by module
|
// 'hooks' => array('hookcontext1','hookcontext2',...) // Set here all hooks context managed by module. You can also set hook context 'all'
|
||||||
// 'dir' => array('output' => 'othermodulename'), // To force the default directories names
|
// 'dir' => array('output' => 'othermodulename'), // To force the default directories names
|
||||||
// 'workflow' => array('WORKFLOW_MODULE1_YOURACTIONTYPE_MODULE2'=>array('enabled'=>'! empty($conf->module1->enabled) && ! empty($conf->module2->enabled)', 'picto'=>'yourpicto@mymodule')) // Set here all workflow context managed by module
|
// 'workflow' => array('WORKFLOW_MODULE1_YOURACTIONTYPE_MODULE2'=>array('enabled'=>'! empty($conf->module1->enabled) && ! empty($conf->module2->enabled)', 'picto'=>'yourpicto@mymodule')) // Set here all workflow context managed by module
|
||||||
// );
|
// );
|
||||||
@ -180,8 +180,8 @@ class modMyModule extends DolibarrModules
|
|||||||
|
|
||||||
// Cronjobs
|
// Cronjobs
|
||||||
$this->cronjobs = array(); // List of cron jobs entries to add
|
$this->cronjobs = array(); // List of cron jobs entries to add
|
||||||
// Example: $this->cronjobs=array(0=>array('label'=>'My label', 'jobtype'=>'method', 'class'=>'/dir/class/file.class.php', 'objectname'=>'MyClass', 'method'=>'myMethod', 'parameters'=>'', 'comment'=>'Comment', 'frequency'=>2, 'unitfrequency'=>3600),
|
// Example: $this->cronjobs=array(0=>array('label'=>'My label', 'jobtype'=>'method', 'class'=>'/dir/class/file.class.php', 'objectname'=>'MyClass', 'method'=>'myMethod', 'parameters'=>'', 'comment'=>'Comment', 'frequency'=>2, 'unitfrequency'=>3600, 'test'=>true),
|
||||||
// 1=>array('label'=>'My label', 'jobtype'=>'command', 'command'=>'', 'parameters'=>'', 'comment'=>'Comment', 'frequency'=>1, 'unitfrequency'=>3600*24)
|
// 1=>array('label'=>'My label', 'jobtype'=>'command', 'command'=>'', 'parameters'=>'', 'comment'=>'Comment', 'frequency'=>1, 'unitfrequency'=>3600*24, 'test'=>true)
|
||||||
// );
|
// );
|
||||||
|
|
||||||
// Permissions
|
// Permissions
|
||||||
@ -241,7 +241,7 @@ class modMyModule extends DolibarrModules
|
|||||||
// $this->export_code[$r]=$this->rights_class.'_'.$r;
|
// $this->export_code[$r]=$this->rights_class.'_'.$r;
|
||||||
// $this->export_label[$r]='MyModule'; // Translation key (used only if key ExportDataset_xxx_z not found)
|
// $this->export_label[$r]='MyModule'; // Translation key (used only if key ExportDataset_xxx_z not found)
|
||||||
// $this->export_enabled[$r]='1'; // Condition to show export in list (ie: '$user->id==3'). Set to 1 to always show when module is enabled.
|
// $this->export_enabled[$r]='1'; // Condition to show export in list (ie: '$user->id==3'). Set to 1 to always show when module is enabled.
|
||||||
// $this->export_icon[$r]='generic:MyModule';
|
// $this->export_icon[$r]='generic:MyModule'; // Put here code of icon then string for translation key of module name
|
||||||
// $this->export_permission[$r]=array(array("mymodule","level1","level2"));
|
// $this->export_permission[$r]=array(array("mymodule","level1","level2"));
|
||||||
// $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef');
|
// $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef');
|
||||||
// $this->export_TypeFields_array[$r]=array('t.date'=>'Date', 't.qte'=>'Numeric', 't.poids'=>'Numeric', 't.fad'=>'Numeric', 't.paq'=>'Numeric', 't.stockage'=>'Numeric', 't.fadparliv'=>'Numeric', 't.livau100'=>'Numeric', 't.forfait'=>'Numeric', 's.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_private'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.subprice'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.special_code'=>'Numeric','fd.product_type'=>"Numeric",'fd.fk_product'=>'List:product:label','p.ref'=>'Text','p.label'=>'Text','p.accountancy_code_sell'=>'Text');
|
// $this->export_TypeFields_array[$r]=array('t.date'=>'Date', 't.qte'=>'Numeric', 't.poids'=>'Numeric', 't.fad'=>'Numeric', 't.paq'=>'Numeric', 't.stockage'=>'Numeric', 't.fadparliv'=>'Numeric', 't.livau100'=>'Numeric', 't.forfait'=>'Numeric', 's.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_private'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.subprice'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.special_code'=>'Numeric','fd.product_type'=>"Numeric",'fd.fk_product'=>'List:product:label','p.ref'=>'Text','p.label'=>'Text','p.accountancy_code_sell'=>'Text');
|
||||||
|
|||||||
@ -292,12 +292,16 @@ if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($a
|
|||||||
if (preg_match('/^ErrorPriceExpression/', $value)) $qualifiedforclean=0;
|
if (preg_match('/^ErrorPriceExpression/', $value)) $qualifiedforclean=0;
|
||||||
if (preg_match('/^Language_/', $value)) $qualifiedforclean=0;
|
if (preg_match('/^Language_/', $value)) $qualifiedforclean=0;
|
||||||
if (preg_match('/^DescADHERENT_/', $value)) $qualifiedforclean=0;
|
if (preg_match('/^DescADHERENT_/', $value)) $qualifiedforclean=0;
|
||||||
|
if (preg_match('/^SubmitTranslation/', $value)) $qualifiedforclean=0;
|
||||||
|
if (preg_match('/^ModuleCompanyCode/', $value)) $qualifiedforclean=0;
|
||||||
|
|
||||||
// main.lang
|
// main.lang
|
||||||
if (preg_match('/^Duration/', $value)) $qualifiedforclean=0;
|
if (preg_match('/^Duration/', $value)) $qualifiedforclean=0;
|
||||||
if (preg_match('/^FormatDate/', $value)) $qualifiedforclean=0;
|
if (preg_match('/^FormatDate/', $value)) $qualifiedforclean=0;
|
||||||
if (preg_match('/^DateFormat/', $value)) $qualifiedforclean=0;
|
if (preg_match('/^DateFormat/', $value)) $qualifiedforclean=0;
|
||||||
if (preg_match('/^.b$/', $value)) $qualifiedforclean=0;
|
if (preg_match('/^.b$/', $value)) $qualifiedforclean=0;
|
||||||
if (preg_match('/^.*Bytes$/', $value)) $qualifiedforclean=0;
|
if (preg_match('/^.*Bytes$/', $value)) $qualifiedforclean=0;
|
||||||
|
if (preg_match('/^NoteSomeFeaturesAreDisabled/', $value)) $qualifiedforclean=0;
|
||||||
if (preg_match('/^(DoTest|Under|Limits|Cards|CurrentValue|DateLimit|DateAndHour|NbOfLines|NbOfObjects|NbOfReferes|TotalTTCShort|VATs)/', $value)) $qualifiedforclean=0;
|
if (preg_match('/^(DoTest|Under|Limits|Cards|CurrentValue|DateLimit|DateAndHour|NbOfLines|NbOfObjects|NbOfReferes|TotalTTCShort|VATs)/', $value)) $qualifiedforclean=0;
|
||||||
// orders
|
// orders
|
||||||
if (preg_match('/^OrderSource/', $value)) $qualifiedforclean=0;
|
if (preg_match('/^OrderSource/', $value)) $qualifiedforclean=0;
|
||||||
@ -314,12 +318,16 @@ if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($a
|
|||||||
if (preg_match('/^EMailText/', $value)) $qualifiedforclean=0;
|
if (preg_match('/^EMailText/', $value)) $qualifiedforclean=0;
|
||||||
if (preg_match('/ById$/', $value)) $qualifiedforclean=0;
|
if (preg_match('/ById$/', $value)) $qualifiedforclean=0;
|
||||||
if (preg_match('/ByLogin$/', $value)) $qualifiedforclean=0;
|
if (preg_match('/ByLogin$/', $value)) $qualifiedforclean=0;
|
||||||
|
// printing
|
||||||
|
if (preg_match('/PrintingDriverDesc$/', $value)) $qualifiedforclean=0;
|
||||||
|
if (preg_match('/PrintTestDesc$/', $value)) $qualifiedforclean=0;
|
||||||
// products
|
// products
|
||||||
if (preg_match('/GlobalVariableUpdaterType$/', $value)) $qualifiedforclean=0;
|
if (preg_match('/GlobalVariableUpdaterType$/', $value)) $qualifiedforclean=0;
|
||||||
if (preg_match('/GlobalVariableUpdaterHelp$/', $value)) $qualifiedforclean=0;
|
if (preg_match('/GlobalVariableUpdaterHelp$/', $value)) $qualifiedforclean=0;
|
||||||
if (preg_match('/OppStatus/', $value)) $qualifiedforclean=0;
|
if (preg_match('/OppStatus/', $value)) $qualifiedforclean=0;
|
||||||
if (preg_match('/AvailabilityType/', $value)) $qualifiedforclean=0;
|
if (preg_match('/AvailabilityType/', $value)) $qualifiedforclean=0;
|
||||||
|
if (preg_match('/CardProduct/', $value)) $qualifiedforclean=0;
|
||||||
|
|
||||||
if (preg_match('/sms/i', $value)) $qualifiedforclean=0;
|
if (preg_match('/sms/i', $value)) $qualifiedforclean=0;
|
||||||
if (preg_match('/TF_/i', $value)) $qualifiedforclean=0;
|
if (preg_match('/TF_/i', $value)) $qualifiedforclean=0;
|
||||||
if (preg_match('/WithBankUsing/i', $value)) $qualifiedforclean=0;
|
if (preg_match('/WithBankUsing/i', $value)) $qualifiedforclean=0;
|
||||||
@ -331,7 +339,7 @@ if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($a
|
|||||||
}
|
}
|
||||||
|
|
||||||
//$search = '\'trans("'.$value.'")\'';
|
//$search = '\'trans("'.$value.'")\'';
|
||||||
$search = '-e "\''.$value.'\'" -e \'"'.$value.'"\'';
|
$search = '-e "\''.$value.'\'" -e \'"'.$value.'"\' -e "('.$value.')"';
|
||||||
$string = 'grep -R -m 1 -F --exclude=includes/* --include=*.php '.$search.' '.$htdocs.'* '.$scripts.'*';
|
$string = 'grep -R -m 1 -F --exclude=includes/* --include=*.php '.$search.' '.$htdocs.'* '.$scripts.'*';
|
||||||
//print $string."<br>\n";
|
//print $string."<br>\n";
|
||||||
exec($string,$output);
|
exec($string,$output);
|
||||||
|
|||||||
@ -16,9 +16,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/accountancy/admin/categories.php
|
* \file htdocs/accountancy/admin/categories.php
|
||||||
* \ingroup Advanced accountancy
|
* \ingroup Advanced accountancy
|
||||||
* \brief Page to assign mass categories to accounts
|
* \brief Page to assign mass categories to accounts
|
||||||
*/
|
*/
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
|
|
||||||
@ -36,11 +36,11 @@ $langs->load("accountancy");
|
|||||||
$mesg = '';
|
$mesg = '';
|
||||||
$action = GETPOST('action');
|
$action = GETPOST('action');
|
||||||
$cat_id = GETPOST('account_category');
|
$cat_id = GETPOST('account_category');
|
||||||
$selectcpt = GETPOST('cpt_bk');
|
$selectcpt = GETPOST('cpt_bk', 'array');
|
||||||
$cpt_id = GETPOST('cptid');
|
$cpt_id = GETPOST('cptid');
|
||||||
|
|
||||||
if($cat_id == 0){
|
if ($cat_id == 0) {
|
||||||
$cat_id = null;
|
$cat_id = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
@ -54,31 +54,30 @@ if (! $user->admin)
|
|||||||
$AccCat = new AccountancyCategory($db);
|
$AccCat = new AccountancyCategory($db);
|
||||||
|
|
||||||
// si ajout de comptes
|
// si ajout de comptes
|
||||||
if(!empty($selectcpt)){
|
if (! empty($selectcpt)) {
|
||||||
$cpts = array();
|
$cpts = array ();
|
||||||
$i = 0;
|
foreach ( $selectcpt as $selectedOption ) {
|
||||||
foreach ($selectcpt as $selectedOption){
|
if (! array_key_exists($selectedOption, $cpts))
|
||||||
$cpts[$i] = "'".$selectedOption."'";
|
$cpts[$selectedOption] = "'" . $selectedOption . "'";
|
||||||
$i++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if($AccCat->updateAccAcc($cat_id, $cpts)){
|
$return= $AccCat->updateAccAcc($cat_id, $cpts);
|
||||||
|
|
||||||
|
if ($return<0) {
|
||||||
|
setEventMessages($langs->trans('errors'), $AccCat->errors, 'errors');
|
||||||
|
} else {
|
||||||
setEventMessages($langs->trans('Saved'), null, 'mesgs');
|
setEventMessages($langs->trans('Saved'), null, 'mesgs');
|
||||||
}else{
|
|
||||||
setEventMessages($langs->trans('errors'), null, 'errors');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if ($action == 'delete') {
|
if ($action == 'delete') {
|
||||||
if($cpt_id){
|
if ($cpt_id) {
|
||||||
if($AccCat->deleteCptCat($cpt_id)){
|
if ($AccCat->deleteCptCat($cpt_id)) {
|
||||||
setEventMessages($langs->trans('Deleted'), null, 'mesgs');
|
setEventMessages($langs->trans('Deleted'), null, 'mesgs');
|
||||||
}else{
|
} else {
|
||||||
setEventMessages($langs->trans('errors'), null, 'errors');
|
setEventMessages($langs->trans('errors'), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
@ -88,65 +87,69 @@ llxheader('', $langs->trans('AccountAccounting'));
|
|||||||
$formaccounting = new FormAccounting($db);
|
$formaccounting = new FormAccounting($db);
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans('Categories'));
|
print load_fiche_titre($langs->trans('Categories'));
|
||||||
|
|
||||||
print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '" method="POST">' . "\n";
|
print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '" method="POST">' . "\n";
|
||||||
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
|
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
|
||||||
print '<input type="hidden" name="action" value="display">';
|
print '<input type="hidden" name="action" value="display">';
|
||||||
|
|
||||||
dol_fiche_head();
|
dol_fiche_head();
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
// Category
|
// Category
|
||||||
print '<tr><td>' . $langs->trans("AccountingCategory") . '</td>';
|
print '<tr><td>' . $langs->trans("AccountingCategory") . '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
$formaccounting->select_accounting_category($cat_id, 'account_category', 1);
|
$formaccounting->select_accounting_category($cat_id, 'account_category', 1);
|
||||||
print '<input class="button" type="submit" value="' . $langs->trans("Display") . '">';
|
print '<input class="button" type="submit" value="' . $langs->trans("Display") . '">';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
if (! empty($cat_id)) {
|
||||||
if(!empty($cat_id)){
|
$return = $AccCat->getCptBK($cat_id);
|
||||||
$obj = $AccCat->getCptBK($cat_id);
|
if ($return < 0) {
|
||||||
print '<tr><td>' . $langs->trans("AddCompteFromBK") . '</td>';
|
setEventMessages(null, $AccCat->errors, 'errors');
|
||||||
print '<td>';
|
|
||||||
if(!empty($obj)){
|
|
||||||
print '<select size="'.count($obj).'" name="cpt_bk[]" multiple>';
|
|
||||||
foreach ( $obj as $cpt ) {
|
|
||||||
print '<option value="'.length_accountg($cpt->numero_compte).'">' . length_accountg($cpt->numero_compte) . ' ('.$cpt->label_compte.' '.$cpt->doc_ref.')</option>';
|
|
||||||
|
|
||||||
}
|
|
||||||
print '</select> - <input class="button" type="submit" id="" class="action-delete" value="' . $langs->trans("add") . '"> ';
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
|
||||||
}
|
}
|
||||||
|
print '<tr><td>' . $langs->trans("AddCompteFromBK") . '</td>';
|
||||||
print '</table>';
|
print '<td>';
|
||||||
|
if (is_array($AccCat->lines_cptbk) && count($AccCat->lines_cptbk) > 0) {
|
||||||
|
print '<select size="' . count($obj) . '" name="cpt_bk[]" multiple>';
|
||||||
|
foreach ( $AccCat->lines_cptbk as $cpt ) {
|
||||||
|
print '<option value="' . length_accountg($cpt->numero_compte) . '">' . length_accountg($cpt->numero_compte) . ' (' . $cpt->label_compte . ' ' . $cpt->doc_ref . ')</option>';
|
||||||
|
}
|
||||||
|
print '</select> - <input class="button" type="submit" id="" class="action-delete" value="' . $langs->trans("add") . '"> ';
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
dol_fiche_end();
|
print '</table>';
|
||||||
|
|
||||||
print '</form>';
|
dol_fiche_end();
|
||||||
|
|
||||||
|
print '</form>';
|
||||||
|
|
||||||
if ($action == 'display' || $action == 'delete') {
|
if ($action == 'display' || $action == 'delete') {
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
|
|
||||||
print '<tr class="liste_titre"><th class="liste_titre">'.$langs->trans("Numerocompte").'</th><th class="liste_titre">'.$langs->trans("Description").'</th><th class="liste_titre" width="60" align="center">Action</th></tr>';
|
print '<tr class="liste_titre"><th class="liste_titre">' . $langs->trans("Numerocompte") . '</th><th class="liste_titre">' . $langs->trans("Description") . '</th><th class="liste_titre" width="60" align="center">Action</th></tr>';
|
||||||
|
|
||||||
if(!empty($cat_id)){
|
if (! empty($cat_id)) {
|
||||||
$obj = $AccCat->display($cat_id);
|
$return = $AccCat->display($cat_id);
|
||||||
$j=1;
|
if ($return < 0) {
|
||||||
if(!empty($obj)){
|
setEventMessages(null, $AccCat->errors, 'errors');
|
||||||
foreach ( $obj as $cpt ) {
|
}
|
||||||
|
$j = 1;
|
||||||
|
if (is_array($AccCat->lines_display) && count($AccCat->lines_display) > 0) {
|
||||||
|
foreach ( $AccCat->lines_display as $cpt ) {
|
||||||
$var = ! $var;
|
$var = ! $var;
|
||||||
print '<tr'. $bc[$var].'>';
|
print '<tr' . $bc[$var] . '>';
|
||||||
print '<td>' . length_accountg($cpt->account_number) . '</td>';
|
print '<td>' . length_accountg($cpt->account_number) . '</td>';
|
||||||
print '<td>' . $cpt->label . '</td>';
|
print '<td>' . $cpt->label . '</td>';
|
||||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?account_category=$cat_id&cptid=".$cpt->rowid, $langs->trans("DeleteCptCategory"), $langs->trans("ConfirmDeleteCptCategory"), "delete", '', 0, "action-delete".$j);
|
print $form->formconfirm($_SERVER["PHP_SELF"] . "?account_category=$cat_id&cptid=" . $cpt->rowid, $langs->trans("DeleteCptCategory"), $langs->trans("ConfirmDeleteCptCategory"), "delete", '', 0, "action-delete" . $j);
|
||||||
print '<td><input class="button" type="button" id="action-delete'.$j.'" value="' . $langs->trans("Delete") . '"></td>';
|
print '<td><input class="button" type="button" id="action-delete' . $j . '" value="' . $langs->trans("Delete") . '"></td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$j++;
|
$j ++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|||||||
@ -23,6 +23,7 @@
|
|||||||
* \ingroup Advanced accountancy
|
* \ingroup Advanced accountancy
|
||||||
* \brief Balance of book keeping
|
* \brief Balance of book keeping
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
|
|
||||||
// Class
|
// Class
|
||||||
@ -184,7 +185,7 @@ else {
|
|||||||
print_liste_field_titre($langs->trans("Labelcompte"), $_SERVER['PHP_SELF'], "t.label_compte", "", $options, "", $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Labelcompte"), $_SERVER['PHP_SELF'], "t.label_compte", "", $options, "", $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("Debit"), $_SERVER['PHP_SELF'], "t.debit", "", $options, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Debit"), $_SERVER['PHP_SELF'], "t.debit", "", $options, 'align="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("Credit"), $_SERVER['PHP_SELF'], "t.credit", "", $options, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Credit"), $_SERVER['PHP_SELF'], "t.credit", "", $options, 'align="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("Solde"), $_SERVER["PHP_SELF"], "", $options, "", 'width="60" align="center"', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Solde"), $_SERVER["PHP_SELF"], "", $options, "", 'align="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("Action"), $_SERVER["PHP_SELF"], "", $options, "", 'width="60" align="center"', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Action"), $_SERVER["PHP_SELF"], "", $options, "", 'width="60" align="center"', $sortfield, $sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@ -213,6 +214,9 @@ else {
|
|||||||
|
|
||||||
$total_debit = 0;
|
$total_debit = 0;
|
||||||
$total_credit = 0;
|
$total_credit = 0;
|
||||||
|
$sous_total_debit = 0;
|
||||||
|
$sous_total_credit = 0;
|
||||||
|
$displayed_account = "";
|
||||||
|
|
||||||
foreach ( $object->lines as $line ) {
|
foreach ( $object->lines as $line ) {
|
||||||
$var = ! $var;
|
$var = ! $var;
|
||||||
@ -220,33 +224,59 @@ else {
|
|||||||
$total_debit += $line->debit;
|
$total_debit += $line->debit;
|
||||||
$total_credit += $line->credit;
|
$total_credit += $line->credit;
|
||||||
$description = $object->get_compte_desc($line->numero_compte); // Search description of the account
|
$description = $object->get_compte_desc($line->numero_compte); // Search description of the account
|
||||||
|
$root_account_description = $object->get_compte_racine($line->numero_compte);
|
||||||
if(empty($description)){
|
if(empty($description)){
|
||||||
$link = '<a href="../admin/card.php?action=create&compte=' . length_accountg($line->numero_compte) . '">' . img_edit_add() .'</a>';
|
$link = '<a href="../admin/card.php?action=create&compte=' . length_accountg($line->numero_compte) . '">' . img_edit_add() .'</a>';
|
||||||
}
|
}
|
||||||
print '<tr'. $bc[$var].'>';
|
print '<tr'. $bc[$var].'>';
|
||||||
|
|
||||||
|
|
||||||
|
// Permet d'afficher le compte comptable
|
||||||
|
if ($root_account_description != $displayed_account) {
|
||||||
|
|
||||||
|
// Affiche un Sous-Total par compte comptable
|
||||||
|
if ($displayed_account != "") {
|
||||||
|
print '<tr class="liste_total"><td align="right" colspan="2">'.$langs->trans("SubTotal") . ':</td><td class="nowrap" align="right">'.price($sous_total_debit).'</td><td class="nowrap" align="right">'.price($sous_total_credit).'</td><td class="nowrap" align="right">'.price($sous_total_credit-$sous_total_debit).'</td>';
|
||||||
|
print "<td> </td>\n";
|
||||||
|
print '</tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Affiche le compte comptable en début de ligne
|
||||||
|
print "<tr>";
|
||||||
|
print '<td colspan="6" style="font-weight:bold; border-bottom: 1pt solid black;">'. $root_account_description .'</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
$displayed_account = $root_account_description;
|
||||||
|
$sous_total_debit = 0;
|
||||||
|
$sous_total_credit = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// $object->get_compte_racine($line->numero_compte);
|
||||||
|
|
||||||
|
|
||||||
print '<td>' . length_accountg($line->numero_compte) . '</td>';
|
print '<td>' . length_accountg($line->numero_compte) . '</td>';
|
||||||
print '<td>' . $description . '</td>';
|
print '<td>' . $description . '</td>';
|
||||||
print '<td align="right">' . number_format($line->debit, 2, ',', ' ') . '</td>';
|
print '<td align="right">' . number_format($line->debit, 2, ',', ' ') . '</td>';
|
||||||
print '<td align="right">' . number_format($line->credit, 2, ',', ' ') . '</td>';
|
print '<td align="right">' . number_format($line->credit, 2, ',', ' ') . '</td>';
|
||||||
print '<td align="right">' . number_format($line->credit - $line->debit, 2, ',', ' ') . '</td>';
|
print '<td align="right">' . number_format($line->credit - $line->debit, 2, ',', ' ') . '</td>';
|
||||||
print '<td align="center">' . $link;
|
print '<td align="center">' . $link;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
// Comptabilise le sous-total
|
||||||
|
$sous_total_debit += $line->debit;
|
||||||
|
$sous_total_credit += $line->credit;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total"><td align="right" colspan="2">'.$langs->trans("SubTotal") . ':</td><td class="nowrap" align="right">'.price($sous_total_debit).'</td><td class="nowrap" align="right">'.price($sous_total_credit).'</td><td class="nowrap" align="right">'.price($sous_total_credit-$sous_total_debit).'</td>';
|
||||||
print '<td></td>';
|
print "<td> </td>\n";
|
||||||
print '<td></td>';
|
print '</tr>';
|
||||||
print '<td align="right">';
|
|
||||||
print price($total_debit);
|
print '<tr class="liste_total"><td align="right" colspan="2">'.$langs->trans("AccountBalance") . ':</td><td class="nowrap" align="right">'.price($total_debit).'</td><td class="nowrap" align="right">'.price($total_credit).'</td><td class="nowrap" align="right">'.price($total_credit-$total_debit).'</td>';
|
||||||
print '</td>';
|
print "<td> </td>\n";
|
||||||
print '<td align="right">';
|
print '</tr>';
|
||||||
print price($total_credit);
|
|
||||||
print '</td>';
|
|
||||||
print '<td align="right">' . price($total_credit - $total_debit) . '</td>';
|
|
||||||
print '<td align="right"></td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|||||||
@ -18,9 +18,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/accountancy/bookkeeping/card.php
|
* \file htdocs/accountancy/bookkeeping/card.php
|
||||||
* \ingroup Advanced accountancy
|
* \ingroup Advanced accountancy
|
||||||
* \brief Page to show book-entry
|
* \brief Page to show book-entry
|
||||||
*/
|
*/
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
|
|
||||||
@ -62,17 +62,17 @@ if (! empty($update)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($action == "confirm_update") {
|
if ($action == "confirm_update") {
|
||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
if ((floatval($debit) != 0.0) && (floatval($credit) != 0.0)) {
|
if ((floatval($debit) != 0.0) && (floatval($credit) != 0.0)) {
|
||||||
setEventMessages($langs->trans('ErrorDebitCredit'), null, 'errors');
|
setEventMessages($langs->trans('ErrorDebitCredit'), null, 'errors');
|
||||||
$error ++;
|
$error ++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($error)) {
|
if (empty($error)) {
|
||||||
$book = new BookKeeping($db);
|
$book = new BookKeeping($db);
|
||||||
|
|
||||||
$result = $book->fetch($id);
|
$result = $book->fetch($id);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessages($book->error, $book->errors, 'errors');
|
setEventMessages($book->error, $book->errors, 'errors');
|
||||||
@ -82,7 +82,7 @@ if ($action == "confirm_update") {
|
|||||||
$book->label_compte = $label_compte;
|
$book->label_compte = $label_compte;
|
||||||
$book->debit = $debit;
|
$book->debit = $debit;
|
||||||
$book->credit = $credit;
|
$book->credit = $credit;
|
||||||
|
|
||||||
if (floatval($debit) != 0.0) {
|
if (floatval($debit) != 0.0) {
|
||||||
$book->montant = $debit;
|
$book->montant = $debit;
|
||||||
$book->sens = 'D';
|
$book->sens = 'D';
|
||||||
@ -91,7 +91,7 @@ if ($action == "confirm_update") {
|
|||||||
$book->montant = $credit;
|
$book->montant = $credit;
|
||||||
$book->sens = 'C';
|
$book->sens = 'C';
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $book->update($user);
|
$result = $book->update($user);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessages($book->error, $book->errors, 'errors');
|
setEventMessages($book->error, $book->errors, 'errors');
|
||||||
@ -101,19 +101,19 @@ if ($action == "confirm_update") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action == "add") {
|
else if ($action == "add") {
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
if ((floatval($debit) != 0.0) && (floatval($credit) != 0.0)) {
|
if ((floatval($debit) != 0.0) && (floatval($credit) != 0.0)) {
|
||||||
setEventMessages($langs->trans('ErrorDebitCredit'), null, 'errors');
|
setEventMessages($langs->trans('ErrorDebitCredit'), null, 'errors');
|
||||||
$error ++;
|
$error ++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($error)) {
|
if (empty($error)) {
|
||||||
$book = new BookKeeping($db);
|
$book = new BookKeeping($db);
|
||||||
|
|
||||||
$book->numero_compte = $account_number;
|
$book->numero_compte = $account_number;
|
||||||
$book->code_tiers = $code_tiers;
|
$book->code_tiers = $code_tiers;
|
||||||
$book->label_compte = $label_compte;
|
$book->label_compte = $label_compte;
|
||||||
@ -126,17 +126,17 @@ else if ($action == "add") {
|
|||||||
$book->code_journal = GETPOST('code_journal');
|
$book->code_journal = GETPOST('code_journal');
|
||||||
$book->fk_doc = GETPOST('fk_doc');
|
$book->fk_doc = GETPOST('fk_doc');
|
||||||
$book->fk_docdet = GETPOST('fk_docdet');
|
$book->fk_docdet = GETPOST('fk_docdet');
|
||||||
|
|
||||||
if (floatval($debit) != 0.0) {
|
if (floatval($debit) != 0.0) {
|
||||||
$book->montant = $debit;
|
$book->montant = $debit;
|
||||||
$book->sens = 'D';
|
$book->sens = 'D';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (floatval($credit) != 0.0) {
|
if (floatval($credit) != 0.0) {
|
||||||
$book->montant = $credit;
|
$book->montant = $credit;
|
||||||
$book->sens = 'C';
|
$book->sens = 'C';
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $book->createStd($user);
|
$result = $book->createStd($user);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessages($book->error, $book->errors, 'errors');
|
setEventMessages($book->error, $book->errors, 'errors');
|
||||||
@ -145,15 +145,15 @@ else if ($action == "add") {
|
|||||||
$action = '';
|
$action = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action == "confirm_delete") {
|
else if ($action == "confirm_delete") {
|
||||||
$book = new BookKeeping($db);
|
$book = new BookKeeping($db);
|
||||||
|
|
||||||
$result = $book->fetch($id);
|
$result = $book->fetch($id);
|
||||||
|
|
||||||
$piece_num = $book->piece_num;
|
$piece_num = $book->piece_num;
|
||||||
|
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessages($book->error, $book->errors, 'errors');
|
setEventMessages($book->error, $book->errors, 'errors');
|
||||||
} else {
|
} else {
|
||||||
@ -163,11 +163,11 @@ else if ($action == "confirm_delete") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$action = '';
|
$action = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action == "confirm_create") {
|
else if ($action == "confirm_create") {
|
||||||
$book = new BookKeeping($db);
|
$book = new BookKeeping($db);
|
||||||
|
|
||||||
$book->label_compte = '';
|
$book->label_compte = '';
|
||||||
$book->debit = 0;
|
$book->debit = 0;
|
||||||
$book->credit = 0;
|
$book->credit = 0;
|
||||||
@ -178,9 +178,9 @@ else if ($action == "confirm_create") {
|
|||||||
$book->code_journal = GETPOST('code_journal');
|
$book->code_journal = GETPOST('code_journal');
|
||||||
$book->fk_doc = 0;
|
$book->fk_doc = 0;
|
||||||
$book->fk_docdet = 0;
|
$book->fk_docdet = 0;
|
||||||
|
|
||||||
$book->montant = 0;
|
$book->montant = 0;
|
||||||
|
|
||||||
$result = $book->createStd($user);
|
$result = $book->createStd($user);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessages($book->error, $book->errors, 'errors');
|
setEventMessages($book->error, $book->errors, 'errors');
|
||||||
@ -209,15 +209,15 @@ if ($action == 'delete') {
|
|||||||
|
|
||||||
if ($action == 'create') {
|
if ($action == 'create') {
|
||||||
print load_fiche_titre($langs->trans("CreateMvts"));
|
print load_fiche_titre($langs->trans("CreateMvts"));
|
||||||
|
|
||||||
$code_journal_array = array (
|
$code_journal_array = array (
|
||||||
$conf->global->ACCOUNTING_SELL_JOURNAL => $conf->global->ACCOUNTING_SELL_JOURNAL,
|
$conf->global->ACCOUNTING_SELL_JOURNAL => $conf->global->ACCOUNTING_SELL_JOURNAL,
|
||||||
$conf->global->ACCOUNTING_PURCHASE_JOURNAL => $conf->global->ACCOUNTING_PURCHASE_JOURNAL,
|
$conf->global->ACCOUNTING_PURCHASE_JOURNAL => $conf->global->ACCOUNTING_PURCHASE_JOURNAL,
|
||||||
$conf->global->ACCOUNTING_SOCIAL_JOURNAL => $conf->global->ACCOUNTING_SOCIAL_JOURNAL,
|
$conf->global->ACCOUNTING_SOCIAL_JOURNAL => $conf->global->ACCOUNTING_SOCIAL_JOURNAL,
|
||||||
$conf->global->ACCOUNTING_MISCELLANEOUS_JOURNAL => $conf->global->ACCOUNTING_MISCELLANEOUS_JOURNAL,
|
$conf->global->ACCOUNTING_MISCELLANEOUS_JOURNAL => $conf->global->ACCOUNTING_MISCELLANEOUS_JOURNAL,
|
||||||
$conf->global->ACCOUNTING_EXPENSEREPORT_JOURNAL => $conf->global->ACCOUNTING_EXPENSEREPORT_JOURNAL
|
$conf->global->ACCOUNTING_EXPENSEREPORT_JOURNAL => $conf->global->ACCOUNTING_EXPENSEREPORT_JOURNAL
|
||||||
);
|
);
|
||||||
|
|
||||||
$sql = 'SELECT DISTINCT accountancy_journal FROM ' . MAIN_DB_PREFIX . 'bank_account WHERE clos=0';
|
$sql = 'SELECT DISTINCT accountancy_journal FROM ' . MAIN_DB_PREFIX . 'bank_account WHERE clos=0';
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if (! $resql) {
|
if (! $resql) {
|
||||||
@ -229,52 +229,52 @@ if ($action == 'create') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$book = new BookKeeping($db);
|
$book = new BookKeeping($db);
|
||||||
$next_num_mvt = $book->getNextNumMvt();
|
$next_num_mvt = $book->getNextNumMvt();
|
||||||
|
|
||||||
print '<form action="' . $_SERVER["PHP_SELF"] . '" name="create_mvt" method="POST">';
|
print '<form action="' . $_SERVER["PHP_SELF"] . '" name="create_mvt" method="POST">';
|
||||||
print '<input type="hidden" name="action" value="confirm_create">' . "\n";
|
print '<input type="hidden" name="action" value="confirm_create">' . "\n";
|
||||||
print '<input type="hidden" name="next_num_mvt" value="' . $next_num_mvt . '">' . "\n";
|
print '<input type="hidden" name="next_num_mvt" value="' . $next_num_mvt . '">' . "\n";
|
||||||
|
|
||||||
dol_fiche_head();
|
dol_fiche_head();
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td width="25%">' . $langs->trans("NumMvts") . '</td>';
|
print '<td width="25%">' . $langs->trans("NumMvts") . '</td>';
|
||||||
print '<td>' . $next_num_mvt . '</td>';
|
print '<td>' . $next_num_mvt . '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>' . $langs->trans("Docdate") . '</td>';
|
print '<td>' . $langs->trans("Docdate") . '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $html->select_date('', 'doc_date', '', '', '', "create_mvt", 1, 1);
|
print $html->select_date('', 'doc_date', '', '', '', "create_mvt", 1, 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>' . $langs->trans("Codejournal") . '</td>';
|
print '<td>' . $langs->trans("Codejournal") . '</td>';
|
||||||
print '<td>' . $html->selectarray('code_journal', $code_journal_array) . '</td>';
|
print '<td>' . $html->selectarray('code_journal', $code_journal_array) . '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>' . $langs->trans("Docref") . '</td>';
|
print '<td>' . $langs->trans("Docref") . '</td>';
|
||||||
print '<td><input type="text" size="20" name="doc_ref" value=""/></td>';
|
print '<td><input type="text" size="20" name="doc_ref" value=""/></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>' . $langs->trans("Doctype") . '</td>';
|
print '<td>' . $langs->trans("Doctype") . '</td>';
|
||||||
print '<td><input type="text" size="20" name="doc_type" value=""/></td>';
|
print '<td><input type="text" size="20" name="doc_type" value=""/></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
print '<div align="center"><input type="submit" class="button" value="' . $langs->trans("Create") . '">';
|
print '<div align="center"><input type="submit" class="button" value="' . $langs->trans("Create") . '">';
|
||||||
print ' <input type="button" value="' . $langs->trans("Cancel") . '" class="button" onclick="history.go(-1)" />';
|
print ' <input type="button" value="' . $langs->trans("Cancel") . '" class="button" onclick="history.go(-1)" />';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
} else {
|
} else {
|
||||||
$book = new BookKeeping($db);
|
$book = new BookKeeping($db);
|
||||||
@ -283,9 +283,9 @@ if ($action == 'create') {
|
|||||||
setEventMessages($book->error, $book->errors, 'errors');
|
setEventMessages($book->error, $book->errors, 'errors');
|
||||||
}
|
}
|
||||||
if (! empty($book->piece_num)) {
|
if (! empty($book->piece_num)) {
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("UpdateMvts"), '<a href="list.php">' . $langs->trans('BackToList') . '</a>');
|
print load_fiche_titre($langs->trans("UpdateMvts"), '<a href="list.php">' . $langs->trans('BackToList') . '</a>');
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
print '<tr class="pair">';
|
print '<tr class="pair">';
|
||||||
print '<td width="25%">' . $langs->trans("NumMvts") . '</td>';
|
print '<td width="25%">' . $langs->trans("NumMvts") . '</td>';
|
||||||
@ -309,14 +309,14 @@ if ($action == 'create') {
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '<br />';
|
print '<br />';
|
||||||
|
|
||||||
$result = $book->fetch_all_per_mvt($piece_num);
|
$result = $book->fetch_all_per_mvt($piece_num);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessages($book->error, $book->errors, 'errors');
|
setEventMessages($book->error, $book->errors, 'errors');
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("ListeMvts"));
|
print load_fiche_titre($langs->trans("ListeMvts"));
|
||||||
|
|
||||||
print '<form action="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $book->piece_num . '" method="post">';
|
print '<form action="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $book->piece_num . '" method="post">';
|
||||||
print '<input type="hidden" name="doc_date" value="' . $book->doc_date . '">' . "\n";
|
print '<input type="hidden" name="doc_date" value="' . $book->doc_date . '">' . "\n";
|
||||||
print '<input type="hidden" name="doc_type" value="' . $book->doc_type . '">' . "\n";
|
print '<input type="hidden" name="doc_type" value="' . $book->doc_type . '">' . "\n";
|
||||||
@ -324,15 +324,15 @@ if ($action == 'create') {
|
|||||||
print '<input type="hidden" name="code_journal" value="' . $book->code_journal . '">' . "\n";
|
print '<input type="hidden" name="code_journal" value="' . $book->code_journal . '">' . "\n";
|
||||||
print '<input type="hidden" name="fk_doc" value="' . $book->fk_doc . '">' . "\n";
|
print '<input type="hidden" name="fk_doc" value="' . $book->fk_doc . '">' . "\n";
|
||||||
print '<input type="hidden" name="fk_docdet" value="' . $book->fk_docdet . '">' . "\n";
|
print '<input type="hidden" name="fk_docdet" value="' . $book->fk_docdet . '">' . "\n";
|
||||||
|
|
||||||
print "<table class=\"noborder\" width=\"100%\">";
|
print "<table class=\"noborder\" width=\"100%\">";
|
||||||
if (count($book->linesmvt) > 0) {
|
if (count($book->linesmvt) > 0) {
|
||||||
|
|
||||||
$total_debit = 0;
|
$total_debit = 0;
|
||||||
$total_credit = 0;
|
$total_credit = 0;
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
|
|
||||||
print_liste_field_titre($langs->trans("AccountAccountingShort"));
|
print_liste_field_titre($langs->trans("AccountAccountingShort"));
|
||||||
print_liste_field_titre($langs->trans("Code_tiers"));
|
print_liste_field_titre($langs->trans("Code_tiers"));
|
||||||
print_liste_field_titre($langs->trans("Labelcompte"));
|
print_liste_field_titre($langs->trans("Labelcompte"));
|
||||||
@ -341,18 +341,18 @@ if ($action == 'create') {
|
|||||||
print_liste_field_titre($langs->trans("Amount"), "", "", "", "", 'align="center"');
|
print_liste_field_titre($langs->trans("Amount"), "", "", "", "", 'align="center"');
|
||||||
print_liste_field_titre($langs->trans("Sens"), "", "", "", "", 'align="center"');
|
print_liste_field_titre($langs->trans("Sens"), "", "", "", "", 'align="center"');
|
||||||
print_liste_field_titre($langs->trans("Action"), "", "", "", "", 'width="60" align="center"');
|
print_liste_field_titre($langs->trans("Action"), "", "", "", "", 'width="60" align="center"');
|
||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
foreach ( $book->linesmvt as $line ) {
|
foreach ( $book->linesmvt as $line ) {
|
||||||
$var = ! $var;
|
$var = ! $var;
|
||||||
print '<tr'. $bc[$var].'>';
|
print '<tr' . $bc[$var] . '>';
|
||||||
|
|
||||||
$total_debit += $line->debit;
|
$total_debit += $line->debit;
|
||||||
$total_credit += $line->credit;
|
$total_credit += $line->credit;
|
||||||
|
|
||||||
if ($action == 'update' && $line->id == $id) {
|
if ($action == 'update' && $line->id == $id) {
|
||||||
|
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $formventilation->select_account($line->numero_compte, 'account_number', 0, array (), 1, 1, '');
|
print $formventilation->select_account($line->numero_compte, 'account_number', 0, array (), 1, 1, '');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -376,7 +376,7 @@ if ($action == 'create') {
|
|||||||
print '<td align="right">' . price($line->credit) . '</td>';
|
print '<td align="right">' . price($line->credit) . '</td>';
|
||||||
print '<td align="right">' . price($line->montant) . '</td>';
|
print '<td align="right">' . price($line->montant) . '</td>';
|
||||||
print '<td align="center">' . $line->sens . '</td>';
|
print '<td align="center">' . $line->sens . '</td>';
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print '<a href="./card.php?action=update&id=' . $line->id . '&piece_num=' . $line->piece_num . '">';
|
print '<a href="./card.php?action=update&id=' . $line->id . '&piece_num=' . $line->piece_num . '">';
|
||||||
print img_edit();
|
print img_edit();
|
||||||
@ -384,23 +384,21 @@ if ($action == 'create') {
|
|||||||
print '<a href="./card.php?action=delete&id=' . $line->id . '&piece_num=' . $line->piece_num . '">';
|
print '<a href="./card.php?action=delete&id=' . $line->id . '&piece_num=' . $line->piece_num . '">';
|
||||||
print img_delete();
|
print img_delete();
|
||||||
print '</a>';
|
print '</a>';
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($total_debit != $total_credit) {
|
if ($total_debit != $total_credit) {
|
||||||
setEventMessages(null, array (
|
setEventMessages(null, array (
|
||||||
'MvtNotCorrectlyBalanced',
|
$langs->trans('MvtNotCorrectlyBalanced', $total_credit, $total_debit)
|
||||||
$total_credit,
|
|
||||||
$total_debit
|
|
||||||
), 'errors');
|
), 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == "" || $action == 'add') {
|
if ($action == "" || $action == 'add') {
|
||||||
$var = ! $var;
|
$var = ! $var;
|
||||||
print '<tr'. $bc[$var].'>';
|
print '<tr' . $bc[$var] . '>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $formventilation->select_account($account_number, 'account_number', 0, array (), 1, 1, '');
|
print $formventilation->select_account($account_number, 'account_number', 0, array (), 1, 1, '');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@ -202,14 +202,22 @@ if ($action == 'delbookkeeping') {
|
|||||||
if ($action == 'delbookkeepingyearconfirm') {
|
if ($action == 'delbookkeepingyearconfirm') {
|
||||||
|
|
||||||
$delyear = GETPOST('delyear', 'int');
|
$delyear = GETPOST('delyear', 'int');
|
||||||
|
if ($delyear==-1) {
|
||||||
|
$delyear=0;
|
||||||
|
}
|
||||||
|
$deljournal = GETPOST('deljournal','alpha');
|
||||||
|
if ($deljournal==-1) {
|
||||||
|
$deljournal=0;
|
||||||
|
}
|
||||||
|
|
||||||
if (! empty($delyear)) {
|
|
||||||
$result = $object->deleteByYear($delyear);
|
if (! empty($delyear) || ! empty($deljournal)) {
|
||||||
|
$result = $object->deleteByYearAndJournal($delyear,$deljournal);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
Header("Location: list.php");
|
Header("Location: list.php");
|
||||||
exit();
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($action == 'delmouvconfirm') {
|
if ($action == 'delmouvconfirm') {
|
||||||
@ -222,7 +230,7 @@ if ($action == 'delmouvconfirm') {
|
|||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
Header("Location: list.php");
|
Header("Location: list.php");
|
||||||
exit();
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($action == 'export_csv') {
|
if ($action == 'export_csv') {
|
||||||
@ -250,7 +258,6 @@ if ($action == 'export_csv') {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
$title_page = $langs->trans("Bookkeeping") . ' ' . dol_print_date($search_date_start) . '-' . dol_print_date($search_date_end);
|
$title_page = $langs->trans("Bookkeeping") . ' ' . dol_print_date($search_date_start) . '-' . dol_print_date($search_date_end);
|
||||||
|
|
||||||
llxHeader('', $title_page);
|
llxHeader('', $title_page);
|
||||||
|
|
||||||
// List
|
// List
|
||||||
@ -276,11 +283,13 @@ if ($action == 'delbookkeepingyear') {
|
|||||||
|
|
||||||
$form_question = array ();
|
$form_question = array ();
|
||||||
$delyear = GETPOST('delyear');
|
$delyear = GETPOST('delyear');
|
||||||
|
$deljournal = GETPOST('deljournal');
|
||||||
|
|
||||||
if (empty($delyear)) {
|
if (empty($delyear)) {
|
||||||
$delyear = dol_print_date(dol_now(), '%Y');
|
$delyear = dol_print_date(dol_now(), '%Y');
|
||||||
}
|
}
|
||||||
$year_array = $formventilation->selectyear_accountancy_bookkepping($delyear, 'delyear', 0, 'array');
|
$year_array = $formventilation->selectyear_accountancy_bookkepping($delyear, 'delyear', 0, 'array');
|
||||||
|
$journal_array = $formventilation->selectjournal_accountancy_bookkepping($deljournal, 'deljournal', 0, 'array');
|
||||||
|
|
||||||
$form_question['delyear'] = array (
|
$form_question['delyear'] = array (
|
||||||
'name' => 'delyear',
|
'name' => 'delyear',
|
||||||
@ -289,6 +298,13 @@ if ($action == 'delbookkeepingyear') {
|
|||||||
'values' => $year_array,
|
'values' => $year_array,
|
||||||
'default' => $delyear
|
'default' => $delyear
|
||||||
);
|
);
|
||||||
|
$form_question['deljournal'] = array (
|
||||||
|
'name' => 'deljournal',
|
||||||
|
'type' => 'select',
|
||||||
|
'label' => $langs->trans('DelJournal'),
|
||||||
|
'values' => $journal_array,
|
||||||
|
'default' => $deljournal
|
||||||
|
);
|
||||||
|
|
||||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delbookkeepingyearconfirm', $form_question, 0, 1);
|
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delbookkeepingyearconfirm', $form_question, 0, 1);
|
||||||
print $formconfirm;
|
print $formconfirm;
|
||||||
@ -298,6 +314,7 @@ print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $options, $sortfield
|
|||||||
|
|
||||||
print '<form method="GET" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">';
|
print '<form method="GET" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">';
|
||||||
print '<div class="tabsAction">' . "\n";
|
print '<div class="tabsAction">' . "\n";
|
||||||
|
print '<div class="inline-block divButAction"><a class="butAction" href="./listbyaccount.php">' . $langs->trans("Bookkeeping") . ' ' . strtolower($langs->trans("By")) . ' ' . strtolower($langs->trans("AccountAccounting")) . '</a></div>';
|
||||||
print '<div class="inline-block divButAction"><input type="submit" name="button_delmvt" class="butAction" value="' . $langs->trans("DelBookKeeping") . '" /></div>';
|
print '<div class="inline-block divButAction"><input type="submit" name="button_delmvt" class="butAction" value="' . $langs->trans("DelBookKeeping") . '" /></div>';
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="./card.php?action=create">' . $langs->trans("NewAccountingMvt") . '</a></div>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="./card.php?action=create">' . $langs->trans("NewAccountingMvt") . '</a></div>';
|
||||||
print '<div class="inline-block divButAction"><input type="submit" name="button_export_csv" class="butAction" value="' . $langs->trans("Export") . '" /></div>';
|
print '<div class="inline-block divButAction"><input type="submit" name="button_export_csv" class="butAction" value="' . $langs->trans("Export") . '" /></div>';
|
||||||
|
|||||||
348
htdocs/accountancy/bookkeeping/listbyaccount.php
Normal file
348
htdocs/accountancy/bookkeeping/listbyaccount.php
Normal file
@ -0,0 +1,348 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2016 Neil Orley <neil.orley@oeris.fr>
|
||||||
|
* largely based on the great work of :
|
||||||
|
* - Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
|
* - Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
||||||
|
* - Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \file htdocs/accountancy/bookkeeping/listbyaccount.php
|
||||||
|
* \ingroup Advanced accountancy
|
||||||
|
* \brief List operation of book keeping ordered by account number
|
||||||
|
*/
|
||||||
|
|
||||||
|
require '../../main.inc.php';
|
||||||
|
|
||||||
|
// Class
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
|
||||||
|
|
||||||
|
// Langs
|
||||||
|
$langs->load("accountancy");
|
||||||
|
|
||||||
|
$page = GETPOST("page");
|
||||||
|
$sortorder = GETPOST("sortorder");
|
||||||
|
$sortfield = GETPOST("sortfield");
|
||||||
|
$action = GETPOST('action', 'alpha');
|
||||||
|
$search_date_start = dol_mktime(0, 0, 0, GETPOST('date_startmonth', 'int'), GETPOST('date_startday', 'int'), GETPOST('date_startyear', 'int'));
|
||||||
|
$search_date_end = dol_mktime(0, 0, 0, GETPOST('date_endmonth', 'int'), GETPOST('date_endday', 'int'), GETPOST('date_endyear', 'int'));
|
||||||
|
$search_doc_date = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST('doc_dateday', 'int'), GETPOST('doc_dateyear', 'int'));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$search_accountancy_code = GETPOST("search_accountancy_code");
|
||||||
|
|
||||||
|
$search_accountancy_code_start = GETPOST('search_accountancy_code_start', 'alpha');
|
||||||
|
if ($search_accountancy_code_start == - 1) {
|
||||||
|
$search_accountancy_code_start = '';
|
||||||
|
}
|
||||||
|
$search_label_account = GETPOST('search_label_account', 'alpha');
|
||||||
|
|
||||||
|
$search_mvt_label = GETPOST('search_mvt_label', 'alpha');
|
||||||
|
$search_direction = GETPOST('search_direction', 'alpha');
|
||||||
|
$search_ledger_code = GETPOST('search_ledger_code', 'alpha');
|
||||||
|
|
||||||
|
$limit = GETPOST('limit') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||||
|
if ($page == -1) { $page = 0 ; }
|
||||||
|
$offset = $limit * $page ;
|
||||||
|
$pageprev = $page - 1;
|
||||||
|
$pagenext = $page + 1;
|
||||||
|
|
||||||
|
$object = new BookKeeping($db);
|
||||||
|
|
||||||
|
$formventilation = new FormVentilation($db);
|
||||||
|
$formother = new FormOther($db);
|
||||||
|
$form = new Form($db);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (empty($search_date_start)) {
|
||||||
|
$search_date_start = dol_mktime(0, 0, 0, 1, 1, dol_print_date(dol_now(), '%Y'));
|
||||||
|
$search_date_end = dol_mktime(0, 0, 0, 12, 31, dol_print_date(dol_now(), '%Y'));
|
||||||
|
}
|
||||||
|
if ($sortorder == "")
|
||||||
|
$sortorder = "ASC";
|
||||||
|
if ($sortfield == "")
|
||||||
|
$sortfield = "t.rowid";
|
||||||
|
|
||||||
|
|
||||||
|
$options = '';
|
||||||
|
$filter = array ();
|
||||||
|
|
||||||
|
if (! empty($search_date_start)) {
|
||||||
|
$filter['t.doc_date>='] = $search_date_start;
|
||||||
|
$options .= '&date_startmonth=' . GETPOST('date_startmonth', 'int') . '&date_startday=' . GETPOST('date_startday', 'int') . '&date_startyear=' . GETPOST('date_startyear', 'int');
|
||||||
|
}
|
||||||
|
if (! empty($search_date_end)) {
|
||||||
|
$filter['t.doc_date<='] = $search_date_end;
|
||||||
|
$options .= '&date_endmonth=' . GETPOST('date_endmonth', 'int') . '&date_endday=' . GETPOST('date_endday', 'int') . '&date_endyear=' . GETPOST('date_endyear', 'int');
|
||||||
|
}
|
||||||
|
if (! empty($search_doc_date)) {
|
||||||
|
$filter['t.doc_date'] = $search_doc_date;
|
||||||
|
$options .= '&doc_datemonth=' . GETPOST('doc_datemonth', 'int') . '&doc_dateday=' . GETPOST('doc_dateday', 'int') . '&doc_dateyear=' . GETPOST('doc_dateyear', 'int');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!GETPOST("button_removefilter_x") && !GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
|
||||||
|
{
|
||||||
|
if (! empty($search_accountancy_code_start)) {
|
||||||
|
$filter['t.numero_compte'] = $search_accountancy_code_start;
|
||||||
|
$options .= '&search_accountancy_code_start=' . $search_accountancy_code_start;
|
||||||
|
}
|
||||||
|
if (! empty($search_label_account)) {
|
||||||
|
$filter['t.label_compte'] = $search_label_account;
|
||||||
|
$options .= '&search_label_account=' . $search_label_account;
|
||||||
|
}
|
||||||
|
if (! empty($search_mvt_label)) {
|
||||||
|
$filter['t.label_compte'] = $search_mvt_label;
|
||||||
|
$options .= '&search_mvt_label=' . $search_mvt_label;
|
||||||
|
}
|
||||||
|
if (! empty($search_direction)) {
|
||||||
|
$filter['t.sens'] = $search_direction;
|
||||||
|
$options .= '&search_direction=' . $search_direction;
|
||||||
|
}
|
||||||
|
if (! empty($search_ledger_code)) {
|
||||||
|
$filter['t.code_journal'] = $search_ledger_code;
|
||||||
|
$options .= '&search_ledger_code=' . $search_ledger_code;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Action
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
|
||||||
|
{
|
||||||
|
$search_doc_date = '';
|
||||||
|
$search_accountancy_code = '';
|
||||||
|
$search_accountancy_code_start = '';
|
||||||
|
$search_label_account = '';
|
||||||
|
$search_mvt_label = '';
|
||||||
|
$search_direction = '';
|
||||||
|
$search_ledger_code = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($action == 'delmouvconfirm') {
|
||||||
|
|
||||||
|
$mvt_num = GETPOST('mvt_num', 'int');
|
||||||
|
|
||||||
|
if (! empty($mvt_num)) {
|
||||||
|
$result = $object->deleteMvtNum($mvt_num);
|
||||||
|
if ($result < 0) {
|
||||||
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
|
}
|
||||||
|
Header("Location: listbyaccount.php");
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* View
|
||||||
|
*/
|
||||||
|
|
||||||
|
$title_page = $langs->trans("Bookkeeping") . ' ' . strtolower($langs->trans("By")) . ' ' . $langs->trans("AccountAccounting") . ' ' . dol_print_date($search_date_start) . '-' . dol_print_date($search_date_end);
|
||||||
|
|
||||||
|
llxHeader('', $title_page);
|
||||||
|
|
||||||
|
// List
|
||||||
|
|
||||||
|
$nbtotalofrecords = 0;
|
||||||
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
||||||
|
$nbtotalofrecords = $object->fetchAllByAccount($sortorder, $sortfield, 0, 0, $filter);
|
||||||
|
if ($nbtotalofrecords < 0) {
|
||||||
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = $object->fetchAllByAccount($sortorder, $sortfield, $limit, $offset, $filter);
|
||||||
|
if ($result < 0) {
|
||||||
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
|
}
|
||||||
|
$nbtotalofrecords = $result;
|
||||||
|
|
||||||
|
if ($action == 'delmouv') {
|
||||||
|
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?mvt_num=' . GETPOST('mvt_num'), $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delmouvconfirm', '', 0, 1);
|
||||||
|
print $formconfirm;
|
||||||
|
}
|
||||||
|
if ($action == 'delbookkeepingyear') {
|
||||||
|
|
||||||
|
$form_question = array ();
|
||||||
|
$delyear = GETPOST('delyear');
|
||||||
|
|
||||||
|
if (empty($delyear)) {
|
||||||
|
$delyear = dol_print_date(dol_now(), '%Y');
|
||||||
|
}
|
||||||
|
$year_array = $formventilation->selectyear_accountancy_bookkepping($delyear, 'delyear', 0, 'array');
|
||||||
|
|
||||||
|
$form_question['delyear'] = array (
|
||||||
|
'name' => 'delyear',
|
||||||
|
'type' => 'select',
|
||||||
|
'label' => $langs->trans('DelYear'),
|
||||||
|
'values' => $year_array,
|
||||||
|
'default' => $delyear
|
||||||
|
);
|
||||||
|
|
||||||
|
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delbookkeepingyearconfirm', $form_question, 0, 1);
|
||||||
|
print $formconfirm;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
print '<form method="GET" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">';
|
||||||
|
|
||||||
|
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $options, $sortfield, $sortorder, '', $result, $nbtotalofrecords,'',0,'','',$limit);
|
||||||
|
|
||||||
|
// Reverse sort order
|
||||||
|
if ( preg_match('/^asc/i', $sortorder) )
|
||||||
|
$sortorder = "asc";
|
||||||
|
else
|
||||||
|
$sortorder = "desc";
|
||||||
|
|
||||||
|
print '<div class="tabsAction">' . "\n";
|
||||||
|
print '<div class="inline-block divButAction"><a class="butAction" href="./card.php?action=create">' . $langs->trans("NewAccountingMvt") . '</a></div>';
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
|
print '<table class="noborder" width="100%">';
|
||||||
|
print '<tr class="liste_titre">';
|
||||||
|
print '<td>' . $langs->trans("AccountAccounting") . '</td>';
|
||||||
|
print_liste_field_titre($langs->trans("Docdate"), $_SERVER['PHP_SELF'], "t.doc_date", "", $options, "", $sortfield, $sortorder);
|
||||||
|
print_liste_field_titre($langs->trans("Docref"), $_SERVER['PHP_SELF'], "t.doc_ref", "", $options, "", $sortfield, $sortorder);
|
||||||
|
print '<td>' . $langs->trans("SuppliersInvoices") . ' / ' . $langs->trans("CustomersInvoices") . '</td>';
|
||||||
|
print_liste_field_titre($langs->trans("Debit"), $_SERVER['PHP_SELF'], "t.debit", "", $options, 'align="right"', $sortfield, $sortorder);
|
||||||
|
print_liste_field_titre($langs->trans("Credit"), $_SERVER['PHP_SELF'], "t.credit", "", $options, 'align="right"', $sortfield, $sortorder);
|
||||||
|
print_liste_field_titre($langs->trans("Codejournal"), $_SERVER['PHP_SELF'], "t.code_journal", "", $options, 'align="center"', $sortfield, $sortorder);
|
||||||
|
print_liste_field_titre($langs->trans("Action"), $_SERVER["PHP_SELF"], "", $options, "", 'width="60" align="center"', $sortfield, $sortorder);
|
||||||
|
print "</tr>\n";
|
||||||
|
|
||||||
|
print '<tr class="liste_titre">';
|
||||||
|
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="GET">';
|
||||||
|
print '<td width >' . $object->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array (), 1, 1, '') . '</td>';
|
||||||
|
print '<td class="liste_titre">';
|
||||||
|
print $langs->trans('From') . ': ';
|
||||||
|
print $form->select_date($search_date_start, 'date_start', 0, 0, 1);
|
||||||
|
print '<br>';
|
||||||
|
print $langs->trans('to') . ': ';
|
||||||
|
print $form->select_date($search_date_end, 'date_end', 0, 0, 1);
|
||||||
|
print '</td>';
|
||||||
|
print '<td class="liste_titre"><input type="text" size="7" class="flat" name="search_mvt_label" value="' . $search_mvt_label . '"/></td>';
|
||||||
|
print '<td class="liste_titre"><input type="text" size="7" class="flat" name="search_label_account" value="' . $search_label_account . '"/></td>';
|
||||||
|
print '<td> </td>';
|
||||||
|
print '<td> </td>';
|
||||||
|
print '<td align="right"><input type="text" name="search_ledger_code" size="3" value="' . $search_ledger_code . '"></td>';
|
||||||
|
print '<td align="right" colspan="2" class="liste_titre">';
|
||||||
|
$searchpitco=$form->showFilterAndCheckAddButtons(0);
|
||||||
|
print $searchpitco;
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
$var = True;
|
||||||
|
|
||||||
|
$total_debit = 0;
|
||||||
|
$total_credit = 0;
|
||||||
|
$sous_total_debit = 0;
|
||||||
|
$sous_total_credit = 0;
|
||||||
|
$displayed_account_number = "";
|
||||||
|
|
||||||
|
foreach ( $object->lines as $line ) {
|
||||||
|
$var = ! $var;
|
||||||
|
|
||||||
|
$total_debit += $line->debit;
|
||||||
|
$total_credit += $line->credit;
|
||||||
|
|
||||||
|
// Permet d'afficher le compte comptable
|
||||||
|
if (length_accountg($line->numero_compte) != $displayed_account_number) {
|
||||||
|
|
||||||
|
// Affiche un Sous-Total par compte comptable
|
||||||
|
if ($displayed_account_number != "") {
|
||||||
|
print '<tr class="liste_total"><td align="right" colspan="4">'.$langs->trans("SubTotal").':</td><td class="nowrap" align="right">'.price($sous_total_debit).'</td><td class="nowrap" align="right">'.price($sous_total_credit).'</td>';
|
||||||
|
print "<td> </td>\n";
|
||||||
|
print '</tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Affiche le compte comptable en début de ligne
|
||||||
|
print "<tr>";
|
||||||
|
print '<td colspan="7" style="font-weight:bold; border-bottom: 1pt solid black;">'.length_accountg($line->numero_compte) . ' : ' . $object->get_compte_desc($line->numero_compte).'</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
$displayed_account_number = length_accountg($line->numero_compte);
|
||||||
|
$sous_total_debit = 0;
|
||||||
|
$sous_total_credit = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
print '<tr'. $bc[$var].'>';
|
||||||
|
print '<td> </td>';
|
||||||
|
print '<td align="center">' . dol_print_date($line->doc_date, 'day') . '</td>';
|
||||||
|
print '<td><a href="./card.php?piece_num=' . $line->piece_num . '">' . $line->doc_ref . '</a></td>';
|
||||||
|
|
||||||
|
// Affiche un lien vers la facture client/fournisseur
|
||||||
|
$doc_ref = preg_replace('/\(.*\)/', '', $line->doc_ref);
|
||||||
|
if ($line->doc_type == 'supplier_invoice')
|
||||||
|
print strlen(length_accounta($line->code_tiers)) == 0 ? '<td><a href="/fourn/facture/list.php?search_ref_supplier=' . $doc_ref . '">' . $line->label_compte . '</a></td>' : '<td><a href="/fourn/facture/list.php?search_ref_supplier=' . $doc_ref . '">' . $line->label_compte . '</a><br /><span style="font-size:0.8em">(' . length_accounta($line->code_tiers) . ')</span></td>';
|
||||||
|
elseif ($line->doc_type == 'customer_invoice')
|
||||||
|
print strlen(length_accounta($line->code_tiers)) == 0 ? '<td><a href="/compta/facture/list.php?search_ref=' . $doc_ref . '">' . $line->label_compte . '</a></td>' : '<td><a href="/compta/facture/list.php?search_ref=' . $doc_ref . '">' . $line->label_compte . '</a><br /><span style="font-size:0.8em">(' . length_accounta($line->code_tiers) . ')</span></td>';
|
||||||
|
else
|
||||||
|
print strlen(length_accounta($line->code_tiers)) == 0 ? '<td>' . $line->label_compte . '</td>' : '<td>' . $line->label_compte . '<br /><span style="font-size:0.8em">(' . length_accounta($line->code_tiers) . ')</span></td>';
|
||||||
|
|
||||||
|
|
||||||
|
print '<td align="right">' . price($line->debit) . '</td>';
|
||||||
|
print '<td align="right">' . price($line->credit) . '</td>';
|
||||||
|
print '<td align="center">' . $line->code_journal . '</td>';
|
||||||
|
print '<td align="center">';
|
||||||
|
print '<a href="./card.php?piece_num=' . $line->piece_num . '">' . img_edit() . '</a> ';
|
||||||
|
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=delmouv&mvt_num=' . $line->piece_num . $options . '&page=' . $page . '">' . img_delete() . '</a>';
|
||||||
|
print '</td>';
|
||||||
|
print "</tr>\n";
|
||||||
|
|
||||||
|
// Comptabilise le sous-total
|
||||||
|
$sous_total_debit += $line->debit;
|
||||||
|
$sous_total_credit += $line->credit;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Affiche un Sous-Total du dernier compte comptable affiché
|
||||||
|
print '<tr class="liste_total"><td align="right" colspan="4">'.$langs->trans("SubTotal").':</td><td class="nowrap" align="right">'.price($sous_total_debit).'</td><td class="nowrap" align="right">'.price($sous_total_credit).'</td>';
|
||||||
|
print "<td> </td>\n";
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
|
||||||
|
// Affiche le Total
|
||||||
|
print '<tr class="liste_total">';
|
||||||
|
print '<td align="right" colspan="4">'.$langs->trans("Total").':</td>';
|
||||||
|
print '<td align="right">';
|
||||||
|
print price($total_debit);
|
||||||
|
print '</td>';
|
||||||
|
print '<td align="right">';
|
||||||
|
print price($total_credit);
|
||||||
|
print '</td>';
|
||||||
|
print '<td colspan="2"></td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
print "</table>";
|
||||||
|
print '</form>';
|
||||||
|
|
||||||
|
llxFooter();
|
||||||
|
|
||||||
|
|
||||||
|
$db->close();
|
||||||
@ -17,9 +17,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/accountancy/class/accountancycategory.class.php
|
* \file htdocs/accountancy/class/accountancycategory.class.php
|
||||||
* \ingroup Advanced accountancy
|
* \ingroup Advanced accountancy
|
||||||
* \brief File of class to manage categories of an accounting category_type
|
* \brief File of class to manage categories of an accounting category_type
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Class
|
// Class
|
||||||
@ -32,18 +32,20 @@ class AccountancyCategory
|
|||||||
{
|
{
|
||||||
private $db;
|
private $db;
|
||||||
public $error;
|
public $error;
|
||||||
public $errors = array();
|
public $errors = array ();
|
||||||
//public $element='accounting_category';
|
public $element = 'accounting_category';
|
||||||
//public $table_element='c_accounting_category';
|
public $table_element = 'c_accounting_category';
|
||||||
public $id;
|
public $id;
|
||||||
|
public $lines_cptbk;
|
||||||
|
public $lines_display;
|
||||||
|
public $sdc;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
*/
|
*/
|
||||||
public function __construct($db)
|
public function __construct($db) {
|
||||||
{
|
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
@ -52,122 +54,136 @@ class AccountancyCategory
|
|||||||
/**
|
/**
|
||||||
* Function to select all accounting accounts from an accounting category
|
* Function to select all accounting accounts from an accounting category
|
||||||
*
|
*
|
||||||
* @param int $id Id
|
* @param int $id Id
|
||||||
*
|
*
|
||||||
* @return int <0 if KO, 0 if not found, >0 if OK
|
* @return int <0 if KO, 0 if not found, >0 if OK
|
||||||
*/
|
*/
|
||||||
public function display($id)
|
public function display($id) {
|
||||||
{
|
|
||||||
$sql = "SELECT t.rowid, t.account_number, t.label";
|
$sql = "SELECT t.rowid, t.account_number, t.label";
|
||||||
$sql.= " FROM " . MAIN_DB_PREFIX . "accounting_account as t";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as t";
|
||||||
$sql.= " WHERE t.fk_accounting_category = " . $id;
|
$sql .= " WHERE t.fk_accounting_category = " . $id;
|
||||||
|
|
||||||
|
$this->lines_display = array ();
|
||||||
|
|
||||||
dol_syslog(__METHOD__ . " sql=" . $sql, LOG_DEBUG);
|
dol_syslog(__METHOD__ . " sql=" . $sql, LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
$i = 0;
|
|
||||||
$obj = '';
|
|
||||||
$num = $this->db->num_rows($resql);
|
$num = $this->db->num_rows($resql);
|
||||||
if ($num) {
|
if ($num) {
|
||||||
while ( $i < $num ) {
|
while ( $obj = $this->db->fetch_object($resql) ) {
|
||||||
$obj[$i] = $this->db->fetch_object($resql);
|
$this->lines_display[] = $obj;
|
||||||
$i ++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $obj;
|
return $num;
|
||||||
} else {
|
} else {
|
||||||
$this->error = "Error " . $this->db->lasterror();
|
$this->error = "Error " . $this->db->lasterror();
|
||||||
dol_syslog(__METHOD__ . " " . $this->error, LOG_ERR);
|
$this->errors[] = $this->error;
|
||||||
|
dol_syslog(__METHOD__ . " " . implode(',' . $this->errors), LOG_ERR);
|
||||||
|
|
||||||
return -1;
|
return - 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function to select accountiing category of an accounting account present in chart of accounts
|
* Function to select accountiing category of an accounting account present in chart of accounts
|
||||||
*
|
*
|
||||||
* @param int $id Id category
|
* @param int $id Id category
|
||||||
*
|
*
|
||||||
* @return int <0 if KO, 0 if not found, >0 if OK
|
* @return int <0 if KO, 0 if not found, >0 if OK
|
||||||
*/
|
*/
|
||||||
public function getCptBK($id)
|
public function getCptBK($id) {
|
||||||
{
|
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$sql = "SELECT t.numero_compte, t.label_compte, t.doc_ref";
|
$sql = "SELECT t.numero_compte, t.label_compte, t.doc_ref";
|
||||||
$sql.= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as t";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as t";
|
||||||
$sql.= " WHERE t.numero_compte NOT IN (";
|
$sql .= " WHERE t.numero_compte NOT IN (";
|
||||||
$sql.= " SELECT t.account_number";
|
$sql .= " SELECT t.account_number";
|
||||||
$sql.= " FROM " . MAIN_DB_PREFIX . "accounting_account as t";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as t";
|
||||||
$sql.= " WHERE t.fk_accounting_category = " . $id .")";
|
$sql .= " WHERE t.fk_accounting_category = " . $id . ")";
|
||||||
$sql.= " AND t.numero_compte IN (";
|
$sql .= " AND t.numero_compte IN (";
|
||||||
$sql.= " SELECT DISTINCT aa.account_number";
|
$sql .= " SELECT DISTINCT aa.account_number";
|
||||||
$sql.= " FROM " . MAIN_DB_PREFIX . "accounting_account as aa";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as aa";
|
||||||
$sql.= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
|
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
|
||||||
$sql.= " AND asy.rowid = " . $conf->global->CHARTOFACCOUNTS;
|
$sql .= " AND asy.rowid = " . $conf->global->CHARTOFACCOUNTS;
|
||||||
$sql.= " AND aa.active = 1)";
|
$sql .= " AND aa.active = 1)";
|
||||||
$sql.= " GROUP BY t.numero_compte";
|
$sql .= " GROUP BY t.numero_compte, t.label_compte, t.doc_ref";
|
||||||
|
$sql .= " ORDER BY t.numero_compte";
|
||||||
|
|
||||||
dol_syslog(__METHOD__ . " sql=" . $sql, LOG_DEBUG);
|
$this->lines_CptBk = array ();
|
||||||
|
|
||||||
|
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
$i = 0;
|
|
||||||
$obj = '';
|
|
||||||
$num = $this->db->num_rows($resql);
|
$num = $this->db->num_rows($resql);
|
||||||
if ($num) {
|
if ($num) {
|
||||||
while ( $i < $num ) {
|
while ( $obj = $this->db->fetch_object($resql) ) {
|
||||||
$obj[$i] = $this->db->fetch_object($resql);
|
$this->lines_cptbk[] = $obj;
|
||||||
$i ++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $obj;
|
return $num;
|
||||||
} else {
|
} else {
|
||||||
$this->error = "Error " . $this->db->lasterror();
|
$this->error = "Error " . $this->db->lasterror();
|
||||||
dol_syslog(__METHOD__ . " " . $this->error, LOG_ERR);
|
$this->errors[] = $this->error;
|
||||||
|
dol_syslog(__METHOD__ . " " . implode(',' . $this->errors), LOG_ERR);
|
||||||
|
|
||||||
return -1;
|
return - 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function to add an accounting account in an accounting category
|
* Function to add an accounting account in an accounting category
|
||||||
*
|
*
|
||||||
* @param int $id_cat Id category
|
* @param int $id_cat Id category
|
||||||
* @param array $cpts list of accounts array
|
* @param array $cpts list of accounts array
|
||||||
*
|
*
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
public function updateAccAcc($id_cat, $cpts = array())
|
public function updateAccAcc($id_cat, $cpts = array()) {
|
||||||
{
|
|
||||||
global $conf;
|
global $conf;
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
$sql = "UPDATE " . MAIN_DB_PREFIX . "accounting_account as aa";
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
||||||
$sql.= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
|
|
||||||
$sql.= " AND asy.rowid = " . $conf->global->CHARTOFACCOUNTS;
|
|
||||||
$sql.= " AND aa.active = 1";
|
|
||||||
$sql.= " SET fk_accounting_category=" . $id_cat;
|
|
||||||
$sql.= " WHERE aa.account_number IN (" . join(',',$cpts) .")";
|
|
||||||
$this->db->begin();
|
|
||||||
|
|
||||||
dol_syslog(__METHOD__ . " sql=" . $sql, LOG_DEBUG);
|
$sql = "SELECT aa.rowid,aa.account_number ";
|
||||||
|
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as aa";
|
||||||
|
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
|
||||||
|
$sql .= " AND asy.rowid = " . $conf->global->CHARTOFACCOUNTS;
|
||||||
|
$sql .= " AND aa.active = 1";
|
||||||
|
|
||||||
|
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if (! $resql) {
|
if (! $resql) {
|
||||||
$error ++;
|
$error ++;
|
||||||
$this->errors[] = "Error " . $this->db->lasterror();
|
$this->errors[] = "Error " . $this->db->lasterror();
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->db->begin();
|
||||||
|
while ( $obj = $this->db->fetch_object($resql)) {
|
||||||
|
if (array_key_exists(length_accountg($obj->account_number), $cpts)) {
|
||||||
|
$sql = "UPDATE " . MAIN_DB_PREFIX . "accounting_account";
|
||||||
|
$sql .= " SET fk_accounting_category=" . $id_cat;
|
||||||
|
$sql .= " WHERE rowid=".$obj->rowid;
|
||||||
|
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||||
|
$resql = $this->db->query($sql);
|
||||||
|
if (! $resql) {
|
||||||
|
$error ++;
|
||||||
|
$this->errors[] = "Error " . $this->db->lasterror();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
if ($error) {
|
if ($error) {
|
||||||
foreach ($this->errors as $errmsg) {
|
foreach ( $this->errors as $errmsg ) {
|
||||||
dol_syslog(__METHOD__ . " " . $errmsg, LOG_ERR);
|
dol_syslog(__METHOD__ . " " . $errmsg, LOG_ERR);
|
||||||
$this->error.=($this->error ? ', ' . $errmsg : $errmsg);
|
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
||||||
}
|
}
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
|
|
||||||
return -1 * $error;
|
return - 1 * $error;
|
||||||
} else {
|
} else {
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
|
|
||||||
@ -178,17 +194,16 @@ class AccountancyCategory
|
|||||||
/**
|
/**
|
||||||
* Function to delete an accounting account from an accounting category
|
* Function to delete an accounting account from an accounting category
|
||||||
*
|
*
|
||||||
* @param int $cpt_id Id of accounting account
|
* @param int $cpt_id Id of accounting account
|
||||||
*
|
*
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
public function deleteCptCat($cpt_id)
|
public function deleteCptCat($cpt_id) {
|
||||||
{
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
$sql = "UPDATE " . MAIN_DB_PREFIX . "accounting_account as aa";
|
$sql = "UPDATE " . MAIN_DB_PREFIX . "accounting_account as aa";
|
||||||
$sql.= " SET fk_accounting_category= 0";
|
$sql .= " SET fk_accounting_category= 0";
|
||||||
$sql.= " WHERE aa.rowid= " . $cpt_id;
|
$sql .= " WHERE aa.rowid= " . $cpt_id;
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
dol_syslog(__METHOD__ . " sql=" . $sql, LOG_DEBUG);
|
dol_syslog(__METHOD__ . " sql=" . $sql, LOG_DEBUG);
|
||||||
@ -200,13 +215,13 @@ class AccountancyCategory
|
|||||||
|
|
||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
if ($error) {
|
if ($error) {
|
||||||
foreach ($this->errors as $errmsg) {
|
foreach ( $this->errors as $errmsg ) {
|
||||||
dol_syslog(__METHOD__ . " " . $errmsg, LOG_ERR);
|
dol_syslog(__METHOD__ . " " . $errmsg, LOG_ERR);
|
||||||
$this->error.=($this->error ? ', ' . $errmsg : $errmsg);
|
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
||||||
}
|
}
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
|
|
||||||
return -1 * $error;
|
return - 1 * $error;
|
||||||
} else {
|
} else {
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
|
|
||||||
@ -217,57 +232,51 @@ class AccountancyCategory
|
|||||||
/**
|
/**
|
||||||
* Function to know all category from accounting account
|
* Function to know all category from accounting account
|
||||||
*
|
*
|
||||||
* @return array Result in table
|
* @return array Result in table
|
||||||
*/
|
*/
|
||||||
public function getCatsCpts()
|
public function getCatsCpts() {
|
||||||
{
|
|
||||||
global $mysoc;
|
global $mysoc;
|
||||||
$sql = "";
|
$sql = "";
|
||||||
|
|
||||||
if (empty($mysoc->country_id) && empty($mysoc->country_code))
|
if (empty($mysoc->country_id) && empty($mysoc->country_code)) {
|
||||||
{
|
dol_print_error('', 'Call to select_accounting_account with mysoc country not yet defined');
|
||||||
dol_print_error('','Call to select_accounting_account with mysoc country not yet defined');
|
exit();
|
||||||
exit;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (! empty($mysoc->country_id))
|
if (! empty($mysoc->country_id)) {
|
||||||
{
|
$sql = "SELECT t.rowid, t.account_number, t.label as name_cpt, cat.code, cat.position, cat.label as name_cat, cat.sens ";
|
||||||
$sql = "SELECT t.rowid, t.account_number, t.label as name_cpt, cat.code, cat.position, cat.label as name_cat, cat.sens ";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as t, " . MAIN_DB_PREFIX . "c_accounting_category as cat";
|
||||||
$sql.= " FROM " . MAIN_DB_PREFIX . "accounting_account as t, ".MAIN_DB_PREFIX."c_accounting_category as cat";
|
$sql .= " WHERE t.fk_accounting_category IN ( SELECT c.rowid ";
|
||||||
$sql.= " WHERE t.fk_accounting_category IN ( SELECT c.rowid ";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "c_accounting_category as c";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_accounting_category as c";
|
$sql .= " WHERE c.active = 1";
|
||||||
$sql.= " WHERE c.active = 1";
|
$sql .= " AND c.fk_country = " . $mysoc->country_id . ")";
|
||||||
$sql.= " AND c.fk_country = ".$mysoc->country_id.")";
|
$sql .= " AND cat.rowid = t.fk_accounting_category";
|
||||||
$sql.= " AND cat.rowid = t.fk_accounting_category";
|
$sql .= " ORDER BY cat.position ASC";
|
||||||
$sql.= " ORDER BY cat.position ASC";
|
} else {
|
||||||
}
|
$sql = "SELECT c.rowid, c.code, c.label, c.category_type ";
|
||||||
else
|
$sql .= " FROM " . MAIN_DB_PREFIX . "c_accounting_category as c, " . MAIN_DB_PREFIX . "c_country as co";
|
||||||
{
|
$sql .= " WHERE c.active = 1 AND c.fk_country = co.rowid";
|
||||||
$sql = "SELECT c.rowid, c.code, c.label, c.category_type ";
|
$sql .= " AND co.code = '" . $mysoc->country_code . "'";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_accounting_category as c, ".MAIN_DB_PREFIX."c_country as co";
|
$sql .= " ORDER BY c.position ASC";
|
||||||
$sql.= " WHERE c.active = 1 AND c.fk_country = co.rowid";
|
}
|
||||||
$sql.= " AND co.code = '".$mysoc->country_code."'";
|
|
||||||
$sql.= " ORDER BY c.position ASC";
|
$resql = $this->db->query($sql);
|
||||||
}
|
|
||||||
|
|
||||||
$resql = $this->db->query($sql);
|
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$obj = '';
|
$obj = '';
|
||||||
$num = $this->db->num_rows($resql);
|
$num = $this->db->num_rows($resql);
|
||||||
$data = array();
|
$data = array ();
|
||||||
if ($num) {
|
if ($num) {
|
||||||
while ( $i < $num ) {
|
while ( $obj = $this->db->fetch_object($resql) ) {
|
||||||
$obj = $this->db->fetch_object($resql);
|
|
||||||
$name_cat = $obj->name_cat;
|
$name_cat = $obj->name_cat;
|
||||||
$data[$name_cat][$i] = array(
|
$data[$name_cat][$i] = array (
|
||||||
'id' => $obj->rowid,
|
'id' => $obj->rowid,
|
||||||
'code' => $obj->code,
|
'code' => $obj->code,
|
||||||
'position' => $obj->position,
|
'position' => $obj->position,
|
||||||
'account_number' => $obj->account_number,
|
'account_number' => $obj->account_number,
|
||||||
'name_cpt' => $obj->name_cpt,
|
'name_cpt' => $obj->name_cpt,
|
||||||
'sens' => $obj->sens,
|
'sens' => $obj->sens
|
||||||
);
|
);
|
||||||
$i ++;
|
$i ++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -276,29 +285,28 @@ class AccountancyCategory
|
|||||||
$this->error = "Error " . $this->db->lasterror();
|
$this->error = "Error " . $this->db->lasterror();
|
||||||
dol_syslog(__METHOD__ . " " . $this->error, LOG_ERR);
|
dol_syslog(__METHOD__ . " " . $this->error, LOG_ERR);
|
||||||
|
|
||||||
return -1;
|
return - 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function to show result of an accounting account from the general ledger with a sens and a period
|
* Function to show result of an accounting account from the general ledger with a sens and a period
|
||||||
*
|
|
||||||
* @param int $cpt Id accounting account
|
|
||||||
* @param string $month Specifig month - Can be empty
|
|
||||||
* @param string $year Specific year
|
|
||||||
* @param int $sens Sens of the account 0: credit - debit 1: debit - credit
|
|
||||||
*
|
*
|
||||||
* @return array Result in table
|
* @param int $cpt Id accounting account
|
||||||
|
* @param string $month Specifig month - Can be empty
|
||||||
|
* @param string $year Specific year
|
||||||
|
* @param int $sens Sens of the account 0: credit - debit 1: debit - credit
|
||||||
|
*
|
||||||
|
* @return integer Result in table
|
||||||
*/
|
*/
|
||||||
public function getResult($cpt, $month, $year, $sens)
|
public function getResult($cpt, $month, $year, $sens) {
|
||||||
{
|
$sql = "SELECT SUM(t.debit) as debit, SUM(t.credit) as credit";
|
||||||
$sql = "SELECT SUM(t.debit) as debit, SUM(t.credit) as credit";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as t";
|
||||||
$sql.= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as t";
|
$sql .= " WHERE t.numero_compte = '" . $cpt."'";
|
||||||
$sql.= " WHERE t.numero_compte = " . $cpt;
|
$sql .= " AND YEAR(t.doc_date) = " . $year;
|
||||||
$sql.= " AND YEAR(t.doc_date) = " . $year;
|
|
||||||
|
|
||||||
if(! empty($month)){
|
if (! empty($month)) {
|
||||||
$sql.= " AND MONTH(t.doc_date) = " . $month;
|
$sql .= " AND MONTH(t.doc_date) = " . $month;
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_syslog(__METHOD__ . " sql=" . $sql, LOG_DEBUG);
|
dol_syslog(__METHOD__ . " sql=" . $sql, LOG_DEBUG);
|
||||||
@ -306,81 +314,77 @@ class AccountancyCategory
|
|||||||
|
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
$num = $this->db->num_rows($resql);
|
$num = $this->db->num_rows($resql);
|
||||||
$sdc = 0;
|
$this->sdc = 0;
|
||||||
if ($num) {
|
if ($num) {
|
||||||
$obj = $this->db->fetch_object($resql);
|
$obj = $this->db->fetch_object($resql);
|
||||||
if($sens == 1){
|
if ($sens == 1) {
|
||||||
$sdc = $obj->debit - $obj->credit;
|
$this->sdc = $obj->debit - $obj->credit;
|
||||||
}else{
|
} else {
|
||||||
$sdc = $obj->credit - $obj->debit;
|
$this->sdc = $obj->credit - $obj->debit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $sdc;
|
return $num;
|
||||||
} else {
|
} else {
|
||||||
$this->error = "Error " . $this->db->lasterror();
|
$this->error = "Error " . $this->db->lasterror();
|
||||||
dol_syslog(__METHOD__ . " " . $this->error, LOG_ERR);
|
dol_syslog(__METHOD__ . " " . $this->error, LOG_ERR);
|
||||||
|
|
||||||
return -1;
|
return - 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function to call category from a specific country
|
* Function to call category from a specific country
|
||||||
*
|
*
|
||||||
* @return array Result in table
|
* @return array Result in table
|
||||||
*/
|
*/
|
||||||
public function getCatsCal()
|
public function getCatsCal() {
|
||||||
{
|
global $db, $langs, $user, $mysoc;
|
||||||
global $db,$langs,$user,$mysoc;
|
|
||||||
|
|
||||||
if (empty($mysoc->country_id) && empty($mysoc->country_code))
|
if (empty($mysoc->country_id) && empty($mysoc->country_code)) {
|
||||||
{
|
dol_print_error('', 'Call to select_accounting_account with mysoc country not yet defined');
|
||||||
dol_print_error('','Call to select_accounting_account with mysoc country not yet defined');
|
exit();
|
||||||
exit;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (! empty($mysoc->country_id))
|
if (! empty($mysoc->country_id)) {
|
||||||
{
|
$sql = "SELECT c.rowid, c.code, c.label, c.formula, c.position";
|
||||||
$sql = "SELECT c.rowid, c.code, c.label, c.formula, c.position";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "c_accounting_category as c";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_accounting_category as c";
|
$sql .= " WHERE c.active = 1 AND c.category_type = 1 ";
|
||||||
$sql.= " WHERE c.active = 1 AND c.category_type = 1 ";
|
$sql .= " AND c.fk_country = " . $mysoc->country_id;
|
||||||
$sql.= " AND c.fk_country = ".$mysoc->country_id;
|
$sql .= " ORDER BY c.position ASC";
|
||||||
$sql.= " ORDER BY c.position ASC";
|
} else {
|
||||||
}
|
$sql = "SELECT c.rowid, c.code, c.label, c.formula, c.position";
|
||||||
else
|
$sql .= " FROM " . MAIN_DB_PREFIX . "c_accounting_category as c, " . MAIN_DB_PREFIX . "c_country as co";
|
||||||
{
|
$sql .= " WHERE c.active = 1 AND c.category_type = 1 AND c.fk_country = co.rowid";
|
||||||
$sql = "SELECT c.rowid, c.code, c.label, c.formula, c.position";
|
$sql .= " AND co.code = '" . $mysoc->country_code . "'";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_accounting_category as c, ".MAIN_DB_PREFIX."c_country as co";
|
$sql .= " ORDER BY c.position ASC";
|
||||||
$sql.= " WHERE c.active = 1 AND c.category_type = 1 AND c.fk_country = co.rowid";
|
}
|
||||||
$sql.= " AND co.code = '".$mysoc->country_code."'";
|
|
||||||
$sql.= " ORDER BY c.position ASC";
|
|
||||||
}
|
|
||||||
|
|
||||||
dol_syslog(__METHOD__ . " sql=" . $sql, LOG_DEBUG);
|
dol_syslog(__METHOD__ . " sql=" . $sql, LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$obj = '';
|
$obj = '';
|
||||||
$num = $this->db->num_rows($resql);
|
$num = $this->db->num_rows($resql);
|
||||||
$data = array();
|
$data = array ();
|
||||||
if ($num) {
|
if ($num) {
|
||||||
while ( $i < $num ) {
|
while ( $i < $num ) {
|
||||||
$obj = $this->db->fetch_object($resql);
|
$obj = $this->db->fetch_object($resql);
|
||||||
$position = $obj->position;
|
$position = $obj->position;
|
||||||
$data[$position] = array(
|
$data[$position] = array (
|
||||||
'code' => $obj->code,
|
'code' => $obj->code,
|
||||||
'label' => $obj->label,
|
'label' => $obj->label,
|
||||||
'formula' => $obj->formula
|
'formula' => $obj->formula
|
||||||
);
|
);
|
||||||
$i ++;
|
$i ++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $data;
|
return $data;
|
||||||
} else {
|
} else {
|
||||||
$this->error = "Error " . $this->db->lasterror();
|
$this->error = "Error " . $this->db->lasterror();
|
||||||
dol_syslog(__METHOD__ . " " . $this->error, LOG_ERR);
|
$this->errors[] = $this->error;
|
||||||
|
dol_syslog(__METHOD__ . " " . implode(',' . $this->errors), LOG_ERR);
|
||||||
|
|
||||||
return -1;
|
return - 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -43,6 +43,7 @@ class AccountancyExport
|
|||||||
public static $EXPORT_TYPE_CIEL = 5;
|
public static $EXPORT_TYPE_CIEL = 5;
|
||||||
public static $EXPORT_TYPE_QUADRATUS = 6;
|
public static $EXPORT_TYPE_QUADRATUS = 6;
|
||||||
public static $EXPORT_TYPE_EBP = 7;
|
public static $EXPORT_TYPE_EBP = 7;
|
||||||
|
public static $EXPORT_TYPE_COGILOG = 8;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -91,6 +92,7 @@ class AccountancyExport
|
|||||||
self::$EXPORT_TYPE_CIEL => $langs->trans('Modelcsv_ciel'),
|
self::$EXPORT_TYPE_CIEL => $langs->trans('Modelcsv_ciel'),
|
||||||
self::$EXPORT_TYPE_QUADRATUS => $langs->trans('Modelcsv_quadratus'),
|
self::$EXPORT_TYPE_QUADRATUS => $langs->trans('Modelcsv_quadratus'),
|
||||||
self::$EXPORT_TYPE_EBP => $langs->trans('Modelcsv_ebp'),
|
self::$EXPORT_TYPE_EBP => $langs->trans('Modelcsv_ebp'),
|
||||||
|
self::$EXPORT_TYPE_COGILOG => $langs->trans('Modelcsv_cogilog'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -137,7 +139,10 @@ class AccountancyExport
|
|||||||
case self::$EXPORT_TYPE_EBP :
|
case self::$EXPORT_TYPE_EBP :
|
||||||
$this->exportEbp($TData);
|
$this->exportEbp($TData);
|
||||||
break;
|
break;
|
||||||
default :
|
case self::$EXPORT_TYPE_COGILOG :
|
||||||
|
$this->exportCogilog($TData);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
$this->errors[] = $langs->trans('accountancy_error_modelnotfound');
|
$this->errors[] = $langs->trans('accountancy_error_modelnotfound');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -151,6 +156,8 @@ class AccountancyExport
|
|||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function exportNormal($objectLines) {
|
public function exportNormal($objectLines) {
|
||||||
|
global $conf;
|
||||||
|
|
||||||
foreach ( $objectLines as $line ) {
|
foreach ( $objectLines as $line ) {
|
||||||
// Std export
|
// Std export
|
||||||
$date = dol_print_date($line->doc_date, $conf->global->ACCOUNTING_EXPORT_DATE);
|
$date = dol_print_date($line->doc_date, $conf->global->ACCOUNTING_EXPORT_DATE);
|
||||||
@ -188,6 +195,37 @@ class AccountancyExport
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Export format : COGILOG
|
||||||
|
*
|
||||||
|
* @param array $objectLines data
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function exportCogilog($objectLines) {
|
||||||
|
foreach ( $objectLines as $line ) {
|
||||||
|
$date = dol_print_date($line->doc_date, '%d%m%Y');
|
||||||
|
|
||||||
|
print $line->code_journal . $this->separator;
|
||||||
|
print $date . $this->separator;
|
||||||
|
print $line->piece_num . $this->separator;
|
||||||
|
print length_accountg($line->numero_compte) . $this->separator;
|
||||||
|
print '' . $this->separator;
|
||||||
|
print $line->label_compte . $this->separator;
|
||||||
|
print $date . $this->separator;
|
||||||
|
if ($line->sens=='D') {
|
||||||
|
print price($line->montant) . $this->separator;
|
||||||
|
print '' . $this->separator;
|
||||||
|
}elseif ($line->sens=='C') {
|
||||||
|
print '' . $this->separator;
|
||||||
|
print price($line->montant) . $this->separator;
|
||||||
|
}
|
||||||
|
print $line->doc_ref . $this->separator;
|
||||||
|
print $line->label_compte . $this->separator;
|
||||||
|
print $this->end_line;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Export format : COALA
|
* Export format : COALA
|
||||||
*
|
*
|
||||||
|
|||||||
@ -53,7 +53,7 @@ class BookKeeping extends CommonObject
|
|||||||
*
|
*
|
||||||
* @var string Name of table without prefix where object is stored
|
* @var string Name of table without prefix where object is stored
|
||||||
*/
|
*/
|
||||||
public $table_element = 'accounting_bookkeeping';
|
public $table_element = 'accounting_bookkeeping';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -527,6 +527,118 @@ class BookKeeping extends CommonObject
|
|||||||
return - 1;
|
return - 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load object in memory from the database
|
||||||
|
*
|
||||||
|
* @param string $sortorder Sort Order
|
||||||
|
* @param string $sortfield Sort field
|
||||||
|
* @param int $limit offset limit
|
||||||
|
* @param int $offset offset limit
|
||||||
|
* @param array $filter filter array
|
||||||
|
* @param string $filtermode filter mode (AND or OR)
|
||||||
|
*
|
||||||
|
* @return int <0 if KO, >0 if OK
|
||||||
|
*/
|
||||||
|
public function fetchAllByAccount($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND') {
|
||||||
|
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||||
|
|
||||||
|
$sql = 'SELECT';
|
||||||
|
$sql .= ' t.rowid,';
|
||||||
|
|
||||||
|
$sql .= " t.doc_date,";
|
||||||
|
$sql .= " t.doc_type,";
|
||||||
|
$sql .= " t.doc_ref,";
|
||||||
|
$sql .= " t.fk_doc,";
|
||||||
|
$sql .= " t.fk_docdet,";
|
||||||
|
$sql .= " t.code_tiers,";
|
||||||
|
$sql .= " t.numero_compte,";
|
||||||
|
$sql .= " t.label_compte,";
|
||||||
|
$sql .= " t.debit,";
|
||||||
|
$sql .= " t.credit,";
|
||||||
|
$sql .= " t.montant,";
|
||||||
|
$sql .= " t.sens,";
|
||||||
|
$sql .= " t.fk_user_author,";
|
||||||
|
$sql .= " t.import_key,";
|
||||||
|
$sql .= " t.code_journal,";
|
||||||
|
$sql .= " t.piece_num";
|
||||||
|
|
||||||
|
$sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element . ' as t';
|
||||||
|
|
||||||
|
// Manage filter
|
||||||
|
$sqlwhere = array ();
|
||||||
|
if (count($filter) > 0) {
|
||||||
|
foreach ( $filter as $key => $value ) {
|
||||||
|
if ($key == 't.doc_date') {
|
||||||
|
$sqlwhere[] = $key . '=\'' . $this->db->idate($value) . '\'';
|
||||||
|
} elseif ($key == 't.doc_date>=' || $key == 't.doc_date<=') {
|
||||||
|
$sqlwhere[] = $key . '\'' . $this->db->idate($value) . '\'';
|
||||||
|
} elseif ($key == 't.numero_compte>=' || $key == 't.numero_compte<=' || $key == 't.code_tiers>=' || $key == 't.code_tiers<=') {
|
||||||
|
$sqlwhere[] = $key . '\'' . $this->db->escape($value) . '\'';
|
||||||
|
} elseif ($key == 't.fk_doc' || $key == 't.fk_docdet' || $key == 't.piece_num') {
|
||||||
|
$sqlwhere[] = $key . '=' . $value;
|
||||||
|
} elseif ($key == 't.code_tiers' || $key == 't.numero_compte') {
|
||||||
|
$sqlwhere[] = $key . ' LIKE \'' . $this->db->escape($value) . '%\'';
|
||||||
|
} elseif ($key == 't.label_compte') {
|
||||||
|
$sqlwhere[] = $key . ' LIKE \'' . $this->db->escape($value) . '%\'';
|
||||||
|
}else {
|
||||||
|
$sqlwhere[] = $key . ' LIKE \'%' . $this->db->escape($value) . '%\'';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count($sqlwhere) > 0) {
|
||||||
|
$sql .= ' WHERE ' . implode(' ' . $filtermode . ' ', $sqlwhere);
|
||||||
|
}
|
||||||
|
// Affichage par compte comptable
|
||||||
|
$sql .= ' ORDER BY t.numero_compte ASC';
|
||||||
|
if (! empty($sortfield)) {
|
||||||
|
$sql .= ', ' . $sortfield . ' ' .$sortorder;
|
||||||
|
}
|
||||||
|
if (! empty($limit)) {
|
||||||
|
$sql .= ' ' . $this->db->plimit($limit + 1, $offset);
|
||||||
|
}
|
||||||
|
$this->lines = array ();
|
||||||
|
|
||||||
|
$resql = $this->db->query($sql);
|
||||||
|
if ($resql) {
|
||||||
|
$num = $this->db->num_rows($resql);
|
||||||
|
|
||||||
|
while ( $obj = $this->db->fetch_object($resql) ) {
|
||||||
|
$line = new BookKeepingLine();
|
||||||
|
|
||||||
|
$line->id = $obj->rowid;
|
||||||
|
|
||||||
|
$line->doc_date = $this->db->jdate($obj->doc_date);
|
||||||
|
$line->doc_type = $obj->doc_type;
|
||||||
|
$line->doc_ref = $obj->doc_ref;
|
||||||
|
$line->fk_doc = $obj->fk_doc;
|
||||||
|
$line->fk_docdet = $obj->fk_docdet;
|
||||||
|
$line->code_tiers = $obj->code_tiers;
|
||||||
|
$line->numero_compte = $obj->numero_compte;
|
||||||
|
$line->label_compte = $obj->label_compte;
|
||||||
|
$line->debit = $obj->debit;
|
||||||
|
$line->credit = $obj->credit;
|
||||||
|
$line->montant = $obj->montant;
|
||||||
|
$line->sens = $obj->sens;
|
||||||
|
$line->fk_user_author = $obj->fk_user_author;
|
||||||
|
$line->import_key = $obj->import_key;
|
||||||
|
$line->code_journal = $obj->code_journal;
|
||||||
|
$line->piece_num = $obj->piece_num;
|
||||||
|
|
||||||
|
$this->lines[] = $line;
|
||||||
|
}
|
||||||
|
$this->db->free($resql);
|
||||||
|
|
||||||
|
return $num;
|
||||||
|
} else {
|
||||||
|
$this->errors[] = 'Error ' . $this->db->lasterror();
|
||||||
|
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
||||||
|
|
||||||
|
return - 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load object in memory from the database
|
* Load object in memory from the database
|
||||||
@ -686,7 +798,7 @@ class BookKeeping extends CommonObject
|
|||||||
$sql .= ' GROUP BY t.numero_compte';
|
$sql .= ' GROUP BY t.numero_compte';
|
||||||
|
|
||||||
if (! empty($sortfield)) {
|
if (! empty($sortfield)) {
|
||||||
$sql .= $this->db->order($sortfield, $sortorder);
|
$sql .= $this->db->order($sortfield, $sortorder);
|
||||||
}
|
}
|
||||||
if (! empty($limit)) {
|
if (! empty($limit)) {
|
||||||
$sql .= ' ' . $this->db->plimit($limit + 1, $offset);
|
$sql .= ' ' . $this->db->plimit($limit + 1, $offset);
|
||||||
@ -1201,8 +1313,124 @@ class BookKeeping extends CommonObject
|
|||||||
return - 1;
|
return - 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return list of accounts with label by chart of accounts
|
||||||
|
*
|
||||||
|
* @param string $selectid Preselected chart of accounts
|
||||||
|
* @param string $htmlname Name of field in html form
|
||||||
|
* @param int $showempty Add an empty field
|
||||||
|
* @param array $event Event options
|
||||||
|
* @param int $select_in $selectid value is a aa.rowid (0 default) or aa.account_number (1)
|
||||||
|
* @param int $select_out set value returned by select 0=rowid (default), 1=account_number
|
||||||
|
* @param int $aabase set accounting_account base class to display empty=all or from 1 to 8 will display only account beginning by this number
|
||||||
|
*
|
||||||
|
* @return string String with HTML select
|
||||||
|
*/
|
||||||
|
function select_account($selectid, $htmlname = 'account', $showempty = 0, $event = array(), $select_in = 0, $select_out = 0, $aabase = '') {
|
||||||
|
global $conf;
|
||||||
|
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||||
|
|
||||||
|
$pcgver = $conf->global->CHARTOFACCOUNTS;
|
||||||
|
|
||||||
|
$sql = "SELECT DISTINCT ab.numero_compte as account_number, aa.label as label, aa.rowid as rowid, aa.fk_pcg_version";
|
||||||
|
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as ab";
|
||||||
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.account_number = ab.numero_compte";
|
||||||
|
$sql .= " AND aa.active = 1";
|
||||||
|
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
|
||||||
|
$sql .= " AND asy.rowid = " . $pcgver;
|
||||||
|
$sql .= " ORDER BY account_number ASC";
|
||||||
|
|
||||||
|
dol_syslog(get_class($this) . "::select_account", LOG_DEBUG);
|
||||||
|
$resql = $this->db->query($sql);
|
||||||
|
|
||||||
|
if (!$resql) {
|
||||||
|
$this->error = "Error " . $this->db->lasterror();
|
||||||
|
dol_syslog(get_class($this) . "::select_account " . $this->error, LOG_ERR);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
$out = ajax_combobox($htmlname, $event);
|
||||||
|
|
||||||
|
$options = array();
|
||||||
|
$selected = null;
|
||||||
|
|
||||||
|
while ($obj = $this->db->fetch_object($resql)) {
|
||||||
|
$label = length_accountg($obj->account_number) . ' - ' . $obj->label;
|
||||||
|
$label = dol_trunc($label, $trunclength);
|
||||||
|
|
||||||
|
$select_value_in = $obj->rowid;
|
||||||
|
$select_value_out = $obj->rowid;
|
||||||
|
|
||||||
|
if ($select_in == 1) {
|
||||||
|
$select_value_in = $obj->account_number;
|
||||||
|
}
|
||||||
|
if ($select_out == 1) {
|
||||||
|
$select_value_out = $obj->account_number;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remember guy's we store in database llx_facturedet the rowid of accounting_account and not the account_number
|
||||||
|
// Because same account_number can be share between different accounting_system and do have the same meaning
|
||||||
|
if (($selectid != '') && $selectid == $select_value_in) {
|
||||||
|
$selected = $select_value_out;
|
||||||
|
}
|
||||||
|
|
||||||
|
$options[$select_value_out] = $label;
|
||||||
|
}
|
||||||
|
|
||||||
|
$out .= Form::selectarray($htmlname, $options, $selected, $showempty, 0, 0, '', 0, 0, 0, '', 'maxwidth300');
|
||||||
|
$this->db->free($resql);
|
||||||
|
return $out;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Description of a root accounting account
|
||||||
|
*
|
||||||
|
* @param string $account Accounting account
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
function get_compte_racine($account = null)
|
||||||
|
{
|
||||||
|
global $conf;
|
||||||
|
$pcgver = $conf->global->CHARTOFACCOUNTS;
|
||||||
|
|
||||||
|
|
||||||
|
$sql = "SELECT root.account_number, root.label as label";
|
||||||
|
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as aa";
|
||||||
|
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
|
||||||
|
$sql .= " AND asy.rowid = " . $pcgver;
|
||||||
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as parent ON aa.account_parent = parent.rowid";
|
||||||
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as root ON parent.account_parent = root.rowid";
|
||||||
|
$sql .= " WHERE aa.account_number = '" . $account . "'";
|
||||||
|
$sql .= " AND parent.active = 1";
|
||||||
|
$sql .= " AND root.active = 1";
|
||||||
|
|
||||||
|
|
||||||
|
dol_syslog(get_class($this) . "::select_account sql=" . $sql, LOG_DEBUG);
|
||||||
|
$resql = $this->db->query($sql);
|
||||||
|
if ($resql) {
|
||||||
|
$obj = '';
|
||||||
|
if ($this->db->num_rows($resql)) {
|
||||||
|
$obj = $this->db->fetch_object($resql);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $obj->label;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$this->error = "Error " . $this->db->lasterror();
|
||||||
|
dol_syslog(__METHOD__ . " " . $this->error, LOG_ERR);
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
* Description of accounting account
|
* Description of accounting account
|
||||||
*
|
*
|
||||||
* @param string $account Accounting account
|
* @param string $account Accounting account
|
||||||
@ -1212,7 +1440,6 @@ class BookKeeping extends CommonObject
|
|||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
$pcgver = $conf->global->CHARTOFACCOUNTS;
|
$pcgver = $conf->global->CHARTOFACCOUNTS;
|
||||||
|
|
||||||
$sql = "SELECT aa.account_number, aa.label, aa.rowid, aa.fk_pcg_version, cat.label as category";
|
$sql = "SELECT aa.account_number, aa.label, aa.rowid, aa.fk_pcg_version, cat.label as category";
|
||||||
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as aa ";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as aa ";
|
||||||
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
|
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
|
||||||
@ -1220,7 +1447,6 @@ class BookKeeping extends CommonObject
|
|||||||
$sql .= " AND asy.rowid = " . $pcgver;
|
$sql .= " AND asy.rowid = " . $pcgver;
|
||||||
$sql .= " AND aa.active = 1";
|
$sql .= " AND aa.active = 1";
|
||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_accounting_category as cat ON aa.fk_accounting_category = cat.rowid";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_accounting_category as cat ON aa.fk_accounting_category = cat.rowid";
|
||||||
|
|
||||||
dol_syslog(get_class($this) . "::select_account sql=" . $sql, LOG_DEBUG);
|
dol_syslog(get_class($this) . "::select_account sql=" . $sql, LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
@ -1238,7 +1464,6 @@ class BookKeeping extends CommonObject
|
|||||||
} else {
|
} else {
|
||||||
$this->error = "Error " . $this->db->lasterror();
|
$this->error = "Error " . $this->db->lasterror();
|
||||||
dol_syslog(__METHOD__ . " " . $this->error, LOG_ERR);
|
dol_syslog(__METHOD__ . " " . $this->error, LOG_ERR);
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -58,7 +58,7 @@ class FormVentilation extends Form
|
|||||||
|
|
||||||
return Form::selectarray($htmlname, $options, $selectedkey);
|
return Form::selectarray($htmlname, $options, $selectedkey);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return list of accounts with label by chart of accounts
|
* Return list of accounts with label by chart of accounts
|
||||||
*
|
*
|
||||||
@ -69,23 +69,23 @@ class FormVentilation extends Form
|
|||||||
* @param int $select_in $selectid value is a aa.rowid (0 default) or aa.account_number (1)
|
* @param int $select_in $selectid value is a aa.rowid (0 default) or aa.account_number (1)
|
||||||
* @param int $select_out set value returned by select 0=rowid (default), 1=account_number
|
* @param int $select_out set value returned by select 0=rowid (default), 1=account_number
|
||||||
* @param int $aabase set accounting_account base class to display empty=all or from 1 to 8 will display only account beginning by this number
|
* @param int $aabase set accounting_account base class to display empty=all or from 1 to 8 will display only account beginning by this number
|
||||||
*
|
*
|
||||||
* @return string String with HTML select
|
* @return string String with HTML select
|
||||||
*/
|
*/
|
||||||
function select_account($selectid, $htmlname = 'account', $showempty = 0, $event = array(), $select_in = 0, $select_out = 0, $aabase = '') {
|
function select_account($selectid, $htmlname = 'account', $showempty = 0, $event = array(), $select_in = 0, $select_out = 0, $aabase = '') {
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||||
|
|
||||||
$trunclength = defined('ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT') ? $conf->global->ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT : 50;
|
$trunclength = defined('ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT') ? $conf->global->ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT : 50;
|
||||||
|
|
||||||
$sql = "SELECT DISTINCT aa.account_number, aa.label, aa.rowid, aa.fk_pcg_version";
|
$sql = "SELECT DISTINCT aa.account_number, aa.label, aa.rowid, aa.fk_pcg_version";
|
||||||
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as aa";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as aa";
|
||||||
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
|
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
|
||||||
$sql .= " AND asy.rowid = " . $conf->global->CHARTOFACCOUNTS;
|
$sql .= " AND asy.rowid = " . $conf->global->CHARTOFACCOUNTS;
|
||||||
$sql .= " AND aa.active = 1";
|
$sql .= " AND aa.active = 1";
|
||||||
$sql .= " ORDER BY aa.account_number";
|
$sql .= " ORDER BY aa.account_number";
|
||||||
|
|
||||||
dol_syslog(get_class($this) . "::select_account", LOG_DEBUG);
|
dol_syslog(get_class($this) . "::select_account", LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
|
|
||||||
@ -127,7 +127,7 @@ class FormVentilation extends Form
|
|||||||
$this->db->free($resql);
|
$this->db->free($resql);
|
||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return list of accounts with label by class of accounts
|
* Return list of accounts with label by class of accounts
|
||||||
*
|
*
|
||||||
@ -135,18 +135,18 @@ class FormVentilation extends Form
|
|||||||
* @param string $htmlname Name of field in html form
|
* @param string $htmlname Name of field in html form
|
||||||
* @param int $showempty Add an empty field
|
* @param int $showempty Add an empty field
|
||||||
* @param array $event Event options
|
* @param array $event Event options
|
||||||
*
|
*
|
||||||
* @return string String with HTML select
|
* @return string String with HTML select
|
||||||
*/
|
*/
|
||||||
function select_pcgtype($selectid, $htmlname = 'pcg_type', $showempty = 0, $event = array()) {
|
function select_pcgtype($selectid, $htmlname = 'pcg_type', $showempty = 0, $event = array()) {
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$sql = "SELECT DISTINCT pcg_type ";
|
$sql = "SELECT DISTINCT pcg_type ";
|
||||||
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as aa";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as aa";
|
||||||
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
|
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
|
||||||
$sql .= " AND asy.rowid = " . $conf->global->CHARTOFACCOUNTS;
|
$sql .= " AND asy.rowid = " . $conf->global->CHARTOFACCOUNTS;
|
||||||
$sql .= " ORDER BY pcg_type";
|
$sql .= " ORDER BY pcg_type";
|
||||||
|
|
||||||
dol_syslog(get_class($this) . "::select_pcgtype", LOG_DEBUG);
|
dol_syslog(get_class($this) . "::select_pcgtype", LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
|
|
||||||
@ -168,7 +168,7 @@ class FormVentilation extends Form
|
|||||||
$this->db->free($resql);
|
$this->db->free($resql);
|
||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return list of accounts with label by sub_class of accounts
|
* Return list of accounts with label by sub_class of accounts
|
||||||
*
|
*
|
||||||
@ -176,18 +176,18 @@ class FormVentilation extends Form
|
|||||||
* @param string $htmlname Name of field in html form
|
* @param string $htmlname Name of field in html form
|
||||||
* @param int $showempty Add an empty field
|
* @param int $showempty Add an empty field
|
||||||
* @param array $event Event options
|
* @param array $event Event options
|
||||||
*
|
*
|
||||||
* @return string String with HTML select
|
* @return string String with HTML select
|
||||||
*/
|
*/
|
||||||
function select_pcgsubtype($selectid, $htmlname = 'pcg_subtype', $showempty = 0, $event = array()) {
|
function select_pcgsubtype($selectid, $htmlname = 'pcg_subtype', $showempty = 0, $event = array()) {
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$sql = "SELECT DISTINCT pcg_subtype ";
|
$sql = "SELECT DISTINCT pcg_subtype ";
|
||||||
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as aa";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as aa";
|
||||||
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
|
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
|
||||||
$sql .= " AND asy.rowid = " . $conf->global->CHARTOFACCOUNTS;
|
$sql .= " AND asy.rowid = " . $conf->global->CHARTOFACCOUNTS;
|
||||||
$sql .= " ORDER BY pcg_subtype";
|
$sql .= " ORDER BY pcg_subtype";
|
||||||
|
|
||||||
dol_syslog(get_class($this) . "::select_pcgsubtype", LOG_DEBUG);
|
dol_syslog(get_class($this) . "::select_pcgsubtype", LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
|
|
||||||
@ -209,7 +209,7 @@ class FormVentilation extends Form
|
|||||||
$this->db->free($resql);
|
$this->db->free($resql);
|
||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return list of auxilary thirdparty accounts
|
* Return list of auxilary thirdparty accounts
|
||||||
*
|
*
|
||||||
@ -217,7 +217,7 @@ class FormVentilation extends Form
|
|||||||
* @param string $htmlname Name of field in html form
|
* @param string $htmlname Name of field in html form
|
||||||
* @param int $showempty Add an empty field
|
* @param int $showempty Add an empty field
|
||||||
* @param array $event Event options
|
* @param array $event Event options
|
||||||
*
|
*
|
||||||
* @return string String with HTML select
|
* @return string String with HTML select
|
||||||
*/
|
*/
|
||||||
function select_auxaccount($selectid, $htmlname = 'account_num_aux', $showempty = 0, $event = array()) {
|
function select_auxaccount($selectid, $htmlname = 'account_num_aux', $showempty = 0, $event = array()) {
|
||||||
@ -246,7 +246,7 @@ class FormVentilation extends Form
|
|||||||
// Auxiliary supplier account
|
// Auxiliary supplier account
|
||||||
$sql = "SELECT DISTINCT code_compta_fournisseur, nom ";
|
$sql = "SELECT DISTINCT code_compta_fournisseur, nom ";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe";
|
$sql .= " FROM ".MAIN_DB_PREFIX."societe";
|
||||||
$sql .= " ORDER BY code_compta";
|
$sql .= " ORDER BY code_compta_fournisseur";
|
||||||
dol_syslog(get_class($this)."::select_auxaccount", LOG_DEBUG);
|
dol_syslog(get_class($this)."::select_auxaccount", LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
@ -268,7 +268,7 @@ class FormVentilation extends Form
|
|||||||
|
|
||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return HTML combo list of years existing into book keepping
|
* Return HTML combo list of years existing into book keepping
|
||||||
*
|
*
|
||||||
@ -284,7 +284,7 @@ class FormVentilation extends Form
|
|||||||
|
|
||||||
$sql = "SELECT DISTINCT date_format(doc_date,'%Y') as dtyear";
|
$sql = "SELECT DISTINCT date_format(doc_date,'%Y') as dtyear";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping";
|
$sql .= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping";
|
||||||
$sql .= " ORDER BY doc_date";
|
$sql .= " ORDER BY date_format(doc_date,'%Y')";
|
||||||
dol_syslog(get_class($this)."::".__METHOD__, LOG_DEBUG);
|
dol_syslog(get_class($this)."::".__METHOD__, LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
|
|
||||||
@ -304,4 +304,40 @@ class FormVentilation extends Form
|
|||||||
return $out_array;
|
return $out_array;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return HTML combo list of years existing into book keepping
|
||||||
|
*
|
||||||
|
* @param string $selected Preselected value
|
||||||
|
* @param string $htmlname Name of HTML select object
|
||||||
|
* @param int $useempty Affiche valeur vide dans liste
|
||||||
|
* @param string $output_format (html/opton (for option html only)/array (to return options arrays
|
||||||
|
* @return string/array
|
||||||
|
*/
|
||||||
|
function selectjournal_accountancy_bookkepping($selected = '', $htmlname = 'journalid', $useempty = 0, $output_format = 'html')
|
||||||
|
{
|
||||||
|
$out_array = array();
|
||||||
|
|
||||||
|
$sql = "SELECT DISTINCT code_journal";
|
||||||
|
$sql .= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping";
|
||||||
|
$sql .= " ORDER BY code_journal";
|
||||||
|
dol_syslog(get_class($this)."::".__METHOD__, LOG_DEBUG);
|
||||||
|
$resql = $this->db->query($sql);
|
||||||
|
|
||||||
|
if (!$resql) {
|
||||||
|
$this->error = "Error ".$this->db->lasterror();
|
||||||
|
dol_syslog(get_class($this)."::".__METHOD__.$this->error, LOG_ERR);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
while ($obj = $this->db->fetch_object($resql)) {
|
||||||
|
$out_array[$obj->code_journal] = $obj->code_journal;
|
||||||
|
}
|
||||||
|
$this->db->free($resql);
|
||||||
|
|
||||||
|
if ($output_format == 'html') {
|
||||||
|
return Form::selectarray($htmlname, $out_array, $selected, $useempty, 0, 0, 'placeholder="aa"');
|
||||||
|
} else {
|
||||||
|
return $out_array;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,9 +21,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/accountancy/customer/index.php
|
* \file htdocs/accountancy/customer/index.php
|
||||||
* \ingroup Advanced accountancy
|
* \ingroup Advanced accountancy
|
||||||
* \brief Home customer ventilation
|
* \brief Home customer ventilation
|
||||||
*/
|
*/
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ if ($user->societe_id > 0)
|
|||||||
if (! $user->rights->accounting->ventilation->read)
|
if (! $user->rights->accounting->ventilation->read)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
// Filter
|
// Filter
|
||||||
$year = $_GET["year"];
|
$year = $_GET["year"];
|
||||||
if ($year == 0) {
|
if ($year == 0) {
|
||||||
$year_current = strftime("%Y", time());
|
$year_current = strftime("%Y", time());
|
||||||
@ -170,37 +170,17 @@ $var = true;
|
|||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td width="200">' . $langs->trans("Account") . '</td>';
|
print '<tr class="liste_titre"><td width="200">' . $langs->trans("Account") . '</td>';
|
||||||
print '<td width="200" align="left">' . $langs->trans("Label") . '</td>';
|
print '<td width="200" align="left">' . $langs->trans("Label") . '</td>';
|
||||||
print '<td width="60" align="center">' . $langs->trans("JanuaryMin") . '</td>';
|
for($i = 1; $i <= 12; $i ++) {
|
||||||
print '<td width="60" align="center">' . $langs->trans("FebruaryMin") . '</td>';
|
print '<td width="60" align="center">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
|
||||||
print '<td width="60" align="center">' . $langs->trans("MarchMin") . '</td>';
|
}
|
||||||
print '<td width="60" align="center">' . $langs->trans("AprilMin") . '</td>';
|
|
||||||
print '<td width="60" align="center">' . $langs->trans("MayMin") . '</td>';
|
|
||||||
print '<td width="60" align="center">' . $langs->trans("JuneMin") . '</td>';
|
|
||||||
print '<td width="60" align="center">' . $langs->trans("JulyMin") . '</td>';
|
|
||||||
print '<td width="60" align="center">' . $langs->trans("AugustMin") . '</td>';
|
|
||||||
print '<td width="60" align="center">' . $langs->trans("SeptemberMin") . '</td>';
|
|
||||||
print '<td width="60" align="center">' . $langs->trans("OctoberMin") . '</td>';
|
|
||||||
print '<td width="60" align="center">' . $langs->trans("NovemberMin") . '</td>';
|
|
||||||
print '<td width="60" align="center">' . $langs->trans("DecemberMin") . '</td>';
|
|
||||||
print '<td width="60" align="center"><b>' . $langs->trans("Total") . '</b></td></tr>';
|
print '<td width="60" align="center"><b>' . $langs->trans("Total") . '</b></td></tr>';
|
||||||
|
|
||||||
|
$sql = "SELECT " . $db->ifsql('aa.account_number IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.account_number') . " AS codecomptable,";
|
||||||
//TODO : Cannot work with PGSQL !, Change that with php treatment rather than big SQL query
|
$sql .= " " . $db->ifsql('aa.label IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.label') . " AS intitule,";
|
||||||
$sql = "SELECT IF(aa.account_number IS NULL, 'Non pointe', aa.account_number) AS 'code comptable',";
|
for($i = 1; $i <= 12; $i ++) {
|
||||||
$sql .= " IF(aa.label IS NULL, 'Non pointe', aa.label) AS 'Intitulé',";
|
$sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $i, 'fd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
|
||||||
$sql .= " ROUND(SUM(IF(MONTH(f.datef)=1,fd.total_ht,0)),2) AS 'Janvier',";
|
}
|
||||||
$sql .= " ROUND(SUM(IF(MONTH(f.datef)=2,fd.total_ht,0)),2) AS 'Fevrier',";
|
$sql .= " SUM(fd.total_ht) as total";
|
||||||
$sql .= " ROUND(SUM(IF(MONTH(f.datef)=3,fd.total_ht,0)),2) AS 'Mars',";
|
|
||||||
$sql .= " ROUND(SUM(IF(MONTH(f.datef)=4,fd.total_ht,0)),2) AS 'Avril',";
|
|
||||||
$sql .= " ROUND(SUM(IF(MONTH(f.datef)=5,fd.total_ht,0)),2) AS 'Mai',";
|
|
||||||
$sql .= " ROUND(SUM(IF(MONTH(f.datef)=6,fd.total_ht,0)),2) AS 'Juin',";
|
|
||||||
$sql .= " ROUND(SUM(IF(MONTH(f.datef)=7,fd.total_ht,0)),2) AS 'Juillet',";
|
|
||||||
$sql .= " ROUND(SUM(IF(MONTH(f.datef)=8,fd.total_ht,0)),2) AS 'Aout',";
|
|
||||||
$sql .= " ROUND(SUM(IF(MONTH(f.datef)=9,fd.total_ht,0)),2) AS 'Septembre',";
|
|
||||||
$sql .= " ROUND(SUM(IF(MONTH(f.datef)=10,fd.total_ht,0)),2) AS 'Octobre',";
|
|
||||||
$sql .= " ROUND(SUM(IF(MONTH(f.datef)=11,fd.total_ht,0)),2) AS 'Novembre',";
|
|
||||||
$sql .= " ROUND(SUM(IF(MONTH(f.datef)=12,fd.total_ht,0)),2) AS 'Decembre',";
|
|
||||||
$sql .= " ROUND(SUM(fd.total_ht),2) as 'Total'";
|
|
||||||
$sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as fd";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as fd";
|
||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture";
|
||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = fd.fk_code_ventilation";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = fd.fk_code_ventilation";
|
||||||
@ -211,7 +191,7 @@ if (! empty($conf->multicompany->enabled)) {
|
|||||||
$sql .= " AND f.entity IN (" . getEntity("facture", 1) . ")";
|
$sql .= " AND f.entity IN (" . getEntity("facture", 1) . ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql .= " GROUP BY fd.fk_code_ventilation";
|
$sql .= " GROUP BY fd.fk_code_ventilation,aa.account_number,aa.label";
|
||||||
|
|
||||||
dol_syslog("htdocs/accountancy/customer/index.php sql=" . $sql, LOG_DEBUG);
|
dol_syslog("htdocs/accountancy/customer/index.php sql=" . $sql, LOG_DEBUG);
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
@ -224,17 +204,9 @@ if ($resql) {
|
|||||||
$var = ! $var;
|
$var = ! $var;
|
||||||
print '<tr ' . $bc[$var] . '><td>' . length_accountg($row[0]) . '</td>';
|
print '<tr ' . $bc[$var] . '><td>' . length_accountg($row[0]) . '</td>';
|
||||||
print '<td align="left">' . $row[1] . '</td>';
|
print '<td align="left">' . $row[1] . '</td>';
|
||||||
print '<td align="right">' . price($row[2]) . '</td>';
|
for($i = 2; $i <= 12; $i ++) {
|
||||||
print '<td align="right">' . price($row[3]) . '</td>';
|
print '<td align="right">' . price($row[$i]) . '</td>';
|
||||||
print '<td align="right">' . price($row[4]) . '</td>';
|
}
|
||||||
print '<td align="right">' . price($row[5]) . '</td>';
|
|
||||||
print '<td align="right">' . price($row[6]) . '</td>';
|
|
||||||
print '<td align="right">' . price($row[7]) . '</td>';
|
|
||||||
print '<td align="right">' . price($row[8]) . '</td>';
|
|
||||||
print '<td align="right">' . price($row[9]) . '</td>';
|
|
||||||
print '<td align="right">' . price($row[10]) . '</td>';
|
|
||||||
print '<td align="right">' . price($row[11]) . '</td>';
|
|
||||||
print '<td align="right">' . price($row[12]) . '</td>';
|
|
||||||
print '<td align="right">' . price($row[13]) . '</td>';
|
print '<td align="right">' . price($row[13]) . '</td>';
|
||||||
print '<td align="right"><b>' . price($row[14]) . '</b></td>';
|
print '<td align="right"><b>' . price($row[14]) . '</b></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@ -249,34 +221,16 @@ print "</table>\n";
|
|||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td width="400" align="left">' . $langs->trans("TotalVente") . '</td>';
|
print '<tr class="liste_titre"><td width="400" align="left">' . $langs->trans("TotalVente") . '</td>';
|
||||||
print '<td width="60" align="center">' . $langs->trans("JanuaryMin") . '</td>';
|
for($i = 1; $i <= 12; $i ++) {
|
||||||
print '<td width="60" align="center">' . $langs->trans("FebruaryMin") . '</td>';
|
print '<td width="60" align="center">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
|
||||||
print '<td width="60" align="center">' . $langs->trans("MarchMin") . '</td>';
|
}
|
||||||
print '<td width="60" align="center">' . $langs->trans("AprilMin") . '</td>';
|
|
||||||
print '<td width="60" align="center">' . $langs->trans("MayMin") . '</td>';
|
|
||||||
print '<td width="60" align="center">' . $langs->trans("JuneMin") . '</td>';
|
|
||||||
print '<td width="60" align="center">' . $langs->trans("JulyMin") . '</td>';
|
|
||||||
print '<td width="60" align="center">' . $langs->trans("AugustMin") . '</td>';
|
|
||||||
print '<td width="60" align="center">' . $langs->trans("SeptemberMin") . '</td>';
|
|
||||||
print '<td width="60" align="center">' . $langs->trans("OctoberMin") . '</td>';
|
|
||||||
print '<td width="60" align="center">' . $langs->trans("NovemberMin") . '</td>';
|
|
||||||
print '<td width="60" align="center">' . $langs->trans("DecemberMin") . '</td>';
|
|
||||||
print '<td width="60" align="center"><b>' . $langs->trans("Total") . '</b></td></tr>';
|
print '<td width="60" align="center"><b>' . $langs->trans("Total") . '</b></td></tr>';
|
||||||
|
|
||||||
$sql = "SELECT '" . $langs->trans("TotalVente") . "' AS 'Total',";
|
$sql = "SELECT '" . $langs->trans("TotalVente") . "' AS total,";
|
||||||
$sql .= " ROUND(SUM(IF(MONTH(f.datef)=1,fd.total_ht,0)),2) AS 'Janvier',";
|
for($i = 1; $i <= 12; $i ++) {
|
||||||
$sql .= " ROUND(SUM(IF(MONTH(f.datef)=2,fd.total_ht,0)),2) AS 'Fevrier',";
|
$sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $i, 'fd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
|
||||||
$sql .= " ROUND(SUM(IF(MONTH(f.datef)=3,fd.total_ht,0)),2) AS 'Mars',";
|
}
|
||||||
$sql .= " ROUND(SUM(IF(MONTH(f.datef)=4,fd.total_ht,0)),2) AS 'Avril',";
|
$sql .= " SUM(fd.total_ht) as total";
|
||||||
$sql .= " ROUND(SUM(IF(MONTH(f.datef)=5,fd.total_ht,0)),2) AS 'Mai',";
|
|
||||||
$sql .= " ROUND(SUM(IF(MONTH(f.datef)=6,fd.total_ht,0)),2) AS 'Juin',";
|
|
||||||
$sql .= " ROUND(SUM(IF(MONTH(f.datef)=7,fd.total_ht,0)),2) AS 'Juillet',";
|
|
||||||
$sql .= " ROUND(SUM(IF(MONTH(f.datef)=8,fd.total_ht,0)),2) AS 'Aout',";
|
|
||||||
$sql .= " ROUND(SUM(IF(MONTH(f.datef)=9,fd.total_ht,0)),2) AS 'Septembre',";
|
|
||||||
$sql .= " ROUND(SUM(IF(MONTH(f.datef)=10,fd.total_ht,0)),2) AS 'Octobre',";
|
|
||||||
$sql .= " ROUND(SUM(IF(MONTH(f.datef)=11,fd.total_ht,0)),2) AS 'Novembre',";
|
|
||||||
$sql .= " ROUND(SUM(IF(MONTH(f.datef)=12,fd.total_ht,0)),2) AS 'Decembre',";
|
|
||||||
$sql .= " ROUND(SUM(fd.total_ht),2) as 'Total'";
|
|
||||||
$sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as fd";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as fd";
|
||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture";
|
||||||
$sql .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
$sql .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
||||||
@ -296,18 +250,9 @@ if ($resql) {
|
|||||||
$row = $db->fetch_row($resql);
|
$row = $db->fetch_row($resql);
|
||||||
|
|
||||||
print '<tr><td>' . $row[0] . '</td>';
|
print '<tr><td>' . $row[0] . '</td>';
|
||||||
print '<td align="right">' . price($row[1]) . '</td>';
|
for($i = 1; $i <= 12; $i ++) {
|
||||||
print '<td align="right">' . price($row[2]) . '</td>';
|
print '<td align="right">' . price($row[$i]) . '</td>';
|
||||||
print '<td align="right">' . price($row[3]) . '</td>';
|
}
|
||||||
print '<td align="right">' . price($row[4]) . '</td>';
|
|
||||||
print '<td align="right">' . price($row[5]) . '</td>';
|
|
||||||
print '<td align="right">' . price($row[6]) . '</td>';
|
|
||||||
print '<td align="right">' . price($row[7]) . '</td>';
|
|
||||||
print '<td align="right">' . price($row[8]) . '</td>';
|
|
||||||
print '<td align="right">' . price($row[9]) . '</td>';
|
|
||||||
print '<td align="right">' . price($row[10]) . '</td>';
|
|
||||||
print '<td align="right">' . price($row[11]) . '</td>';
|
|
||||||
print '<td align="right">' . price($row[12]) . '</td>';
|
|
||||||
print '<td align="right"><b>' . price($row[13]) . '</b></td>';
|
print '<td align="right"><b>' . price($row[13]) . '</b></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
$i ++;
|
$i ++;
|
||||||
@ -322,34 +267,16 @@ if (! empty($conf->margin->enabled)) {
|
|||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td width="400">' . $langs->trans("TotalMarge") . '</td>';
|
print '<tr class="liste_titre"><td width="400">' . $langs->trans("TotalMarge") . '</td>';
|
||||||
print '<td width="60" align="center">' . $langs->trans("JanuaryMin") . '</td>';
|
for($i = 1; $i <= 12; $i ++) {
|
||||||
print '<td width="60" align="center">' . $langs->trans("FebruaryMin") . '</td>';
|
print '<td width="60" align="center">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
|
||||||
print '<td width="60" align="center">' . $langs->trans("MarchMin") . '</td>';
|
}
|
||||||
print '<td width="60" align="center">' . $langs->trans("AprilMin") . '</td>';
|
|
||||||
print '<td width="60" align="center">' . $langs->trans("MayMin") . '</td>';
|
|
||||||
print '<td width="60" align="center">' . $langs->trans("JuneMin") . '</td>';
|
|
||||||
print '<td width="60" align="center">' . $langs->trans("JulyMin") . '</td>';
|
|
||||||
print '<td width="60" align="center">' . $langs->trans("AugustMin") . '</td>';
|
|
||||||
print '<td width="60" align="center">' . $langs->trans("SeptemberMin") . '</td>';
|
|
||||||
print '<td width="60" align="center">' . $langs->trans("OctoberMin") . '</td>';
|
|
||||||
print '<td width="60" align="center">' . $langs->trans("NovemberMin") . '</td>';
|
|
||||||
print '<td width="60" align="center">' . $langs->trans("DecemberMin") . '</td>';
|
|
||||||
print '<td width="60" align="center"><b>' . $langs->trans("Total") . '</b></td></tr>';
|
print '<td width="60" align="center"><b>' . $langs->trans("Total") . '</b></td></tr>';
|
||||||
|
|
||||||
$sql = "SELECT '" . $langs->trans("Vide") . "' AS 'Marge',";
|
$sql = "SELECT '" . $langs->trans("Vide") . "' AS 'Marge',";
|
||||||
$sql .= " ROUND(SUM(IF(MONTH(f.datef)=1,(fd.total_ht-(fd.qty * fd.buy_price_ht)),0)),2) AS 'Janvier',";
|
for($i = 1; $i <= 12; $i ++) {
|
||||||
$sql .= " ROUND(SUM(IF(MONTH(f.datef)=2,(fd.total_ht-(fd.qty * fd.buy_price_ht)),0)),2) AS 'Fevrier',";
|
$sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $i, '(fd.total_ht-(fd.qty * fd.buy_price_ht))', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
|
||||||
$sql .= " ROUND(SUM(IF(MONTH(f.datef)=3,(fd.total_ht-(fd.qty * fd.buy_price_ht)),0)),2) AS 'Mars',";
|
}
|
||||||
$sql .= " ROUND(SUM(IF(MONTH(f.datef)=4,(fd.total_ht-(fd.qty * fd.buy_price_ht)),0)),2) AS 'Avril',";
|
$sql .= " SUM((fd.total_ht-(fd.qty * fd.buy_price_ht))) as 'Total'";
|
||||||
$sql .= " ROUND(SUM(IF(MONTH(f.datef)=5,(fd.total_ht-(fd.qty * fd.buy_price_ht)),0)),2) AS 'Mai',";
|
|
||||||
$sql .= " ROUND(SUM(IF(MONTH(f.datef)=6,(fd.total_ht-(fd.qty * fd.buy_price_ht)),0)),2) AS 'Juin',";
|
|
||||||
$sql .= " ROUND(SUM(IF(MONTH(f.datef)=7,(fd.total_ht-(fd.qty * fd.buy_price_ht)),0)),2) AS 'Juillet',";
|
|
||||||
$sql .= " ROUND(SUM(IF(MONTH(f.datef)=8,(fd.total_ht-(fd.qty * fd.buy_price_ht)),0)),2) AS 'Aout',";
|
|
||||||
$sql .= " ROUND(SUM(IF(MONTH(f.datef)=9,(fd.total_ht-(fd.qty * fd.buy_price_ht)),0)),2) AS 'Septembre',";
|
|
||||||
$sql .= " ROUND(SUM(IF(MONTH(f.datef)=10,(fd.total_ht-(fd.qty * fd.buy_price_ht)),0)),2) AS 'Octobre',";
|
|
||||||
$sql .= " ROUND(SUM(IF(MONTH(f.datef)=11,(fd.total_ht-(fd.qty * fd.buy_price_ht)),0)),2) AS 'Novembre',";
|
|
||||||
$sql .= " ROUND(SUM(IF(MONTH(f.datef)=12,(fd.total_ht-(fd.qty * fd.buy_price_ht)),0)),2) AS 'Decembre',";
|
|
||||||
$sql .= " ROUND(SUM((fd.total_ht-(fd.qty * fd.buy_price_ht))),2) as 'Total'";
|
|
||||||
$sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as fd";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as fd";
|
||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture";
|
||||||
$sql .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
$sql .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
||||||
@ -369,18 +296,9 @@ if (! empty($conf->margin->enabled)) {
|
|||||||
$row = $db->fetch_row($resql);
|
$row = $db->fetch_row($resql);
|
||||||
|
|
||||||
print '<tr><td>' . $row[0] . '</td>';
|
print '<tr><td>' . $row[0] . '</td>';
|
||||||
print '<td align="right">' . price($row[1]) . '</td>';
|
for($i = 1; $i <= 12; $i ++) {
|
||||||
print '<td align="right">' . price($row[2]) . '</td>';
|
print '<td align="right">' . price($row[$i]) . '</td>';
|
||||||
print '<td align="right">' . price($row[3]) . '</td>';
|
}
|
||||||
print '<td align="right">' . price($row[4]) . '</td>';
|
|
||||||
print '<td align="right">' . price($row[5]) . '</td>';
|
|
||||||
print '<td align="right">' . price($row[6]) . '</td>';
|
|
||||||
print '<td align="right">' . price($row[7]) . '</td>';
|
|
||||||
print '<td align="right">' . price($row[8]) . '</td>';
|
|
||||||
print '<td align="right">' . price($row[9]) . '</td>';
|
|
||||||
print '<td align="right">' . price($row[10]) . '</td>';
|
|
||||||
print '<td align="right">' . price($row[11]) . '</td>';
|
|
||||||
print '<td align="right">' . price($row[12]) . '</td>';
|
|
||||||
print '<td align="right"><b>' . price($row[13]) . '</b></td>';
|
print '<td align="right"><b>' . price($row[13]) . '</b></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
$i ++;
|
$i ++;
|
||||||
@ -395,4 +313,4 @@ print "</table>\n";
|
|||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -138,7 +138,7 @@ if ($result) {
|
|||||||
//Define array for display vat tx
|
//Define array for display vat tx
|
||||||
$def_tva[$obj->rowid]=price($obj->tva_tx);
|
$def_tva[$obj->rowid]=price($obj->tva_tx);
|
||||||
|
|
||||||
$tabfac[$obj->rowid]["date"] = $obj->df;
|
$tabfac[$obj->rowid]["date"] = $db->jdate($obj->df);
|
||||||
$tabfac[$obj->rowid]["ref"] = $obj->ref_supplier . ' (' . $obj->ref . ')';
|
$tabfac[$obj->rowid]["ref"] = $obj->ref_supplier . ' (' . $obj->ref . ')';
|
||||||
$tabfac[$obj->rowid]["refsologest"] = $obj->ref;
|
$tabfac[$obj->rowid]["refsologest"] = $obj->ref;
|
||||||
$tabfac[$obj->rowid]["refsuppliersologest"] = $obj->ref_supplier;
|
$tabfac[$obj->rowid]["refsuppliersologest"] = $obj->ref_supplier;
|
||||||
@ -166,14 +166,13 @@ if ($action == 'writebookkeeping') {
|
|||||||
$now = dol_now();
|
$now = dol_now();
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
foreach ( $tabfac as $key => $val ) {
|
foreach ($tabfac as $key => $val)
|
||||||
|
{
|
||||||
$companystatic = new Societe($db);
|
$companystatic = new Societe($db);
|
||||||
$invoicestatic = new FactureFournisseur($db);
|
$invoicestatic = new FactureFournisseur($db);
|
||||||
|
|
||||||
$invoicestatic->id = $key;
|
$invoicestatic->id = $key;
|
||||||
$invoicestatic->ref = $val["ref"];
|
$invoicestatic->ref = (string) $val["refsologest"];
|
||||||
$invoicestatic->ref = $val["refsologest"];
|
|
||||||
$invoicestatic->refsupplier = $val["refsuppliersologest"];
|
$invoicestatic->refsupplier = $val["refsuppliersologest"];
|
||||||
$invoicestatic->type = $val["type"];
|
$invoicestatic->type = $val["type"];
|
||||||
$invoicestatic->description = html_entity_decode(dol_trunc($val["description"], 32));
|
$invoicestatic->description = html_entity_decode(dol_trunc($val["description"], 32));
|
||||||
@ -193,7 +192,7 @@ if ($action == 'writebookkeeping') {
|
|||||||
$bookkeeping->fk_doc = $key;
|
$bookkeeping->fk_doc = $key;
|
||||||
$bookkeeping->fk_docdet = $val["fk_facturefourndet"];
|
$bookkeeping->fk_docdet = $val["fk_facturefourndet"];
|
||||||
$bookkeeping->code_tiers = $tabcompany[$key]['code_fournisseur'];
|
$bookkeeping->code_tiers = $tabcompany[$key]['code_fournisseur'];
|
||||||
$bookkeeping->label_compte = utf8_decode(dol_trunc($companystatic->name, 16)) . ' - ' . $invoicestatic->refsupplier . ' - ' . $langs->trans("Code_tiers");
|
$bookkeeping->label_compte = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $langs->trans("Code_tiers");
|
||||||
$bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER;
|
$bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER;
|
||||||
$bookkeeping->montant = $mt;
|
$bookkeeping->montant = $mt;
|
||||||
$bookkeeping->sens = ($mt >= 0) ? 'C' : 'D';
|
$bookkeeping->sens = ($mt >= 0) ? 'C' : 'D';
|
||||||
@ -225,7 +224,7 @@ if ($action == 'writebookkeeping') {
|
|||||||
$bookkeeping->fk_doc = $key;
|
$bookkeeping->fk_doc = $key;
|
||||||
$bookkeeping->fk_docdet = $val["fk_facturefourndet"];
|
$bookkeeping->fk_docdet = $val["fk_facturefourndet"];
|
||||||
$bookkeeping->code_tiers = '';
|
$bookkeeping->code_tiers = '';
|
||||||
$bookkeeping->label_compte = utf8_decode(dol_trunc($companystatic->name, 16)) . ' - ' . $invoicestatic->refsupplier . ' - ' . utf8_decode($accountingaccount->label);
|
$bookkeeping->label_compte = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $accountingaccount->label;
|
||||||
$bookkeeping->numero_compte = $k;
|
$bookkeeping->numero_compte = $k;
|
||||||
$bookkeeping->montant = $mt;
|
$bookkeeping->montant = $mt;
|
||||||
$bookkeeping->sens = ($mt < 0) ? 'C' : 'D';
|
$bookkeeping->sens = ($mt < 0) ? 'C' : 'D';
|
||||||
@ -256,7 +255,7 @@ if ($action == 'writebookkeeping') {
|
|||||||
$bookkeeping->fk_doc = $key;
|
$bookkeeping->fk_doc = $key;
|
||||||
$bookkeeping->fk_docdet = $val["fk_facturefourndet"];
|
$bookkeeping->fk_docdet = $val["fk_facturefourndet"];
|
||||||
$bookkeeping->code_tiers = '';
|
$bookkeeping->code_tiers = '';
|
||||||
$bookkeeping->label_compte = utf8_decode(dol_trunc($companystatic->name, 16)) . ' - ' . $invoicestatic->refsupplier . ' - ' . $langs->trans("VAT"). ' '.$def_tva[$key];
|
$bookkeeping->label_compte = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $langs->trans("VAT"). ' '.$def_tva[$key];
|
||||||
$bookkeeping->numero_compte = $k;
|
$bookkeeping->numero_compte = $k;
|
||||||
$bookkeeping->montant = $mt;
|
$bookkeeping->montant = $mt;
|
||||||
$bookkeeping->sens = ($mt < 0) ? 'C' : 'D';
|
$bookkeeping->sens = ($mt < 0) ? 'C' : 'D';
|
||||||
@ -297,7 +296,7 @@ if ($action == 'export_csv') {
|
|||||||
$sep = ";";
|
$sep = ";";
|
||||||
|
|
||||||
foreach ( $tabfac as $key => $val ) {
|
foreach ( $tabfac as $key => $val ) {
|
||||||
$date = dol_print_date($db->jdate($val["date"]), '%d%m%Y');
|
$date = dol_print_date($val["date"], '%d%m%Y');
|
||||||
|
|
||||||
// Product / Service
|
// Product / Service
|
||||||
foreach ( $tabht[$key] as $k => $mt ) {
|
foreach ( $tabht[$key] as $k => $mt ) {
|
||||||
@ -340,7 +339,7 @@ if ($action == 'export_csv') {
|
|||||||
print length_accounta(html_entity_decode($k)) . $sep;
|
print length_accounta(html_entity_decode($k)) . $sep;
|
||||||
print ($mt < 0 ? 'D' : 'C') . $sep;
|
print ($mt < 0 ? 'D' : 'C') . $sep;
|
||||||
print ($mt <= 0 ? price(- $mt) : $mt) . $sep;
|
print ($mt <= 0 ? price(- $mt) : $mt) . $sep;
|
||||||
print utf8_decode($companystatic->name) . $sep;
|
print $companystatic->name . $sep;
|
||||||
print $val["ref"];
|
print $val["ref"];
|
||||||
print "\n";
|
print "\n";
|
||||||
}
|
}
|
||||||
@ -356,7 +355,7 @@ if ($action == 'export_csv') {
|
|||||||
$invoicestatic->type = $val["type"];
|
$invoicestatic->type = $val["type"];
|
||||||
$invoicestatic->description = html_entity_decode(dol_trunc($val["description"], 32));
|
$invoicestatic->description = html_entity_decode(dol_trunc($val["description"], 32));
|
||||||
|
|
||||||
$date = dol_print_date($db->jdate($val["date"]), 'day');
|
$date = dol_print_date($val["date"], 'day');
|
||||||
|
|
||||||
$companystatic->id = $tabcompany[$key]['id'];
|
$companystatic->id = $tabcompany[$key]['id'];
|
||||||
$companystatic->name = $tabcompany[$key]['name'];
|
$companystatic->name = $tabcompany[$key]['name'];
|
||||||
@ -370,7 +369,7 @@ if ($action == 'export_csv') {
|
|||||||
print '"' . $date . '"' . $sep;
|
print '"' . $date . '"' . $sep;
|
||||||
print '"' . $val["ref"] . '"' . $sep;
|
print '"' . $val["ref"] . '"' . $sep;
|
||||||
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
|
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
|
||||||
print '"' . utf8_decode(dol_trunc($companystatic->name, 16)) . ' - ' . $val["refsuppliersologest"] . ' - ' . utf8_decode(dol_trunc($accountingaccount->label, 32)) . '"' . $sep;
|
print '"' . dol_trunc($companystatic->name, 16) . ' - ' . $val["refsuppliersologest"] . ' - ' . dol_trunc($accountingaccount->label, 32) . '"' . $sep;
|
||||||
// print '"' . dol_trunc($accountingaccount->label, 32) . '"' . $sep;
|
// print '"' . dol_trunc($accountingaccount->label, 32) . '"' . $sep;
|
||||||
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
|
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
|
||||||
print '"' . ($mt < 0 ? price(- $mt) : '') . '"';
|
print '"' . ($mt < 0 ? price(- $mt) : '') . '"';
|
||||||
@ -384,7 +383,7 @@ if ($action == 'export_csv') {
|
|||||||
print '"' . $val["ref"] . '"' . $sep;
|
print '"' . $val["ref"] . '"' . $sep;
|
||||||
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
|
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
|
||||||
// print '"' . $langs->trans("VAT") . '"' . $sep;
|
// print '"' . $langs->trans("VAT") . '"' . $sep;
|
||||||
print '"' . utf8_decode(dol_trunc($companystatic->name, 16)) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("VAT") . '"' . $sep;
|
print '"' . dol_trunc($companystatic->name, 16) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("VAT") . '"' . $sep;
|
||||||
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
|
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
|
||||||
print '"' . ($mt < 0 ? price(- $mt) : '') . '"';
|
print '"' . ($mt < 0 ? price(- $mt) : '') . '"';
|
||||||
print "\n";
|
print "\n";
|
||||||
@ -396,8 +395,7 @@ if ($action == 'export_csv') {
|
|||||||
print '"' . $date . '"' . $sep;
|
print '"' . $date . '"' . $sep;
|
||||||
print '"' . $val["ref"] . '"' . $sep;
|
print '"' . $val["ref"] . '"' . $sep;
|
||||||
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
|
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
|
||||||
// print '"' . utf8_decode($companystatic->name) . '"' . $sep;
|
print '"' . dol_trunc($companystatic->name, 16) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("Code_tiers") . '"' . $sep;
|
||||||
print '"' . utf8_decode(dol_trunc($companystatic->name, 16)) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("Code_tiers") . '"' . $sep;
|
|
||||||
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
|
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
|
||||||
print '"' . ($mt >= 0 ? price($mt) : '') . '"';
|
print '"' . ($mt >= 0 ? price($mt) : '') . '"';
|
||||||
}
|
}
|
||||||
@ -479,7 +477,7 @@ if ($action == 'export_csv') {
|
|||||||
$invoicestatic->type = $val["type"];
|
$invoicestatic->type = $val["type"];
|
||||||
$invoicestatic->description = html_entity_decode(dol_trunc($val["description"], 32));
|
$invoicestatic->description = html_entity_decode(dol_trunc($val["description"], 32));
|
||||||
|
|
||||||
$date = dol_print_date($db->jdate($val["date"]), 'day');
|
$date = dol_print_date($val["date"], 'day');
|
||||||
|
|
||||||
// Product / Service
|
// Product / Service
|
||||||
foreach ( $tabht[$key] as $k => $mt ) {
|
foreach ( $tabht[$key] as $k => $mt ) {
|
||||||
|
|||||||
@ -161,7 +161,7 @@ if ($result) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Invoice lines
|
// Invoice lines
|
||||||
$tabfac[$obj->rowid]["date"] = $obj->df;
|
$tabfac[$obj->rowid]["date"] = $db->jdate($obj->df);
|
||||||
$tabfac[$obj->rowid]["ref"] = $obj->facnumber;
|
$tabfac[$obj->rowid]["ref"] = $obj->facnumber;
|
||||||
$tabfac[$obj->rowid]["type"] = $obj->type;
|
$tabfac[$obj->rowid]["type"] = $obj->type;
|
||||||
$tabfac[$obj->rowid]["description"] = $obj->label_compte;
|
$tabfac[$obj->rowid]["description"] = $obj->label_compte;
|
||||||
@ -207,7 +207,7 @@ if ($action == 'writebookkeeping') {
|
|||||||
$companystatic->client = $tabcompany[$key]['code_client'];
|
$companystatic->client = $tabcompany[$key]['code_client'];
|
||||||
|
|
||||||
$invoicestatic->id = $key;
|
$invoicestatic->id = $key;
|
||||||
$invoicestatic->ref = $val["ref"];
|
$invoicestatic->ref = (string) $val["ref"];
|
||||||
|
|
||||||
foreach ( $tabttc[$key] as $k => $mt ) {
|
foreach ( $tabttc[$key] as $k => $mt ) {
|
||||||
$bookkeeping = new BookKeeping($db);
|
$bookkeeping = new BookKeeping($db);
|
||||||
@ -220,7 +220,7 @@ if ($action == 'writebookkeeping') {
|
|||||||
$bookkeeping->code_tiers = $tabcompany[$key]['code_client'];
|
$bookkeeping->code_tiers = $tabcompany[$key]['code_client'];
|
||||||
$bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER;
|
$bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER;
|
||||||
// $bookkeeping->label_compte = $tabcompany[$key]['name'];
|
// $bookkeeping->label_compte = $tabcompany[$key]['name'];
|
||||||
$bookkeeping->label_compte = utf8_decode(dol_trunc($companystatic->name, 16)) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("Code_tiers");
|
$bookkeeping->label_compte = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("Code_tiers");
|
||||||
$bookkeeping->montant = $mt;
|
$bookkeeping->montant = $mt;
|
||||||
$bookkeeping->sens = ($mt >= 0) ? 'D' : 'C';
|
$bookkeeping->sens = ($mt >= 0) ? 'D' : 'C';
|
||||||
$bookkeeping->debit = ($mt >= 0) ? $mt : 0;
|
$bookkeeping->debit = ($mt >= 0) ? $mt : 0;
|
||||||
@ -250,7 +250,7 @@ if ($action == 'writebookkeeping') {
|
|||||||
$bookkeeping->fk_docdet = $val["fk_facturedet"];
|
$bookkeeping->fk_docdet = $val["fk_facturedet"];
|
||||||
$bookkeeping->code_tiers = '';
|
$bookkeeping->code_tiers = '';
|
||||||
$bookkeeping->numero_compte = $k;
|
$bookkeeping->numero_compte = $k;
|
||||||
$bookkeeping->label_compte = utf8_decode(dol_trunc($companystatic->name, 16)) . ' - ' . $invoicestatic->ref . ' - ' . utf8_decode($accountingaccount->label);
|
$bookkeeping->label_compte = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref . ' - ' . $accountingaccount->label;
|
||||||
$bookkeeping->montant = $mt;
|
$bookkeeping->montant = $mt;
|
||||||
$bookkeeping->sens = ($mt < 0) ? 'D' : 'C';
|
$bookkeeping->sens = ($mt < 0) ? 'D' : 'C';
|
||||||
$bookkeeping->debit = ($mt < 0) ? $mt : 0;
|
$bookkeeping->debit = ($mt < 0) ? $mt : 0;
|
||||||
@ -280,7 +280,7 @@ if ($action == 'writebookkeeping') {
|
|||||||
$bookkeeping->fk_docdet = $val["fk_facturedet"];
|
$bookkeeping->fk_docdet = $val["fk_facturedet"];
|
||||||
$bookkeeping->code_tiers = '';
|
$bookkeeping->code_tiers = '';
|
||||||
$bookkeeping->numero_compte = $k;
|
$bookkeeping->numero_compte = $k;
|
||||||
$bookkeeping->label_compte = utf8_decode(dol_trunc($companystatic->name, 16)) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("VAT").' '.$def_tva[$key];
|
$bookkeeping->label_compte = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("VAT").' '.$def_tva[$key];
|
||||||
$bookkeeping->montant = $mt;
|
$bookkeeping->montant = $mt;
|
||||||
$bookkeeping->sens = ($mt < 0) ? 'D' : 'C';
|
$bookkeeping->sens = ($mt < 0) ? 'D' : 'C';
|
||||||
$bookkeeping->debit = ($mt < 0) ? $mt : 0;
|
$bookkeeping->debit = ($mt < 0) ? $mt : 0;
|
||||||
@ -324,7 +324,7 @@ if ($action == 'export_csv') {
|
|||||||
$invoicestatic->id = $key;
|
$invoicestatic->id = $key;
|
||||||
$invoicestatic->ref = $val["ref"];
|
$invoicestatic->ref = $val["ref"];
|
||||||
|
|
||||||
$date = dol_print_date($db->jdate($val["date"]), '%d%m%Y');
|
$date = dol_print_date($val["date"], '%d%m%Y');
|
||||||
|
|
||||||
foreach ( $tabttc[$key] as $k => $mt ) {
|
foreach ( $tabttc[$key] as $k => $mt ) {
|
||||||
print $date . $sep;
|
print $date . $sep;
|
||||||
@ -333,8 +333,7 @@ if ($action == 'export_csv') {
|
|||||||
print length_accounta(html_entity_decode($k)) . $sep;
|
print length_accounta(html_entity_decode($k)) . $sep;
|
||||||
print ($mt < 0 ? 'C' : 'D') . $sep;
|
print ($mt < 0 ? 'C' : 'D') . $sep;
|
||||||
print ($mt <= 0 ? price(- $mt) : $mt) . $sep;
|
print ($mt <= 0 ? price(- $mt) : $mt) . $sep;
|
||||||
print utf8_decode(dol_trunc($companystatic->name, 16)) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("Code_tiers") . $sep;
|
print dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("Code_tiers") . $sep;
|
||||||
// print utf8_decode($companystatic->name) . $sep;
|
|
||||||
print $val["ref"];
|
print $val["ref"];
|
||||||
print "\n";
|
print "\n";
|
||||||
}
|
}
|
||||||
@ -349,8 +348,7 @@ if ($action == 'export_csv') {
|
|||||||
print $sep;
|
print $sep;
|
||||||
print ($mt < 0 ? 'D' : 'C') . $sep;
|
print ($mt < 0 ? 'D' : 'C') . $sep;
|
||||||
print ($mt <= 0 ? price(- $mt) : $mt) . $sep;
|
print ($mt <= 0 ? price(- $mt) : $mt) . $sep;
|
||||||
print utf8_decode(dol_trunc($companystatic->name, 16)) . ' - ' . $invoicestatic->ref . ' - ' . utf8_decode(utf8_decode($accountingaccount_static->label)) . $sep;
|
print dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref . ' - ' . $accountingaccount_static->label . $sep;
|
||||||
// print dol_trunc($accountingaccount_static->label, 32) . $sep;
|
|
||||||
print $val["ref"];
|
print $val["ref"];
|
||||||
print "\n";
|
print "\n";
|
||||||
}
|
}
|
||||||
@ -365,7 +363,7 @@ if ($action == 'export_csv') {
|
|||||||
print $sep;
|
print $sep;
|
||||||
print ($mt < 0 ? 'D' : 'C') . $sep;
|
print ($mt < 0 ? 'D' : 'C') . $sep;
|
||||||
print ($mt <= 0 ? price(- $mt) : $mt) . $sep;
|
print ($mt <= 0 ? price(- $mt) : $mt) . $sep;
|
||||||
print utf8_decode(dol_trunc($companystatic->name, 16)) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("VAT") . $sep;
|
print dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("VAT") . $sep;
|
||||||
// print $langs->trans("VAT") . $sep;
|
// print $langs->trans("VAT") . $sep;
|
||||||
print $val["ref"];
|
print $val["ref"];
|
||||||
print "\n";
|
print "\n";
|
||||||
@ -382,14 +380,13 @@ if ($action == 'export_csv') {
|
|||||||
$invoicestatic->id = $key;
|
$invoicestatic->id = $key;
|
||||||
$invoicestatic->ref = $val["ref"];
|
$invoicestatic->ref = $val["ref"];
|
||||||
|
|
||||||
$date = dol_print_date($db->jdate($val["date"]), 'day');
|
$date = dol_print_date($val["date"], 'day');
|
||||||
|
|
||||||
foreach ( $tabttc[$key] as $k => $mt ) {
|
foreach ( $tabttc[$key] as $k => $mt ) {
|
||||||
print '"' . $date . '"' . $sep;
|
print '"' . $date . '"' . $sep;
|
||||||
print '"' . $val["ref"] . '"' . $sep;
|
print '"' . $val["ref"] . '"' . $sep;
|
||||||
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
|
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
|
||||||
print '"' . utf8_decode(dol_trunc($companystatic->name, 16)) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("Code_tiers") . '"' . $sep;
|
print '"' . dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("Code_tiers") . '"' . $sep;
|
||||||
// print '"' . utf8_decode($companystatic->name) . '"' . $sep;
|
|
||||||
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
|
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
|
||||||
print '"' . ($mt < 0 ? price(- $mt) : '') . '"';
|
print '"' . ($mt < 0 ? price(- $mt) : '') . '"';
|
||||||
print "\n";
|
print "\n";
|
||||||
@ -404,8 +401,7 @@ if ($action == 'export_csv') {
|
|||||||
print '"' . $date . '"' . $sep;
|
print '"' . $date . '"' . $sep;
|
||||||
print '"' . $val["ref"] . '"' . $sep;
|
print '"' . $val["ref"] . '"' . $sep;
|
||||||
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
|
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
|
||||||
print '"' . utf8_decode(dol_trunc($companystatic->name, 16)) . ' - ' . utf8_decode(dol_trunc($accountingaccount->label, 32)) . '"' . $sep;
|
print '"' . dol_trunc($companystatic->name, 16) . ' - ' . dol_trunc($accountingaccount->label, 32) . '"' . $sep;
|
||||||
// print '"' . dol_trunc($accountingaccount->label, 32) . '"' . $sep;
|
|
||||||
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
|
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
|
||||||
print '"' . ($mt >= 0 ? price($mt) : '') . '"';
|
print '"' . ($mt >= 0 ? price($mt) : '') . '"';
|
||||||
print "\n";
|
print "\n";
|
||||||
@ -418,8 +414,7 @@ if ($action == 'export_csv') {
|
|||||||
print '"' . $date . '"' . $sep;
|
print '"' . $date . '"' . $sep;
|
||||||
print '"' . $val["ref"] . '"' . $sep;
|
print '"' . $val["ref"] . '"' . $sep;
|
||||||
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
|
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
|
||||||
print '"' . utf8_decode(dol_trunc($companystatic->name, 16)) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("VAT") . '"' . $sep;
|
print '"' . dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("VAT") . '"' . $sep;
|
||||||
// print '"' . $langs->trans("VAT") . '"' . $sep;
|
|
||||||
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
|
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
|
||||||
print '"' . ($mt >= 0 ? price($mt) : '') . '"';
|
print '"' . ($mt >= 0 ? price($mt) : '') . '"';
|
||||||
print "\n";
|
print "\n";
|
||||||
@ -497,7 +492,7 @@ if ($action == 'export_csv') {
|
|||||||
$invoicestatic->ref = $val["ref"];
|
$invoicestatic->ref = $val["ref"];
|
||||||
$invoicestatic->type = $val["type"];
|
$invoicestatic->type = $val["type"];
|
||||||
|
|
||||||
$date = dol_print_date($db->jdate($val["date"]), 'day');
|
$date = dol_print_date($val["date"], 'day');
|
||||||
|
|
||||||
// Third party
|
// Third party
|
||||||
foreach ( $tabttc[$key] as $k => $mt ) {
|
foreach ( $tabttc[$key] as $k => $mt ) {
|
||||||
@ -527,7 +522,7 @@ if ($action == 'export_csv') {
|
|||||||
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
|
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
|
||||||
print "<td>" . length_accountg($k) . "</td>";
|
print "<td>" . length_accountg($k) . "</td>";
|
||||||
// print "<td>" . $accountingaccount->label . "</td>";
|
// print "<td>" . $accountingaccount->label . "</td>";
|
||||||
print "<td>" . $companystatic->getNomUrl(0, 'customer', 16) . ' - ' . $invoicestatic->ref . ' - ' . utf8_decode(utf8_decode($accountingaccount->label)) . "</td>";
|
print "<td>" . $companystatic->getNomUrl(0, 'customer', 16) . ' - ' . $invoicestatic->ref . ' - ' . $accountingaccount->label . "</td>";
|
||||||
print "<td align='right'>" . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
print "<td align='right'>" . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||||
print "<td align='right'>" . ($mt >= 0 ? price($mt) : '') . "</td>";
|
print "<td align='right'>" . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
|||||||
@ -53,7 +53,7 @@ if ($year == 0) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($cat_id == 0){
|
if($cat_id == 0){
|
||||||
$cat_id = null;
|
$cat_id = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
@ -76,31 +76,31 @@ $textprevyear = '<a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_current -
|
|||||||
$textnextyear = ' <a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_current + 1) . '">' . img_next() . '</a>';
|
$textnextyear = ' <a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_current + 1) . '">' . img_next() . '</a>';
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans('ReportInOut') . " " . $textprevyear . " " . $langs->trans("Year") . " " . $year_start . " " . $textnextyear);
|
print load_fiche_titre($langs->trans('ReportInOut') . " " . $textprevyear . " " . $langs->trans("Year") . " " . $year_start . " " . $textnextyear);
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
$months = array( $langs->trans("JanuaryMin"),
|
$months = array( $langs->trans("JanuaryMin"),
|
||||||
$langs->trans("FebruaryMin"),
|
$langs->trans("FebruaryMin"),
|
||||||
$langs->trans("MarchMin"),
|
$langs->trans("MarchMin"),
|
||||||
$langs->trans("AprilMin"),
|
$langs->trans("AprilMin"),
|
||||||
$langs->trans("MayMin"),
|
$langs->trans("MayMin"),
|
||||||
$langs->trans("JuneMin"),
|
$langs->trans("JuneMin"),
|
||||||
$langs->trans("JulyMin"),
|
$langs->trans("JulyMin"),
|
||||||
$langs->trans("AugustMin"),
|
$langs->trans("AugustMin"),
|
||||||
$langs->trans("SeptemberMin"),
|
$langs->trans("SeptemberMin"),
|
||||||
$langs->trans("OctoberMin"),
|
$langs->trans("OctoberMin"),
|
||||||
$langs->trans("NovemberMin"),
|
$langs->trans("NovemberMin"),
|
||||||
$langs->trans("DecemberMin"),
|
$langs->trans("DecemberMin"),
|
||||||
);
|
);
|
||||||
|
|
||||||
print '<tr class="liste_titre"><th class="liste_titre">'.$langs->trans("Account").'</th>';
|
print '<tr class="liste_titre"><th class="liste_titre">'.$langs->trans("Account").'</th>';
|
||||||
print '<th class="liste_titre">'.$langs->trans("Description").'</th>';
|
print '<th class="liste_titre">'.$langs->trans("Description").'</th>';
|
||||||
print '<th class="liste_titre" align="center">N-1</th>';
|
print '<th class="liste_titre" align="center">N-1</th>';
|
||||||
print '<th class="liste_titre" align="center">'.$langs->trans("NReal").'</th>';
|
print '<th class="liste_titre" align="center">'.$langs->trans("NReal").'</th>';
|
||||||
foreach($months as $k => $v){
|
foreach($months as $k => $v){
|
||||||
print '<th class="liste_titre" align="center">'.$langs->trans($v).'</th>';
|
print '<th class="liste_titre" align="center">'.$langs->trans($v).'</th>';
|
||||||
}
|
}
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
$cats = $AccCat->getCatsCpts();
|
$cats = $AccCat->getCatsCpts();
|
||||||
$catsCalcule = $AccCat->getCatsCal();
|
$catsCalcule = $AccCat->getCatsCal();
|
||||||
@ -123,22 +123,41 @@ if(!empty($cats))
|
|||||||
$position = $cpt['position'];
|
$position = $cpt['position'];
|
||||||
$code = $cpt['code'];
|
$code = $cpt['code'];
|
||||||
|
|
||||||
$resultNP = $AccCat->getResult($cpt['account_number'], 0, $year_current -1, $cpt['dc']);
|
$return = $AccCat->getResult($cpt['account_number'], 0, $year_current -1, $cpt['dc']);
|
||||||
$resultN = $AccCat->getResult($cpt['account_number'], 0, $year_current, $cpt['dc']);
|
if ($return < 0) {
|
||||||
|
setEventMessages(null, $AccCat->errors, 'errors');
|
||||||
|
$resultNP=0;
|
||||||
|
} else {
|
||||||
|
$resultNP=$AccCat->sdc;
|
||||||
|
}
|
||||||
|
|
||||||
|
$return = $AccCat->getResult($cpt['account_number'], 0, $year_current, $cpt['dc']);
|
||||||
|
if ($return < 0) {
|
||||||
|
setEventMessages(null, $AccCat->errors, 'errors');
|
||||||
|
$resultN=0;
|
||||||
|
} else {
|
||||||
|
$resultN=$AccCat->sdc;
|
||||||
|
}
|
||||||
$sommes[$code]['NP'] += $resultNP;
|
$sommes[$code]['NP'] += $resultNP;
|
||||||
$sommes[$code]['N'] += $resultN;
|
$sommes[$code]['N'] += $resultN;
|
||||||
print '<tr'. $bc[$var].'>';
|
print '<tr'. $bc[$var].'>';
|
||||||
print '<td>' . $cpt['account_number'] . '</td>';
|
print '<td>' . $cpt['account_number'] . '</td>';
|
||||||
print '<td>' . $cpt['name_cpt'] . '</td>';
|
print '<td>' . $cpt['name_cpt'] . '</td>';
|
||||||
print '<td>' . price($resultNP) . '</td>';
|
print '<td>' . price($resultNP) . '</td>';
|
||||||
print '<td>' . price($resultN) . '</td>';
|
print '<td>' . price($resultN) . '</td>';
|
||||||
|
|
||||||
foreach($months as $k => $v){
|
foreach($months as $k => $v){
|
||||||
$resultM = $AccCat->getResult($cpt['account_number'], $k+1, $year_current, $cpt['dc']);
|
$return = $AccCat->getResult($cpt['account_number'], $k+1, $year_current, $cpt['dc']);
|
||||||
|
if ($return < 0) {
|
||||||
|
setEventMessages(null, $AccCat->errors, 'errors');
|
||||||
|
$resultM=0;
|
||||||
|
} else {
|
||||||
|
$resultM=$AccCat->sdc;
|
||||||
|
}
|
||||||
$sommes[$code]['M'][$k] += $resultM;
|
$sommes[$code]['M'][$k] += $resultM;
|
||||||
print '<td align="right">' . price($resultM) . '</td>';
|
print '<td align="right">' . price($resultM) . '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -168,9 +187,9 @@ if(!empty($cats))
|
|||||||
}
|
}
|
||||||
$result = strtr($formula, $vars);
|
$result = strtr($formula, $vars);
|
||||||
eval( '$result = (' . $result . ');' );
|
eval( '$result = (' . $result . ');' );
|
||||||
print '<td align="right">' . price($result) . '</td>';
|
print '<td align="right">' . price($result) . '</td>';
|
||||||
$sommes[$code]['N'] += $result;
|
$sommes[$code]['N'] += $result;
|
||||||
|
|
||||||
// Detail by month
|
// Detail by month
|
||||||
foreach($months as $k => $v){
|
foreach($months as $k => $v){
|
||||||
foreach($sommes as $code => $det){
|
foreach($sommes as $code => $det){
|
||||||
@ -181,14 +200,14 @@ if(!empty($cats))
|
|||||||
print '<td align="right">' . price($result) . '</td>';
|
print '<td align="right">' . price($result) . '</td>';
|
||||||
$sommes[$code]['M'][$k] += $result;
|
$sommes[$code]['M'][$k] += $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
//print '<td colspan="15">' . $catsCalcule[$p]['formula'] . '</td>';
|
//print '<td colspan="15">' . $catsCalcule[$p]['formula'] . '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
unset($catsCalcule[$p]); // j'élimine la catégorie calculée après affichage
|
unset($catsCalcule[$p]); // j'élimine la catégorie calculée après affichage
|
||||||
}
|
}
|
||||||
$j++;
|
$j++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Others calculed category
|
// Others calculed category
|
||||||
foreach($catsCalcule as $p => $catc)
|
foreach($catsCalcule as $p => $catc)
|
||||||
{
|
{
|
||||||
@ -215,7 +234,7 @@ if(!empty($cats))
|
|||||||
}
|
}
|
||||||
$result = strtr($formula, $vars);
|
$result = strtr($formula, $vars);
|
||||||
eval( '$result = (' . $result . ');' );
|
eval( '$result = (' . $result . ');' );
|
||||||
print '<td align="right">' . price($result) . '</td>';
|
print '<td align="right">' . price($result) . '</td>';
|
||||||
$sommes[$code]['N'] += $result;
|
$sommes[$code]['N'] += $result;
|
||||||
|
|
||||||
// Detail by month
|
// Detail by month
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
/* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
|
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -16,12 +17,12 @@
|
|||||||
*/
|
*/
|
||||||
$prefix = $conf->global->ACCOUNTING_EXPORT_PREFIX_SPEC;
|
$prefix = $conf->global->ACCOUNTING_EXPORT_PREFIX_SPEC;
|
||||||
$format = $conf->global->ACCOUNTING_EXPORT_FORMAT;
|
$format = $conf->global->ACCOUNTING_EXPORT_FORMAT;
|
||||||
|
$nodateexport = $conf->global->ACCOUNTING_EXPORT_NO_DATE_IN_FILENAME;
|
||||||
|
|
||||||
$date_export = dol_print_date($now, '%Y%m%d%H%M%S');
|
$date_export = dol_print_date($now, '%Y%m%d%H%M%S');
|
||||||
|
|
||||||
header('Content-Type: text/csv');
|
header('Content-Type: text/csv');
|
||||||
if ($prefix)
|
|
||||||
$filename = $prefix . "_" . "journal_" . $journal . $date_export . "." . $format;
|
$filename = ($prefix?$prefix . "_":""). "journal_" . $journal . ($nodateexport?"":$date_export) . "." . $format;
|
||||||
else
|
|
||||||
$filename = "journal_" . $journal . $date_export . "." . $format;
|
header('Content-Disposition: attachment;filename=' . $filename);
|
||||||
header('Content-Disposition: attachment;filename=' . $filename);
|
|
||||||
|
|||||||
@ -404,11 +404,7 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($object->error) {
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
|
||||||
} else {
|
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
|
||||||
}
|
|
||||||
$action='';
|
$action='';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -554,7 +550,7 @@ if (empty($reshook))
|
|||||||
$result=$object->create($user);
|
$result=$object->create($user);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
// Fundation categories
|
// Foundation categories
|
||||||
$memcats = GETPOST('memcats', 'array');
|
$memcats = GETPOST('memcats', 'array');
|
||||||
$object->setCategories($memcats);
|
$object->setCategories($memcats);
|
||||||
|
|
||||||
@ -864,7 +860,7 @@ else
|
|||||||
|
|
||||||
// Address
|
// Address
|
||||||
print '<tr><td valign="top">'.$langs->trans("Address").'</td><td>';
|
print '<tr><td valign="top">'.$langs->trans("Address").'</td><td>';
|
||||||
print '<textarea name="address" wrap="soft" cols="40" rows="2">'.(GETPOST('address','alpha')?GETPOST('address','alpha'):$object->address).'</textarea>';
|
print '<textarea name="address" wrap="soft" class="quatrevingtpercent" rows="2">'.(GETPOST('address','alpha')?GETPOST('address','alpha'):$object->address).'</textarea>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Zip / Town
|
// Zip / Town
|
||||||
@ -1125,7 +1121,7 @@ else
|
|||||||
|
|
||||||
// Address
|
// Address
|
||||||
print '<tr><td>'.$langs->trans("Address").'</td><td>';
|
print '<tr><td>'.$langs->trans("Address").'</td><td>';
|
||||||
print '<textarea name="address" wrap="soft" cols="40" rows="2">'.(isset($_POST["address"])?$_POST["address"]:$object->address).'</textarea>';
|
print '<textarea name="address" wrap="soft" class="quatrevingtpercent" rows="2">'.(isset($_POST["address"])?$_POST["address"]:$object->address).'</textarea>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Zip / Town
|
// Zip / Town
|
||||||
@ -1443,6 +1439,12 @@ else
|
|||||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("Password").'</td><td>'.preg_replace('/./i','*',$object->pass);
|
print '<tr><td>'.$langs->trans("Password").'</td><td>'.preg_replace('/./i','*',$object->pass);
|
||||||
|
if ($object->pass) print preg_replace('/./i','*',$object->pass);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ($user->admin) print $langs->trans("Crypted").': '.$object->pass_indatabase_crypted;
|
||||||
|
else print $langs->trans("Hidden");
|
||||||
|
}
|
||||||
if ((! empty($object->pass) || ! empty($object->pass_crypted)) && empty($object->user_id))
|
if ((! empty($object->pass) || ! empty($object->pass_crypted)) && empty($object->user_id))
|
||||||
{
|
{
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
@ -1451,7 +1453,7 @@ else
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
@ -1483,6 +1485,30 @@ else
|
|||||||
print $object->showOptionals($extrafields, 'view', $parameters);
|
print $object->showOptionals($extrafields, 'view', $parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Date end subscription
|
||||||
|
print '<tr><td>'.$langs->trans("SubscriptionEndDate").'</td><td class="valeur">';
|
||||||
|
if ($object->datefin)
|
||||||
|
{
|
||||||
|
print dol_print_date($object->datefin,'day');
|
||||||
|
if ($object->hasDelay()) {
|
||||||
|
print " ".img_warning($langs->trans("Late"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (! $adht->cotisation)
|
||||||
|
{
|
||||||
|
print $langs->trans("SubscriptionNotRecorded");
|
||||||
|
if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // displays delay Pictogram only if not a draft and not terminated
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print $langs->trans("SubscriptionNotReceived");
|
||||||
|
if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // displays delay Pictogram only if not a draft and not terminated
|
||||||
|
}
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
// Third party Dolibarr
|
// Third party Dolibarr
|
||||||
if (! empty($conf->societe->enabled))
|
if (! empty($conf->societe->enabled))
|
||||||
{
|
{
|
||||||
@ -1553,30 +1579,6 @@ else
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Date end subscription
|
|
||||||
print '<tr><td>'.$langs->trans("SubscriptionEndDate").'</td><td class="valeur">';
|
|
||||||
if ($object->datefin)
|
|
||||||
{
|
|
||||||
print dol_print_date($object->datefin,'day');
|
|
||||||
if ($object->hasDelay()) {
|
|
||||||
print " ".img_warning($langs->trans("Late"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (! $adht->cotisation)
|
|
||||||
{
|
|
||||||
print $langs->trans("SubscriptionNotRecorded");
|
|
||||||
if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print $langs->trans("SubscriptionNotReceived");
|
|
||||||
if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie
|
|
||||||
}
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
|
||||||
print "</div></div></div>\n";
|
print "</div></div></div>\n";
|
||||||
|
|||||||
@ -53,6 +53,10 @@ $result=restrictedArea($user,'adherent',$rowid,'','cotisation');
|
|||||||
$object = new Adherent($db);
|
$object = new Adherent($db);
|
||||||
$extrafields = new ExtraFields($db);
|
$extrafields = new ExtraFields($db);
|
||||||
$adht = new AdherentType($db);
|
$adht = new AdherentType($db);
|
||||||
|
|
||||||
|
// fetch optionals attributes and labels
|
||||||
|
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
|
||||||
|
|
||||||
$errmsg='';
|
$errmsg='';
|
||||||
$errmsgs=array();
|
$errmsgs=array();
|
||||||
|
|
||||||
@ -379,6 +383,13 @@ if ($user->rights->adherent->cotisation->creer && $action == 'cotisation' && ! $
|
|||||||
$invoice->socid=$object->fk_soc;
|
$invoice->socid=$object->fk_soc;
|
||||||
$invoice->date=$datecotisation;
|
$invoice->date=$datecotisation;
|
||||||
|
|
||||||
|
// Possibility to add external linked objects with hooks
|
||||||
|
$invoice->linked_objects['subscription'] = $crowid;
|
||||||
|
if (! empty($_POST['other_linked_objects']) && is_array($_POST['other_linked_objects']))
|
||||||
|
{
|
||||||
|
$invoice->linked_objects = array_merge($invoice->linked_objects, $_POST['other_linked_objects']);
|
||||||
|
}
|
||||||
|
|
||||||
$result=$invoice->create($user);
|
$result=$invoice->create($user);
|
||||||
if ($result <= 0)
|
if ($result <= 0)
|
||||||
{
|
{
|
||||||
@ -641,6 +652,30 @@ if ($rowid > 0)
|
|||||||
print $object->showOptionals($extrafields, 'view', $parameters);
|
print $object->showOptionals($extrafields, 'view', $parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Date end subscription
|
||||||
|
print '<tr><td>'.$langs->trans("SubscriptionEndDate").'</td><td class="valeur">';
|
||||||
|
if ($object->datefin)
|
||||||
|
{
|
||||||
|
print dol_print_date($object->datefin,'day');
|
||||||
|
if ($object->hasDelay()) {
|
||||||
|
print " ".img_warning($langs->trans("Late"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (! $adht->cotisation)
|
||||||
|
{
|
||||||
|
print $langs->trans("SubscriptionNotRecorded");
|
||||||
|
if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print $langs->trans("SubscriptionNotReceived");
|
||||||
|
if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie
|
||||||
|
}
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
// Third party Dolibarr
|
// Third party Dolibarr
|
||||||
if (! empty($conf->societe->enabled))
|
if (! empty($conf->societe->enabled))
|
||||||
{
|
{
|
||||||
@ -711,30 +746,6 @@ if ($rowid > 0)
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Date end subscription
|
|
||||||
print '<tr><td>'.$langs->trans("SubscriptionEndDate").'</td><td class="valeur">';
|
|
||||||
if ($object->datefin)
|
|
||||||
{
|
|
||||||
print dol_print_date($object->datefin,'day');
|
|
||||||
if ($object->hasDelay()) {
|
|
||||||
print " ".img_warning($langs->trans("Late"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (! $adht->cotisation)
|
|
||||||
{
|
|
||||||
print $langs->trans("SubscriptionNotRecorded");
|
|
||||||
if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print $langs->trans("SubscriptionNotReceived");
|
|
||||||
if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie
|
|
||||||
}
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
|
||||||
print "</div></div></div>\n";
|
print "</div></div></div>\n";
|
||||||
|
|||||||
@ -47,8 +47,15 @@ class Adherent extends CommonObject
|
|||||||
var $mesgs;
|
var $mesgs;
|
||||||
|
|
||||||
var $login;
|
var $login;
|
||||||
var $pass;
|
|
||||||
var $societe;
|
//! Clear password in memory
|
||||||
|
var $pass;
|
||||||
|
//! Clear password in database (defined if DATABASE_PWD_ENCRYPTED=0)
|
||||||
|
var $pass_indatabase;
|
||||||
|
//! Encrypted password in database (always defined)
|
||||||
|
var $pass_indatabase_crypted;
|
||||||
|
|
||||||
|
var $societe;
|
||||||
var $company;
|
var $company;
|
||||||
var $address;
|
var $address;
|
||||||
var $zip;
|
var $zip;
|
||||||
@ -309,7 +316,7 @@ class Adherent extends CommonObject
|
|||||||
if ($id > 0)
|
if ($id > 0)
|
||||||
{
|
{
|
||||||
$this->id=$id;
|
$this->id=$id;
|
||||||
$this->ref=$id;
|
$this->ref=(string) $id;
|
||||||
|
|
||||||
// Update minor fields
|
// Update minor fields
|
||||||
$result=$this->update($user,1,1,0,0,'add'); // nosync is 1 to avoid update data of user
|
$result=$this->update($user,1,1,0,0,'add'); // nosync is 1 to avoid update data of user
|
||||||
@ -482,8 +489,10 @@ class Adherent extends CommonObject
|
|||||||
dol_syslog(get_class($this)."::update update password");
|
dol_syslog(get_class($this)."::update update password");
|
||||||
if ($this->pass != $this->pass_indatabase && $this->pass != $this->pass_indatabase_crypted)
|
if ($this->pass != $this->pass_indatabase && $this->pass != $this->pass_indatabase_crypted)
|
||||||
{
|
{
|
||||||
// Si mot de passe saisi et different de celui en base
|
$isencrypted = empty($conf->global->DATABASE_PWD_ENCRYPTED)?0:1;
|
||||||
$result=$this->setPassword($user,$this->pass,0,$notrigger,$nosyncuserpass);
|
|
||||||
|
// If password to set differs from the one found into database
|
||||||
|
$result=$this->setPassword($user,$this->pass,$isencrypted,$notrigger,$nosyncuserpass);
|
||||||
if (! $nbrowsaffected) $nbrowsaffected++;
|
if (! $nbrowsaffected) $nbrowsaffected++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -509,7 +518,7 @@ class Adherent extends CommonObject
|
|||||||
if (! $error && $nbrowsaffected) // If something has change in main data
|
if (! $error && $nbrowsaffected) // If something has change in main data
|
||||||
{
|
{
|
||||||
// Update information on linked user if it is an update
|
// Update information on linked user if it is an update
|
||||||
if ($this->user_id > 0 && ! $nosyncuser)
|
if (! $error && $this->user_id > 0 && ! $nosyncuser)
|
||||||
{
|
{
|
||||||
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
||||||
|
|
||||||
@ -552,7 +561,7 @@ class Adherent extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update information on linked thirdparty if it is an update
|
// Update information on linked thirdparty if it is an update
|
||||||
if ($this->fk_soc > 0 && ! $nosyncthirdparty)
|
if (! $error && $this->fk_soc > 0 && ! $nosyncthirdparty)
|
||||||
{
|
{
|
||||||
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||||
|
|
||||||
@ -810,13 +819,11 @@ class Adherent extends CommonObject
|
|||||||
$password=getRandomPassword(false);
|
$password=getRandomPassword(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cryptage mot de passe
|
// Crypt password
|
||||||
if ($isencrypted)
|
$password_crypted = dol_hash($password);
|
||||||
{
|
|
||||||
// Encryption
|
$password_indatabase = '';
|
||||||
$password_indatabase = dol_hash($password);
|
if (! $isencrypted)
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
$password_indatabase = $password;
|
$password_indatabase = $password;
|
||||||
}
|
}
|
||||||
@ -824,7 +831,17 @@ class Adherent extends CommonObject
|
|||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
// Mise a jour
|
// Mise a jour
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET pass = '".$this->db->escape($password_indatabase)."'";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent";
|
||||||
|
$sql.= " SET pass_crypted = '".$this->db->escape($password_crypted)."'";
|
||||||
|
//if (! empty($conf->global->DATABASE_PWD_ENCRYPTED))
|
||||||
|
if ($isencrypted)
|
||||||
|
{
|
||||||
|
$sql.= ", pass = null";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$sql.= ", pass = '".$this->db->escape($password_indatabase)."'";
|
||||||
|
}
|
||||||
$sql.= " WHERE rowid = ".$this->id;
|
$sql.= " WHERE rowid = ".$this->id;
|
||||||
|
|
||||||
//dol_syslog("Adherent::Password sql=hidden");
|
//dol_syslog("Adherent::Password sql=hidden");
|
||||||
@ -838,7 +855,8 @@ class Adherent extends CommonObject
|
|||||||
{
|
{
|
||||||
$this->pass=$password;
|
$this->pass=$password;
|
||||||
$this->pass_indatabase=$password_indatabase;
|
$this->pass_indatabase=$password_indatabase;
|
||||||
|
$this->pass_indatabase_crypted=$password_crypted;
|
||||||
|
|
||||||
if ($this->user_id && ! $nosyncuser)
|
if ($this->user_id && ! $nosyncuser)
|
||||||
{
|
{
|
||||||
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
||||||
@ -1042,7 +1060,7 @@ class Adherent extends CommonObject
|
|||||||
|
|
||||||
$sql = "SELECT d.rowid, d.ref_ext, d.civility as civility_id, d.firstname, d.lastname, d.societe as company, d.fk_soc, d.statut, d.public, d.address, d.zip, d.town, d.note_private,";
|
$sql = "SELECT d.rowid, d.ref_ext, d.civility as civility_id, d.firstname, d.lastname, d.societe as company, d.fk_soc, d.statut, d.public, d.address, d.zip, d.town, d.note_private,";
|
||||||
$sql.= " d.note_public,";
|
$sql.= " d.note_public,";
|
||||||
$sql.= " d.email, d.skype, d.phone, d.phone_perso, d.phone_mobile, d.login, d.pass,";
|
$sql.= " d.email, d.skype, d.phone, d.phone_perso, d.phone_mobile, d.login, d.pass, d.pass_crypted,";
|
||||||
$sql.= " d.photo, d.fk_adherent_type, d.morphy, d.entity,";
|
$sql.= " d.photo, d.fk_adherent_type, d.morphy, d.entity,";
|
||||||
$sql.= " d.datec as datec,";
|
$sql.= " d.datec as datec,";
|
||||||
$sql.= " d.tms as datem,";
|
$sql.= " d.tms as datem,";
|
||||||
@ -1087,7 +1105,6 @@ class Adherent extends CommonObject
|
|||||||
$this->firstname = $obj->firstname;
|
$this->firstname = $obj->firstname;
|
||||||
$this->lastname = $obj->lastname;
|
$this->lastname = $obj->lastname;
|
||||||
$this->login = $obj->login;
|
$this->login = $obj->login;
|
||||||
$this->pass = $obj->pass;
|
|
||||||
$this->societe = $obj->company;
|
$this->societe = $obj->company;
|
||||||
$this->company = $obj->company;
|
$this->company = $obj->company;
|
||||||
$this->fk_soc = $obj->fk_soc;
|
$this->fk_soc = $obj->fk_soc;
|
||||||
@ -1095,6 +1112,10 @@ class Adherent extends CommonObject
|
|||||||
$this->zip = $obj->zip;
|
$this->zip = $obj->zip;
|
||||||
$this->town = $obj->town;
|
$this->town = $obj->town;
|
||||||
|
|
||||||
|
$this->pass = $obj->pass;
|
||||||
|
$this->pass_indatabase = $obj->pass;
|
||||||
|
$this->pass_indatabase_crypted = $obj->pass_crypted;
|
||||||
|
|
||||||
$this->state_id = $obj->state_id;
|
$this->state_id = $obj->state_id;
|
||||||
$this->state_code = $obj->state_id?$obj->state_code:'';
|
$this->state_code = $obj->state_id?$obj->state_code:'';
|
||||||
$this->state = $obj->state_id?$obj->state:'';
|
$this->state = $obj->state_id?$obj->state:'';
|
||||||
@ -1423,9 +1444,10 @@ class Adherent extends CommonObject
|
|||||||
$err=0;
|
$err=0;
|
||||||
|
|
||||||
// mailman
|
// mailman
|
||||||
if (! empty($conf->global->ADHERENT_USE_MAILMAN))
|
if (! empty($conf->global->ADHERENT_USE_MAILMAN) && ! empty($conf->mailmanspip->enabled))
|
||||||
{
|
{
|
||||||
$result=$mailmanspip->add_to_mailman($this);
|
$result=$mailmanspip->add_to_mailman($this);
|
||||||
|
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
if (! empty($mailmanspip->error)) $this->errors[]=$mailmanspip->error;
|
if (! empty($mailmanspip->error)) $this->errors[]=$mailmanspip->error;
|
||||||
@ -1444,7 +1466,7 @@ class Adherent extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
// spip
|
// spip
|
||||||
if ($conf->global->ADHERENT_USE_SPIP && ! empty($conf->mailmanspip->enabled))
|
if (! empty($conf->global->ADHERENT_USE_SPIP) && ! empty($conf->mailmanspip->enabled))
|
||||||
{
|
{
|
||||||
$result=$mailmanspip->add_to_spip($this);
|
$result=$mailmanspip->add_to_spip($this);
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
@ -1458,7 +1480,7 @@ class Adherent extends CommonObject
|
|||||||
return -$err;
|
return -$err;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1556,6 +1578,7 @@ class Adherent extends CommonObject
|
|||||||
$label.= '<br><b>' . $langs->trans('Name') . ':</b> ' . $this->getFullName($langs);
|
$label.= '<br><b>' . $langs->trans('Name') . ':</b> ' . $this->getFullName($langs);
|
||||||
$linkclose = '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
$linkclose = '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||||
|
|
||||||
|
$link=''; $linkend='';
|
||||||
if ($option == 'card')
|
if ($option == 'card')
|
||||||
{
|
{
|
||||||
$link = '<a href="'.DOL_URL_ROOT.'/adherents/card.php?rowid='.$this->id.$linkclose;
|
$link = '<a href="'.DOL_URL_ROOT.'/adherents/card.php?rowid='.$this->id.$linkclose;
|
||||||
|
|||||||
@ -190,11 +190,12 @@ class Cotisation extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function delete($user)
|
function delete($user)
|
||||||
{
|
{
|
||||||
|
$accountline=new AccountLine($this->db);
|
||||||
|
|
||||||
// It subscription is linked to a bank transaction, we get it
|
// It subscription is linked to a bank transaction, we get it
|
||||||
if ($this->fk_bank)
|
if ($this->fk_bank > 0)
|
||||||
{
|
{
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
$accountline=new AccountLine($this->db);
|
|
||||||
$result=$accountline->fetch($this->fk_bank);
|
$result=$accountline->fetch($this->fk_bank);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -213,7 +214,7 @@ class Cotisation extends CommonObject
|
|||||||
$result=$member->fetch($this->fk_adherent);
|
$result=$member->fetch($this->fk_adherent);
|
||||||
$result=$member->update_end_date($user);
|
$result=$member->update_end_date($user);
|
||||||
|
|
||||||
if ($accountline->id > 0) // If we found bank account line (this means this->fk_bank defined)
|
if (is_object($accountline) && $accountline->id > 0) // If we found bank account line (this means this->fk_bank defined)
|
||||||
{
|
{
|
||||||
$result=$accountline->delete($user); // Return false if refused because line is conciliated
|
$result=$accountline->delete($user); // Return false if refused because line is conciliated
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
|
|||||||
@ -33,35 +33,49 @@ $langs->load("members");
|
|||||||
$langs->load("users");
|
$langs->load("users");
|
||||||
|
|
||||||
$adh = new Adherent($db);
|
$adh = new Adherent($db);
|
||||||
$subscription = new Cotisation($db);
|
$object = new Cotisation($db);
|
||||||
$errmsg='';
|
$errmsg='';
|
||||||
|
|
||||||
$action=isset($_GET["action"])?$_GET["action"]:$_POST["action"];
|
$action=GETPOST("action",'alpha');
|
||||||
$rowid=isset($_GET["rowid"])?$_GET["rowid"]:$_POST["rowid"];
|
$rowid=GETPOST("rowid","int")?GETPOST("rowid","int"):GETPOST("id","int");
|
||||||
$typeid=isset($_GET["typeid"])?$_GET["typeid"]:$_POST["typeid"];
|
$typeid=GETPOST("typeid","int");
|
||||||
|
$cancel=GETPOST('cancel');
|
||||||
|
|
||||||
if (! $user->rights->adherent->cotisation->lire)
|
if (! $user->rights->adherent->cotisation->lire)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
|
$permissionnote = $user->rights->adherent->cotisation->creer; // Used by the include of actions_setnotes.inc.php
|
||||||
|
$permissiondellink=$user->rights->adherent->cotisation->creer; // Used by the include of actions_dellink.inc.php
|
||||||
|
$permissiontoedit = $user->rights->adherent->cotisation->creer; // Used by the include of actions_lineupdonw.inc.php
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if ($cancel) $action='';
|
||||||
|
|
||||||
|
//include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once
|
||||||
|
|
||||||
|
include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include, not include_once
|
||||||
|
|
||||||
|
//include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once
|
||||||
|
|
||||||
|
|
||||||
if ($user->rights->adherent->cotisation->creer && $_REQUEST["action"] == 'update' && ! $_POST["cancel"])
|
if ($user->rights->adherent->cotisation->creer && $_REQUEST["action"] == 'update' && ! $_POST["cancel"])
|
||||||
{
|
{
|
||||||
// Charge objet actuel
|
// Charge objet actuel
|
||||||
$result=$subscription->fetch($_POST["rowid"]);
|
$result=$object->fetch($_POST["rowid"]);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
$errmsg='';
|
$errmsg='';
|
||||||
|
|
||||||
if ($subscription->fk_bank)
|
if ($object->fk_bank)
|
||||||
{
|
{
|
||||||
$accountline=new AccountLine($db);
|
$accountline=new AccountLine($db);
|
||||||
$result=$accountline->fetch($subscription->fk_bank);
|
$result=$accountline->fetch($object->fk_bank);
|
||||||
|
|
||||||
// If transaction consolidated
|
// If transaction consolidated
|
||||||
if ($accountline->rappro)
|
if ($accountline->rappro)
|
||||||
@ -84,31 +98,31 @@ if ($user->rights->adherent->cotisation->creer && $_REQUEST["action"] == 'update
|
|||||||
if (! $errmsg)
|
if (! $errmsg)
|
||||||
{
|
{
|
||||||
// Modifie valeures
|
// Modifie valeures
|
||||||
$subscription->dateh=dol_mktime($_POST['datesubhour'], $_POST['datesubmin'], 0, $_POST['datesubmonth'], $_POST['datesubday'], $_POST['datesubyear']);
|
$object->dateh=dol_mktime($_POST['datesubhour'], $_POST['datesubmin'], 0, $_POST['datesubmonth'], $_POST['datesubday'], $_POST['datesubyear']);
|
||||||
$subscription->datef=dol_mktime($_POST['datesubendhour'], $_POST['datesubendmin'], 0, $_POST['datesubendmonth'], $_POST['datesubendday'], $_POST['datesubendyear']);
|
$object->datef=dol_mktime($_POST['datesubendhour'], $_POST['datesubendmin'], 0, $_POST['datesubendmonth'], $_POST['datesubendday'], $_POST['datesubendyear']);
|
||||||
$subscription->note=$_POST["note"];
|
$object->note=$_POST["note"];
|
||||||
$subscription->amount=$_POST["amount"];
|
$object->amount=$_POST["amount"];
|
||||||
//print 'datef='.$subscription->datef.' '.$_POST['datesubendday'];
|
//print 'datef='.$object->datef.' '.$_POST['datesubendday'];
|
||||||
|
|
||||||
$result=$subscription->update($user);
|
$result=$object->update($user);
|
||||||
if ($result >= 0 && ! count($subscription->errors))
|
if ($result >= 0 && ! count($object->errors))
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
|
|
||||||
header("Location: fiche_subscription.php?rowid=".$subscription->id);
|
header("Location: fiche_subscription.php?rowid=".$object->id);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
|
|
||||||
if ($subscription->error)
|
if ($object->error)
|
||||||
{
|
{
|
||||||
$errmsg=$subscription->error;
|
$errmsg=$object->error;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
foreach($subscription->errors as $error)
|
foreach($object->errors as $error)
|
||||||
{
|
{
|
||||||
if ($errmsg) $errmsg.='<br>';
|
if ($errmsg) $errmsg.='<br>';
|
||||||
$errmsg.=$error;
|
$errmsg.=$error;
|
||||||
@ -126,11 +140,11 @@ if ($user->rights->adherent->cotisation->creer && $_REQUEST["action"] == 'update
|
|||||||
|
|
||||||
if ($_REQUEST["action"] == 'confirm_delete' && $_REQUEST["confirm"] == 'yes' && $user->rights->adherent->cotisation->creer)
|
if ($_REQUEST["action"] == 'confirm_delete' && $_REQUEST["confirm"] == 'yes' && $user->rights->adherent->cotisation->creer)
|
||||||
{
|
{
|
||||||
$result=$subscription->fetch($rowid);
|
$result=$object->fetch($rowid);
|
||||||
$result=$subscription->delete($user);
|
$result=$object->delete($user);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
header("Location: card_subscriptions.php?rowid=".$subscription->fk_adherent);
|
header("Location: card_subscriptions.php?rowid=".$object->fk_adherent);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -145,11 +159,12 @@ if ($_REQUEST["action"] == 'confirm_delete' && $_REQUEST["confirm"] == 'yes' &&
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
llxHeader('',$langs->trans("SubscriptionCard"),'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros');
|
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
|
|
||||||
|
llxHeader('',$langs->trans("SubscriptionCard"),'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros');
|
||||||
|
|
||||||
|
|
||||||
dol_htmloutput_errors($errmsg);
|
dol_htmloutput_errors($errmsg);
|
||||||
|
|
||||||
|
|
||||||
@ -161,8 +176,8 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit')
|
|||||||
*
|
*
|
||||||
********************************************/
|
********************************************/
|
||||||
|
|
||||||
$subscription->fetch($rowid);
|
$object->fetch($rowid);
|
||||||
$result=$adh->fetch($subscription->fk_adherent);
|
$result=$adh->fetch($object->fk_adherent);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Affichage onglets
|
* Affichage onglets
|
||||||
@ -170,12 +185,12 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit')
|
|||||||
$h = 0;
|
$h = 0;
|
||||||
$head = array();
|
$head = array();
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/adherents/fiche_subscription.php?rowid='.$subscription->id;
|
$head[$h][0] = DOL_URL_ROOT.'/adherents/fiche_subscription.php?rowid='.$object->id;
|
||||||
$head[$h][1] = $langs->trans("SubscriptionCard");
|
$head[$h][1] = $langs->trans("SubscriptionCard");
|
||||||
$head[$h][2] = 'general';
|
$head[$h][2] = 'general';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/adherents/info_subscription.php?rowid='.$subscription->id;
|
$head[$h][0] = DOL_URL_ROOT.'/adherents/info_subscription.php?rowid='.$object->id;
|
||||||
$head[$h][1] = $langs->trans("Info");
|
$head[$h][1] = $langs->trans("Info");
|
||||||
$head[$h][2] = 'info';
|
$head[$h][2] = 'info';
|
||||||
$h++;
|
$h++;
|
||||||
@ -184,7 +199,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit')
|
|||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print "<input type=\"hidden\" name=\"action\" value=\"update\">";
|
print "<input type=\"hidden\" name=\"action\" value=\"update\">";
|
||||||
print "<input type=\"hidden\" name=\"rowid\" value=\"$rowid\">";
|
print "<input type=\"hidden\" name=\"rowid\" value=\"$rowid\">";
|
||||||
print "<input type=\"hidden\" name=\"fk_bank\" value=\"".$subscription->fk_bank."\">";
|
print "<input type=\"hidden\" name=\"fk_bank\" value=\"".$object->fk_bank."\">";
|
||||||
|
|
||||||
dol_fiche_head($head, 'general', $langs->trans("Subscription"), 0, 'payment');
|
dol_fiche_head($head, 'general', $langs->trans("Subscription"), 0, 'payment');
|
||||||
|
|
||||||
@ -196,7 +211,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit')
|
|||||||
// Ref
|
// Ref
|
||||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td>';
|
print '<tr><td width="20%">'.$langs->trans("Ref").'</td>';
|
||||||
print '<td class="valeur" colspan="3">';
|
print '<td class="valeur" colspan="3">';
|
||||||
print $form->showrefnav($subscription, 'rowid', $linkback, 1);
|
print $form->showrefnav($object, 'rowid', $linkback, 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Member
|
// Member
|
||||||
@ -207,34 +222,34 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit')
|
|||||||
|
|
||||||
// Date start subscription
|
// Date start subscription
|
||||||
print '<tr><td>'.$langs->trans("DateSubscription").'</td><td class="valeur" colspan="2">';
|
print '<tr><td>'.$langs->trans("DateSubscription").'</td><td class="valeur" colspan="2">';
|
||||||
$form->select_date($subscription->dateh,'datesub',1,1,0,'update',1);
|
$form->select_date($object->dateh,'datesub',1,1,0,'update',1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Date end subscription
|
// Date end subscription
|
||||||
print '<tr><td>'.$langs->trans("DateEndSubscription").'</td><td class="valeur" colspan="2">';
|
print '<tr><td>'.$langs->trans("DateEndSubscription").'</td><td class="valeur" colspan="2">';
|
||||||
$form->select_date($subscription->datef,'datesubend',0,0,0,'update',1);
|
$form->select_date($object->datef,'datesubend',0,0,0,'update',1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Amount
|
// Amount
|
||||||
print '<tr><td>'.$langs->trans("Amount").'</td><td class="valeur" colspan="2">';
|
print '<tr><td>'.$langs->trans("Amount").'</td><td class="valeur" colspan="2">';
|
||||||
print '<input type="text" class="flat" size="10" name="amount" value="'.price($subscription->amount).'"></td></tr>';
|
print '<input type="text" class="flat" size="10" name="amount" value="'.price($object->amount).'"></td></tr>';
|
||||||
|
|
||||||
// Label
|
// Label
|
||||||
print '<tr><td>'.$langs->trans("Label").'</td><td class="valeur" colspan="2">';
|
print '<tr><td>'.$langs->trans("Label").'</td><td class="valeur" colspan="2">';
|
||||||
print '<input type="text" class="flat" size="60" name="note" value="'.$subscription->note.'"></td></tr>';
|
print '<input type="text" class="flat" size="60" name="note" value="'.$object->note.'"></td></tr>';
|
||||||
|
|
||||||
// Bank line
|
// Bank line
|
||||||
if (! empty($conf->banque->enabled))
|
if (! empty($conf->banque->enabled))
|
||||||
{
|
{
|
||||||
if ($conf->global->ADHERENT_BANK_USE || $subscription->fk_bank)
|
if ($conf->global->ADHERENT_BANK_USE || $object->fk_bank)
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("BankTransactionLine").'</td><td class="valeur" colspan="2">';
|
print '<tr><td>'.$langs->trans("BankTransactionLine").'</td><td class="valeur" colspan="2">';
|
||||||
if ($subscription->fk_bank)
|
if ($object->fk_bank)
|
||||||
{
|
{
|
||||||
$bankline=new AccountLine($db);
|
$bankline=new AccountLine($db);
|
||||||
$result=$bankline->fetch($subscription->fk_bank);
|
$result=$bankline->fetch($object->fk_bank);
|
||||||
print $bankline->getNomUrl(1,0,'showall');
|
print $bankline->getNomUrl(1,0,'showall');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -267,8 +282,8 @@ if ($rowid && $action != 'edit')
|
|||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
$result=$subscription->fetch($rowid);
|
$result=$object->fetch($rowid);
|
||||||
$result=$adh->fetch($subscription->fk_adherent);
|
$result=$adh->fetch($object->fk_adherent);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Affichage onglets
|
* Affichage onglets
|
||||||
@ -276,12 +291,12 @@ if ($rowid && $action != 'edit')
|
|||||||
$h = 0;
|
$h = 0;
|
||||||
$head = array();
|
$head = array();
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/adherents/fiche_subscription.php?rowid='.$subscription->id;
|
$head[$h][0] = DOL_URL_ROOT.'/adherents/fiche_subscription.php?rowid='.$object->id;
|
||||||
$head[$h][1] = $langs->trans("SubscriptionCard");
|
$head[$h][1] = $langs->trans("SubscriptionCard");
|
||||||
$head[$h][2] = 'general';
|
$head[$h][2] = 'general';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/adherents/info_subscription.php?rowid='.$subscription->id;
|
$head[$h][0] = DOL_URL_ROOT.'/adherents/info_subscription.php?rowid='.$object->id;
|
||||||
$head[$h][1] = $langs->trans("Info");
|
$head[$h][1] = $langs->trans("Info");
|
||||||
$head[$h][2] = 'info';
|
$head[$h][2] = 'info';
|
||||||
$h++;
|
$h++;
|
||||||
@ -295,7 +310,7 @@ if ($rowid && $action != 'edit')
|
|||||||
//$formquestion['text']='<b>'.$langs->trans("ThisWillAlsoDeleteBankRecord").'</b>';
|
//$formquestion['text']='<b>'.$langs->trans("ThisWillAlsoDeleteBankRecord").'</b>';
|
||||||
$text=$langs->trans("ConfirmDeleteSubscription");
|
$text=$langs->trans("ConfirmDeleteSubscription");
|
||||||
if (! empty($conf->banque->enabled) && ! empty($conf->global->ADHERENT_BANK_USE)) $text.='<br>'.img_warning().' '.$langs->trans("ThisWillAlsoDeleteBankRecord");
|
if (! empty($conf->banque->enabled) && ! empty($conf->global->ADHERENT_BANK_USE)) $text.='<br>'.img_warning().' '.$langs->trans("ThisWillAlsoDeleteBankRecord");
|
||||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$subscription->id,$langs->trans("DeleteSubscription"),$text,"confirm_delete",$formquestion,0,1);
|
print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("DeleteSubscription"),$text,"confirm_delete",$formquestion,0,1);
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||||
@ -307,7 +322,7 @@ if ($rowid && $action != 'edit')
|
|||||||
// Ref
|
// Ref
|
||||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td>';
|
print '<tr><td width="20%">'.$langs->trans("Ref").'</td>';
|
||||||
print '<td class="valeur" colspan="3">';
|
print '<td class="valeur" colspan="3">';
|
||||||
print $form->showrefnav($subscription, 'rowid', $linkback, 1);
|
print $form->showrefnav($object, 'rowid', $linkback, 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Member
|
// Member
|
||||||
@ -318,35 +333,35 @@ if ($rowid && $action != 'edit')
|
|||||||
|
|
||||||
// Date record
|
// Date record
|
||||||
/*print '<tr>';
|
/*print '<tr>';
|
||||||
print '<td>'.$langs->trans("DateSubscription").'</td><td class="valeur" colspan="3">'.dol_print_date($subscription->datec,'dayhour').'</td>';
|
print '<td>'.$langs->trans("DateSubscription").'</td><td class="valeur" colspan="3">'.dol_print_date($object->datec,'dayhour').'</td>';
|
||||||
print '</tr>';*/
|
print '</tr>';*/
|
||||||
|
|
||||||
// Date subscription
|
// Date subscription
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.$langs->trans("DateSubscription").'</td><td class="valeur" colspan="3">'.dol_print_date($subscription->dateh,'day').'</td>';
|
print '<td>'.$langs->trans("DateSubscription").'</td><td class="valeur" colspan="3">'.dol_print_date($object->dateh,'day').'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Date end subscription
|
// Date end subscription
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.$langs->trans("DateEndSubscription").'</td><td class="valeur" colspan="3">'.dol_print_date($subscription->datef,'day').'</td>';
|
print '<td>'.$langs->trans("DateEndSubscription").'</td><td class="valeur" colspan="3">'.dol_print_date($object->datef,'day').'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Amount
|
// Amount
|
||||||
print '<tr><td>'.$langs->trans("Amount").'</td><td class="valeur" colspan="3">'.price($subscription->amount).'</td></tr>';
|
print '<tr><td>'.$langs->trans("Amount").'</td><td class="valeur" colspan="3">'.price($object->amount).'</td></tr>';
|
||||||
|
|
||||||
// Amount
|
// Amount
|
||||||
print '<tr><td>'.$langs->trans("Label").'</td><td class="valeur" colspan="3">'.$subscription->note.'</td></tr>';
|
print '<tr><td>'.$langs->trans("Label").'</td><td class="valeur" colspan="3">'.$object->note.'</td></tr>';
|
||||||
|
|
||||||
// Bank line
|
// Bank line
|
||||||
if (! empty($conf->banque->enabled))
|
if (! empty($conf->banque->enabled))
|
||||||
{
|
{
|
||||||
if ($conf->global->ADHERENT_BANK_USE || $subscription->fk_bank)
|
if ($conf->global->ADHERENT_BANK_USE || $object->fk_bank)
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("BankTransactionLine").'</td><td class="valeur" colspan="3">';
|
print '<tr><td>'.$langs->trans("BankTransactionLine").'</td><td class="valeur" colspan="3">';
|
||||||
if ($subscription->fk_bank)
|
if ($object->fk_bank)
|
||||||
{
|
{
|
||||||
$bankline=new AccountLine($db);
|
$bankline=new AccountLine($db);
|
||||||
$result=$bankline->fetch($subscription->fk_bank);
|
$result=$bankline->fetch($object->fk_bank);
|
||||||
print $bankline->getNomUrl(1,0,'showall');
|
print $bankline->getNomUrl(1,0,'showall');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -373,7 +388,7 @@ if ($rowid && $action != 'edit')
|
|||||||
{
|
{
|
||||||
if (! $bankline->rappro)
|
if (! $bankline->rappro)
|
||||||
{
|
{
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"]."?rowid=".$subscription->id."&action=edit\">".$langs->trans("Modify")."</a></div>";
|
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"]."?rowid=".$object->id."&action=edit\">".$langs->trans("Modify")."</a></div>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -384,12 +399,49 @@ if ($rowid && $action != 'edit')
|
|||||||
// Supprimer
|
// Supprimer
|
||||||
if ($user->rights->adherent->cotisation->creer)
|
if ($user->rights->adherent->cotisation->creer)
|
||||||
{
|
{
|
||||||
print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER["PHP_SELF"]."?rowid=".$subscription->id."&action=delete\">".$langs->trans("Delete")."</a></div>\n";
|
print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER["PHP_SELF"]."?rowid=".$object->id."&action=delete\">".$langs->trans("Delete")."</a></div>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print "<br>\n";
|
|
||||||
|
|
||||||
|
print '<div class="fichecenter"><div class="fichehalfleft">';
|
||||||
|
print '<a name="builddoc"></a>'; // ancre
|
||||||
|
|
||||||
|
// Documents generes
|
||||||
|
/*
|
||||||
|
$filename = dol_sanitizeFileName($object->ref);
|
||||||
|
$filedir = $conf->facture->dir_output . '/' . dol_sanitizeFileName($object->ref);
|
||||||
|
$urlsource = $_SERVER['PHP_SELF'] . '?facid=' . $object->id;
|
||||||
|
$genallowed = $user->rights->facture->creer;
|
||||||
|
$delallowed = $user->rights->facture->supprimer;
|
||||||
|
|
||||||
|
print $formfile->showdocuments('facture', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang);
|
||||||
|
$somethingshown = $formfile->numoffiles;
|
||||||
|
*/
|
||||||
|
// Linked object block
|
||||||
|
$somethingshown = $form->showLinkedObjectBlock($object);
|
||||||
|
|
||||||
|
// Show links to link elements
|
||||||
|
/*$linktoelem = $form->showLinkToObjectBlock($object,array('order'));
|
||||||
|
if ($linktoelem) print '<br>'.$linktoelem;
|
||||||
|
|
||||||
|
// Link for paypal payment
|
||||||
|
if (! empty($conf->paypal->enabled) && $object->statut != 0) {
|
||||||
|
include_once DOL_DOCUMENT_ROOT . '/paypal/lib/paypal.lib.php';
|
||||||
|
print showPaypalPaymentUrl('invoice', $object->ref);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
print '</div><div class="fichehalfright"><div class="ficheaddleft">';
|
||||||
|
|
||||||
|
// List of actions on element
|
||||||
|
/*
|
||||||
|
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
|
||||||
|
$formactions = new FormActions($db);
|
||||||
|
$somethingshown = $formactions->showactions($object, 'invoice', $socid);
|
||||||
|
*/
|
||||||
|
|
||||||
|
print '</div></div></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
0
htdocs/adherents/tpl/index.html
Normal file
0
htdocs/adherents/tpl/index.html
Normal file
55
htdocs/adherents/tpl/linkedobjectblock.tpl.php
Normal file
55
htdocs/adherents/tpl/linkedobjectblock.tpl.php
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
<?php
|
||||||
|
/* Copyright (C) 2010-2011 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
|
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
|
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!-- BEGIN PHP TEMPLATE -->
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
global $user;
|
||||||
|
|
||||||
|
$langs = $GLOBALS['langs'];
|
||||||
|
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
||||||
|
$langs->load("members");
|
||||||
|
|
||||||
|
$var=true;
|
||||||
|
$total=0;
|
||||||
|
foreach($linkedObjectBlock as $key => $objectlink)
|
||||||
|
{
|
||||||
|
$var=!$var;
|
||||||
|
?>
|
||||||
|
<tr <?php echo $GLOBALS['bc'][$var]; ?> >
|
||||||
|
<td><?php echo $langs->trans("Subscription"); ?></td>
|
||||||
|
<td><?php echo $objectlink->getNomUrl(1); ?></td>
|
||||||
|
<td align="center"></td>
|
||||||
|
<td align="center"><?php echo dol_print_date($objectlink->dateh,'day'); ?></td>
|
||||||
|
<td align="right"><?php
|
||||||
|
if ($user->rights->adherent->lire) {
|
||||||
|
$total = $total + $objectlink->amount;
|
||||||
|
echo price($objectlink->amount);
|
||||||
|
} ?></td>
|
||||||
|
<td align="right"></td>
|
||||||
|
<td align="right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_delete($langs->transnoentitiesnoconv("RemoveLink")); ?></a></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!-- END PHP TEMPLATE -->
|
||||||
@ -7,7 +7,7 @@
|
|||||||
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2011-2015 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2011-2016 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -166,8 +166,8 @@ else if ($action == 'setdoc')
|
|||||||
{
|
{
|
||||||
if (dolibarr_set_const($db, "COMMANDE_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
|
if (dolibarr_set_const($db, "COMMANDE_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
|
||||||
{
|
{
|
||||||
// La constante qui a ete lue en avant du nouveau set
|
// The constant that was read before the new set
|
||||||
// on passe donc par une variable pour avoir un affichage coherent
|
// We therefore requires a variable to have a coherent view
|
||||||
$conf->global->COMMANDE_ADDON_PDF = $value;
|
$conf->global->COMMANDE_ADDON_PDF = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -181,8 +181,8 @@ else if ($action == 'setdoc')
|
|||||||
|
|
||||||
else if ($action == 'setmod')
|
else if ($action == 'setmod')
|
||||||
{
|
{
|
||||||
// TODO Verifier si module numerotation choisi peut etre active
|
// TODO Check if numbering module chosen can be activated
|
||||||
// par appel methode canBeActivated
|
// by calling method canBeActivated
|
||||||
|
|
||||||
dolibarr_set_const($db, "COMMANDE_ADDON",$value,'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, "COMMANDE_ADDON",$value,'chaine',0,'',$conf->entity);
|
||||||
}
|
}
|
||||||
@ -494,7 +494,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Defaut
|
// Default
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
if ($conf->global->COMMANDE_ADDON_PDF == $name)
|
if ($conf->global->COMMANDE_ADDON_PDF == $name)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2011-2015 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2011-2016 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -308,13 +308,15 @@ if ($action == 'edit' || $action == 'updateedit')
|
|||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><th width="35%">'.$langs->trans("CompanyInfo").'</th><th>'.$langs->trans("Value").'</th></tr>'."\n";
|
print '<tr class="liste_titre"><th width="35%">'.$langs->trans("CompanyInfo").'</th><th>'.$langs->trans("Value").'</th></tr>'."\n";
|
||||||
|
|
||||||
|
// Name
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td class="fieldrequired"><label for="name">'.$langs->trans("CompanyName").'</label></td><td>';
|
print '<tr '.$bc[$var].'><td class="fieldrequired"><label for="name">'.$langs->trans("CompanyName").'</label></td><td>';
|
||||||
print '<input name="nom" id="name" size="30" value="'. ($conf->global->MAIN_INFO_SOCIETE_NOM?$conf->global->MAIN_INFO_SOCIETE_NOM:$_POST["nom"]) . '" autofocus="autofocus"></td></tr>'."\n";
|
print '<input name="nom" id="name" size="30" value="'. ($conf->global->MAIN_INFO_SOCIETE_NOM?$conf->global->MAIN_INFO_SOCIETE_NOM:$_POST["nom"]) . '" autofocus="autofocus"></td></tr>'."\n";
|
||||||
|
|
||||||
|
// Addresse
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td><label for="address">'.$langs->trans("CompanyAddress").'</label></td><td>';
|
print '<tr '.$bc[$var].'><td><label for="address">'.$langs->trans("CompanyAddress").'</label></td><td>';
|
||||||
print '<textarea name="address" id="address" cols="80" rows="'.ROWS_3.'">'. ($conf->global->MAIN_INFO_SOCIETE_ADDRESS?$conf->global->MAIN_INFO_SOCIETE_ADDRESS:$_POST["address"]) . '</textarea></td></tr>'."\n";
|
print '<textarea name="address" id="address" class="quatrevingtpercent" rows="'.ROWS_3.'">'. ($conf->global->MAIN_INFO_SOCIETE_ADDRESS?$conf->global->MAIN_INFO_SOCIETE_ADDRESS:$_POST["address"]) . '</textarea></td></tr>'."\n";
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td><label for="zipcode">'.$langs->trans("CompanyZip").'</label></td><td>';
|
print '<tr '.$bc[$var].'><td><label for="zipcode">'.$langs->trans("CompanyZip").'</label></td><td>';
|
||||||
@ -392,14 +394,14 @@ if ($action == 'edit' || $action == 'updateedit')
|
|||||||
// Note
|
// Note
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td valign="top"><label for="note">'.$langs->trans("Note").'</label></td><td>';
|
print '<tr '.$bc[$var].'><td valign="top"><label for="note">'.$langs->trans("Note").'</label></td><td>';
|
||||||
print '<textarea class="flat" name="note" id="note" cols="80" rows="'.ROWS_5.'">'.(! empty($conf->global->MAIN_INFO_SOCIETE_NOTE) ? $conf->global->MAIN_INFO_SOCIETE_NOTE : '').'</textarea></td></tr>';
|
print '<textarea class="flat quatrevingtpercent" name="note" id="note" rows="'.ROWS_5.'">'.(! empty($conf->global->MAIN_INFO_SOCIETE_NOTE) ? $conf->global->MAIN_INFO_SOCIETE_NOTE : '').'</textarea></td></tr>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
// Identifiants de la societe (country-specific)
|
// IDs of the company (country-specific)
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td>'.$langs->trans("CompanyIds").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
print '<tr class="liste_titre"><td>'.$langs->trans("CompanyIds").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||||
$var=true;
|
$var=true;
|
||||||
@ -416,7 +418,7 @@ if ($action == 'edit' || $action == 'updateedit')
|
|||||||
print '<tr '.$bc[$var].'><td width="35%"><label for="capital">'.$langs->trans("Capital").'</label></td><td>';
|
print '<tr '.$bc[$var].'><td width="35%"><label for="capital">'.$langs->trans("Capital").'</label></td><td>';
|
||||||
print '<input name="capital" id="capital" size="20" value="' . $conf->global->MAIN_INFO_CAPITAL . '"></td></tr>';
|
print '<input name="capital" id="capital" size="20" value="' . $conf->global->MAIN_INFO_CAPITAL . '"></td></tr>';
|
||||||
|
|
||||||
// Forme juridique
|
// Juridical Status
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td><label for="forme_juridique_code">'.$langs->trans("JuridicalStatus").'</label></td><td>';
|
print '<tr '.$bc[$var].'><td><label for="forme_juridique_code">'.$langs->trans("JuridicalStatus").'</label></td><td>';
|
||||||
if ($mysoc->country_code) {
|
if ($mysoc->country_code) {
|
||||||
@ -531,7 +533,7 @@ if ($action == 'edit' || $action == 'updateedit')
|
|||||||
// Object of the company
|
// Object of the company
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%"><label for="object">'.$langs->trans("CompanyObject").'</label></td><td>';
|
print '<tr '.$bc[$var].'><td width="35%"><label for="object">'.$langs->trans("CompanyObject").'</label></td><td>';
|
||||||
print '<textarea class="flat" name="object" id="object" cols="80" rows="'.ROWS_5.'">'.(! empty($conf->global->MAIN_INFO_SOCIETE_OBJECT) ? $conf->global->MAIN_INFO_SOCIETE_OBJECT : '').'</textarea></td></tr>';
|
print '<textarea class="flat quatrevingtpercent" name="object" id="object" rows="'.ROWS_5.'">'.(! empty($conf->global->MAIN_INFO_SOCIETE_OBJECT) ? $conf->global->MAIN_INFO_SOCIETE_OBJECT : '').'</textarea></td></tr>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
@ -764,7 +766,7 @@ else
|
|||||||
print $mysoc->logo;
|
print $mysoc->logo;
|
||||||
print '</td><td class="nocellnopadd" valign="center" align="right">';
|
print '</td><td class="nocellnopadd" valign="center" align="right">';
|
||||||
|
|
||||||
// On propose la generation de la vignette si elle n'existe pas
|
// It offers the generation of the thumbnail if it does not exist
|
||||||
if (!is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini) && preg_match('/(\.jpg|\.jpeg|\.png)$/i',$mysoc->logo))
|
if (!is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini) && preg_match('/(\.jpg|\.jpeg|\.png)$/i',$mysoc->logo))
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=addthumb&file='.urlencode($mysoc->logo).'">'.img_picto($langs->trans('GenerateThumb'),'refresh').'</a> ';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=addthumb&file='.urlencode($mysoc->logo).'">'.img_picto($langs->trans('GenerateThumb'),'refresh').'</a> ';
|
||||||
@ -790,7 +792,7 @@ else
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
|
||||||
// Identifiants de la societe (country-specific)
|
// IDs of the company (country-specific)
|
||||||
print '<form name="formsoc" method="post">';
|
print '<form name="formsoc" method="post">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
@ -807,7 +809,7 @@ else
|
|||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("Capital").'</td><td>';
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("Capital").'</td><td>';
|
||||||
print $conf->global->MAIN_INFO_CAPITAL . '</td></tr>';
|
print $conf->global->MAIN_INFO_CAPITAL . '</td></tr>';
|
||||||
|
|
||||||
// Forme juridique
|
// Juridical Status
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("JuridicalStatus").'</td><td>';
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("JuridicalStatus").'</td><td>';
|
||||||
print getFormeJuridiqueLabel($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE);
|
print getFormeJuridiqueLabel($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE);
|
||||||
@ -821,7 +823,8 @@ else
|
|||||||
if (! empty($conf->global->MAIN_INFO_SIREN))
|
if (! empty($conf->global->MAIN_INFO_SIREN))
|
||||||
{
|
{
|
||||||
print $conf->global->MAIN_INFO_SIREN;
|
print $conf->global->MAIN_INFO_SIREN;
|
||||||
if ($mysoc->country_code == 'FR') print ' <a href="http://avis-situation-sirene.insee.fr/avisitu/jsp/avis.jsp" target="_blank">'.$langs->trans("Check").'</a>';
|
$s = $mysoc->id_prof_url(1,$mysoc);
|
||||||
|
if ($s) print ' - '.$s;
|
||||||
} else {
|
} else {
|
||||||
print ' ';
|
print ' ';
|
||||||
}
|
}
|
||||||
@ -836,6 +839,8 @@ else
|
|||||||
if (! empty($conf->global->MAIN_INFO_SIRET))
|
if (! empty($conf->global->MAIN_INFO_SIRET))
|
||||||
{
|
{
|
||||||
print $conf->global->MAIN_INFO_SIRET;
|
print $conf->global->MAIN_INFO_SIRET;
|
||||||
|
$s = $mysoc->id_prof_url(2,$mysoc);
|
||||||
|
if ($s) print ' - '.$s;
|
||||||
} else {
|
} else {
|
||||||
print ' ';
|
print ' ';
|
||||||
}
|
}
|
||||||
@ -850,6 +855,8 @@ else
|
|||||||
if (! empty($conf->global->MAIN_INFO_APE))
|
if (! empty($conf->global->MAIN_INFO_APE))
|
||||||
{
|
{
|
||||||
print $conf->global->MAIN_INFO_APE;
|
print $conf->global->MAIN_INFO_APE;
|
||||||
|
$s = $mysoc->id_prof_url(3,$mysoc);
|
||||||
|
if ($s) print ' - '.$s;
|
||||||
} else {
|
} else {
|
||||||
print ' ';
|
print ' ';
|
||||||
}
|
}
|
||||||
@ -864,6 +871,8 @@ else
|
|||||||
if (! empty($conf->global->MAIN_INFO_RCS))
|
if (! empty($conf->global->MAIN_INFO_RCS))
|
||||||
{
|
{
|
||||||
print $conf->global->MAIN_INFO_RCS;
|
print $conf->global->MAIN_INFO_RCS;
|
||||||
|
$s = $mysoc->id_prof_url(4,$mysoc);
|
||||||
|
if ($s) print ' - '.$s;
|
||||||
} else {
|
} else {
|
||||||
print ' ';
|
print ' ';
|
||||||
}
|
}
|
||||||
@ -878,6 +887,8 @@ else
|
|||||||
if (! empty($conf->global->MAIN_INFO_PROFID5))
|
if (! empty($conf->global->MAIN_INFO_PROFID5))
|
||||||
{
|
{
|
||||||
print $conf->global->MAIN_INFO_PROFID5;
|
print $conf->global->MAIN_INFO_PROFID5;
|
||||||
|
$s = $mysoc->id_prof_url(5,$mysoc);
|
||||||
|
if ($s) print ' - '.$s;
|
||||||
} else {
|
} else {
|
||||||
print ' ';
|
print ' ';
|
||||||
}
|
}
|
||||||
@ -892,13 +903,15 @@ else
|
|||||||
if (! empty($conf->global->MAIN_INFO_PROFID6))
|
if (! empty($conf->global->MAIN_INFO_PROFID6))
|
||||||
{
|
{
|
||||||
print $conf->global->MAIN_INFO_PROFID6;
|
print $conf->global->MAIN_INFO_PROFID6;
|
||||||
|
$s = $mysoc->id_prof_url(6,$mysoc);
|
||||||
|
if ($s) print ' - '.$s;
|
||||||
} else {
|
} else {
|
||||||
print ' ';
|
print ' ';
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// TVA
|
// VAT
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("VATIntra").'</td>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("VATIntra").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
@ -907,9 +920,9 @@ else
|
|||||||
$s='';
|
$s='';
|
||||||
$s.=$conf->global->MAIN_INFO_TVAINTRA;
|
$s.=$conf->global->MAIN_INFO_TVAINTRA;
|
||||||
$s.='<input type="hidden" name="tva_intra" size="12" maxlength="20" value="'.$conf->global->MAIN_INFO_TVAINTRA.'">';
|
$s.='<input type="hidden" name="tva_intra" size="12" maxlength="20" value="'.$conf->global->MAIN_INFO_TVAINTRA.'">';
|
||||||
if (empty($conf->global->MAIN_DISABLEVATCHECK))
|
if (empty($conf->global->MAIN_DISABLEVATCHECK) && $mysoc->isInEEC())
|
||||||
{
|
{
|
||||||
$s.=' ';
|
$s.=' - ';
|
||||||
if (! empty($conf->use_javascript_ajax))
|
if (! empty($conf->use_javascript_ajax))
|
||||||
{
|
{
|
||||||
print "\n";
|
print "\n";
|
||||||
@ -943,7 +956,7 @@ else
|
|||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Debut d'annee fiscale
|
* fiscal year beginning
|
||||||
*/
|
*/
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
@ -960,7 +973,7 @@ else
|
|||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Options fiscale
|
* tax options
|
||||||
*/
|
*/
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2013-2015 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2013-2016 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -114,7 +114,7 @@ print '<input type="hidden" name="action" value="update">';
|
|||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
|
|
||||||
// Cas du parametre ACCOUNTING_MODE
|
// case of the parameter ACCOUNTING_MODE
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans('OptionMode').'</td><td>'.$langs->trans('Description').'</td>';
|
print '<td>'.$langs->trans('OptionMode').'</td><td>'.$langs->trans('Description').'</td>';
|
||||||
|
|||||||
@ -62,6 +62,23 @@ if ($action == 'update')
|
|||||||
{
|
{
|
||||||
if (! $_POST['cancel'])
|
if (! $_POST['cancel'])
|
||||||
{
|
{
|
||||||
|
$leftmenu=''; $mainmenu='';
|
||||||
|
if (! empty($_POST['menuIdParent']) && ! is_numeric($_POST['menuIdParent']))
|
||||||
|
{
|
||||||
|
$tmp=explode('&',$_POST['menuIdParent']);
|
||||||
|
foreach($tmp as $s)
|
||||||
|
{
|
||||||
|
if (preg_match('/fk_mainmenu=/',$s))
|
||||||
|
{
|
||||||
|
$mainmenu=preg_replace('/fk_mainmenu=/','',$s);
|
||||||
|
}
|
||||||
|
if (preg_match('/fk_leftmenu=/',$s))
|
||||||
|
{
|
||||||
|
$leftmenu=preg_replace('/fk_leftmenu=/','',$s);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$menu = new Menubase($db);
|
$menu = new Menubase($db);
|
||||||
$result=$menu->fetch($_POST['menuId']);
|
$result=$menu->fetch($_POST['menuId']);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
@ -75,7 +92,18 @@ if ($action == 'update')
|
|||||||
$menu->perms=$_POST['perms'];
|
$menu->perms=$_POST['perms'];
|
||||||
$menu->target=$_POST['target'];
|
$menu->target=$_POST['target'];
|
||||||
$menu->user=$_POST['user'];
|
$menu->user=$_POST['user'];
|
||||||
$menu->fk_menu=$_POST['fk_menu'];
|
if (is_numeric($_POST['menuIdParent']))
|
||||||
|
{
|
||||||
|
$menu->fk_menu=$_POST['menuIdParent'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ($_POST['type'] == 'top') $menu->fk_menu=0;
|
||||||
|
else $menu->fk_menu=-1;
|
||||||
|
$menu->fk_mainmenu=$mainmenu;
|
||||||
|
$menu->fk_leftmenu=$leftmenu;
|
||||||
|
}
|
||||||
|
|
||||||
$result=$menu->update($user);
|
$result=$menu->update($user);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
@ -215,7 +243,7 @@ if ($action == 'confirm_delete' && $_POST["confirm"] == 'yes')
|
|||||||
{
|
{
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."menu WHERE rowid = ".$_GET['menuId'];
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."menu WHERE rowid = ".GETPOST('menuId', 'int');
|
||||||
$db->query($sql);
|
$db->query($sql);
|
||||||
|
|
||||||
if ($result == 0)
|
if ($result == 0)
|
||||||
@ -284,7 +312,7 @@ if ($action == 'create')
|
|||||||
$parent_rowid = $_GET['menuId'];
|
$parent_rowid = $_GET['menuId'];
|
||||||
if ($_GET['menuId'])
|
if ($_GET['menuId'])
|
||||||
{
|
{
|
||||||
$sql = "SELECT m.rowid, m.mainmenu, m.leftmenu, m.level, m.langs FROM ".MAIN_DB_PREFIX."menu as m WHERE m.rowid = ".$_GET['menuId'];
|
$sql = "SELECT m.rowid, m.mainmenu, m.leftmenu, m.level, m.langs FROM ".MAIN_DB_PREFIX."menu as m WHERE m.rowid = ".GETPOST('menuId', 'int');
|
||||||
$res = $db->query($sql);
|
$res = $db->query($sql);
|
||||||
if ($res)
|
if ($res)
|
||||||
{
|
{
|
||||||
@ -342,7 +370,7 @@ if ($action == 'create')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td><input type="text" size="20" id="menuId" name="menuId" value="'.($_POST["menuId"]?$_POST["menuId"]:'').'"></td>';
|
print '<td><input type="text" size="40" id="menuId" name="menuId" value="'.($_POST["menuId"]?$_POST["menuId"]:'').'"></td>';
|
||||||
}
|
}
|
||||||
print '<td>'.$langs->trans('DetailMenuIdParent');
|
print '<td>'.$langs->trans('DetailMenuIdParent');
|
||||||
print ', '.$langs->trans("Example").': fk_mainmenu=abc&fk_leftmenu=def';
|
print ', '.$langs->trans("Example").': fk_mainmenu=abc&fk_leftmenu=def';
|
||||||
@ -425,12 +453,15 @@ elseif ($action == 'edit')
|
|||||||
print '<tr><td class="fieldrequired">'.$langs->trans('Type').'</td><td>'.$langs->trans(ucfirst($menu->type)).'</td><td>'.$langs->trans('DetailType').'</td></tr>';
|
print '<tr><td class="fieldrequired">'.$langs->trans('Type').'</td><td>'.$langs->trans(ucfirst($menu->type)).'</td><td>'.$langs->trans('DetailType').'</td></tr>';
|
||||||
|
|
||||||
// MenuId Parent
|
// MenuId Parent
|
||||||
print '<tr><td class="fieldrequired">'.$langs->trans('MenuIdParent').'</td>';
|
print '<tr><td class="fieldrequired">'.$langs->trans('MenuIdParent');
|
||||||
|
print '</td>';
|
||||||
$valtouse=$menu->fk_menu;
|
$valtouse=$menu->fk_menu;
|
||||||
if ($menu->fk_mainmenu) $valtouse='fk_mainmenu='.$menu->fk_mainmenu;
|
if ($menu->fk_mainmenu) $valtouse='fk_mainmenu='.$menu->fk_mainmenu;
|
||||||
if ($menu->fk_leftmenu) $valtouse.='&fk_leftmenu='.$menu->fk_leftmenu;
|
if ($menu->fk_leftmenu) $valtouse.='&fk_leftmenu='.$menu->fk_leftmenu;
|
||||||
print '<td><input type="text" name="fk_menu" value="'.$valtouse.'" size="10"></td>';
|
print '<td><input type="text" name="menuIdParent" value="'.$valtouse.'" size="40"></td>';
|
||||||
print '<td>'.$langs->trans('DetailMenuIdParent').'</td></tr>';
|
print '<td>'.$langs->trans('DetailMenuIdParent');
|
||||||
|
print ', '.$langs->trans("Example").': fk_mainmenu=abc&fk_leftmenu=def';
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
// Niveau
|
// Niveau
|
||||||
//print '<tr><td>'.$langs->trans('Level').'</td><td>'.$menu->level.'</td><td>'.$langs->trans('DetailLevel').'</td></tr>';
|
//print '<tr><td>'.$langs->trans('Level').'</td><td>'.$menu->level.'</td><td>'.$langs->trans('DetailLevel').'</td></tr>';
|
||||||
|
|||||||
@ -361,7 +361,7 @@ if ($conf->use_javascript_ajax)
|
|||||||
|
|
||||||
if (count($remainingdata))
|
if (count($remainingdata))
|
||||||
{
|
{
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="noborder centpercent">';
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("NotTopTreeMenuPersonalized").'</td>';
|
print '<td>'.$langs->trans("NotTopTreeMenuPersonalized").'</td>';
|
||||||
|
|||||||
@ -45,14 +45,6 @@ $action = GETPOST('action','alpha');
|
|||||||
if ($action == "set")
|
if ($action == "set")
|
||||||
{
|
{
|
||||||
$db->begin();
|
$db->begin();
|
||||||
for ($i = 0 ; $i < 2 ; $i++)
|
|
||||||
{
|
|
||||||
$res = dolibarr_set_const($db, GETPOST("nom$i",'alpha'), GETPOST("value$i",'alpha'),'chaine',0,'',$conf->entity);
|
|
||||||
if (! $res > 0) $error++;
|
|
||||||
}
|
|
||||||
|
|
||||||
$res = dolibarr_set_const($db, "PRELEVEMENT_ICS", GETPOST("PRELEVEMENT_ICS"),'chaine',0,'',$conf->entity);
|
|
||||||
if (! $res > 0) $error++;
|
|
||||||
|
|
||||||
$id=GETPOST('PRELEVEMENT_ID_BANKACCOUNT','int');
|
$id=GETPOST('PRELEVEMENT_ID_BANKACCOUNT','int');
|
||||||
$account = new Account($db);
|
$account = new Account($db);
|
||||||
@ -78,6 +70,15 @@ if ($action == "set")
|
|||||||
}
|
}
|
||||||
else $error++;
|
else $error++;
|
||||||
|
|
||||||
|
$res = dolibarr_set_const($db, "PRELEVEMENT_ICS", GETPOST("PRELEVEMENT_ICS"),'chaine',0,'',$conf->entity);
|
||||||
|
if (! $res > 0) $error++;
|
||||||
|
|
||||||
|
if (GETPOST("PRELEVEMENT_USER") > 0)
|
||||||
|
{
|
||||||
|
$res = dolibarr_set_const($db, "PRELEVEMENT_USER", GETPOST("PRELEVEMENT_USER"),'chaine',0,'',$conf->entity);
|
||||||
|
if (! $res > 0) $error++;
|
||||||
|
}
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
@ -131,33 +132,25 @@ print '<td width="30%">'.$langs->trans("Parameter").'</td>';
|
|||||||
print '<td width="40%">'.$langs->trans("Value").'</td>';
|
print '<td width="40%">'.$langs->trans("Value").'</td>';
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
|
||||||
//User
|
|
||||||
print '<tr class="impair"><td>'.$langs->trans("ResponsibleUser").'</td>';
|
|
||||||
print '<td align="left">';
|
|
||||||
print '<input type="hidden" name="nom0" value="PRELEVEMENT_USER">';
|
|
||||||
print $form->select_dolusers($conf->global->PRELEVEMENT_USER, 'value0', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
|
|
||||||
print '</td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
//Profid1 of Transmitter
|
|
||||||
print '<tr class="pair"><td>'.$langs->trans("NumeroNationalEmetter").' - '.$langs->transcountry('ProfId1',$mysoc->country_code).'</td>';
|
|
||||||
print '<td align="left">';
|
|
||||||
print '<input type="hidden" name="nom1" value="PRELEVEMENT_NUMERO_NATIONAL_EMETTEUR">';
|
|
||||||
print '<input type="text" name="value1" value="'.$conf->global->PRELEVEMENT_NUMERO_NATIONAL_EMETTEUR.'" size="9" ></td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Bank account (from Banks module)
|
// Bank account (from Banks module)
|
||||||
print '<tr class="impair"><td>'.$langs->trans("BankToReceiveWithdraw").'</td>';
|
print '<tr class="impair"><td class="fieldrequired">'.$langs->trans("BankToReceiveWithdraw").'</td>';
|
||||||
print '<td align="left">';
|
print '<td align="left">';
|
||||||
$form->select_comptes($conf->global->PRELEVEMENT_ID_BANKACCOUNT,'PRELEVEMENT_ID_BANKACCOUNT',0,"courant=1",1);
|
$form->select_comptes($conf->global->PRELEVEMENT_ID_BANKACCOUNT,'PRELEVEMENT_ID_BANKACCOUNT',0,"courant=1",1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// ICS
|
// ICS
|
||||||
print '<tr class="pair"><td>'.$langs->trans("ICS").'</td>';
|
print '<tr class="pair"><td class="fieldrequired">'.$langs->trans("ICS").'</td>';
|
||||||
print '<td align="left">';
|
print '<td align="left">';
|
||||||
print '<input type="text" name="PRELEVEMENT_ICS" value="'.$conf->global->PRELEVEMENT_ICS.'" size="9" ></td>';
|
print '<input type="text" name="PRELEVEMENT_ICS" value="'.$conf->global->PRELEVEMENT_ICS.'" size="9" ></td>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
//User
|
||||||
|
print '<tr class="impair"><td class="fieldrequired">'.$langs->trans("ResponsibleUser").'</td>';
|
||||||
|
print '<td align="left">';
|
||||||
|
print $form->select_dolusers($conf->global->PRELEVEMENT_USER, 'PRELEVEMENT_USER', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
|||||||
@ -53,6 +53,8 @@ if ($file && ! $what)
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$errormsg='';
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
@ -120,16 +122,37 @@ if ($what == 'mysql')
|
|||||||
{
|
{
|
||||||
|
|
||||||
$cmddump=GETPOST("mysqldump"); // Do not sanitize here with 'alpha', will be sanitize later by escapeshellarg
|
$cmddump=GETPOST("mysqldump"); // Do not sanitize here with 'alpha', will be sanitize later by escapeshellarg
|
||||||
if ($cmddump)
|
if (! empty($dolibarr_main_restrict_os_commands))
|
||||||
|
{
|
||||||
|
$arrayofallowedcommand=explode(',', $dolibarr_main_restrict_os_commands);
|
||||||
|
$ok=0;
|
||||||
|
dol_syslog("Command are restricted to ".$dolibarr_main_restrict_os_commands.". We check that on of this command is inside ".$cmddump);
|
||||||
|
foreach($arrayofallowedcommand as $allowedcommand)
|
||||||
|
{
|
||||||
|
if (preg_match('/'.preg_quote($allowedcommand,'/').'/', $cmddump))
|
||||||
|
{
|
||||||
|
$ok=1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (! $ok)
|
||||||
|
{
|
||||||
|
$errormsg=$langs->trans('CommandIsNotInsideAllowedCommands');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! $errormsg && $cmddump)
|
||||||
{
|
{
|
||||||
dolibarr_set_const($db, 'SYSTEMTOOLS_MYSQLDUMP', $cmddump,'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, 'SYSTEMTOOLS_MYSQLDUMP', $cmddump,'chaine',0,'',$conf->entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
$utils->dumpDatabase(GETPOST('compression','alpha'), $what, 0, $file);
|
if (! $errormsg)
|
||||||
|
{
|
||||||
$errormsg=$utils->error;
|
$utils->dumpDatabase(GETPOST('compression','alpha'), $what, 0, $file);
|
||||||
$_SESSION["commandbackuplastdone"]=$utils->result['commandbackuplastdone'];
|
$errormsg=$utils->error;
|
||||||
$_SESSION["commandbackuptorun"]=$utils->result['commandbackuptorun'];
|
$_SESSION["commandbackuplastdone"]=$utils->result['commandbackuplastdone'];
|
||||||
|
$_SESSION["commandbackuptorun"]=$utils->result['commandbackuptorun'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// MYSQL NO BIN
|
// MYSQL NO BIN
|
||||||
@ -146,16 +169,19 @@ if ($what == 'mysqlnobin')
|
|||||||
if ($what == 'postgresql')
|
if ($what == 'postgresql')
|
||||||
{
|
{
|
||||||
$cmddump=GETPOST("postgresqldump"); // Do not sanitize here with 'alpha', will be sanitize later by escapeshellarg
|
$cmddump=GETPOST("postgresqldump"); // Do not sanitize here with 'alpha', will be sanitize later by escapeshellarg
|
||||||
if ($cmddump)
|
|
||||||
|
if (! $errormsg && $cmddump)
|
||||||
{
|
{
|
||||||
dolibarr_set_const($db, 'SYSTEMTOOLS_POSTGRESQLDUMP', $cmddump,'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, 'SYSTEMTOOLS_POSTGRESQLDUMP', $cmddump,'chaine',0,'',$conf->entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
$utils->dumpDatabase(GETPOST('compression','alpha'), $what, 0, $file);
|
if (! $errormsg)
|
||||||
|
{
|
||||||
$errormsg=$utils->error;
|
$utils->dumpDatabase(GETPOST('compression','alpha'), $what, 0, $file);
|
||||||
$_SESSION["commandbackuplastdone"]=$utils->result['commandbackuplastdone'];
|
$errormsg=$utils->error;
|
||||||
$_SESSION["commandbackuptorun"]=$utils->result['commandbackuptorun'];
|
$_SESSION["commandbackuplastdone"]=$utils->result['commandbackuplastdone'];
|
||||||
|
$_SESSION["commandbackuptorun"]=$utils->result['commandbackuptorun'];
|
||||||
|
}
|
||||||
|
|
||||||
$what=''; // Clear to show message to run command
|
$what=''; // Clear to show message to run command
|
||||||
}
|
}
|
||||||
|
|||||||
@ -44,7 +44,7 @@ $conf_fkaccount_cb = (! empty($_SESSION["CASHDESK_ID_BANKACCOUNT_CB"]))?$_SESSIO
|
|||||||
|
|
||||||
|
|
||||||
// View parameters
|
// View parameters
|
||||||
$conf_taille_listes = (empty($conf->global->PRODUIT_LIMIT_SIZE)?500:$conf->global->PRODUIT_LIMIT_SIZE); // Nombre max de lignes a afficher dans les listes
|
$conf_taille_listes = (empty($conf->global->PRODUIT_LIMIT_SIZE)?1000:$conf->global->PRODUIT_LIMIT_SIZE); // Nombre max de lignes a afficher dans les listes
|
||||||
$conf_nbr_car_listes = 60; // Nombre max de caracteres par ligne dans les listes
|
$conf_nbr_car_listes = 60; // Nombre max de caracteres par ligne dans les listes
|
||||||
|
|
||||||
// Add hidden option to force decrease of stock whatever is user setup
|
// Add hidden option to force decrease of stock whatever is user setup
|
||||||
|
|||||||
@ -617,13 +617,14 @@ else if ($id || $ref)
|
|||||||
* @param Object $object Object we want to see categories it can be classified into
|
* @param Object $object Object we want to see categories it can be classified into
|
||||||
* @param int $typeid Type of category (0, 1, 2, 3)
|
* @param int $typeid Type of category (0, 1, 2, 3)
|
||||||
* @param int $socid Id thirdparty
|
* @param int $socid Id thirdparty
|
||||||
* @param int $showclassifyform 1=Add form to 'Classify', 0=Do not show form to 'Classify'
|
* @param int $showclassifyform 1=Add form to 'Classify', 0=Do not show form to 'Classify'
|
||||||
* @return int 0
|
* @return int 0
|
||||||
*/
|
*/
|
||||||
function formCategory($db,$object,$typeid,$socid=0,$showclassifyform=1)
|
function formCategory($db,$object,$typeid,$socid=0,$showclassifyform=1)
|
||||||
{
|
{
|
||||||
global $user,$langs,$form,$bc;
|
global $user,$langs,$form,$bc;
|
||||||
|
|
||||||
|
$title='NotDefined';
|
||||||
if ($typeid == Categorie::TYPE_PRODUCT) $title = $langs->trans("ProductsCategoriesShort");
|
if ($typeid == Categorie::TYPE_PRODUCT) $title = $langs->trans("ProductsCategoriesShort");
|
||||||
if ($typeid == Categorie::TYPE_SUPPLIER) $title = $langs->trans("SuppliersCategoriesShort");
|
if ($typeid == Categorie::TYPE_SUPPLIER) $title = $langs->trans("SuppliersCategoriesShort");
|
||||||
if ($typeid == Categorie::TYPE_CUSTOMER) $title = $langs->trans("CustomersProspectsCategoriesShort");
|
if ($typeid == Categorie::TYPE_CUSTOMER) $title = $langs->trans("CustomersProspectsCategoriesShort");
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
* Copyright (C) 2006-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2006-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2013-2016 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||||
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
||||||
@ -43,13 +43,13 @@ require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
|||||||
class Categorie extends CommonObject
|
class Categorie extends CommonObject
|
||||||
{
|
{
|
||||||
// Categories types
|
// Categories types
|
||||||
const TYPE_PRODUCT = 0;
|
const TYPE_PRODUCT = 0; // TODO Replace with value 'product'
|
||||||
const TYPE_SUPPLIER = 1;
|
const TYPE_SUPPLIER = 1; // TODO Replace this value with 'supplier'
|
||||||
const TYPE_CUSTOMER = 2;
|
const TYPE_CUSTOMER = 2; // TODO Replace this value with 'customer'
|
||||||
const TYPE_MEMBER = 3;
|
const TYPE_MEMBER = 3; // TODO Replace this value with 'member'
|
||||||
const TYPE_CONTACT = 4;
|
const TYPE_CONTACT = 4; // TODO Replace this value with 'contact'
|
||||||
const TYPE_USER = 4; // categorie contact and user are same !
|
const TYPE_USER = 4; // categorie contact and user are same ! TODO Replace this value with 'user'
|
||||||
const TYPE_ACCOUNT = 5; // bank account
|
const TYPE_ACCOUNT = 5; // for bank account TODO Replace this value with 'account'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array ID mapping from type string
|
* @var array ID mapping from type string
|
||||||
@ -63,7 +63,7 @@ class Categorie extends CommonObject
|
|||||||
'member' => 3,
|
'member' => 3,
|
||||||
'contact' => 4,
|
'contact' => 4,
|
||||||
'user' => 4,
|
'user' => 4,
|
||||||
'account' => 5,
|
'account' => 5,
|
||||||
);
|
);
|
||||||
/**
|
/**
|
||||||
* @var array Foreign keys mapping from type string
|
* @var array Foreign keys mapping from type string
|
||||||
@ -149,7 +149,7 @@ class Categorie extends CommonObject
|
|||||||
*/
|
*/
|
||||||
var $type;
|
var $type;
|
||||||
|
|
||||||
var $cats=array(); // Tableau en memoire des categories
|
var $cats=array(); // Categories table in memory
|
||||||
var $motherof=array();
|
var $motherof=array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -232,9 +232,9 @@ class Categorie extends CommonObject
|
|||||||
* Add category into database
|
* Add category into database
|
||||||
*
|
*
|
||||||
* @param User $user Object user
|
* @param User $user Object user
|
||||||
* @return int -1 : erreur SQL
|
* @return int -1 : SQL error
|
||||||
* -2 : nouvel ID inconnu
|
* -2 : new ID unknown
|
||||||
* -3 : categorie invalide
|
* -3 : Invalid category
|
||||||
* -4 : category already exists
|
* -4 : category already exists
|
||||||
*/
|
*/
|
||||||
function create($user)
|
function create($user)
|
||||||
@ -304,7 +304,7 @@ class Categorie extends CommonObject
|
|||||||
$action='create';
|
$action='create';
|
||||||
|
|
||||||
// Actions on extra fields (by external module or standard code)
|
// Actions on extra fields (by external module or standard code)
|
||||||
// TODO le hook fait double emploi avec le trigger !!
|
// TODO the hook duplicates the trigger !!
|
||||||
$hookmanager->initHooks(array('HookModuleNamedao'));
|
$hookmanager->initHooks(array('HookModuleNamedao'));
|
||||||
$parameters=array('socid'=>$this->id);
|
$parameters=array('socid'=>$this->id);
|
||||||
$reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
$reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||||
@ -398,7 +398,7 @@ class Categorie extends CommonObject
|
|||||||
$action='update';
|
$action='update';
|
||||||
|
|
||||||
// Actions on extra fields (by external module or standard code)
|
// Actions on extra fields (by external module or standard code)
|
||||||
// TODO le hook fait double emploi avec le trigger !!
|
// TODO the hook duplicates the trigger !!
|
||||||
$hookmanager->initHooks(array('HookCategorydao'));
|
$hookmanager->initHooks(array('HookCategorydao'));
|
||||||
$parameters=array();
|
$parameters=array();
|
||||||
$reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
$reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||||
@ -867,8 +867,8 @@ class Categorie extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reconstruit l'arborescence des categories sous la forme d'un tableau
|
* Rebuilding the category tree as an array
|
||||||
* Renvoi un tableau de tableau('id','id_mere',...) trie selon arbre et avec:
|
* Return an array of table('id','id_mere',...) trie selon arbre et avec:
|
||||||
* id = id de la categorie
|
* id = id de la categorie
|
||||||
* id_mere = id de la categorie mere
|
* id_mere = id de la categorie mere
|
||||||
* id_children = tableau des id enfant
|
* id_children = tableau des id enfant
|
||||||
@ -1008,13 +1008,13 @@ class Categorie extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Affiche contenu de $this->cats
|
* Display content of $this->cats
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function debug_cats()
|
function debug_cats()
|
||||||
{
|
{
|
||||||
// Affiche $this->cats
|
// Display $this->cats
|
||||||
foreach($this->cats as $key => $val)
|
foreach($this->cats as $key => $val)
|
||||||
{
|
{
|
||||||
print 'id: '.$this->cats[$key]['id'];
|
print 'id: '.$this->cats[$key]['id'];
|
||||||
@ -1029,11 +1029,11 @@ class Categorie extends CommonObject
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retourne toutes les categories
|
* Returns all categories
|
||||||
*
|
*
|
||||||
* @param int $type Type of category
|
* @param int $type Type of category
|
||||||
* @param boolean $parent Just parent categories if true
|
* @param boolean $parent Just parent categories if true
|
||||||
* @return array Tableau d'objet Categorie
|
* @return array Table of Object Category
|
||||||
*/
|
*/
|
||||||
function get_all_categories($type=null, $parent=false)
|
function get_all_categories($type=null, $parent=false)
|
||||||
{
|
{
|
||||||
@ -1064,9 +1064,9 @@ class Categorie extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retourne le nombre total de categories
|
* Returns total number of categories
|
||||||
*
|
*
|
||||||
* @return int Nombre de categories
|
* @return int Number of categories
|
||||||
* @deprecated function not used ?
|
* @deprecated function not used ?
|
||||||
*/
|
*/
|
||||||
function get_nb_categories()
|
function get_nb_categories()
|
||||||
@ -1133,7 +1133,7 @@ class Categorie extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retourne les categories de premier niveau (qui ne sont pas filles)
|
* Returns the top level categories (which are not girls)
|
||||||
*
|
*
|
||||||
* @param int $type Type of category
|
* @param int $type Type of category
|
||||||
* @return array
|
* @return array
|
||||||
@ -1144,8 +1144,8 @@ class Categorie extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retourne les chemin de la categorie, avec les noms des categories
|
* Returns the path of the category, with the names of the categories
|
||||||
* separes par $sep (" >> " par defaut)
|
* separated by $sep (" >> " by default)
|
||||||
*
|
*
|
||||||
* @param string $sep Separator
|
* @param string $sep Separator
|
||||||
* @param string $url Url
|
* @param string $url Url
|
||||||
@ -1205,7 +1205,7 @@ class Categorie extends CommonObject
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retourne un tableau contenant la liste des categories meres
|
* Returns an array containing the list of parent categories
|
||||||
*
|
*
|
||||||
* @return int|array <0 KO, array OK
|
* @return int|array <0 KO, array OK
|
||||||
*/
|
*/
|
||||||
@ -1239,8 +1239,8 @@ class Categorie extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retourne dans un tableau tous les chemins possibles pour arriver a la categorie
|
* Returns in a table all possible paths to get to the category
|
||||||
* en partant des categories principales, representes par des tableaux de categories
|
* starting with the major categories represented by Tables of categories
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
@ -1324,8 +1324,8 @@ class Categorie extends CommonObject
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retourne les categories dont l'id ou le nom correspond
|
* Returns categories whose id or name match
|
||||||
* ajoute des wildcards au nom sauf si $exact = true
|
* add wildcards in the name unless $exact = true
|
||||||
*
|
*
|
||||||
* @param int $id Id
|
* @param int $id Id
|
||||||
* @param string $nom Name
|
* @param string $nom Name
|
||||||
@ -1717,6 +1717,6 @@ class Categorie extends CommonObject
|
|||||||
'categorie_societe'
|
'categorie_societe'
|
||||||
);
|
);
|
||||||
|
|
||||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -297,7 +297,7 @@ else
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "<tr ".$bc[false].'><td colspan="3">'.$langs->trans("NoSubCat")."</td></tr>";
|
print "<tr ".$bc[false].'><td colspan="3" class="opacitymedium">'.$langs->trans("NoSubCat")."</td></tr>";
|
||||||
}
|
}
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
}
|
}
|
||||||
@ -371,7 +371,7 @@ if ($object->type == Categorie::TYPE_PRODUCT)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "<tr ".$bc[false].'><td colspan="2">'.$langs->trans("ThisCategoryHasNoProduct")."</td></tr>";
|
print "<tr ".$bc[false].'><td colspan="2" class="opacitymedium">'.$langs->trans("ThisCategoryHasNoProduct")."</td></tr>";
|
||||||
}
|
}
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
}
|
}
|
||||||
@ -422,7 +422,7 @@ if ($object->type == Categorie::TYPE_SUPPLIER)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "<tr ".$bc[false]."><td>".$langs->trans("ThisCategoryHasNoSupplier")."</td></tr>";
|
print '<tr '.$bc[false].'><td class="opacitymedium">'.$langs->trans("ThisCategoryHasNoSupplier").'</td></tr>';
|
||||||
}
|
}
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
}
|
}
|
||||||
@ -475,7 +475,7 @@ if($object->type == Categorie::TYPE_CUSTOMER)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "<tr ".$bc[false]."><td>".$langs->trans("ThisCategoryHasNoCustomer")."</td></tr>";
|
print '<tr '.$bc[false].'><td class="opacitymedium">'.$langs->trans("ThisCategoryHasNoCustomer").'</td></tr>';
|
||||||
}
|
}
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
}
|
}
|
||||||
@ -529,7 +529,7 @@ if ($object->type == Categorie::TYPE_MEMBER)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "<tr ".$bc[false].'><td colspan="3">'.$langs->trans("ThisCategoryHasNoMember")."</td></tr>";
|
print '<tr '.$bc[false].'><td colspan="3" class="opacitymedium">'.$langs->trans("ThisCategoryHasNoMember").'</td></tr>';
|
||||||
}
|
}
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
}
|
}
|
||||||
@ -582,7 +582,7 @@ if($object->type == Categorie::TYPE_CONTACT)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "<tr ".$bc[false]."><td>".$langs->trans("ThisCategoryHasNoContact")."</td></tr>";
|
print '<tr '.$bc[false].'><td class="opacitymedium">'.$langs->trans("ThisCategoryHasNoContact").'</td></tr>';
|
||||||
}
|
}
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
}
|
}
|
||||||
@ -636,7 +636,7 @@ if ($object->type == Categorie::TYPE_ACCOUNT)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "<tr ".$bc[false].'><td colspan="3">'.$langs->trans("ThisCategoryHasNoAccount")."</td></tr>";
|
print '<tr '.$bc[false].'><td colspan="3" class="opacitymedium">'.$langs->trans("ThisCategoryHasNoAccount").'</td></tr>';
|
||||||
}
|
}
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -61,8 +61,14 @@ $originid=GETPOST('originid','int');
|
|||||||
$confirm = GETPOST('confirm', 'alpha');
|
$confirm = GETPOST('confirm', 'alpha');
|
||||||
|
|
||||||
$fulldayevent=GETPOST('fullday');
|
$fulldayevent=GETPOST('fullday');
|
||||||
$datep=dol_mktime($fulldayevent?'00':GETPOST("aphour"), $fulldayevent?'00':GETPOST("apmin"), 0, GETPOST("apmonth"), GETPOST("apday"), GETPOST("apyear"));
|
|
||||||
$datef=dol_mktime($fulldayevent?'23':GETPOST("p2hour"), $fulldayevent?'59':GETPOST("p2min"), $fulldayevent?'59':'0', GETPOST("p2month"), GETPOST("p2day"), GETPOST("p2year"));
|
$aphour = GETPOST('aphour');
|
||||||
|
$apmin = GETPOST('apmin');
|
||||||
|
$p2hour = GETPOST('p2hour');
|
||||||
|
$p2min = GETPOST('p2min');
|
||||||
|
|
||||||
|
$datep=dol_mktime($fulldayevent?'00':$aphour, $fulldayevent?'00':$apmin, 0, GETPOST("apmonth"), GETPOST("apday"), GETPOST("apyear"));
|
||||||
|
$datef=dol_mktime($fulldayevent?'23':$p2hour, $fulldayevent?'59':$p2min, $fulldayevent?'59':'0', GETPOST("p2month"), GETPOST("p2day"), GETPOST("p2year"));
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid = GETPOST('socid','int');
|
$socid = GETPOST('socid','int');
|
||||||
@ -92,7 +98,6 @@ $extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
|
|||||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||||
$hookmanager->initHooks(array('actioncard','globalcard'));
|
$hookmanager->initHooks(array('actioncard','globalcard'));
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
@ -781,7 +786,7 @@ if ($action == 'create')
|
|||||||
|
|
||||||
print '<tr><td>'.$langs->trans("Project").'</td><td>';
|
print '<tr><td>'.$langs->trans("Project").'</td><td>';
|
||||||
|
|
||||||
$numproject=$formproject->select_projects((! empty($societe->id)?$societe->id:0),GETPOST("projectid")?GETPOST("projectid"):'','projectid');
|
$numproject=$formproject->select_projects((! empty($societe->id)?$societe->id:-1),GETPOST("projectid")?GETPOST("projectid"):'','projectid');
|
||||||
if ($numproject==0)
|
if ($numproject==0)
|
||||||
{
|
{
|
||||||
print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$societe->id.'&action=create">'.$langs->trans("AddProject").'</a>';
|
print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$societe->id.'&action=create">'.$langs->trans("AddProject").'</a>';
|
||||||
|
|||||||
@ -406,7 +406,7 @@ class ActionComm extends CommonObject
|
|||||||
*/
|
*/
|
||||||
public function add(User $user, $notrigger = 0)
|
public function add(User $user, $notrigger = 0)
|
||||||
{
|
{
|
||||||
$this->create($user, $notrigger);
|
return $this->create($user, $notrigger);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -208,7 +208,7 @@ class ICal
|
|||||||
|
|
||||||
//print 'type='.$type.' key='.$key.' value='.$value.'<br>'."\n";
|
//print 'type='.$type.' key='.$key.' value='.$value.'<br>'."\n";
|
||||||
|
|
||||||
if ($key == false)
|
if (empty($key))
|
||||||
{
|
{
|
||||||
$key = $this->last_key;
|
$key = $this->last_key;
|
||||||
switch ($type)
|
switch ($type)
|
||||||
|
|||||||
@ -86,12 +86,12 @@ $status=GETPOST("status");
|
|||||||
$type=GETPOST("type");
|
$type=GETPOST("type");
|
||||||
$maxprint=(isset($_GET["maxprint"])?GETPOST("maxprint"):$conf->global->AGENDA_MAX_EVENTS_DAY_VIEW);
|
$maxprint=(isset($_GET["maxprint"])?GETPOST("maxprint"):$conf->global->AGENDA_MAX_EVENTS_DAY_VIEW);
|
||||||
// Set actioncode (this code must be same for setting actioncode into peruser, listacton and index)
|
// Set actioncode (this code must be same for setting actioncode into peruser, listacton and index)
|
||||||
if (GETPOST('actioncode','array'))
|
if (GETPOST('actioncode','array'))
|
||||||
{
|
{
|
||||||
$actioncode=GETPOST('actioncode','array',3);
|
$actioncode=GETPOST('actioncode','array',3);
|
||||||
if (! count($actioncode)) $actioncode='0';
|
if (! count($actioncode)) $actioncode='0';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$actioncode=GETPOST("actioncode","alpha",3)?GETPOST("actioncode","alpha",3):(GETPOST("actioncode")=='0'?'0':(empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE)?'':$conf->global->AGENDA_DEFAULT_FILTER_TYPE));
|
$actioncode=GETPOST("actioncode","alpha",3)?GETPOST("actioncode","alpha",3):(GETPOST("actioncode")=='0'?'0':(empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE)?'':$conf->global->AGENDA_DEFAULT_FILTER_TYPE));
|
||||||
}
|
}
|
||||||
@ -186,7 +186,7 @@ $week = $prev['week'];
|
|||||||
|
|
||||||
$day = (int) $day;
|
$day = (int) $day;
|
||||||
$next = dol_get_next_day($day, $month, $year);
|
$next = dol_get_next_day($day, $month, $year);
|
||||||
$next_year = year + 1;
|
$next_year = $year + 1;
|
||||||
$next_month = $month;
|
$next_month = $month;
|
||||||
$next_day = $day;
|
$next_day = $day;
|
||||||
|
|
||||||
|
|||||||
@ -253,7 +253,7 @@ if ($action == 'create')
|
|||||||
print '<tr><td class="fieldrequired">'.$langs->trans('Label').'</td><td><input type="text" size="30" name="label" id="label" value="'.($object->label?$object->label:$langs->trans('RequiredField')).'"></td></tr>';
|
print '<tr><td class="fieldrequired">'.$langs->trans('Label').'</td><td><input type="text" size="30" name="label" id="label" value="'.($object->label?$object->label:$langs->trans('RequiredField')).'"></td></tr>';
|
||||||
print '<tr><td class="fieldrequired">'.$langs->trans('Name').'</td><td><input type="text" size="30" name="name" id="name" value="'.($object->name?$object->name:$langs->trans('RequiredField')).'"></td></tr>';
|
print '<tr><td class="fieldrequired">'.$langs->trans('Name').'</td><td><input type="text" size="30" name="name" id="name" value="'.($object->name?$object->name:$langs->trans('RequiredField')).'"></td></tr>';
|
||||||
|
|
||||||
print '<tr><td valign="top">'.$langs->trans('Address').'</td><td colspan="3"><textarea name="address" cols="40" rows="3" wrap="soft">';
|
print '<tr><td valign="top">'.$langs->trans('Address').'</td><td colspan="3"><textarea name="address" class="quatrevingtpercent" rows="3" wrap="soft">';
|
||||||
print $object->address;
|
print $object->address;
|
||||||
print '</textarea></td></tr>';
|
print '</textarea></td></tr>';
|
||||||
|
|
||||||
@ -353,7 +353,7 @@ elseif ($action == 'edit')
|
|||||||
print '<tr><td>'.$langs->trans('AddressLabel').'</td><td colspan="3"><input type="text" size="40" name="label" value="'.$object->label.'"></td></tr>';
|
print '<tr><td>'.$langs->trans('AddressLabel').'</td><td colspan="3"><input type="text" size="40" name="label" value="'.$object->label.'"></td></tr>';
|
||||||
print '<tr><td>'.$langs->trans('Name').'</td><td colspan="3"><input type="text" size="40" name="name" value="'.$object->name.'"></td></tr>';
|
print '<tr><td>'.$langs->trans('Name').'</td><td colspan="3"><input type="text" size="40" name="name" value="'.$object->name.'"></td></tr>';
|
||||||
|
|
||||||
print '<tr><td valign="top">'.$langs->trans('Address').'</td><td colspan="3"><textarea name="address" cols="40" rows="3" wrap="soft">';
|
print '<tr><td valign="top">'.$langs->trans('Address').'</td><td colspan="3"><textarea name="address" class="quatrevingtpercent" rows="3" wrap="soft">';
|
||||||
print $object->address;
|
print $object->address;
|
||||||
print '</textarea></td></tr>';
|
print '</textarea></td></tr>';
|
||||||
|
|
||||||
|
|||||||
@ -423,7 +423,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande
|
|||||||
$companystatic->code_client = $obj->code_client;
|
$companystatic->code_client = $obj->code_client;
|
||||||
$companystatic->code_fournisseur = $obj->code_fournisseur;
|
$companystatic->code_fournisseur = $obj->code_fournisseur;
|
||||||
$companystatic->canvas=$obj->canvas;
|
$companystatic->canvas=$obj->canvas;
|
||||||
print $companystatic->getNomUrl(1,'customer',16);
|
print $companystatic->getNomUrl(1,'supplier',16);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right" class="nowrap">'.price($obj->total_ttc).'</td></tr>';
|
print '<td align="right" class="nowrap">'.price($obj->total_ttc).'</td></tr>';
|
||||||
$i++;
|
$i++;
|
||||||
@ -729,7 +729,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
|
|||||||
$companystatic->code_client = $obj->code_client;
|
$companystatic->code_client = $obj->code_client;
|
||||||
$companystatic->code_fournisseur = $obj->code_fournisseur;
|
$companystatic->code_fournisseur = $obj->code_fournisseur;
|
||||||
$companystatic->canvas=$obj->canvas;
|
$companystatic->canvas=$obj->canvas;
|
||||||
print $companystatic->getNomUrl(1, 'company', 44);
|
print $companystatic->getNomUrl(1, 'customer', 44);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
print dol_print_date($db->jdate($obj->dp),'day').'</td>'."\n";
|
print dol_print_date($db->jdate($obj->dp),'day').'</td>'."\n";
|
||||||
@ -828,7 +828,7 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire)
|
|||||||
$companystatic->code_client = $obj->code_client;
|
$companystatic->code_client = $obj->code_client;
|
||||||
$companystatic->code_fournisseur = $obj->code_fournisseur;
|
$companystatic->code_fournisseur = $obj->code_fournisseur;
|
||||||
$companystatic->canvas=$obj->canvas;
|
$companystatic->canvas=$obj->canvas;
|
||||||
print $companystatic->getNomUrl(1, 'company', 44);
|
print $companystatic->getNomUrl(1, 'customer', 44);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
print dol_print_date($db->jdate($obj->dp),'day').'</td>'."\n";
|
print dol_print_date($db->jdate($obj->dp),'day').'</td>'."\n";
|
||||||
|
|||||||
@ -221,7 +221,7 @@ if ($action == 'add') {
|
|||||||
if ((count($advTarget->thirdparty_lines) > 0) || (count($advTarget->contact_lines) > 0)) {
|
if ((count($advTarget->thirdparty_lines) > 0) || (count($advTarget->contact_lines) > 0)) {
|
||||||
// Add targets into database
|
// Add targets into database
|
||||||
$obj = new mailing_advthirdparties($db);
|
$obj = new mailing_advthirdparties($db);
|
||||||
$result = $obj->add_to_target($id, $advTarget->thirdparty_lines, $array_query['type_of_target'], $advTarget->contact_lines);
|
$result = $obj->add_to_target_spec($id, $advTarget->thirdparty_lines, $array_query['type_of_target'], $advTarget->contact_lines);
|
||||||
} else {
|
} else {
|
||||||
$result = 0;
|
$result = 0;
|
||||||
}
|
}
|
||||||
@ -967,11 +967,11 @@ if ($object->fetch($id) >= 0) {
|
|||||||
print '</form>';
|
print '</form>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (empty($conf->mailchimp->enabled) || (! empty($conf->mailchimp->enabled) && $object->statut != 3))
|
|
||||||
|
if (empty($conf->mailchimp->enabled) || (! empty($conf->mailchimp->enabled) && $object->statut != 3))
|
||||||
{
|
{
|
||||||
// List of recipients (TODO Move code of page cibles.php into a .tpl.php file and make an include here to avoid duplicate content)
|
// List of recipients (TODO Move code of page cibles.php into a .tpl.php file and make an include here to avoid duplicate content)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -259,7 +259,8 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Fabrication du mail
|
// Fabrication du mail
|
||||||
$mail = new CMailFile($newsubject, $sendto, $from, $newmessage, $arr_file, $arr_mime, $arr_name, '', '', 0, $msgishtml, $errorsto, $arr_css);
|
$trackid=''; // TODO Define a trackid for mass emailing too. We can use source type for this.
|
||||||
|
$mail = new CMailFile($newsubject, $sendto, $from, $newmessage, $arr_file, $arr_mime, $arr_name, '', '', 0, $msgishtml, $errorsto, $arr_css, $trackid);
|
||||||
|
|
||||||
if ($mail->error)
|
if ($mail->error)
|
||||||
{
|
{
|
||||||
@ -672,9 +673,9 @@ if ($action == 'create')
|
|||||||
dol_fiche_head();
|
dol_fiche_head();
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
print '<tr><td width="25%" class="fieldrequired">'.$langs->trans("MailTitle").'</td><td><input class="flat" name="titre" size="40" value="'.$_POST['titre'].'"></td></tr>';
|
print '<tr><td class="fieldrequired titlefieldcreate">'.$langs->trans("MailTitle").'</td><td><input class="flat" name="titre" size="40" value="'.$_POST['titre'].'"></td></tr>';
|
||||||
print '<tr><td width="25%" class="fieldrequired">'.$langs->trans("MailFrom").'</td><td><input class="flat" name="from" size="40" value="'.$conf->global->MAILING_EMAIL_FROM.'"></td></tr>';
|
print '<tr><td class="fieldrequired">'.$langs->trans("MailFrom").'</td><td><input class="flat" name="from" size="40" value="'.$conf->global->MAILING_EMAIL_FROM.'"></td></tr>';
|
||||||
print '<tr><td width="25%">'.$langs->trans("MailErrorsTo").'</td><td><input class="flat" name="errorsto" size="40" value="'.(!empty($conf->global->MAILING_EMAIL_ERRORSTO)?$conf->global->MAILING_EMAIL_ERRORSTO:$conf->global->MAIN_MAIL_ERRORS_TO).'"></td></tr>';
|
print '<tr><td>'.$langs->trans("MailErrorsTo").'</td><td><input class="flat" name="errorsto" size="40" value="'.(!empty($conf->global->MAILING_EMAIL_ERRORSTO)?$conf->global->MAILING_EMAIL_ERRORSTO:$conf->global->MAIN_MAIL_ERRORS_TO).'"></td></tr>';
|
||||||
|
|
||||||
// Other attributes
|
// Other attributes
|
||||||
$parameters=array();
|
$parameters=array();
|
||||||
@ -688,11 +689,11 @@ if ($action == 'create')
|
|||||||
print '</br><br>';
|
print '</br><br>';
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
print '<tr><td width="25%" class="fieldrequired">'.$langs->trans("MailTopic").'</td><td><input class="flat" name="sujet" size="60" value="'.$_POST['sujet'].'"></td></tr>';
|
print '<tr><td class="fieldrequired titlefieldcreate">'.$langs->trans("MailTopic").'</td><td><input class="flat" name="sujet" size="60" value="'.$_POST['sujet'].'"></td></tr>';
|
||||||
print '<tr><td width="25%">'.$langs->trans("BackgroundColorByDefault").'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans("BackgroundColorByDefault").'</td><td colspan="3">';
|
||||||
print $htmlother->selectColor($_POST['bgcolor'],'bgcolor','new_mailing',0);
|
print $htmlother->selectColor($_POST['bgcolor'],'bgcolor','new_mailing',0);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
print '<tr><td width="25%" valign="top"><span class="fieldrequired">'.$langs->trans("MailMessage").'</span><br>';
|
print '<tr><td valign="top"><span class="fieldrequired">'.$langs->trans("MailMessage").'</span><br>';
|
||||||
print '<br><i>'.$langs->trans("CommonSubstitutions").':<br>';
|
print '<br><i>'.$langs->trans("CommonSubstitutions").':<br>';
|
||||||
foreach($object->substitutionarray as $key => $val)
|
foreach($object->substitutionarray as $key => $val)
|
||||||
{
|
{
|
||||||
@ -791,7 +792,7 @@ else
|
|||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/comm/mailing/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/comm/mailing/list.php">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
|
print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td>';
|
||||||
print '<td colspan="3">';
|
print '<td colspan="3">';
|
||||||
print $form->showrefnav($object,'id', $linkback);
|
print $form->showrefnav($object,'id', $linkback);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@ -994,7 +995,7 @@ else
|
|||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// Subject
|
// Subject
|
||||||
print '<tr><td width="25%">'.$langs->trans("MailTopic").'</td><td colspan="3">'.$object->sujet.'</td></tr>';
|
print '<tr><td class="titlefield">'.$langs->trans("MailTopic").'</td><td colspan="3">'.$object->sujet.'</td></tr>';
|
||||||
|
|
||||||
// Joined files
|
// Joined files
|
||||||
print '<tr><td>'.$langs->trans("MailFile").'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans("MailFile").'</td><td colspan="3">';
|
||||||
@ -1020,7 +1021,7 @@ else
|
|||||||
print '</td></tr>';*/
|
print '</td></tr>';*/
|
||||||
|
|
||||||
// Message
|
// Message
|
||||||
print '<tr><td width="25%" valign="top">'.$langs->trans("MailMessage").'<br>';
|
print '<tr><td valign="top">'.$langs->trans("MailMessage").'<br>';
|
||||||
print '<br><i>'.$langs->trans("CommonSubstitutions").':<br>';
|
print '<br><i>'.$langs->trans("CommonSubstitutions").':<br>';
|
||||||
foreach($object->substitutionarray as $key => $val)
|
foreach($object->substitutionarray as $key => $val)
|
||||||
{
|
{
|
||||||
@ -1054,7 +1055,7 @@ else
|
|||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/comm/mailing/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/comm/mailing/list.php">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
|
print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td>';
|
||||||
print '<td colspan="3">';
|
print '<td colspan="3">';
|
||||||
print $form->showrefnav($object,'id', $linkback);
|
print $form->showrefnav($object,'id', $linkback);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@ -1113,9 +1114,10 @@ else
|
|||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// Subject
|
// Subject
|
||||||
print '<tr><td width="25%" class="fieldrequired">'.$langs->trans("MailTopic").'</td><td colspan="3"><input class="flat" type="text" size=60 name="sujet" value="'.$object->sujet.'"></td></tr>';
|
print '<tr><td class="fieldrequired titlefield">'.$langs->trans("MailTopic").'</td><td colspan="3"><input class="flat" type="text" size=60 name="sujet" value="'.$object->sujet.'"></td></tr>';
|
||||||
|
|
||||||
dol_init_file_process($upload_dir);
|
$trackid=''; // TODO To avoid conflicts with 2 mass emailing, we should set a trackid here, even if we use another one into email header.
|
||||||
|
dol_init_file_process($upload_dir, $trackid);
|
||||||
|
|
||||||
// Joined files
|
// Joined files
|
||||||
$addfileaction='addfile';
|
$addfileaction='addfile';
|
||||||
@ -1154,12 +1156,12 @@ else
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Background color
|
// Background color
|
||||||
print '<tr><td width="25%">'.$langs->trans("BackgroundColorByDefault").'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans("BackgroundColorByDefault").'</td><td colspan="3">';
|
||||||
print $htmlother->selectColor($object->bgcolor,'bgcolor','edit_mailing',0);
|
print $htmlother->selectColor($object->bgcolor,'bgcolor','edit_mailing',0);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Message
|
// Message
|
||||||
print '<tr><td width="25%" valign="top">'.$langs->trans("MailMessage").'<br>';
|
print '<tr><td valign="top">'.$langs->trans("MailMessage").'<br>';
|
||||||
print '<br><i>'.$langs->trans("CommonSubstitutions").':<br>';
|
print '<br><i>'.$langs->trans("CommonSubstitutions").':<br>';
|
||||||
foreach($object->substitutionarray as $key => $val)
|
foreach($object->substitutionarray as $key => $val)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -122,9 +122,10 @@ if (GETPOST('clearlist'))
|
|||||||
// Loading Class
|
// Loading Class
|
||||||
$obj = new MailingTargets($db);
|
$obj = new MailingTargets($db);
|
||||||
$obj->clear_target($id);
|
$obj->clear_target($id);
|
||||||
|
/* Avoid this to allow reposition
|
||||||
header("Location: ".$_SERVER['PHP_SELF']."?id=".$id);
|
header("Location: ".$_SERVER['PHP_SELF']."?id=".$id);
|
||||||
exit;
|
exit;
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'delete')
|
if ($action == 'delete')
|
||||||
@ -182,30 +183,30 @@ if ($object->fetch($id) >= 0)
|
|||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/comm/mailing/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/comm/mailing/list.php">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
|
print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td>';
|
||||||
print '<td colspan="3">';
|
print '<td colspan="3">';
|
||||||
print $form->showrefnav($object,'id', $linkback);
|
print $form->showrefnav($object,'id', $linkback);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td width="25%">'.$langs->trans("MailTitle").'</td><td colspan="3">'.$object->titre.'</td></tr>';
|
print '<tr><td>'.$langs->trans("MailTitle").'</td><td colspan="3">'.$object->titre.'</td></tr>';
|
||||||
|
|
||||||
print '<tr><td width="25%">'.$langs->trans("MailFrom").'</td><td colspan="3">'.dol_print_email($object->email_from,0,0,0,0,1).'</td></tr>';
|
print '<tr><td>'.$langs->trans("MailFrom").'</td><td colspan="3">'.dol_print_email($object->email_from,0,0,0,0,1).'</td></tr>';
|
||||||
|
|
||||||
// Errors to
|
// Errors to
|
||||||
print '<tr><td width="25%">'.$langs->trans("MailErrorsTo").'</td><td colspan="3">'.dol_print_email($object->email_errorsto,0,0,0,0,1);
|
print '<tr><td>'.$langs->trans("MailErrorsTo").'</td><td colspan="3">'.dol_print_email($object->email_errorsto,0,0,0,0,1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Status
|
// Status
|
||||||
print '<tr><td width="25%">'.$langs->trans("Status").'</td><td colspan="3">'.$object->getLibStatut(4);
|
print '<tr><td>'.$langs->trans("Status").'</td><td colspan="3">'.$object->getLibStatut(4);
|
||||||
if ($object->statut == 2) print ' ('.$object->countNbOfTargets('alreadysent').'/'.$object->nbemail.')';
|
if ($object->statut == 2) print ' ('.$object->countNbOfTargets('alreadysent').'/'.$object->nbemail.')';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Nb of distinct emails
|
// Nb of distinct emails
|
||||||
print '<tr><td width="25%">';
|
print '<tr><td>';
|
||||||
print $langs->trans("TotalNbOfDistinctRecipients");
|
print $langs->trans("TotalNbOfDistinctRecipients");
|
||||||
print '</td><td colspan="3">';
|
print '</td><td colspan="3">';
|
||||||
$nbemail = ($object->nbemail?$object->nbemail:'0');
|
$nbemail = ($object->nbemail?$object->nbemail:'0');
|
||||||
if (!empty($conf->global->MAILING_LIMIT_SENDBYWEB) && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail)
|
if (!empty($conf->global->MAILING_LIMIT_SENDBYWEB) && ($conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail) && ($object->statut == 1 || $object->statut == 2))
|
||||||
{
|
{
|
||||||
$text=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB);
|
$text=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB);
|
||||||
print $form->textwithpicto($nbemail,$text,1,'warning');
|
print $form->textwithpicto($nbemail,$text,1,'warning');
|
||||||
@ -400,7 +401,7 @@ if ($object->fetch($id) >= 0)
|
|||||||
|
|
||||||
$cleartext='';
|
$cleartext='';
|
||||||
if ($allowaddtarget) {
|
if ($allowaddtarget) {
|
||||||
$cleartext=$langs->trans("ToClearAllRecipientsClickHere").' '.'<input type="submit" name="clearlist" class="button" value="'.$langs->trans("TargetsReset").'">';
|
$cleartext=$langs->trans("ToClearAllRecipientsClickHere").' '.'<a href="'.$_SERVER["PHP_SELF"].'?clearlist=1&id='.$object->id.'" class="button reposition">'.$langs->trans("TargetsReset").'</a>';
|
||||||
}
|
}
|
||||||
print_barre_liste($langs->trans("MailSelectedRecipients"),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,$cleartext,$num,$nbtotalofrecords,'title_generic',0,'','',$limit);
|
print_barre_liste($langs->trans("MailSelectedRecipients"),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,$cleartext,$num,$nbtotalofrecords,'title_generic',0,'','',$limit);
|
||||||
|
|
||||||
|
|||||||
@ -41,6 +41,8 @@ class Mailing extends CommonObject
|
|||||||
var $bgcolor;
|
var $bgcolor;
|
||||||
var $bgimage;
|
var $bgimage;
|
||||||
|
|
||||||
|
var $statut; // Status 0=Draft, 1=Validated, 2=Sent partially, 3=Sent completely
|
||||||
|
|
||||||
var $email_from;
|
var $email_from;
|
||||||
var $email_replyto;
|
var $email_replyto;
|
||||||
var $email_errorsto;
|
var $email_errorsto;
|
||||||
|
|||||||
@ -1403,7 +1403,7 @@ if ($action == 'create')
|
|||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>' . $langs->trans("Project") . '</td><td colspan="2">';
|
print '<td>' . $langs->trans("Project") . '</td><td colspan="2">';
|
||||||
$numprojet = $formproject->select_projects($soc->id, $projectid, 'projectid', 0);
|
$numprojet = $formproject->select_projects($soc->id, $projectid, 'projectid', 0);
|
||||||
print ' <a href="../projet/card.php?socid=' . $soc->id . '&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'">' . $langs->trans("AddProject") . '</a>';
|
print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid=' . $soc->id . '&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'">' . $langs->trans("AddProject") . '</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -32,6 +32,8 @@ $langs->load("orders");
|
|||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|
||||||
|
$id=GETPOST('id','int');
|
||||||
|
|
||||||
$action=GETPOST('action','alpha');
|
$action=GETPOST('action','alpha');
|
||||||
$backtopage=GETPOST('backtopage','alpha');
|
$backtopage=GETPOST('backtopage','alpha');
|
||||||
|
|
||||||
@ -58,6 +60,9 @@ if ($action == 'confirm_split' && GETPOST("confirm") == 'yes')
|
|||||||
//if ($user->rights->societe->creer)
|
//if ($user->rights->societe->creer)
|
||||||
//if ($user->rights->facture->creer)
|
//if ($user->rights->facture->creer)
|
||||||
|
|
||||||
|
$amount_ttc_1=GETPOST('amount_ttc_1');
|
||||||
|
$amount_ttc_2=GETPOST('amount_ttc_2');
|
||||||
|
|
||||||
$error=0;
|
$error=0;
|
||||||
$remid=GETPOST("remid")?GETPOST("remid"):0;
|
$remid=GETPOST("remid")?GETPOST("remid"):0;
|
||||||
$discount=new DiscountAbsolute($db);
|
$discount=new DiscountAbsolute($db);
|
||||||
@ -67,7 +72,7 @@ if ($action == 'confirm_split' && GETPOST("confirm") == 'yes')
|
|||||||
$error++;
|
$error++;
|
||||||
setEventMessages($langs->trans("ErrorFailedToLoadDiscount"), null, 'errors');
|
setEventMessages($langs->trans("ErrorFailedToLoadDiscount"), null, 'errors');
|
||||||
}
|
}
|
||||||
if (! $error && price2num($_POST["amount_ttc_1"]+$_POST["amount_ttc_2"]) != $discount->amount_ttc)
|
if (! $error && price2num($amount_ttc_1+$amount_ttc_2) != $discount->amount_ttc)
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages($langs->trans("TotalOfTwoDiscountMustEqualsOriginal"), null, 'errors');
|
setEventMessages($langs->trans("TotalOfTwoDiscountMustEqualsOriginal"), null, 'errors');
|
||||||
@ -120,7 +125,7 @@ if ($action == 'confirm_split' && GETPOST("confirm") == 'yes')
|
|||||||
if ($res > 0 && $newid1 > 0 && $newid2 > 0)
|
if ($res > 0 && $newid1 > 0 && $newid2 > 0)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
header("Location: ".$_SERVER["PHP_SELF"].'?id='.$_REQUEST['id']); // To avoid pb whith back
|
header("Location: ".$_SERVER["PHP_SELF"].'?id='.$id); // To avoid pb whith back
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -135,10 +140,14 @@ if ($action == 'setremise')
|
|||||||
//if ($user->rights->societe->creer)
|
//if ($user->rights->societe->creer)
|
||||||
//if ($user->rights->facture->creer)
|
//if ($user->rights->facture->creer)
|
||||||
|
|
||||||
if (price2num($_POST["amount_ht"]) > 0)
|
$amount_ht=GETPOST('amount_ht');
|
||||||
|
$desc=GETPOST('desc','alpha');
|
||||||
|
$tva_tx=GETPOST('tva_tx','alpha');
|
||||||
|
|
||||||
|
if (price2num($amount_ht) > 0)
|
||||||
{
|
{
|
||||||
$error=0;
|
$error=0;
|
||||||
if (empty($_POST["desc"]))
|
if (empty($desc))
|
||||||
{
|
{
|
||||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->trans("ReasonDiscount")), null, 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->trans("ReasonDiscount")), null, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
@ -147,8 +156,8 @@ if ($action == 'setremise')
|
|||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$soc = new Societe($db);
|
$soc = new Societe($db);
|
||||||
$soc->fetch($_GET["id"]);
|
$soc->fetch($id);
|
||||||
$discountid=$soc->set_remise_except($_POST["amount_ht"],$user,$_POST["desc"],$_POST["tva_tx"]);
|
$discountid=$soc->set_remise_except($amount_ht,$user,$desc,$tva_tx);
|
||||||
|
|
||||||
if ($discountid > 0)
|
if ($discountid > 0)
|
||||||
{
|
{
|
||||||
@ -159,7 +168,7 @@ if ($action == 'setremise')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
header("Location: remx.php?id=".$_GET["id"]);
|
header("Location: remx.php?id=".$id);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -189,7 +198,7 @@ if (GETPOST("action") == 'confirm_remove' && GETPOST("confirm")=='yes')
|
|||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
header("Location: ".$_SERVER["PHP_SELF"].'?id='.GETPOST('id','int')); // To avoid pb whith back
|
header("Location: ".$_SERVER["PHP_SELF"].'?id='.$id); // To avoid pb whith back
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -227,11 +236,11 @@ if ($socid > 0)
|
|||||||
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
|
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
|
||||||
|
|
||||||
dol_fiche_head($head, 'absolutediscount', $langs->trans("ThirdParty"),0,'company');
|
dol_fiche_head($head, 'absolutediscount', $langs->trans("ThirdParty"),0,'company');
|
||||||
|
|
||||||
dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
|
dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
|
||||||
|
|
||||||
print '<div class="fichecenter">';
|
print '<div class="fichecenter">';
|
||||||
|
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
print '<table class="border centpercent">';
|
print '<table class="border centpercent">';
|
||||||
|
|
||||||
@ -264,22 +273,22 @@ if ($socid > 0)
|
|||||||
|
|
||||||
print load_fiche_titre($langs->trans("NewGlobalDiscount"),'','');
|
print load_fiche_titre($langs->trans("NewGlobalDiscount"),'','');
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
print '<tr><td width="38%">'.$langs->trans("AmountHT").'</td>';
|
print '<tr><td width="38%" class="fieldrequired">'.$langs->trans("AmountHT").'</td>';
|
||||||
print '<td><input type="text" size="5" name="amount_ht" value="'.$_POST["amount_ht"].'">';
|
print '<td><input type="text" size="5" name="amount_ht" value="'.$_POST["amount_ht"].'">';
|
||||||
print '<span class="hideonsmartphone"> '.$langs->trans("Currency".$conf->currency).'</span></td></tr>';
|
print '<span class="hideonsmartphone"> '.$langs->trans("Currency".$conf->currency).'</span></td></tr>';
|
||||||
print '<tr><td width="38%">'.$langs->trans("VAT").'</td>';
|
print '<tr><td width="38%">'.$langs->trans("VAT").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $form->load_tva('tva_tx',GETPOST('tva_tx'),$mysoc,$object);
|
print $form->load_tva('tva_tx',GETPOST('tva_tx'),$mysoc,$object);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
print '<tr><td>'.$langs->trans("NoteReason").'</td>';
|
print '<tr><td class="fieldrequired" >'.$langs->trans("NoteReason").'</td>';
|
||||||
print '<td><input type="text" size="60" name="desc" value="'.$_POST["desc"].'"></td></tr>';
|
print '<td><input type="text" size="60" name="desc" value="'.GETPOST('desc').'"></td></tr>';
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
print '<div class="center">';
|
print '<div class="center">';
|
||||||
print '<input type="submit" class="button" name="submit" value="'.$langs->trans("AddGlobalDiscount").'">';
|
print '<input type="submit" class="button" name="submit" value="'.$langs->trans("AddGlobalDiscount").'">';
|
||||||
if (! empty($backtopage))
|
if (! empty($backtopage))
|
||||||
@ -296,7 +305,7 @@ if ($socid > 0)
|
|||||||
|
|
||||||
if ($_GET['action'] == 'remove')
|
if ($_GET['action'] == 'remove')
|
||||||
{
|
{
|
||||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$_GET["remid"], $langs->trans('RemoveDiscount'), $langs->trans('ConfirmRemoveDiscount'), 'confirm_remove', '', 0, 1);
|
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.GETPOST('remid'), $langs->trans('RemoveDiscount'), $langs->trans('ConfirmRemoveDiscount'), 'confirm_remove', '', 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -383,7 +392,7 @@ if ($socid > 0)
|
|||||||
else print '<td> </td>';
|
else print '<td> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
if ($_GET["action"]=='split' && $_GET['remid'] == $obj->rowid)
|
if ($_GET["action"]=='split' && GETPOST('remid') == $obj->rowid)
|
||||||
{
|
{
|
||||||
$showconfirminfo['rowid']=$obj->rowid;
|
$showconfirminfo['rowid']=$obj->rowid;
|
||||||
$showconfirminfo['amount_ttc']=$obj->amount_ttc;
|
$showconfirminfo['amount_ttc']=$obj->amount_ttc;
|
||||||
|
|||||||
@ -1195,9 +1195,9 @@ if (empty($reshook))
|
|||||||
$file = $upload_dir . '/' . GETPOST('file');
|
$file = $upload_dir . '/' . GETPOST('file');
|
||||||
$ret = dol_delete_file($file, 0, 0, 0, $object);
|
$ret = dol_delete_file($file, 0, 0, 0, $object);
|
||||||
if ($ret)
|
if ($ret)
|
||||||
setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs');
|
setEventMessages($langs->trans("FileWasRemoved", GETPOST('file')), null, 'mesgs');
|
||||||
else
|
else
|
||||||
setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors');
|
setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('file')), null, 'errors');
|
||||||
$action = '';
|
$action = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -1030,7 +1030,6 @@ if ($resql)
|
|||||||
else print '<td></td>';
|
else print '<td></td>';
|
||||||
}
|
}
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
|
|||||||
@ -105,6 +105,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
$cssclass="titlefield";
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|||||||
@ -70,9 +70,14 @@ $date_end = dol_mktime(23,59,59,$_REQUEST["date_endmonth"],$_REQUEST["date_endda
|
|||||||
$date_starty = dol_mktime(0,0,0,$_REQUEST["date_start_delymonth"],$_REQUEST["date_start_delyday"],$_REQUEST["date_start_delyyear"]); // Date for local PHP server
|
$date_starty = dol_mktime(0,0,0,$_REQUEST["date_start_delymonth"],$_REQUEST["date_start_delyday"],$_REQUEST["date_start_delyyear"]); // Date for local PHP server
|
||||||
$date_endy = dol_mktime(23,59,59,$_REQUEST["date_end_delymonth"],$_REQUEST["date_end_delyday"],$_REQUEST["date_end_delyyear"]);
|
$date_endy = dol_mktime(23,59,59,$_REQUEST["date_end_delymonth"],$_REQUEST["date_end_delyday"],$_REQUEST["date_end_delyyear"]);
|
||||||
|
|
||||||
|
$extrafields = new ExtraFields($db);
|
||||||
|
|
||||||
|
// fetch optionals attributes and labels
|
||||||
|
$extralabels=$extrafields->fetch_name_optionals_label('facture');
|
||||||
|
|
||||||
if ($action == 'create')
|
if ($action == 'create')
|
||||||
{
|
{
|
||||||
if (is_array($selected) == false)
|
if (! is_array($selected))
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages($langs->trans('Error_OrderNotChecked'), null, 'errors');
|
setEventMessages($langs->trans('Error_OrderNotChecked'), null, 'errors');
|
||||||
@ -174,6 +179,9 @@ if (($action == 'create' || $action == 'add') && !$error)
|
|||||||
$object->remise_absolue = $_POST['remise_absolue'];
|
$object->remise_absolue = $_POST['remise_absolue'];
|
||||||
$object->remise_percent = $_POST['remise_percent'];
|
$object->remise_percent = $_POST['remise_percent'];
|
||||||
|
|
||||||
|
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
||||||
|
if ($ret < 0) $error++;
|
||||||
|
|
||||||
if ($_POST['origin'] && $_POST['originid'])
|
if ($_POST['origin'] && $_POST['originid'])
|
||||||
{
|
{
|
||||||
$object->origin = $_POST['origin'];
|
$object->origin = $_POST['origin'];
|
||||||
@ -464,6 +472,12 @@ if ($action == 'create' && !$error)
|
|||||||
$parameters=array('objectsrc' => $objectsrc, 'idsrc' => $listoforders, 'colspan' => ' colspan="3"');
|
$parameters=array('objectsrc' => $objectsrc, 'idsrc' => $listoforders, 'colspan' => ' colspan="3"');
|
||||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||||
|
|
||||||
|
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||||
|
{
|
||||||
|
$object=new Facture($db);
|
||||||
|
print $object->showOptionals($extrafields,'edit');
|
||||||
|
}
|
||||||
|
|
||||||
// Modele PDF
|
// Modele PDF
|
||||||
print '<tr><td>'.$langs->trans('Model').'</td>';
|
print '<tr><td>'.$langs->trans('Model').'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
|
|||||||
@ -36,10 +36,10 @@ $id=GETPOST('account');
|
|||||||
$ref=GETPOST('ref');
|
$ref=GETPOST('ref');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$fieldid = (! empty($ref)?$ref:$id);
|
$fieldvalue = (! empty($id) ? $id : (! empty($ref) ? $ref :''));
|
||||||
$fieldname = isset($ref)?'ref':'rowid';
|
$fieldtype = (! empty($ref) ? 'ref' :'rowid');
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result=restrictedArea($user,'banque',$fieldid,'bank_account','','',$fieldname);
|
$result=restrictedArea($user,'banque',$fieldvalue,'bank_account&bank_account','','',$fieldtype);
|
||||||
|
|
||||||
$year_start=GETPOST('year_start');
|
$year_start=GETPOST('year_start');
|
||||||
$year_current = strftime("%Y",time());
|
$year_current = strftime("%Y",time());
|
||||||
@ -146,7 +146,7 @@ $linkback = '<a href="'.DOL_URL_ROOT.'/compta/bank/index.php">'.$langs->trans("B
|
|||||||
// Ref
|
// Ref
|
||||||
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
|
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
|
||||||
print '<td colspan="3">';
|
print '<td colspan="3">';
|
||||||
if ($_GET["account"])
|
if (!empty($id))
|
||||||
{
|
{
|
||||||
if (! preg_match('/,/', $id))
|
if (! preg_match('/,/', $id))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -89,8 +89,7 @@ if ($_POST["action"] == 'add')
|
|||||||
$account->proprio = trim($_POST["proprio"]);
|
$account->proprio = trim($_POST["proprio"]);
|
||||||
$account->owner_address = trim($_POST["owner_address"]);
|
$account->owner_address = trim($_POST["owner_address"]);
|
||||||
|
|
||||||
if (GETPOST('account_number') <= 0) { $accountancy_code_number = ''; } else { $accountancy_code_number = GETPOST('account_number'); }
|
$account->account_number = GETPOST('account_number');
|
||||||
$account->account_number = $accountancy_code_number;
|
|
||||||
$account->accountancy_journal = trim($_POST["accountancy_journal"]);
|
$account->accountancy_journal = trim($_POST["accountancy_journal"]);
|
||||||
|
|
||||||
$account->solde = $_POST["solde"];
|
$account->solde = $_POST["solde"];
|
||||||
@ -172,8 +171,7 @@ if ($_POST["action"] == 'update' && ! $_POST["cancel"])
|
|||||||
$account->proprio = trim($_POST["proprio"]);
|
$account->proprio = trim($_POST["proprio"]);
|
||||||
$account->owner_address = trim($_POST["owner_address"]);
|
$account->owner_address = trim($_POST["owner_address"]);
|
||||||
|
|
||||||
if (GETPOST('account_number') <= 0) { $accountancy_code_number = ''; } else { $accountancy_code_number = GETPOST('account_number'); }
|
$account->account_number = GETPOST('account_number');
|
||||||
$account->account_number = $accountancy_code_number;
|
|
||||||
$account->accountancy_journal = trim($_POST["accountancy_journal"]);
|
$account->accountancy_journal = trim($_POST["accountancy_journal"]);
|
||||||
|
|
||||||
$account->currency_code = trim($_POST["account_currency_code"]);
|
$account->currency_code = trim($_POST["account_currency_code"]);
|
||||||
@ -287,7 +285,7 @@ if ($action == 'create')
|
|||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<tr><td class="fieldrequired titlefieldcreate">'.$langs->trans("Ref").'</td>';
|
print '<tr><td class="fieldrequired titlefieldcreate">'.$langs->trans("Ref").'</td>';
|
||||||
print '<td colspan="3"><input size="8" type="text" class="flat" name="ref" value="'.($_POST["ref"]?$_POST["ref"]:$account->ref).'" maxlength="12"></td></tr>';
|
print '<td colspan="3"><input size="8" type="text" class="flat" name="ref" value="'.(GETPOST("ref")?GETPOST("ref",'alpha'):$account->ref).'" maxlength="12"></td></tr>';
|
||||||
|
|
||||||
// Label
|
// Label
|
||||||
print '<tr><td class="fieldrequired">'.$langs->trans("LabelBankCashAccount").'</td>';
|
print '<tr><td class="fieldrequired">'.$langs->trans("LabelBankCashAccount").'</td>';
|
||||||
@ -393,10 +391,10 @@ if ($action == 'create')
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("BalanceMinimalAllowed").'</td>';
|
print '<tr><td>'.$langs->trans("BalanceMinimalAllowed").'</td>';
|
||||||
print '<td colspan="3"><input size="12" type="text" class="flat" name="account_min_allowed" value="'.($_POST["account_min_allowed"]?$_POST["account_min_allowed"]:$account->min_allowed).'"></td></tr>';
|
print '<td colspan="3"><input size="12" type="text" class="flat" name="account_min_allowed" value="'.(GETPOST("account_min_allowed")?GETPOST("account_min_allowed"):$account->min_allowed).'"></td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("BalanceMinimalDesired").'</td>';
|
print '<tr><td>'.$langs->trans("BalanceMinimalDesired").'</td>';
|
||||||
print '<td colspan="3"><input size="12" type="text" class="flat" name="account_min_desired" value="'.($_POST["account_min_desired"]?$_POST["account_min_desired"]:$account->min_desired).'"></td></tr>';
|
print '<td colspan="3"><input size="12" type="text" class="flat" name="account_min_desired" value="'.(GETPOST("account_min_desired")?GETPOST("account_min_desired"):$account->min_desired).'"></td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
@ -407,7 +405,7 @@ if ($action == 'create')
|
|||||||
|
|
||||||
// If bank account
|
// If bank account
|
||||||
print '<tr><td class="titlefieldcreate">'.$langs->trans("BankName").'</td>';
|
print '<tr><td class="titlefieldcreate">'.$langs->trans("BankName").'</td>';
|
||||||
print '<td colspan="3"><input size="30" type="text" class="flat" name="bank" value="'.$account->bank.'"></td>';
|
print '<td colspan="3"><input size="30" type="text" class="flat" name="bank" value="'.(GETPOST('bank')?GETPOST('bank','alpha'):$account->bank).'"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Show fields of bank account
|
// Show fields of bank account
|
||||||
@ -431,7 +429,7 @@ if ($action == 'create')
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '<td>'.$langs->trans($val).'</td>';
|
print '<td>'.$langs->trans($val).'</td>';
|
||||||
print '<td><input size="'.$size.'" type="text" class="flat" name="'.$name.'" value="'.$content.'"></td>';
|
print '<td><input size="'.$size.'" type="text" class="flat" name="'.$name.'" value="'.(GETPOST($name)?GETPOST($name,'alpha'):$content).'"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
$ibankey = FormBank::getIBANLabel($account);
|
$ibankey = FormBank::getIBANLabel($account);
|
||||||
@ -440,23 +438,23 @@ if ($action == 'create')
|
|||||||
|
|
||||||
// IBAN
|
// IBAN
|
||||||
print '<tr><td>'.$langs->trans($ibankey).'</td>';
|
print '<tr><td>'.$langs->trans($ibankey).'</td>';
|
||||||
print '<td colspan="3"><input size="34" maxlength="34" type="text" class="flat" name="iban" value="'.$account->iban.'"></td></tr>';
|
print '<td colspan="3"><input size="34" maxlength="34" type="text" class="flat" name="iban" value="'.(GETPOST('iban')?GETPOST('iban','alpha'):$account->iban).'"></td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans($bickey).'</td>';
|
print '<tr><td>'.$langs->trans($bickey).'</td>';
|
||||||
print '<td colspan="3"><input size="11" maxlength="11" type="text" class="flat" name="bic" value="'.$account->bic.'"></td></tr>';
|
print '<td colspan="3"><input size="11" maxlength="11" type="text" class="flat" name="bic" value="'.(GETPOST('bic')?GETPOST('bic','alpha'):$account->bic).'"></td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("BankAccountDomiciliation").'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans("BankAccountDomiciliation").'</td><td colspan="3">';
|
||||||
print "<textarea class=\"flat\" name=\"domiciliation\" rows=\"2\" cols=\"40\">";
|
print "<textarea class=\"flat\" name=\"domiciliation\" rows=\"2\" cols=\"40\">";
|
||||||
print $account->domiciliation;
|
print (GETPOST('domiciliation')?GETPOST('domiciliation'):$account->domiciliation);
|
||||||
print "</textarea></td></tr>";
|
print "</textarea></td></tr>";
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("BankAccountOwner").'</td>';
|
print '<tr><td>'.$langs->trans("BankAccountOwner").'</td>';
|
||||||
print '<td colspan="3"><input size="30" type="text" class="flat" name="proprio" value="'.$account->proprio.'">';
|
print '<td colspan="3"><input size="30" type="text" class="flat" name="proprio" value="'.(GETPOST('proprio')?GETPOST('proprio','alpha'):$account->proprio).'">';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td class="tdtop">'.$langs->trans("BankAccountOwnerAddress").'</td><td colspan="3">';
|
print '<tr><td class="tdtop">'.$langs->trans("BankAccountOwnerAddress").'</td><td colspan="3">';
|
||||||
print "<textarea class=\"flat\" name=\"owner_address\" rows=\"2\" cols=\"40\">";
|
print "<textarea class=\"flat\" name=\"owner_address\" rows=\"2\" cols=\"40\">";
|
||||||
print $account->owner_address;
|
print (GETPOST('owner_address')?GETPOST('owner_address','alpha'):$account->owner_address);
|
||||||
print "</textarea></td></tr>";
|
print "</textarea></td></tr>";
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|||||||
@ -45,16 +45,9 @@ $statut=GETPOST('statut');
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$help_url='EN:Module_Banks_and_Cash|FR:Module_Banques_et_Caisses|ES:Módulo_Bancos_y_Cajas';
|
$title=$langs->trans('BankAccounts');
|
||||||
llxHeader('',$langs->trans('AccountsArea'),$help_url);
|
|
||||||
|
|
||||||
$link='';
|
// Load array of financial accounts (opened by default)
|
||||||
if ($statut == '') $link='<a href="'.$_SERVER["PHP_SELF"].'?statut=all">'.$langs->trans("IncludeClosedAccount").'</a>';
|
|
||||||
if ($statut == 'all') $link='<a href="'.$_SERVER["PHP_SELF"].'">'.$langs->trans("OnlyOpenedAccount").'</a>';
|
|
||||||
print load_fiche_titre($langs->trans("AccountsArea"),$link, 'title_bank.png');
|
|
||||||
|
|
||||||
|
|
||||||
// On charge tableau des comptes financiers (ouverts par defaut)
|
|
||||||
$accounts = array();
|
$accounts = array();
|
||||||
|
|
||||||
$sql = "SELECT rowid, courant, rappro";
|
$sql = "SELECT rowid, courant, rappro";
|
||||||
@ -66,17 +59,30 @@ $sql.= $db->order('label', 'ASC');
|
|||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$objp = $db->fetch_object($resql);
|
$objp = $db->fetch_object($resql);
|
||||||
$accounts[$objp->rowid] = $objp->courant;
|
$accounts[$objp->rowid] = $objp->courant;
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$nbtotalofrecords = $num;
|
||||||
|
|
||||||
|
|
||||||
|
$help_url='EN:Module_Banks_and_Cash|FR:Module_Banques_et_Caisses|ES:Módulo_Bancos_y_Cajas';
|
||||||
|
llxHeader('',$title,$help_url);
|
||||||
|
|
||||||
|
$link='';
|
||||||
|
if ($statut == '') $link='<a href="'.$_SERVER["PHP_SELF"].'?statut=all">'.$langs->trans("IncludeClosedAccount").'</a>';
|
||||||
|
if ($statut == 'all') $link='<a href="'.$_SERVER["PHP_SELF"].'">'.$langs->trans("OnlyOpenedAccount").'</a>';
|
||||||
|
|
||||||
|
print_barre_liste($title,$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,$link,$num,$nbtotalofrecords,'title_bank.png',0,'','',$limit, 1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Comptes courants (courant = 1)
|
* Comptes courants (courant = 1)
|
||||||
|
|||||||
@ -83,13 +83,13 @@ if ($action == 'confirm_delete_categ' && $confirm == "yes" && $user->rights->ban
|
|||||||
|
|
||||||
if ($user->rights->banque->modifier && $action == 'class')
|
if ($user->rights->banque->modifier && $action == 'class')
|
||||||
{
|
{
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class WHERE lineid = ".$rowid." AND fk_categ = ".$_POST["cat1"];
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class WHERE lineid = ".$rowid." AND fk_categ = ".GETPOST('cat1', 'int');
|
||||||
if (! $db->query($sql))
|
if (! $db->query($sql))
|
||||||
{
|
{
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."bank_class (lineid, fk_categ) VALUES (".$rowid.", ".$_POST["cat1"].")";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."bank_class (lineid, fk_categ) VALUES (".$rowid.", ".GETPOST('cat1', 'int').")";
|
||||||
if (! $db->query($sql))
|
if (! $db->query($sql))
|
||||||
{
|
{
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
@ -312,8 +312,11 @@ if ($result)
|
|||||||
}
|
}
|
||||||
else if ($links[$key]['type']=='company') {
|
else if ($links[$key]['type']=='company') {
|
||||||
print '<a href="'.DOL_URL_ROOT.'/societe/soc.php?socid='.$links[$key]['url_id'].'">';
|
print '<a href="'.DOL_URL_ROOT.'/societe/soc.php?socid='.$links[$key]['url_id'].'">';
|
||||||
print img_object($langs->trans('ShowCompany'),'company').' ';
|
//print img_object($langs->trans('ShowCompany'),'company').' ';
|
||||||
print $links[$key]['label'];
|
$societe=new Societe($db);
|
||||||
|
$societe->fetch($links[$key]['url_id']);
|
||||||
|
//print $links[$key]['label'];
|
||||||
|
print $societe->getNomUrl(1);
|
||||||
print '</a>';
|
print '</a>';
|
||||||
}
|
}
|
||||||
else if ($links[$key]['type']=='sc') {
|
else if ($links[$key]['type']=='sc') {
|
||||||
|
|||||||
@ -53,20 +53,6 @@ $search_dt_end = dol_mktime(0, 0, 0, GETPOST('search_end_dtmonth', 'int'), GETPO
|
|||||||
$search_thirdparty=GETPOST("thirdparty",'alpha');
|
$search_thirdparty=GETPOST("thirdparty",'alpha');
|
||||||
$search_req_nb=GETPOST("req_nb",'alpha');
|
$search_req_nb=GETPOST("req_nb",'alpha');
|
||||||
|
|
||||||
$param='';
|
|
||||||
if (!empty($description)) $param.='&description='.$description;
|
|
||||||
if (!empty($type)) $param.='&type='.$type;
|
|
||||||
if (!empty($debit)) $param.='&debit='.$debit;
|
|
||||||
if (!empty($credit)) $param.='&credit='.$credit;
|
|
||||||
if (!empty($account)) $param.='&account='.$account;
|
|
||||||
if (!empty($bid)) $param.='&bid='.$bid;
|
|
||||||
if (dol_strlen($search_dt_start) > 0)
|
|
||||||
$param .= '&search_start_dtmonth=' . GETPOST('search_start_dtmonth', 'int') . '&search_start_dtday=' . GETPOST('search_start_dtday', 'int') . '&search_start_dtyear=' . GETPOST('search_start_dtyear', 'int');
|
|
||||||
if (dol_strlen($search_dt_end) > 0)
|
|
||||||
$param .= '&search_end_dtmonth=' . GETPOST('search_end_dtmonth', 'int') . '&search_end_dtday=' . GETPOST('search_end_dtday', 'int') . '&search_end_dtyear=' . GETPOST('search_end_dtyear', 'int');
|
|
||||||
if (GETPOST("req_nb")) $param.='&req_nb='.urlencode(GETPOST("req_nb"));
|
|
||||||
if (GETPOST("thirdparty")) $param.='&thirdparty='.urlencode(GETPOST("thirdparty"));
|
|
||||||
|
|
||||||
$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
|
$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
@ -78,6 +64,27 @@ $pagenext = $page + 1;
|
|||||||
if (! $sortorder) $sortorder='DESC';
|
if (! $sortorder) $sortorder='DESC';
|
||||||
if (! $sortfield) $sortfield='b.dateo';
|
if (! $sortfield) $sortfield='b.dateo';
|
||||||
|
|
||||||
|
$param='';
|
||||||
|
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||||
|
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||||
|
if (!empty($description)) $param.='&description='.$description;
|
||||||
|
if (!empty($type)) $param.='&type='.$type;
|
||||||
|
if (!empty($debit)) $param.='&debit='.$debit;
|
||||||
|
if (!empty($credit)) $param.='&credit='.$credit;
|
||||||
|
if (!empty($account)) $param.='&account='.$account;
|
||||||
|
if (!empty($bid)) $param.='&bid='.$bid;
|
||||||
|
if (dol_strlen($search_dt_start) > 0)
|
||||||
|
$param .= '&search_start_dtmonth=' . GETPOST('search_start_dtmonth', 'int') . '&search_start_dtday=' . GETPOST('search_start_dtday', 'int') . '&search_start_dtyear=' . GETPOST('search_start_dtyear', 'int');
|
||||||
|
if (dol_strlen($search_dt_end) > 0)
|
||||||
|
$param .= '&search_end_dtmonth=' . GETPOST('search_end_dtmonth', 'int') . '&search_end_dtday=' . GETPOST('search_end_dtday', 'int') . '&search_end_dtyear=' . GETPOST('search_end_dtyear', 'int');
|
||||||
|
if (GETPOST("req_nb")) $param.='&req_nb='.urlencode(GETPOST("req_nb"));
|
||||||
|
if (GETPOST("thirdparty")) $param.='&thirdparty='.urlencode(GETPOST("thirdparty"));
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Actions
|
||||||
|
*/
|
||||||
|
|
||||||
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
|
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
|
||||||
{
|
{
|
||||||
$description="";
|
$description="";
|
||||||
@ -88,8 +95,10 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both
|
|||||||
$bid="";
|
$bid="";
|
||||||
$search_req_nb='';
|
$search_req_nb='';
|
||||||
$search_thirdparty='';
|
$search_thirdparty='';
|
||||||
|
$thirdparty='';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
@ -108,7 +117,8 @@ else $viewline = 50;
|
|||||||
$sql = "SELECT b.rowid, b.dateo as do, b.datev as dv, b.amount, b.label, b.rappro, b.num_releve, b.num_chq,";
|
$sql = "SELECT b.rowid, b.dateo as do, b.datev as dv, b.amount, b.label, b.rappro, b.num_releve, b.num_chq,";
|
||||||
$sql.= " b.fk_account, b.fk_type,";
|
$sql.= " b.fk_account, b.fk_type,";
|
||||||
$sql.= " ba.rowid as bankid, ba.ref as bankref,";
|
$sql.= " ba.rowid as bankid, ba.ref as bankref,";
|
||||||
$sql.= " bu.label as labelurl, bu.url_id";
|
$sql.= " bu.url_id,";
|
||||||
|
$sql.= " s.nom, s.name_alias, s.client, s.fournisseur, s.code_client, s.code_fournisseur";
|
||||||
$sql.= " FROM ";
|
$sql.= " FROM ";
|
||||||
if ($bid) $sql.= MAIN_DB_PREFIX."bank_class as l,";
|
if ($bid) $sql.= MAIN_DB_PREFIX."bank_class as l,";
|
||||||
$sql.= " ".MAIN_DB_PREFIX."bank_account as ba,";
|
$sql.= " ".MAIN_DB_PREFIX."bank_account as ba,";
|
||||||
@ -155,7 +165,6 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
|||||||
}
|
}
|
||||||
|
|
||||||
$sql.= $db->plimit($limit+1,$offset);
|
$sql.= $db->plimit($limit+1,$offset);
|
||||||
//print $sql;
|
|
||||||
|
|
||||||
dol_syslog('compta/bank/search.php::', LOG_DEBUG);
|
dol_syslog('compta/bank/search.php::', LOG_DEBUG);
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
@ -193,7 +202,7 @@ if ($resql)
|
|||||||
$moreforfilter .= $langs->trans('Period') . ' ('.$langs->trans('DateOperationShort').') : ' . $langs->trans('DateStart') . ' ';
|
$moreforfilter .= $langs->trans('Period') . ' ('.$langs->trans('DateOperationShort').') : ' . $langs->trans('DateStart') . ' ';
|
||||||
$moreforfilter .= $form->select_date($search_dt_start, 'search_start_dt', 0, 0, 1, "search_form", 1, 0, 1);
|
$moreforfilter .= $form->select_date($search_dt_start, 'search_start_dt', 0, 0, 1, "search_form", 1, 0, 1);
|
||||||
$moreforfilter .= ' - ';
|
$moreforfilter .= ' - ';
|
||||||
$moreforfilter .= $langs->trans('EndDate') . ' ' . $form->select_date($search_dt_end, 'search_end_dt', 0, 0, 1, "search_form", 1, 0, 1);
|
$moreforfilter .= $langs->trans('DateEnd') . ' ' . $form->select_date($search_dt_end, 'search_end_dt', 0, 0, 1, "search_form", 1, 0, 1);
|
||||||
$moreforfilter .= '</div>';
|
$moreforfilter .= '</div>';
|
||||||
|
|
||||||
if ($moreforfilter)
|
if ($moreforfilter)
|
||||||
@ -209,9 +218,9 @@ if ($resql)
|
|||||||
print_liste_field_titre($langs->trans('DateOperationShort'),$_SERVER['PHP_SELF'],'b.dateo','',$param,'align="center"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans('DateOperationShort'),$_SERVER['PHP_SELF'],'b.dateo','',$param,'align="center"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans('Value'),$_SERVER['PHP_SELF'],'b.datev','',$param,'align="center"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans('Value'),$_SERVER['PHP_SELF'],'b.datev','',$param,'align="center"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Type"),$_SERVER['PHP_SELF'],'','',$param,'align="center"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Type"),$_SERVER['PHP_SELF'],'','',$param,'align="center"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Numero"));
|
print_liste_field_titre($langs->trans("Numero"),$_SERVER['PHP_SELF'],'b.num_releve','',$param,'align="center"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Description"));
|
print_liste_field_titre($langs->trans("Description"),$_SERVER['PHP_SELF'],'','',$param,'',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("ThirdParty"));
|
print_liste_field_titre($langs->trans("ThirdParty"),$_SERVER['PHP_SELF'],'bu.label','',$param,'',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Debit"),$_SERVER['PHP_SELF'],'','',$param,'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Debit"),$_SERVER['PHP_SELF'],'','',$param,'align="right"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Credit"),$_SERVER['PHP_SELF'],'','',$param,'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Credit"),$_SERVER['PHP_SELF'],'','',$param,'align="right"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Account"),$_SERVER['PHP_SELF'],'','',$param,'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Account"),$_SERVER['PHP_SELF'],'','',$param,'align="right"',$sortfield,$sortorder);
|
||||||
@ -225,7 +234,8 @@ if ($resql)
|
|||||||
print '<td class="liste_titre" align="center">';
|
print '<td class="liste_titre" align="center">';
|
||||||
$form->select_types_paiements(empty($type)?'':$type, 'type', '', 2, 0, 1);
|
$form->select_types_paiements(empty($type)?'':$type, 'type', '', 2, 0, 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre"><input type="text" class="flat" name="req_nb" value="'.dol_escape_htmltag($search_req_nb).'" size="2"></td>';
|
// Numero
|
||||||
|
print '<td class="liste_titre" align="center"><input type="text" class="flat" name="req_nb" value="'.dol_escape_htmltag($search_req_nb).'" size="2"></td>';
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '<input type="text" class="flat" name="description" size="10" value="'.dol_escape_htmltag($description).'">';
|
print '<input type="text" class="flat" name="description" size="10" value="'.dol_escape_htmltag($description).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -287,7 +297,7 @@ if ($resql)
|
|||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
|
|
||||||
// Num
|
// Num
|
||||||
print '<td class="nowrap">'.($objp->num_chq?$objp->num_chq:"")."</td>\n";
|
print '<td class="nowrap" align="center">'.($objp->num_chq?$objp->num_chq:"")."</td>\n";
|
||||||
|
|
||||||
// Description
|
// Description
|
||||||
print "<td>";
|
print "<td>";
|
||||||
@ -306,7 +316,12 @@ if ($resql)
|
|||||||
if ($objp->url_id)
|
if ($objp->url_id)
|
||||||
{
|
{
|
||||||
$companystatic->id=$objp->url_id;
|
$companystatic->id=$objp->url_id;
|
||||||
$companystatic->name=$objp->labelurl;
|
$companystatic->name=$objp->nom;
|
||||||
|
$companystatic->name_alias=$objp->name_alias;
|
||||||
|
$companystatic->client=$objp->client;
|
||||||
|
$companystatic->fournisseur=$objp->fournisseur;
|
||||||
|
$companystatic->code_client=$objp->code_client;
|
||||||
|
$companystatic->code_fournisseur=$objp->code_fournisseur;
|
||||||
print $companystatic->getNomUrl(1);
|
print $companystatic->getNomUrl(1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -363,8 +378,9 @@ else
|
|||||||
// If no data to display after a search
|
// If no data to display after a search
|
||||||
if ($_POST["action"] == "search" && ! $num)
|
if ($_POST["action"] == "search" && ! $num)
|
||||||
{
|
{
|
||||||
print $langs->trans("NoRecordFound");
|
print '<div class="opacitymedium">'.$langs->trans("NoRecordFound").'</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -163,7 +163,7 @@ if (empty($reshook))
|
|||||||
// Change status of invoice
|
// Change status of invoice
|
||||||
else if ($action == 'reopen' && $user->rights->facture->creer) {
|
else if ($action == 'reopen' && $user->rights->facture->creer) {
|
||||||
$result = $object->fetch($id);
|
$result = $object->fetch($id);
|
||||||
if ($object->statut == 2 || ($object->statut == 3 && $object->close_code != 'replaced')) {
|
if ($object->statut == 2 || ($object->statut == 3 && $object->close_code != 'replaced') || ($object->statut == 1 && $object->paye == 1)) { // ($object->statut == 1 && $object->paye == 1) should not happened but can be found when data are corrupted
|
||||||
$result = $object->set_unpaid($user);
|
$result = $object->set_unpaid($user);
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
header('Location: ' . $_SERVER["PHP_SELF"] . '?facid=' . $id);
|
header('Location: ' . $_SERVER["PHP_SELF"] . '?facid=' . $id);
|
||||||
@ -1790,57 +1790,13 @@ if (empty($reshook))
|
|||||||
include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
|
include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
|
||||||
|
|
||||||
|
|
||||||
/*
|
// Actions to build doc
|
||||||
* Generate document
|
$upload_dir = $conf->facture->dir_output;
|
||||||
*/
|
$permissioncreate=$user->rights->facture->creer;
|
||||||
if ($action == 'builddoc') // En get ou en post
|
include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
|
||||||
{
|
|
||||||
$object->fetch($id);
|
|
||||||
$object->fetch_thirdparty();
|
|
||||||
|
|
||||||
// Save last template used to generate document
|
if ($action == 'update_extras') {
|
||||||
if (GETPOST('model'))
|
|
||||||
$object->setDocModel($user, GETPOST('model', 'alpha'));
|
|
||||||
if (GETPOST('fk_bank')) { // this field may come from an external module
|
|
||||||
$object->fk_bank = GETPOST('fk_bank');
|
|
||||||
} else {
|
|
||||||
$object->fk_bank = $object->fk_account;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Define output language
|
|
||||||
$outputlangs = $langs;
|
|
||||||
$newlang = '';
|
|
||||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id')) $newlang = GETPOST('lang_id');
|
|
||||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->thirdparty->default_lang;
|
|
||||||
if (! empty($newlang))
|
|
||||||
{
|
|
||||||
$outputlangs = new Translate("", $conf);
|
|
||||||
$outputlangs->setDefaultLang($newlang);
|
|
||||||
}
|
|
||||||
$result = $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
|
||||||
if ($result <= 0)
|
|
||||||
{
|
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
|
||||||
$action='';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Remove file in doc form
|
|
||||||
else if ($action == 'remove_file') {
|
|
||||||
if ($object->fetch($id)) {
|
|
||||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
|
|
||||||
|
|
||||||
$object->fetch_thirdparty();
|
|
||||||
|
|
||||||
$langs->load("other");
|
|
||||||
$upload_dir = $conf->facture->dir_output;
|
|
||||||
$file = $upload_dir . '/' . GETPOST('file');
|
|
||||||
$ret = dol_delete_file($file, 0, 0, 0, $object);
|
|
||||||
if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs');
|
|
||||||
else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors');
|
|
||||||
$action = '';
|
|
||||||
}
|
|
||||||
} elseif ($action == 'update_extras') {
|
|
||||||
// Fill array 'array_options' with data from add form
|
// Fill array 'array_options' with data from add form
|
||||||
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
|
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
|
||||||
$ret = $extrafields->setOptionalsFromPost($extralabels, $object, GETPOST('attribute'));
|
$ret = $extrafields->setOptionalsFromPost($extralabels, $object, GETPOST('attribute'));
|
||||||
@ -2974,16 +2930,16 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
// Ref
|
// Ref
|
||||||
print '<tr><td width="20%">' . $langs->trans('Ref') . '</td>';
|
print '<tr><td width="20%">' . $langs->trans('Ref') . '</td>';
|
||||||
print '<td colspan="5">';
|
print '<td colspan="5">';
|
||||||
$morehtmlref = '';
|
$morehtmlright = '';
|
||||||
$discount = new DiscountAbsolute($db);
|
$discount = new DiscountAbsolute($db);
|
||||||
$result = $discount->fetch(0, $object->id);
|
$result = $discount->fetch(0, $object->id);
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
$morehtmlref = ' (' . $langs->trans("CreditNoteConvertedIntoDiscount", $discount->getNomUrl(1, 'discount')) . ')';
|
$morehtmlright = ' (' . $langs->trans("CreditNoteConvertedIntoDiscount", $discount->getNomUrl(1, 'discount')) . ')';
|
||||||
}
|
}
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
dol_print_error('', $discount->error);
|
dol_print_error('', $discount->error);
|
||||||
}
|
}
|
||||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref);
|
print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', '', '', 0, '', '', $morehtmlright);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Ref customer
|
// Ref customer
|
||||||
@ -3949,8 +3905,8 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
if ((($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT)
|
if ((($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT)
|
||||||
|| ($object->type == Facture::TYPE_CREDIT_NOTE && empty($discount->id))
|
|| ($object->type == Facture::TYPE_CREDIT_NOTE && empty($discount->id))
|
||||||
|| ($object->type == Facture::TYPE_DEPOSIT && empty($discount->id)))
|
|| ($object->type == Facture::TYPE_DEPOSIT && empty($discount->id)))
|
||||||
&& ($object->statut == 2 || $object->statut == 3)
|
&& ($object->statut == 2 || $object->statut == 3 || ($object->statut == 1 && $object->paye == 1)) // Condition ($object->statut == 1 && $object->paye == 1) should not happened but can be found due to corrupted data
|
||||||
&& $user->rights->facture->creer) // A paid invoice (partially or completely)
|
&& $user->rights->facture->creer) // A paid invoice (partially or completely)
|
||||||
{
|
{
|
||||||
if (! $objectidnext && $object->close_code != 'replaced') // Not replaced by another invoice
|
if (! $objectidnext && $object->close_code != 'replaced') // Not replaced by another invoice
|
||||||
{
|
{
|
||||||
|
|||||||
@ -509,7 +509,7 @@ class FactureRec extends CommonInvoice
|
|||||||
|
|
||||||
$facid=$this->id;
|
$facid=$this->id;
|
||||||
|
|
||||||
dol_syslog("FactureRec::addline facid=$facid,desc=$desc,pu_ht=$pu_ht,qty=$qty,txtva=$txtva,fk_product=$fk_product,remise_percent=$remise_percent,date_start=$date_start,date_end=$date_end,ventil=$ventil,info_bits=$info_bits,fk_remise_except=$fk_remise_except,price_base_type=$price_base_type,pu_ttc=$pu_ttc,type=$type,fk_unit=$fk_unit", LOG_DEBUG);
|
dol_syslog(get_class($this)."::addline facid=$facid,desc=$desc,pu_ht=$pu_ht,qty=$qty,txtva=$txtva,fk_product=$fk_product,remise_percent=$remise_percent,info_bits=$info_bits,fk_remise_except=$fk_remise_except,price_base_type=$price_base_type,pu_ttc=$pu_ttc,type=$type,fk_unit=$fk_unit", LOG_DEBUG);
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
||||||
|
|
||||||
// Check parameters
|
// Check parameters
|
||||||
@ -604,6 +604,111 @@ class FactureRec extends CommonInvoice
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update a line to invoice
|
||||||
|
*
|
||||||
|
* @param int $rowid Id of line to update
|
||||||
|
* @param string $desc Description de la ligne
|
||||||
|
* @param double $pu_ht Prix unitaire HT (> 0 even for credit note)
|
||||||
|
* @param double $qty Quantite
|
||||||
|
* @param double $txtva Taux de tva force, sinon -1
|
||||||
|
* @param int $fk_product Id du produit/service predefini
|
||||||
|
* @param double $remise_percent Pourcentage de remise de la ligne
|
||||||
|
* @param string $price_base_type HT or TTC
|
||||||
|
* @param int $info_bits Bits de type de lignes
|
||||||
|
* @param int $fk_remise_except Id remise
|
||||||
|
* @param double $pu_ttc Prix unitaire TTC (> 0 even for credit note)
|
||||||
|
* @param int $type Type of line (0=product, 1=service)
|
||||||
|
* @param int $rang Position of line
|
||||||
|
* @param int $special_code Special code
|
||||||
|
* @param string $label Label of the line
|
||||||
|
* @param string $fk_unit Unit
|
||||||
|
* @return int <0 if KO, Id of line if OK
|
||||||
|
*/
|
||||||
|
function updateline($rowid, $desc, $pu_ht, $qty, $txtva, $fk_product=0, $remise_percent=0, $price_base_type='HT', $info_bits=0, $fk_remise_except='', $pu_ttc=0, $type=0, $rang=-1, $special_code=0, $label='', $fk_unit=null)
|
||||||
|
{
|
||||||
|
global $mysoc;
|
||||||
|
|
||||||
|
$facid=$this->id;
|
||||||
|
|
||||||
|
dol_syslog(get_class($this)."::updateline facid=".$facid." rowid=$rowid,desc=$desc,pu_ht=$pu_ht,qty=$qty,txtva=$txtva,fk_product=$fk_product,remise_percent=$remise_percent,info_bits=$info_bits,fk_remise_except=$fk_remise_except,price_base_type=$price_base_type,pu_ttc=$pu_ttc,type=$type,fk_unit=$fk_unit", LOG_DEBUG);
|
||||||
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
||||||
|
|
||||||
|
// Check parameters
|
||||||
|
if ($type < 0) return -1;
|
||||||
|
|
||||||
|
if ($this->brouillon)
|
||||||
|
{
|
||||||
|
// Clean parameters
|
||||||
|
$remise_percent=price2num($remise_percent);
|
||||||
|
$qty=price2num($qty);
|
||||||
|
if (! $qty) $qty=1;
|
||||||
|
if (! $info_bits) $info_bits=0;
|
||||||
|
$pu_ht=price2num($pu_ht);
|
||||||
|
$pu_ttc=price2num($pu_ttc);
|
||||||
|
$txtva=price2num($txtva);
|
||||||
|
|
||||||
|
if ($price_base_type=='HT')
|
||||||
|
{
|
||||||
|
$pu=$pu_ht;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$pu=$pu_ttc;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Calcul du total TTC et de la TVA pour la ligne a partir de
|
||||||
|
// qty, pu, remise_percent et txtva
|
||||||
|
// TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker
|
||||||
|
// la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva.
|
||||||
|
$tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, 0, 0, 0, $price_base_type, $info_bits, $type, $mysoc);
|
||||||
|
$total_ht = $tabprice[0];
|
||||||
|
$total_tva = $tabprice[1];
|
||||||
|
$total_ttc = $tabprice[2];
|
||||||
|
|
||||||
|
$product_type=$type;
|
||||||
|
if ($fk_product)
|
||||||
|
{
|
||||||
|
$product=new Product($this->db);
|
||||||
|
$result=$product->fetch($fk_product);
|
||||||
|
$product_type=$product->type;
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = "UPDATE ".MAIN_DB_PREFIX."facturedet_rec SET ";
|
||||||
|
$sql.= "fk_facture = '".$facid."'";
|
||||||
|
$sql.= ", label=".(! empty($label)?"'".$this->db->escape($label)."'":"null");
|
||||||
|
$sql.= ", description='".$this->db->escape($desc)."'";
|
||||||
|
$sql.= ", price=".price2num($pu_ht);
|
||||||
|
$sql.= ", qty=".price2num($qty);
|
||||||
|
$sql.= ", tva_tx=".price2num($txtva);
|
||||||
|
$sql.= ", fk_product=".(! empty($fk_product)?"'".$fk_product."'":"null");
|
||||||
|
$sql.= ", product_type=".$product_type;
|
||||||
|
$sql.= ", remise_percent='".price2num($remise_percent)."'";
|
||||||
|
$sql.= ", subprice='".price2num($pu_ht)."'";
|
||||||
|
$sql.= ", total_ht='".price2num($total_ht)."'";
|
||||||
|
$sql.= ", total_tva='".price2num($total_tva)."'";
|
||||||
|
$sql.= ", total_ttc='".price2num($total_ttc)."'";
|
||||||
|
$sql.= ", rang=".$rang;
|
||||||
|
$sql.= ", special_code=".$special_code;
|
||||||
|
$sql.= ", fk_unit=".($fk_unit?"'".$this->db->escape($fk_unit)."'":"null");
|
||||||
|
$sql.= " WHERE rowid = ".$rowid;
|
||||||
|
|
||||||
|
dol_syslog(get_class($this)."::updateline", LOG_DEBUG);
|
||||||
|
if ($this->db->query($sql))
|
||||||
|
{
|
||||||
|
$this->id=$facid;
|
||||||
|
$this->update_price();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->error=$this->db->lasterror();
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the next date of
|
* Return the next date of
|
||||||
*
|
*
|
||||||
@ -760,8 +865,9 @@ class FactureRec extends CommonInvoice
|
|||||||
$arraynow=dol_getdate($now);
|
$arraynow=dol_getdate($now);
|
||||||
$nownotime=dol_mktime(0, 0, 0, $arraynow['mon'], $arraynow['mday'], $arraynow['year']);
|
$nownotime=dol_mktime(0, 0, 0, $arraynow['mon'], $arraynow['mday'], $arraynow['year']);
|
||||||
|
|
||||||
$prodids = array();
|
// Load array of products prodids
|
||||||
$num_prods = 0;
|
$num_prods = 0;
|
||||||
|
$prodids = array();
|
||||||
|
|
||||||
$sql = "SELECT rowid";
|
$sql = "SELECT rowid";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."product";
|
$sql.= " FROM ".MAIN_DB_PREFIX."product";
|
||||||
|
|||||||
@ -59,63 +59,63 @@ class Facture extends CommonInvoice
|
|||||||
*/
|
*/
|
||||||
protected $table_ref_field = 'facnumber';
|
protected $table_ref_field = 'facnumber';
|
||||||
|
|
||||||
var $socid;
|
public $socid;
|
||||||
|
|
||||||
var $author;
|
public $author;
|
||||||
var $fk_user_author;
|
public $fk_user_author;
|
||||||
var $fk_user_valid;
|
public $fk_user_valid;
|
||||||
var $date; // Date invoice
|
public $date; // Date invoice
|
||||||
var $date_creation; // Creation date
|
public $date_creation; // Creation date
|
||||||
var $date_validation; // Validation date
|
public $date_validation; // Validation date
|
||||||
var $datem;
|
public $datem;
|
||||||
var $ref_client;
|
public $ref_client;
|
||||||
var $ref_int;
|
public $ref_int;
|
||||||
//Check constants for types
|
//Check constants for types
|
||||||
var $type = self::TYPE_STANDARD;
|
public $type = self::TYPE_STANDARD;
|
||||||
|
|
||||||
//var $amount;
|
//var $amount;
|
||||||
var $remise_absolue;
|
public $remise_absolue;
|
||||||
var $remise_percent;
|
public $remise_percent;
|
||||||
var $total_ht=0;
|
public $total_ht=0;
|
||||||
var $total_tva=0;
|
public $total_tva=0;
|
||||||
var $total_ttc=0;
|
public $total_ttc=0;
|
||||||
var $revenuestamp;
|
public $revenuestamp;
|
||||||
|
|
||||||
//! Fermeture apres paiement partiel: discount_vat, badcustomer, abandon
|
//! Fermeture apres paiement partiel: discount_vat, badcustomer, abandon
|
||||||
//! Fermeture alors que aucun paiement: replaced (si remplace), abandon
|
//! Fermeture alors que aucun paiement: replaced (si remplace), abandon
|
||||||
var $close_code;
|
public $close_code;
|
||||||
//! Commentaire si mis a paye sans paiement complet
|
//! Commentaire si mis a paye sans paiement complet
|
||||||
var $close_note;
|
public $close_note;
|
||||||
//! 1 if invoice paid COMPLETELY, 0 otherwise (do not use it anymore, use statut and close_code)
|
//! 1 if invoice paid COMPLETELY, 0 otherwise (do not use it anymore, use statut and close_code)
|
||||||
var $paye;
|
public $paye;
|
||||||
//! id of source invoice if replacement invoice or credit note
|
//! id of source invoice if replacement invoice or credit note
|
||||||
var $fk_facture_source;
|
public $fk_facture_source;
|
||||||
var $linked_objects=array();
|
public $linked_objects=array();
|
||||||
var $date_lim_reglement;
|
public $date_lim_reglement;
|
||||||
var $cond_reglement_code; // Code in llx_c_paiement
|
public $cond_reglement_code; // Code in llx_c_paiement
|
||||||
var $mode_reglement_code; // Code in llx_c_paiement
|
public $mode_reglement_code; // Code in llx_c_paiement
|
||||||
var $fk_bank; // Field to store bank id to use when payment mode is withdraw
|
public $fk_bank; // Field to store bank id to use when payment mode is withdraw
|
||||||
/**
|
/**
|
||||||
* @deprecated
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
var $products=array();
|
public $products=array();
|
||||||
/**
|
/**
|
||||||
* @var FactureLigne[]
|
* @var FactureLigne[]
|
||||||
*/
|
*/
|
||||||
var $lines=array();
|
public $lines=array();
|
||||||
var $line;
|
public $line;
|
||||||
var $extraparams=array();
|
public $extraparams=array();
|
||||||
var $specimen;
|
public $specimen;
|
||||||
|
|
||||||
|
public $fac_rec;
|
||||||
|
|
||||||
var $fac_rec;
|
|
||||||
|
|
||||||
// Multicurrency
|
// Multicurrency
|
||||||
var $fk_multicurrency;
|
public $fk_multicurrency;
|
||||||
var $multicurrency_code;
|
public $multicurrency_code;
|
||||||
var $multicurrency_tx;
|
public $multicurrency_tx;
|
||||||
var $multicurrency_total_ht;
|
public $multicurrency_total_ht;
|
||||||
var $multicurrency_total_tva;
|
public $multicurrency_total_tva;
|
||||||
var $multicurrency_total_ttc;
|
public $multicurrency_total_ttc;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int Situation cycle reference number
|
* @var int Situation cycle reference number
|
||||||
@ -136,12 +136,14 @@ class Facture extends CommonInvoice
|
|||||||
* @var array Table of previous situations
|
* @var array Table of previous situations
|
||||||
*/
|
*/
|
||||||
public $tab_previous_situation_invoice=array();
|
public $tab_previous_situation_invoice=array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array Table of next situations
|
* @var array Table of next situations
|
||||||
*/
|
*/
|
||||||
public $tab_next_situation_invoice=array();
|
public $tab_next_situation_invoice=array();
|
||||||
|
|
||||||
|
public $oldcopy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Standard invoice
|
* Standard invoice
|
||||||
*/
|
*/
|
||||||
@ -249,7 +251,7 @@ class Facture extends CommonInvoice
|
|||||||
$this->fk_multicurrency = 0;
|
$this->fk_multicurrency = 0;
|
||||||
$this->multicurrency_tx = 1;
|
$this->multicurrency_tx = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::create user=".$user->id);
|
dol_syslog(get_class($this)."::create user=".$user->id);
|
||||||
|
|
||||||
// Check parameters
|
// Check parameters
|
||||||
@ -263,7 +265,7 @@ class Facture extends CommonInvoice
|
|||||||
$result=$soc->fetch($this->socid);
|
$result=$soc->fetch($this->socid);
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
$this->error="Failed to fetch company";
|
$this->error="Failed to fetch company: ".$soc->error;
|
||||||
dol_syslog(get_class($this)."::create ".$this->error, LOG_ERR);
|
dol_syslog(get_class($this)."::create ".$this->error, LOG_ERR);
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
@ -280,7 +282,7 @@ class Facture extends CommonInvoice
|
|||||||
$result=$_facrec->fetch($this->fac_rec);
|
$result=$_facrec->fetch($this->fac_rec);
|
||||||
|
|
||||||
$this->socid = $_facrec->socid;
|
$this->socid = $_facrec->socid;
|
||||||
|
|
||||||
// Fields coming from GUI (priority on template). TODO Value of template should be used as default value on GUI so we can use here always value from GUI
|
// Fields coming from GUI (priority on template). TODO Value of template should be used as default value on GUI so we can use here always value from GUI
|
||||||
$this->fk_project = GETPOST('projectid','int') > 0 ? GETPOST('projectid','int') : $_facrec->fk_project;
|
$this->fk_project = GETPOST('projectid','int') > 0 ? GETPOST('projectid','int') : $_facrec->fk_project;
|
||||||
$this->note_public = GETPOST('note_public') ? GETPOST('note_public') : $_facrec->note_public;
|
$this->note_public = GETPOST('note_public') ? GETPOST('note_public') : $_facrec->note_public;
|
||||||
@ -289,7 +291,7 @@ class Facture extends CommonInvoice
|
|||||||
$this->cond_reglement_id = GETPOST('cond_reglement_id') > 0 ? GETPOST('cond_reglement_id') : $_facrec->cond_reglement_id;
|
$this->cond_reglement_id = GETPOST('cond_reglement_id') > 0 ? GETPOST('cond_reglement_id') : $_facrec->cond_reglement_id;
|
||||||
$this->mode_reglement_id = GETPOST('mode_reglement_id') > 0 ? GETPOST('mode_reglement_id') : $_facrec->mode_reglement_id;
|
$this->mode_reglement_id = GETPOST('mode_reglement_id') > 0 ? GETPOST('mode_reglement_id') : $_facrec->mode_reglement_id;
|
||||||
$this->fk_account = GETPOST('fk_account') > 0 ? GETPOST('fk_account') : $_facrec->fk_account;
|
$this->fk_account = GETPOST('fk_account') > 0 ? GETPOST('fk_account') : $_facrec->fk_account;
|
||||||
|
|
||||||
// Fields always coming from template
|
// Fields always coming from template
|
||||||
$this->remise_absolue = $_facrec->remise_absolue;
|
$this->remise_absolue = $_facrec->remise_absolue;
|
||||||
$this->remise_percent = $_facrec->remise_percent;
|
$this->remise_percent = $_facrec->remise_percent;
|
||||||
@ -302,13 +304,13 @@ class Facture extends CommonInvoice
|
|||||||
$this->note_public=trim($this->note_public);
|
$this->note_public=trim($this->note_public);
|
||||||
$this->note_private=trim($this->note_private);
|
$this->note_private=trim($this->note_private);
|
||||||
$this->note_private=dol_concatdesc($this->note_private, $langs->trans("GeneratedFromRecurringInvoice", $_facrec->ref));
|
$this->note_private=dol_concatdesc($this->note_private, $langs->trans("GeneratedFromRecurringInvoice", $_facrec->ref));
|
||||||
|
|
||||||
//if (! $this->remise) $this->remise = 0;
|
//if (! $this->remise) $this->remise = 0;
|
||||||
if (! $this->mode_reglement_id) $this->mode_reglement_id = 0;
|
if (! $this->mode_reglement_id) $this->mode_reglement_id = 0;
|
||||||
$this->brouillon = 1;
|
$this->brouillon = 1;
|
||||||
|
|
||||||
$forceduedate = $this->calculate_date_lim_reglement();
|
$forceduedate = $this->calculate_date_lim_reglement();
|
||||||
|
|
||||||
// For recurrn invoices, update date and number of last generation of recurring template invoice, before inserting new invoice
|
// For recurrn invoices, update date and number of last generation of recurring template invoice, before inserting new invoice
|
||||||
if ($_facrec->frequency > 0)
|
if ($_facrec->frequency > 0)
|
||||||
{
|
{
|
||||||
@ -658,7 +660,7 @@ class Facture extends CommonInvoice
|
|||||||
function createFromCurrent($user,$invertdetail=0)
|
function createFromCurrent($user,$invertdetail=0)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
// Charge facture source
|
// Charge facture source
|
||||||
$facture=new Facture($this->db);
|
$facture=new Facture($this->db);
|
||||||
|
|
||||||
@ -712,15 +714,15 @@ class Facture extends CommonInvoice
|
|||||||
elseif ($this->type == self::TYPE_SITUATION && !empty($conf->global->INVOICE_USE_SITUATION))
|
elseif ($this->type == self::TYPE_SITUATION && !empty($conf->global->INVOICE_USE_SITUATION))
|
||||||
{
|
{
|
||||||
$this->fetchObjectLinked('', '', $object->id, 'facture');
|
$this->fetchObjectLinked('', '', $object->id, 'facture');
|
||||||
|
|
||||||
foreach ($this->linkedObjectsIds as $typeObject => $Tfk_object)
|
foreach ($this->linkedObjectsIds as $typeObject => $Tfk_object)
|
||||||
{
|
{
|
||||||
foreach ($Tfk_object as $fk_object)
|
foreach ($Tfk_object as $fk_object)
|
||||||
{
|
{
|
||||||
$facture->add_object_linked($typeObject, $fk_object);
|
$facture->add_object_linked($typeObject, $fk_object);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$facture->add_object_linked('facture', $this->fk_facture_source);
|
$facture->add_object_linked('facture', $this->fk_facture_source);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1107,7 +1109,7 @@ class Facture extends CommonInvoice
|
|||||||
$this->multicurrency_total_ht = $obj->multicurrency_total_ht;
|
$this->multicurrency_total_ht = $obj->multicurrency_total_ht;
|
||||||
$this->multicurrency_total_tva = $obj->multicurrency_total_tva;
|
$this->multicurrency_total_tva = $obj->multicurrency_total_tva;
|
||||||
$this->multicurrency_total_ttc = $obj->multicurrency_total_ttc;
|
$this->multicurrency_total_ttc = $obj->multicurrency_total_ttc;
|
||||||
|
|
||||||
if ($this->type == self::TYPE_SITUATION && $fetch_situation)
|
if ($this->type == self::TYPE_SITUATION && $fetch_situation)
|
||||||
{
|
{
|
||||||
$this->fetchPreviousNextSituationInvoice();
|
$this->fetchPreviousNextSituationInvoice();
|
||||||
@ -1229,7 +1231,7 @@ class Facture extends CommonInvoice
|
|||||||
$line->situation_percent= $objp->situation_percent;
|
$line->situation_percent= $objp->situation_percent;
|
||||||
$line->fk_prev_id = $objp->fk_prev_id;
|
$line->fk_prev_id = $objp->fk_prev_id;
|
||||||
$line->fk_unit = $objp->fk_unit;
|
$line->fk_unit = $objp->fk_unit;
|
||||||
|
|
||||||
// Multicurrency
|
// Multicurrency
|
||||||
$line->fk_multicurrency = $objp->fk_multicurrency;
|
$line->fk_multicurrency = $objp->fk_multicurrency;
|
||||||
$line->multicurrency_code = $objp->multicurrency_code;
|
$line->multicurrency_code = $objp->multicurrency_code;
|
||||||
@ -1237,7 +1239,7 @@ class Facture extends CommonInvoice
|
|||||||
$line->multicurrency_total_ht = $objp->multicurrency_total_ht;
|
$line->multicurrency_total_ht = $objp->multicurrency_total_ht;
|
||||||
$line->multicurrency_total_tva = $objp->multicurrency_total_tva;
|
$line->multicurrency_total_tva = $objp->multicurrency_total_tva;
|
||||||
$line->multicurrency_total_ttc = $objp->multicurrency_total_ttc;
|
$line->multicurrency_total_ttc = $objp->multicurrency_total_ttc;
|
||||||
|
|
||||||
$this->lines[$i] = $line;
|
$this->lines[$i] = $line;
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
@ -1255,17 +1257,17 @@ class Facture extends CommonInvoice
|
|||||||
/**
|
/**
|
||||||
* Fetch previous and next situations invoices
|
* Fetch previous and next situations invoices
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function fetchPreviousNextSituationInvoice()
|
function fetchPreviousNextSituationInvoice()
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$this->tab_previous_situation_invoice = array();
|
$this->tab_previous_situation_invoice = array();
|
||||||
$this->tab_next_situation_invoice = array();
|
$this->tab_next_situation_invoice = array();
|
||||||
|
|
||||||
$sql = 'SELECT rowid, situation_counter FROM '.MAIN_DB_PREFIX.'facture WHERE rowid <> '.$this->id.' AND entity = '.$conf->entity.' AND situation_cycle_ref = '.(int) $this->situation_cycle_ref.' ORDER BY situation_counter ASC';
|
$sql = 'SELECT rowid, situation_counter FROM '.MAIN_DB_PREFIX.'facture WHERE rowid <> '.$this->id.' AND entity = '.$conf->entity.' AND situation_cycle_ref = '.(int) $this->situation_cycle_ref.' ORDER BY situation_counter ASC';
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::fetchPreviousNextSituationInvoice ', LOG_DEBUG);
|
dol_syslog(get_class($this).'::fetchPreviousNextSituationInvoice ', LOG_DEBUG);
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
if ($result && $this->db->num_rows($result) > 0)
|
if ($result && $this->db->num_rows($result) > 0)
|
||||||
@ -1274,13 +1276,13 @@ class Facture extends CommonInvoice
|
|||||||
{
|
{
|
||||||
$invoice = new Facture($this->db);
|
$invoice = new Facture($this->db);
|
||||||
if ($invoice->fetch($objp->rowid) > 0)
|
if ($invoice->fetch($objp->rowid) > 0)
|
||||||
{
|
{
|
||||||
if ($objp->situation_counter < $this->situation_counter) $this->tab_previous_situation_invoice[] = $invoice;
|
if ($objp->situation_counter < $this->situation_counter) $this->tab_previous_situation_invoice[] = $invoice;
|
||||||
else $this->tab_next_situation_invoice[] = $invoice;
|
else $this->tab_next_situation_invoice[] = $invoice;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1486,25 +1488,60 @@ class Facture extends CommonInvoice
|
|||||||
* Set customer ref
|
* Set customer ref
|
||||||
*
|
*
|
||||||
* @param string $ref_client Customer ref
|
* @param string $ref_client Customer ref
|
||||||
|
* @param int $notrigger 1=Does not execute triggers, 0= execuete triggers
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function set_ref_client($ref_client)
|
function set_ref_client($ref_client, $notrigger=0)
|
||||||
{
|
{
|
||||||
|
$error=0;
|
||||||
|
|
||||||
|
$this->db->begin();
|
||||||
|
|
||||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'facture';
|
$sql = 'UPDATE '.MAIN_DB_PREFIX.'facture';
|
||||||
if (empty($ref_client))
|
if (empty($ref_client))
|
||||||
$sql .= ' SET ref_client = NULL';
|
$sql .= ' SET ref_client = NULL';
|
||||||
else
|
else
|
||||||
$sql .= ' SET ref_client = \''.$this->db->escape($ref_client).'\'';
|
$sql .= ' SET ref_client = \''.$this->db->escape($ref_client).'\'';
|
||||||
$sql .= ' WHERE rowid = '.$this->id;
|
$sql .= ' WHERE rowid = '.$this->id;
|
||||||
if ($this->db->query($sql))
|
|
||||||
|
dol_syslog(__METHOD__.' this->id='.$this->id.', ref_client='.$ref_client, LOG_DEBUG);
|
||||||
|
$resql=$this->db->query($sql);
|
||||||
|
if (!$resql)
|
||||||
|
{
|
||||||
|
$this->errors[]=$this->db->error();
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! $error)
|
||||||
{
|
{
|
||||||
$this->ref_client = $ref_client;
|
$this->ref_client = $ref_client;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! $notrigger && empty($error))
|
||||||
|
{
|
||||||
|
// Call trigger
|
||||||
|
$result=$this->call_trigger('BILL_MODIFY',$user);
|
||||||
|
if ($result < 0) $error++;
|
||||||
|
// End call triggers
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
|
|
||||||
|
$this->ref_client = $ref_client;
|
||||||
|
|
||||||
|
$this->db->commit();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_print_error($this->db);
|
foreach($this->errors as $errmsg)
|
||||||
return -1;
|
{
|
||||||
|
dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR);
|
||||||
|
$this->error.=($this->error?', '.$errmsg:$errmsg);
|
||||||
|
}
|
||||||
|
$this->db->rollback();
|
||||||
|
return -1*$error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2061,7 +2098,7 @@ class Facture extends CommonInvoice
|
|||||||
$this->brouillon=0;
|
$this->brouillon=0;
|
||||||
$this->date_validation=$now;
|
$this->date_validation=$now;
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
if (!empty($conf->global->INVOICE_USE_SITUATION))
|
if (!empty($conf->global->INVOICE_USE_SITUATION))
|
||||||
{
|
{
|
||||||
$final = True;
|
$final = True;
|
||||||
@ -2070,7 +2107,7 @@ class Facture extends CommonInvoice
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
if ($final) {
|
if ($final) {
|
||||||
$this->setFinal();
|
$this->setFinal($user);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2094,7 +2131,7 @@ class Facture extends CommonInvoice
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Update price of next invoice
|
* Update price of next invoice
|
||||||
*
|
*
|
||||||
* @param Translate $langs Translate object
|
* @param Translate $langs Translate object
|
||||||
* @return bool false if KO, true if OK
|
* @return bool false if KO, true if OK
|
||||||
*/
|
*/
|
||||||
@ -2103,13 +2140,13 @@ class Facture extends CommonInvoice
|
|||||||
foreach ($this->tab_next_situation_invoice as $next_invoice)
|
foreach ($this->tab_next_situation_invoice as $next_invoice)
|
||||||
{
|
{
|
||||||
$is_last = $next_invoice->is_last_in_cycle();
|
$is_last = $next_invoice->is_last_in_cycle();
|
||||||
|
|
||||||
if ($next_invoice->brouillon && $is_last != 1)
|
if ($next_invoice->brouillon && $is_last != 1)
|
||||||
{
|
{
|
||||||
$this->error = $langs->trans('updatePriceNextInvoiceErrorUpdateline', $next_invoice->ref);
|
$this->error = $langs->trans('updatePriceNextInvoiceErrorUpdateline', $next_invoice->ref);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$next_invoice->brouillon = 1;
|
$next_invoice->brouillon = 1;
|
||||||
foreach ($next_invoice->lines as $line)
|
foreach ($next_invoice->lines as $line)
|
||||||
{
|
{
|
||||||
@ -2117,17 +2154,17 @@ class Facture extends CommonInvoice
|
|||||||
$line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type,
|
$line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type,
|
||||||
$line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent,
|
$line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent,
|
||||||
$line->fk_unit);
|
$line->fk_unit);
|
||||||
|
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
$this->error = $langs->trans('updatePriceNextInvoiceErrorUpdateline', $next_invoice->ref);
|
$this->error = $langs->trans('updatePriceNextInvoiceErrorUpdateline', $next_invoice->ref);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
break; // Only the next invoice and not each next invoice
|
break; // Only the next invoice and not each next invoice
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2280,7 +2317,7 @@ class Facture extends CommonInvoice
|
|||||||
if (empty($fk_parent_line) || $fk_parent_line < 0) $fk_parent_line=0;
|
if (empty($fk_parent_line) || $fk_parent_line < 0) $fk_parent_line=0;
|
||||||
if (empty($fk_prev_id)) $fk_prev_id = 'null';
|
if (empty($fk_prev_id)) $fk_prev_id = 'null';
|
||||||
if (! isset($situation_percent) || $situation_percent > 100 || (string) $situation_percent == '') $situation_percent = 100;
|
if (! isset($situation_percent) || $situation_percent > 100 || (string) $situation_percent == '') $situation_percent = 100;
|
||||||
|
|
||||||
$remise_percent=price2num($remise_percent);
|
$remise_percent=price2num($remise_percent);
|
||||||
$qty=price2num($qty);
|
$qty=price2num($qty);
|
||||||
$pu_ht=price2num($pu_ht);
|
$pu_ht=price2num($pu_ht);
|
||||||
@ -2314,7 +2351,8 @@ class Facture extends CommonInvoice
|
|||||||
$product_type=$product->type;
|
$product_type=$product->type;
|
||||||
|
|
||||||
if (! empty($conf->global->STOCK_MUST_BE_ENOUGH_FOR_INVOICE) && $product_type == 0 && $product->stock_reel < $qty) {
|
if (! empty($conf->global->STOCK_MUST_BE_ENOUGH_FOR_INVOICE) && $product_type == 0 && $product->stock_reel < $qty) {
|
||||||
$this->error=$langs->trans('ErrorStockIsNotEnough');
|
$langs->load("errors");
|
||||||
|
$this->error=$langs->trans('ErrorStockIsNotEnoughToAddProductOnInvoice', $product->ref);
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
return -3;
|
return -3;
|
||||||
}
|
}
|
||||||
@ -2341,7 +2379,7 @@ class Facture extends CommonInvoice
|
|||||||
$multicurrency_total_ht = $tabprice[16];
|
$multicurrency_total_ht = $tabprice[16];
|
||||||
$multicurrency_total_tva = $tabprice[17];
|
$multicurrency_total_tva = $tabprice[17];
|
||||||
$multicurrency_total_ttc = $tabprice[18];
|
$multicurrency_total_ttc = $tabprice[18];
|
||||||
|
|
||||||
// Rank to use
|
// Rank to use
|
||||||
$rangtouse = $rang;
|
$rangtouse = $rang;
|
||||||
if ($rangtouse == -1)
|
if ($rangtouse == -1)
|
||||||
@ -2354,31 +2392,36 @@ class Facture extends CommonInvoice
|
|||||||
$this->line=new FactureLigne($this->db);
|
$this->line=new FactureLigne($this->db);
|
||||||
|
|
||||||
$this->line->context = $this->context;
|
$this->line->context = $this->context;
|
||||||
|
|
||||||
$this->line->fk_facture=$this->id;
|
$this->line->fk_facture=$this->id;
|
||||||
$this->line->label=$label; // deprecated
|
$this->line->label=$label; // deprecated
|
||||||
$this->line->desc=$desc;
|
$this->line->desc=$desc;
|
||||||
$this->line->qty= ($this->type==self::TYPE_CREDIT_NOTE?abs($qty):$qty); // For credit note, quantity is always positive and unit price negative
|
|
||||||
|
$this->line->qty= ($this->type==self::TYPE_CREDIT_NOTE?abs($qty):$qty); // For credit note, quantity is always positive and unit price negative
|
||||||
|
$this->line->subprice= ($this->type==self::TYPE_CREDIT_NOTE?-abs($pu_ht):$pu_ht); // For credit note, unit price always negative, always positive otherwise
|
||||||
|
|
||||||
$this->line->tva_tx=$txtva;
|
$this->line->tva_tx=$txtva;
|
||||||
$this->line->localtax1_tx=$txlocaltax1;
|
$this->line->localtax1_tx=$txlocaltax1;
|
||||||
$this->line->localtax2_tx=$txlocaltax2;
|
$this->line->localtax2_tx=$txlocaltax2;
|
||||||
|
$this->line->localtax1_type = $localtaxes_type[0];
|
||||||
|
$this->line->localtax2_type = $localtaxes_type[2];
|
||||||
|
|
||||||
|
$this->line->total_ht= (($this->type==self::TYPE_CREDIT_NOTE||$qty<0)?-abs($total_ht):$total_ht); // For credit note and if qty is negative, total is negative
|
||||||
|
$this->line->total_ttc= (($this->type==self::TYPE_CREDIT_NOTE||$qty<0)?-abs($total_ttc):$total_ttc); // For credit note and if qty is negative, total is negative
|
||||||
|
$this->line->total_tva= (($this->type==self::TYPE_CREDIT_NOTE||$qty<0)?-abs($total_tva):$total_tva); // For credit note and if qty is negative, total is negative
|
||||||
|
$this->line->total_localtax1=(($this->type==self::TYPE_CREDIT_NOTE||$qty<0)?-abs($total_localtax1):$total_localtax1); // For credit note and if qty is negative, total is negative
|
||||||
|
$this->line->total_localtax2=(($this->type==self::TYPE_CREDIT_NOTE||$qty<0)?-abs($total_localtax2):$total_localtax2); // For credit note and if qty is negative, total is negative
|
||||||
|
|
||||||
$this->line->fk_product=$fk_product;
|
$this->line->fk_product=$fk_product;
|
||||||
$this->line->product_type=$product_type;
|
$this->line->product_type=$product_type;
|
||||||
$this->line->remise_percent=$remise_percent;
|
$this->line->remise_percent=$remise_percent;
|
||||||
$this->line->subprice= ($this->type==self::TYPE_CREDIT_NOTE?-abs($pu_ht):$pu_ht); // For credit note, unit price always negative, always positive otherwise
|
|
||||||
$this->line->date_start=$date_start;
|
$this->line->date_start=$date_start;
|
||||||
$this->line->date_end=$date_end;
|
$this->line->date_end=$date_end;
|
||||||
$this->line->ventil=$ventil;
|
$this->line->ventil=$ventil;
|
||||||
$this->line->rang=$rangtouse;
|
$this->line->rang=$rangtouse;
|
||||||
$this->line->info_bits=$info_bits;
|
$this->line->info_bits=$info_bits;
|
||||||
$this->line->fk_remise_except=$fk_remise_except;
|
$this->line->fk_remise_except=$fk_remise_except;
|
||||||
$this->line->total_ht= (($this->type==self::TYPE_CREDIT_NOTE||$qty<0)?-abs($total_ht):$total_ht); // For credit note and if qty is negative, total is negative
|
|
||||||
$this->line->total_tva= $total_tva;
|
|
||||||
$this->line->total_localtax1=$total_localtax1;
|
|
||||||
$this->line->total_localtax2=$total_localtax2;
|
|
||||||
$this->line->localtax1_type = $localtaxes_type[0];
|
|
||||||
$this->line->localtax2_type = $localtaxes_type[2];
|
|
||||||
$this->line->total_ttc= (($this->type==self::TYPE_CREDIT_NOTE||$qty<0)?-abs($total_ttc):$total_ttc);
|
|
||||||
$this->line->special_code=$special_code;
|
$this->line->special_code=$special_code;
|
||||||
$this->line->fk_parent_line=$fk_parent_line;
|
$this->line->fk_parent_line=$fk_parent_line;
|
||||||
$this->line->origin=$origin;
|
$this->line->origin=$origin;
|
||||||
@ -2390,7 +2433,7 @@ class Facture extends CommonInvoice
|
|||||||
// infos marge
|
// infos marge
|
||||||
$this->line->fk_fournprice = $fk_fournprice;
|
$this->line->fk_fournprice = $fk_fournprice;
|
||||||
$this->line->pa_ht = $pa_ht;
|
$this->line->pa_ht = $pa_ht;
|
||||||
|
|
||||||
// Multicurrency
|
// Multicurrency
|
||||||
$this->line->fk_multicurrency = $this->fk_multicurrency;
|
$this->line->fk_multicurrency = $this->fk_multicurrency;
|
||||||
$this->line->multicurrency_code = $this->multicurrency_code;
|
$this->line->multicurrency_code = $this->multicurrency_code;
|
||||||
@ -2398,7 +2441,7 @@ class Facture extends CommonInvoice
|
|||||||
$this->line->multicurrency_total_ht = $multicurrency_total_ht;
|
$this->line->multicurrency_total_ht = $multicurrency_total_ht;
|
||||||
$this->line->multicurrency_total_tva = $multicurrency_total_tva;
|
$this->line->multicurrency_total_tva = $multicurrency_total_tva;
|
||||||
$this->line->multicurrency_total_ttc = $multicurrency_total_ttc;
|
$this->line->multicurrency_total_ttc = $multicurrency_total_ttc;
|
||||||
|
|
||||||
if (is_array($array_options) && count($array_options)>0) {
|
if (is_array($array_options) && count($array_options)>0) {
|
||||||
$this->line->array_options=$array_options;
|
$this->line->array_options=$array_options;
|
||||||
}
|
}
|
||||||
@ -2483,7 +2526,7 @@ class Facture extends CommonInvoice
|
|||||||
return -3;
|
return -3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
@ -2509,7 +2552,7 @@ class Facture extends CommonInvoice
|
|||||||
|
|
||||||
$localtaxes_type=getLocalTaxesFromRate($txtva,0,$this->thirdparty, $mysoc);
|
$localtaxes_type=getLocalTaxesFromRate($txtva,0,$this->thirdparty, $mysoc);
|
||||||
$txtva = preg_replace('/\s*\(.*\)/','',$txtva); // Remove code into vatrate.
|
$txtva = preg_replace('/\s*\(.*\)/','',$txtva); // Remove code into vatrate.
|
||||||
|
|
||||||
$tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $mysoc, $localtaxes_type, $situation_percent, $this->multicurrency_tx);
|
$tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $mysoc, $localtaxes_type, $situation_percent, $this->multicurrency_tx);
|
||||||
|
|
||||||
$total_ht = $tabprice[0];
|
$total_ht = $tabprice[0];
|
||||||
@ -2525,7 +2568,7 @@ class Facture extends CommonInvoice
|
|||||||
$multicurrency_total_ht = $tabprice[16];
|
$multicurrency_total_ht = $tabprice[16];
|
||||||
$multicurrency_total_tva = $tabprice[17];
|
$multicurrency_total_tva = $tabprice[17];
|
||||||
$multicurrency_total_ttc = $tabprice[18];
|
$multicurrency_total_ttc = $tabprice[18];
|
||||||
|
|
||||||
// Old properties: $price, $remise (deprecated)
|
// Old properties: $price, $remise (deprecated)
|
||||||
$price = $pu;
|
$price = $pu;
|
||||||
$remise = 0;
|
$remise = 0;
|
||||||
@ -2547,7 +2590,8 @@ class Facture extends CommonInvoice
|
|||||||
$product_type=$product->type;
|
$product_type=$product->type;
|
||||||
|
|
||||||
if (! empty($conf->global->STOCK_MUST_BE_ENOUGH_FOR_INVOICE) && $product_type == 0 && $product->stock_reel < $qty) {
|
if (! empty($conf->global->STOCK_MUST_BE_ENOUGH_FOR_INVOICE) && $product_type == 0 && $product->stock_reel < $qty) {
|
||||||
$this->error=$langs->trans('ErrorStockIsNotEnough');
|
$langs->load("errors");
|
||||||
|
$this->error=$langs->trans('ErrorStockIsNotEnoughToAddProductOnInvoice', $product->ref);
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
return -3;
|
return -3;
|
||||||
}
|
}
|
||||||
@ -2600,7 +2644,7 @@ class Facture extends CommonInvoice
|
|||||||
$this->line->multicurrency_total_ht = $multicurrency_total_ht;
|
$this->line->multicurrency_total_ht = $multicurrency_total_ht;
|
||||||
$this->line->multicurrency_total_tva = $multicurrency_total_tva;
|
$this->line->multicurrency_total_tva = $multicurrency_total_tva;
|
||||||
$this->line->multicurrency_total_ttc = $multicurrency_total_ttc;
|
$this->line->multicurrency_total_ttc = $multicurrency_total_ttc;
|
||||||
|
|
||||||
if (is_array($array_options) && count($array_options)>0) {
|
if (is_array($array_options) && count($array_options)>0) {
|
||||||
$this->line->array_options=$array_options;
|
$this->line->array_options=$array_options;
|
||||||
}
|
}
|
||||||
@ -2631,28 +2675,28 @@ class Facture extends CommonInvoice
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the percent edited is lower of next invoice line
|
* Check if the percent edited is lower of next invoice line
|
||||||
*
|
*
|
||||||
* @param int $idline id of line to check
|
* @param int $idline id of line to check
|
||||||
* @param float $situation_percent progress percentage need to be test
|
* @param float $situation_percent progress percentage need to be test
|
||||||
* @return false if KO, true if OK
|
* @return false if KO, true if OK
|
||||||
*/
|
*/
|
||||||
function checkProgressLine($idline, $situation_percent)
|
function checkProgressLine($idline, $situation_percent)
|
||||||
{
|
{
|
||||||
$sql = 'SELECT fd.situation_percent FROM '.MAIN_DB_PREFIX.'facturedet fd
|
$sql = 'SELECT fd.situation_percent FROM '.MAIN_DB_PREFIX.'facturedet fd
|
||||||
INNER JOIN '.MAIN_DB_PREFIX.'facture f ON (fd.fk_facture = f.rowid)
|
INNER JOIN '.MAIN_DB_PREFIX.'facture f ON (fd.fk_facture = f.rowid)
|
||||||
WHERE fd.fk_prev_id = '.$idline.'
|
WHERE fd.fk_prev_id = '.$idline.'
|
||||||
AND f.fk_statut <> 0';
|
AND f.fk_statut <> 0';
|
||||||
|
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
if (! $result)
|
if (! $result)
|
||||||
{
|
{
|
||||||
$this->error=$this->db->error();
|
$this->error=$this->db->error();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$obj = $this->db->fetch_object($result);
|
$obj = $this->db->fetch_object($result);
|
||||||
|
|
||||||
if ($obj === null) return true;
|
if ($obj === null) return true;
|
||||||
else return $situation_percent < $obj->situation_percent;
|
else return $situation_percent < $obj->situation_percent;
|
||||||
}
|
}
|
||||||
@ -2667,7 +2711,7 @@ class Facture extends CommonInvoice
|
|||||||
function update_percent($line, $percent)
|
function update_percent($line, $percent)
|
||||||
{
|
{
|
||||||
global $mysoc,$user;
|
global $mysoc,$user;
|
||||||
|
|
||||||
include_once(DOL_DOCUMENT_ROOT . '/core/lib/price.lib.php');
|
include_once(DOL_DOCUMENT_ROOT . '/core/lib/price.lib.php');
|
||||||
|
|
||||||
// Cap percentages to 100
|
// Cap percentages to 100
|
||||||
@ -2753,9 +2797,10 @@ class Facture extends CommonInvoice
|
|||||||
*
|
*
|
||||||
* @param User $user User that set discount
|
* @param User $user User that set discount
|
||||||
* @param double $remise Discount
|
* @param double $remise Discount
|
||||||
|
* @param int $notrigger 1=Does not execute triggers, 0= execuete triggers
|
||||||
* @return int <0 if ko, >0 if ok
|
* @return int <0 if ko, >0 if ok
|
||||||
*/
|
*/
|
||||||
function set_remise($user, $remise)
|
function set_remise($user, $remise, $notrigger=0)
|
||||||
{
|
{
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
if (empty($remise)) $remise=0;
|
if (empty($remise)) $remise=0;
|
||||||
@ -2764,21 +2809,48 @@ class Facture extends CommonInvoice
|
|||||||
{
|
{
|
||||||
$remise=price2num($remise);
|
$remise=price2num($remise);
|
||||||
|
|
||||||
|
$error=0;
|
||||||
|
|
||||||
|
$this->db->begin();
|
||||||
|
|
||||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'facture';
|
$sql = 'UPDATE '.MAIN_DB_PREFIX.'facture';
|
||||||
$sql.= ' SET remise_percent = '.$remise;
|
$sql.= ' SET remise_percent = '.$remise;
|
||||||
$sql.= ' WHERE rowid = '.$this->id;
|
$sql.= ' WHERE rowid = '.$this->id;
|
||||||
$sql.= ' AND fk_statut = '.self::STATUS_DRAFT;
|
$sql.= ' AND fk_statut = '.self::STATUS_DRAFT;
|
||||||
|
|
||||||
if ($this->db->query($sql))
|
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||||
|
$resql=$this->db->query($sql);
|
||||||
|
if (!$resql)
|
||||||
|
{
|
||||||
|
$this->errors[]=$this->db->error();
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! $notrigger && empty($error))
|
||||||
|
{
|
||||||
|
// Call trigger
|
||||||
|
$result=$this->call_trigger('BILL_MODIFY',$user);
|
||||||
|
if ($result < 0) $error++;
|
||||||
|
// End call triggers
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! $error)
|
||||||
{
|
{
|
||||||
$this->remise_percent = $remise;
|
$this->remise_percent = $remise;
|
||||||
$this->update_price(1);
|
$this->update_price(1);
|
||||||
|
|
||||||
|
$this->db->commit();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error=$this->db->error();
|
foreach($this->errors as $errmsg)
|
||||||
return -1;
|
{
|
||||||
|
dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR);
|
||||||
|
$this->error.=($this->error?', '.$errmsg:$errmsg);
|
||||||
|
}
|
||||||
|
$this->db->rollback();
|
||||||
|
return -1*$error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2789,14 +2861,19 @@ class Facture extends CommonInvoice
|
|||||||
*
|
*
|
||||||
* @param User $user User that set discount
|
* @param User $user User that set discount
|
||||||
* @param double $remise Discount
|
* @param double $remise Discount
|
||||||
|
* @param int $notrigger 1=Does not execute triggers, 0= execuete triggers
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function set_remise_absolue($user, $remise)
|
function set_remise_absolue($user, $remise, $notrigger=0)
|
||||||
{
|
{
|
||||||
if (empty($remise)) $remise=0;
|
if (empty($remise)) $remise=0;
|
||||||
|
|
||||||
if ($user->rights->facture->creer)
|
if ($user->rights->facture->creer)
|
||||||
{
|
{
|
||||||
|
$error=0;
|
||||||
|
|
||||||
|
$this->db->begin();
|
||||||
|
|
||||||
$remise=price2num($remise);
|
$remise=price2num($remise);
|
||||||
|
|
||||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'facture';
|
$sql = 'UPDATE '.MAIN_DB_PREFIX.'facture';
|
||||||
@ -2804,18 +2881,43 @@ class Facture extends CommonInvoice
|
|||||||
$sql.= ' WHERE rowid = '.$this->id;
|
$sql.= ' WHERE rowid = '.$this->id;
|
||||||
$sql.= ' AND fk_statut = '.self::STATUS_DRAFT;
|
$sql.= ' AND fk_statut = '.self::STATUS_DRAFT;
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::set_remise_absolue", LOG_DEBUG);
|
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||||
|
$resql=$this->db->query($sql);
|
||||||
if ($this->db->query($sql))
|
if (!$resql)
|
||||||
{
|
{
|
||||||
|
$this->errors[]=$this->db->error();
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
|
$this->oldcopy= clone $this;
|
||||||
$this->remise_absolue = $remise;
|
$this->remise_absolue = $remise;
|
||||||
$this->update_price(1);
|
$this->update_price(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! $notrigger && empty($error))
|
||||||
|
{
|
||||||
|
// Call trigger
|
||||||
|
$result=$this->call_trigger('BILL_MODIFY',$user);
|
||||||
|
if ($result < 0) $error++;
|
||||||
|
// End call triggers
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
|
$this->db->commit();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error=$this->db->error();
|
foreach($this->errors as $errmsg)
|
||||||
return -1;
|
{
|
||||||
|
dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR);
|
||||||
|
$this->error.=($this->error?', '.$errmsg:$errmsg);
|
||||||
|
}
|
||||||
|
$this->db->rollback();
|
||||||
|
return -1*$error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3442,7 +3544,7 @@ class Facture extends CommonInvoice
|
|||||||
|
|
||||||
$clause = " WHERE";
|
$clause = " WHERE";
|
||||||
|
|
||||||
$sql = "SELECT f.rowid, f.date_lim_reglement as datefin";
|
$sql = "SELECT f.rowid, f.date_lim_reglement as datefin,f.fk_statut";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f";
|
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f";
|
||||||
if (!$user->rights->societe->client->voir && !$user->societe_id)
|
if (!$user->rights->societe->client->voir && !$user->societe_id)
|
||||||
{
|
{
|
||||||
@ -3472,6 +3574,7 @@ class Facture extends CommonInvoice
|
|||||||
while ($obj=$this->db->fetch_object($resql))
|
while ($obj=$this->db->fetch_object($resql))
|
||||||
{
|
{
|
||||||
$generic_facture->date_lim_reglement = $this->db->jdate($obj->datefin);
|
$generic_facture->date_lim_reglement = $this->db->jdate($obj->datefin);
|
||||||
|
$generic_facture->statut = $obj->fk_statut;
|
||||||
|
|
||||||
$response->nbtodo++;
|
$response->nbtodo++;
|
||||||
|
|
||||||
@ -3479,7 +3582,7 @@ class Facture extends CommonInvoice
|
|||||||
$response->nbtodolate++;
|
$response->nbtodolate++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -3530,6 +3633,8 @@ class Facture extends CommonInvoice
|
|||||||
$arraynow=dol_getdate($now);
|
$arraynow=dol_getdate($now);
|
||||||
$nownotime=dol_mktime(0, 0, 0, $arraynow['mon'], $arraynow['mday'], $arraynow['year']);
|
$nownotime=dol_mktime(0, 0, 0, $arraynow['mon'], $arraynow['mday'], $arraynow['year']);
|
||||||
|
|
||||||
|
// Load array of products prodids
|
||||||
|
$num_prods = 0;
|
||||||
$prodids = array();
|
$prodids = array();
|
||||||
$sql = "SELECT rowid";
|
$sql = "SELECT rowid";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."product";
|
$sql.= " FROM ".MAIN_DB_PREFIX."product";
|
||||||
@ -3546,6 +3651,10 @@ class Facture extends CommonInvoice
|
|||||||
$prodids[$i] = $row[0];
|
$prodids[$i] = $row[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//Avoid php warning Warning: mt_rand(): max(0) is smaller than min(1) when no product exists
|
||||||
|
if (empty($num_prods)) {
|
||||||
|
$num_prods=1;
|
||||||
|
}
|
||||||
|
|
||||||
// Initialize parameters
|
// Initialize parameters
|
||||||
$this->id=0;
|
$this->id=0;
|
||||||
@ -3779,7 +3888,7 @@ class Facture extends CommonInvoice
|
|||||||
function get_prev_sits()
|
function get_prev_sits()
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$sql = 'SELECT rowid FROM ' . MAIN_DB_PREFIX . 'facture';
|
$sql = 'SELECT rowid FROM ' . MAIN_DB_PREFIX . 'facture';
|
||||||
$sql .= ' where situation_cycle_ref = ' . $this->situation_cycle_ref;
|
$sql .= ' where situation_cycle_ref = ' . $this->situation_cycle_ref;
|
||||||
$sql .= ' and situation_counter < ' . $this->situation_counter;
|
$sql .= ' and situation_counter < ' . $this->situation_counter;
|
||||||
@ -3805,25 +3914,49 @@ class Facture extends CommonInvoice
|
|||||||
/**
|
/**
|
||||||
* Sets the invoice as a final situation
|
* Sets the invoice as a final situation
|
||||||
*
|
*
|
||||||
* @return int 1 if ok, -1 if error
|
* @param User $user Object user
|
||||||
|
* @param int $notrigger 1=Does not execute triggers, 0= execuete triggers
|
||||||
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function setFinal()
|
function setFinal(User $user, $notrigger=0)
|
||||||
{
|
{
|
||||||
|
$error=0;
|
||||||
$this->db->begin();
|
|
||||||
|
$this->db->begin();
|
||||||
|
|
||||||
$this->situation_final = 1;
|
$this->situation_final = 1;
|
||||||
$sql = 'update ' . MAIN_DB_PREFIX . 'facture set situation_final = ' . $this->situation_final . ' where rowid = ' . $this->id;
|
$sql = 'UPDATE ' . MAIN_DB_PREFIX . 'facture SET situation_final = ' . $this->situation_final . ' where rowid = ' . $this->id;
|
||||||
$resql = $this->db->query($sql);
|
|
||||||
if ($resql) {
|
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||||
// FIXME: call triggers MODIFY because we modify invoice
|
$resql=$this->db->query($sql);
|
||||||
|
if (!$resql)
|
||||||
|
{
|
||||||
|
$this->errors[]=$this->db->error();
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! $notrigger && empty($error))
|
||||||
|
{
|
||||||
|
// Call trigger
|
||||||
|
$result=$this->call_trigger('BILL_MODIFY',$user);
|
||||||
|
if ($result < 0) $error++;
|
||||||
|
// End call triggers
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
}
|
||||||
$this->error = $this->db->lasterror();
|
else
|
||||||
dol_syslog(get_class($this) . "::update Error setFinal " . $sql, LOG_ERR);
|
{
|
||||||
|
foreach($this->errors as $errmsg)
|
||||||
|
{
|
||||||
|
dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR);
|
||||||
|
$this->error.=($this->error?', '.$errmsg:$errmsg);
|
||||||
|
}
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
return -1;
|
return -1*$error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3836,12 +3969,12 @@ class Facture extends CommonInvoice
|
|||||||
function is_last_in_cycle()
|
function is_last_in_cycle()
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
if (!empty($this->situation_cycle_ref)) {
|
if (!empty($this->situation_cycle_ref)) {
|
||||||
// No point in testing anything if we're not inside a cycle
|
// No point in testing anything if we're not inside a cycle
|
||||||
$sql = 'SELECT max(situation_counter) FROM ' . MAIN_DB_PREFIX . 'facture WHERE situation_cycle_ref = ' . $this->situation_cycle_ref . ' AND entity = ' . ($this->entity > 0 ? $this->entity : $conf->entity);
|
$sql = 'SELECT max(situation_counter) FROM ' . MAIN_DB_PREFIX . 'facture WHERE situation_cycle_ref = ' . $this->situation_cycle_ref . ' AND entity = ' . ($this->entity > 0 ? $this->entity : $conf->entity);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
|
|
||||||
if ($resql && $resql->num_rows > 0) {
|
if ($resql && $resql->num_rows > 0) {
|
||||||
$res = $this->db->fetch_array($resql);
|
$res = $this->db->fetch_array($resql);
|
||||||
$last = $res['max(situation_counter)'];
|
$last = $res['max(situation_counter)'];
|
||||||
@ -3883,10 +4016,10 @@ class Facture extends CommonInvoice
|
|||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$now = dol_now();
|
$now = dol_now();
|
||||||
|
|
||||||
// Paid invoices have status STATUS_CLOSED
|
// Paid invoices have status STATUS_CLOSED
|
||||||
if ($this->statut != Facture::STATUS_VALIDATED) return false;
|
if ($this->statut != Facture::STATUS_VALIDATED) return false;
|
||||||
|
|
||||||
return $this->date_lim_reglement < ($now - $conf->facture->client->warning_delay);
|
return $this->date_lim_reglement < ($now - $conf->facture->client->warning_delay);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3975,7 +4108,7 @@ class FactureLigne extends CommonInvoiceLine
|
|||||||
var $multicurrency_total_ht;
|
var $multicurrency_total_ht;
|
||||||
var $multicurrency_total_tva;
|
var $multicurrency_total_tva;
|
||||||
var $multicurrency_total_ttc;
|
var $multicurrency_total_ttc;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load invoice line from database
|
* Load invoice line from database
|
||||||
*
|
*
|
||||||
@ -4065,7 +4198,7 @@ class FactureLigne extends CommonInvoiceLine
|
|||||||
$error=0;
|
$error=0;
|
||||||
|
|
||||||
$pa_ht_isemptystring = (empty($this->pa_ht) && $this->pa_ht == ''); // If true, we can use a default value. If this->pa_ht = '0', we must use '0'.
|
$pa_ht_isemptystring = (empty($this->pa_ht) && $this->pa_ht == ''); // If true, we can use a default value. If this->pa_ht = '0', we must use '0'.
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::insert rang=".$this->rang, LOG_DEBUG);
|
dol_syslog(get_class($this)."::insert rang=".$this->rang, LOG_DEBUG);
|
||||||
|
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
@ -4091,9 +4224,9 @@ class FactureLigne extends CommonInvoiceLine
|
|||||||
if (empty($this->multicurrency_total_ht)) $this->multicurrency_total_ht=0;
|
if (empty($this->multicurrency_total_ht)) $this->multicurrency_total_ht=0;
|
||||||
if (empty($this->multicurrency_total_tva)) $this->multicurrency_total_tva=0;
|
if (empty($this->multicurrency_total_tva)) $this->multicurrency_total_tva=0;
|
||||||
if (empty($this->multicurrency_total_ttc)) $this->multicurrency_total_ttc=0;
|
if (empty($this->multicurrency_total_ttc)) $this->multicurrency_total_ttc=0;
|
||||||
|
|
||||||
// if buy price not defined, define buyprice as configured in margin admin
|
// if buy price not defined, define buyprice as configured in margin admin
|
||||||
if ($this->pa_ht == 0 && $pa_ht_isemptystring)
|
if ($this->pa_ht == 0 && $pa_ht_isemptystring)
|
||||||
{
|
{
|
||||||
if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0)
|
if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0)
|
||||||
{
|
{
|
||||||
@ -4277,7 +4410,7 @@ class FactureLigne extends CommonInvoiceLine
|
|||||||
$error=0;
|
$error=0;
|
||||||
|
|
||||||
$pa_ht_isemptystring = (empty($this->pa_ht) && $this->pa_ht == ''); // If true, we can use a default value. If this->pa_ht = '0', we must use '0'.
|
$pa_ht_isemptystring = (empty($this->pa_ht) && $this->pa_ht == ''); // If true, we can use a default value. If this->pa_ht = '0', we must use '0'.
|
||||||
|
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
$this->desc=trim($this->desc);
|
$this->desc=trim($this->desc);
|
||||||
if (empty($this->tva_tx)) $this->tva_tx=0;
|
if (empty($this->tva_tx)) $this->tva_tx=0;
|
||||||
@ -4299,7 +4432,7 @@ class FactureLigne extends CommonInvoiceLine
|
|||||||
if ($this->product_type < 0) return -1;
|
if ($this->product_type < 0) return -1;
|
||||||
|
|
||||||
// if buy price not defined, define buyprice as configured in margin admin
|
// if buy price not defined, define buyprice as configured in margin admin
|
||||||
if ($this->pa_ht == 0 && $pa_ht_isemptystring)
|
if ($this->pa_ht == 0 && $pa_ht_isemptystring)
|
||||||
{
|
{
|
||||||
if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0)
|
if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0)
|
||||||
{
|
{
|
||||||
@ -4346,13 +4479,13 @@ class FactureLigne extends CommonInvoiceLine
|
|||||||
if (! empty($this->rang)) $sql.= ", rang=".$this->rang;
|
if (! empty($this->rang)) $sql.= ", rang=".$this->rang;
|
||||||
$sql .= ", situation_percent=" . $this->situation_percent;
|
$sql .= ", situation_percent=" . $this->situation_percent;
|
||||||
$sql .= ", fk_unit=".(!$this->fk_unit ? 'NULL' : $this->fk_unit);
|
$sql .= ", fk_unit=".(!$this->fk_unit ? 'NULL' : $this->fk_unit);
|
||||||
|
|
||||||
// Multicurrency
|
// Multicurrency
|
||||||
$sql.= " , multicurrency_subprice=".price2num($this->multicurrency_subprice)."";
|
$sql.= " , multicurrency_subprice=".price2num($this->multicurrency_subprice)."";
|
||||||
$sql.= " , multicurrency_total_ht=".price2num($this->multicurrency_total_ht)."";
|
$sql.= " , multicurrency_total_ht=".price2num($this->multicurrency_total_ht)."";
|
||||||
$sql.= " , multicurrency_total_tva=".price2num($this->multicurrency_total_tva)."";
|
$sql.= " , multicurrency_total_tva=".price2num($this->multicurrency_total_tva)."";
|
||||||
$sql.= " , multicurrency_total_ttc=".price2num($this->multicurrency_total_ttc)."";
|
$sql.= " , multicurrency_total_ttc=".price2num($this->multicurrency_total_ttc)."";
|
||||||
|
|
||||||
$sql.= " WHERE rowid = ".$this->rowid;
|
$sql.= " WHERE rowid = ".$this->rowid;
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::update", LOG_DEBUG);
|
dol_syslog(get_class($this)."::update", LOG_DEBUG);
|
||||||
@ -4468,7 +4601,7 @@ class FactureLigne extends CommonInvoiceLine
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns situation_percent of the previous line.
|
* Returns situation_percent of the previous line.
|
||||||
* Warning: If invoice is a replacement invoice, this->fk_prev_id is id of the replaced line.
|
* Warning: If invoice is a replacement invoice, this->fk_prev_id is id of the replaced line.
|
||||||
*
|
*
|
||||||
* @param int $invoiceid Invoice id
|
* @param int $invoiceid Invoice id
|
||||||
* @return int >= 0
|
* @return int >= 0
|
||||||
|
|||||||
@ -552,9 +552,9 @@ if ($action == 'addline' && $user->rights->facture->creer)
|
|||||||
|
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
// Define output language
|
|
||||||
/*if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))
|
/*if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))
|
||||||
{
|
{
|
||||||
|
// Define output language
|
||||||
$outputlangs = $langs;
|
$outputlangs = $langs;
|
||||||
$newlang = '';
|
$newlang = '';
|
||||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id')) $newlang = GETPOST('lang_id','alpha');
|
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id')) $newlang = GETPOST('lang_id','alpha');
|
||||||
@ -615,8 +615,168 @@ if ($action == 'addline' && $user->rights->facture->creer)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
elseif ($action == 'updateligne' && $user->rights->facture->creer && ! GETPOST('cancel'))
|
||||||
|
{
|
||||||
|
if (! $object->fetch($id) > 0) dol_print_error($db);
|
||||||
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
|
// Clean parameters
|
||||||
|
$date_start = '';
|
||||||
|
$date_end = '';
|
||||||
|
//$date_start = dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), GETPOST('date_startsec'), GETPOST('date_startmonth'), GETPOST('date_startday'), GETPOST('date_startyear'));
|
||||||
|
//$date_end = dol_mktime(GETPOST('date_endhour'), GETPOST('date_endmin'), GETPOST('date_endsec'), GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear'));
|
||||||
|
$description = dol_htmlcleanlastbr(GETPOST('product_desc') ? GETPOST('product_desc') : GETPOST('desc'));
|
||||||
|
$pu_ht = GETPOST('price_ht');
|
||||||
|
$vat_rate = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0);
|
||||||
|
$qty = GETPOST('qty');
|
||||||
|
|
||||||
|
// Define info_bits
|
||||||
|
$info_bits = 0;
|
||||||
|
if (preg_match('/\*/', $vat_rate))
|
||||||
|
$info_bits |= 0x01;
|
||||||
|
|
||||||
|
// Define vat_rate
|
||||||
|
$vat_rate = str_replace('*', '', $vat_rate);
|
||||||
|
$localtax1_rate = get_localtax($vat_rate, 1, $object->thirdparty);
|
||||||
|
$localtax2_rate = get_localtax($vat_rate, 2, $object->thirdparty);
|
||||||
|
|
||||||
|
// Add buying price
|
||||||
|
$fournprice = price2num(GETPOST('fournprice') ? GETPOST('fournprice') : '');
|
||||||
|
$buyingprice = price2num(GETPOST('buying_price') != '' ? GETPOST('buying_price') : ''); // If buying_price is '0', we muste keep this value
|
||||||
|
|
||||||
|
// Extrafields
|
||||||
|
$extrafieldsline = new ExtraFields($db);
|
||||||
|
$extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line);
|
||||||
|
$array_options = $extrafieldsline->getOptionalsFromPost($extralabelsline);
|
||||||
|
// Unset extrafield
|
||||||
|
if (is_array($extralabelsline)) {
|
||||||
|
// Get extra fields
|
||||||
|
foreach ($extralabelsline as $key => $value) {
|
||||||
|
unset($_POST["options_" . $key]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Define special_code for special lines
|
||||||
|
$special_code=GETPOST('special_code');
|
||||||
|
if (! GETPOST('qty')) $special_code=3;
|
||||||
|
|
||||||
|
/*$line = new FactureLigne($db);
|
||||||
|
$line->fetch(GETPOST('lineid'));
|
||||||
|
$percent = $line->get_prev_progress($object->id);
|
||||||
|
|
||||||
|
if (GETPOST('progress') < $percent)
|
||||||
|
{
|
||||||
|
$mesg = '<div class="warning">' . $langs->trans("CantBeLessThanMinPercent") . '</div>';
|
||||||
|
setEventMessages($mesg, null, 'warnings');
|
||||||
|
$error++;
|
||||||
|
$result = -1;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
// Check minimum price
|
||||||
|
$productid = GETPOST('productid', 'int');
|
||||||
|
if (! empty($productid))
|
||||||
|
{
|
||||||
|
$product = new Product($db);
|
||||||
|
$product->fetch($productid);
|
||||||
|
|
||||||
|
$type = $product->type;
|
||||||
|
|
||||||
|
$price_min = $product->price_min;
|
||||||
|
if (! empty($conf->global->PRODUIT_MULTIPRICES) && ! empty($object->thirdparty->price_level))
|
||||||
|
$price_min = $product->multiprices_min [$object->thirdparty->price_level];
|
||||||
|
|
||||||
|
$label = ((GETPOST('update_label') && GETPOST('product_label')) ? GETPOST('product_label') : '');
|
||||||
|
|
||||||
|
// Check price is not lower than minimum (check is done only for standard or replacement invoices)
|
||||||
|
if (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT) && $price_min && (price2num($pu_ht) * (1 - price2num(GETPOST('remise_percent')) / 100) < price2num($price_min))) {
|
||||||
|
setEventMessages($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)), null, 'errors');
|
||||||
|
$error ++;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$type = GETPOST('type');
|
||||||
|
$label = (GETPOST('product_label') ? GETPOST('product_label') : '');
|
||||||
|
|
||||||
|
// Check parameters
|
||||||
|
if (GETPOST('type') < 0) {
|
||||||
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), null, 'errors');
|
||||||
|
$error ++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($qty < 0) {
|
||||||
|
$langs->load("errors");
|
||||||
|
setEventMessages($langs->trans('ErrorQtyForCustomerInvoiceCantBeNegative'), null, 'errors');
|
||||||
|
$error ++;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update line
|
||||||
|
if (! $error) {
|
||||||
|
$result = $object->updateline(GETPOST('lineid'), $description, $pu_ht, $qty,
|
||||||
|
$vat_rate, GETPOST('productid'), GETPOST('remise_percent'), 'HT', $info_bits, 0, 0, $type,
|
||||||
|
0, $special_code, $label, GETPOST('units'));
|
||||||
|
|
||||||
|
if ($result >= 0) {
|
||||||
|
/*if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
|
||||||
|
// Define output language
|
||||||
|
$outputlangs = $langs;
|
||||||
|
$newlang = '';
|
||||||
|
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id'))
|
||||||
|
$newlang = GETPOST('lang_id');
|
||||||
|
if ($conf->global->MAIN_MULTILANGS && empty($newlang))
|
||||||
|
$newlang = $object->thirdparty->default_lang;
|
||||||
|
if (! empty($newlang)) {
|
||||||
|
$outputlangs = new Translate("", $conf);
|
||||||
|
$outputlangs->setDefaultLang($newlang);
|
||||||
|
}
|
||||||
|
|
||||||
|
$ret = $object->fetch($id); // Reload to get new records
|
||||||
|
$object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
$object->fetch($object->id); // Reload lines
|
||||||
|
|
||||||
|
unset($_POST['qty']);
|
||||||
|
unset($_POST['type']);
|
||||||
|
unset($_POST['productid']);
|
||||||
|
unset($_POST['remise_percent']);
|
||||||
|
unset($_POST['price_ht']);
|
||||||
|
unset($_POST['multicurrency_price_ht']);
|
||||||
|
unset($_POST['price_ttc']);
|
||||||
|
unset($_POST['tva_tx']);
|
||||||
|
unset($_POST['product_ref']);
|
||||||
|
unset($_POST['product_label']);
|
||||||
|
unset($_POST['product_desc']);
|
||||||
|
unset($_POST['fournprice']);
|
||||||
|
unset($_POST['buying_price']);
|
||||||
|
unset($_POST['np_marginRate']);
|
||||||
|
unset($_POST['np_markRate']);
|
||||||
|
|
||||||
|
unset($_POST['dp_desc']);
|
||||||
|
unset($_POST['idprod']);
|
||||||
|
unset($_POST['units']);
|
||||||
|
|
||||||
|
unset($_POST['date_starthour']);
|
||||||
|
unset($_POST['date_startmin']);
|
||||||
|
unset($_POST['date_startsec']);
|
||||||
|
unset($_POST['date_startday']);
|
||||||
|
unset($_POST['date_startmonth']);
|
||||||
|
unset($_POST['date_startyear']);
|
||||||
|
unset($_POST['date_endhour']);
|
||||||
|
unset($_POST['date_endmin']);
|
||||||
|
unset($_POST['date_endsec']);
|
||||||
|
unset($_POST['date_endday']);
|
||||||
|
unset($_POST['date_endmonth']);
|
||||||
|
unset($_POST['date_endyear']);
|
||||||
|
|
||||||
|
unset($_POST['situations']);
|
||||||
|
unset($_POST['progress']);
|
||||||
|
} else {
|
||||||
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Do we click on purge search criteria ?
|
// Do we click on purge search criteria ?
|
||||||
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
|
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All test are required to be compatible with all browsers
|
||||||
{
|
{
|
||||||
$search_ref='';
|
$search_ref='';
|
||||||
$search_societe='';
|
$search_societe='';
|
||||||
@ -1302,7 +1462,7 @@ else
|
|||||||
// Show object lines
|
// Show object lines
|
||||||
if (! empty($object->lines))
|
if (! empty($object->lines))
|
||||||
{
|
{
|
||||||
$disableedit=1;
|
//$disableedit=1;
|
||||||
//$disablemove=1;
|
//$disablemove=1;
|
||||||
$ret = $object->printObjectLines($action, $mysoc, $soc, $lineid, 0); // No date selector for template invoice
|
$ret = $object->printObjectLines($action, $mysoc, $soc, $lineid, 0); // No date selector for template invoice
|
||||||
}
|
}
|
||||||
|
|||||||
@ -29,7 +29,7 @@
|
|||||||
/**
|
/**
|
||||||
* \file htdocs/compta/facture/list.php
|
* \file htdocs/compta/facture/list.php
|
||||||
* \ingroup facture
|
* \ingroup facture
|
||||||
* \brief Page to create/see an invoice
|
* \brief List of customer invoices
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
@ -37,6 +37,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/modules/facture/modules_facture.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/modules/facture/modules_facture.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
||||||
@ -50,7 +51,6 @@ if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/projet/c
|
|||||||
$langs->load('bills');
|
$langs->load('bills');
|
||||||
$langs->load('companies');
|
$langs->load('companies');
|
||||||
$langs->load('products');
|
$langs->load('products');
|
||||||
$langs->load('main');
|
|
||||||
|
|
||||||
$sall=trim(GETPOST('sall'));
|
$sall=trim(GETPOST('sall'));
|
||||||
$projectid=(GETPOST('projectid')?GETPOST('projectid','int'):0);
|
$projectid=(GETPOST('projectid')?GETPOST('projectid','int'):0);
|
||||||
@ -78,8 +78,19 @@ $search_zip=GETPOST('search_zip','alpha');
|
|||||||
$search_state=trim(GETPOST("search_state"));
|
$search_state=trim(GETPOST("search_state"));
|
||||||
$search_country=GETPOST("search_country",'int');
|
$search_country=GETPOST("search_country",'int');
|
||||||
$search_type_thirdparty=GETPOST("search_type_thirdparty",'int');
|
$search_type_thirdparty=GETPOST("search_type_thirdparty",'int');
|
||||||
|
$search_user = GETPOST('search_user','int');
|
||||||
|
$search_sale = GETPOST('search_sale','int');
|
||||||
|
$day = GETPOST('day','int');
|
||||||
|
$month = GETPOST('month','int');
|
||||||
|
$year = GETPOST('year','int');
|
||||||
|
$day_lim = GETPOST('day_lim','int');
|
||||||
|
$month_lim = GETPOST('month_lim','int');
|
||||||
|
$year_lim = GETPOST('year_lim','int');
|
||||||
|
$toselect = GETPOST('toselect', 'array');
|
||||||
|
|
||||||
$option = GETPOST('option');
|
$option = GETPOST('option');
|
||||||
if ($option == 'late') $filter = 'paye:0';
|
if ($option == 'late') $filter = 'paye:0';
|
||||||
|
$filtre = GETPOST('filtre');
|
||||||
|
|
||||||
$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
|
$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
@ -96,17 +107,6 @@ $pagenext = $page + 1;
|
|||||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||||
$contextpage='invoicelist';
|
$contextpage='invoicelist';
|
||||||
|
|
||||||
$search_user = GETPOST('search_user','int');
|
|
||||||
$search_sale = GETPOST('search_sale','int');
|
|
||||||
$day = GETPOST('day','int');
|
|
||||||
$month = GETPOST('month','int');
|
|
||||||
$year = GETPOST('year','int');
|
|
||||||
$day_lim = GETPOST('day_lim','int');
|
|
||||||
$month_lim = GETPOST('month_lim','int');
|
|
||||||
$year_lim = GETPOST('year_lim','int');
|
|
||||||
$filtre = GETPOST('filtre');
|
|
||||||
$toselect = GETPOST('toselect', 'array');
|
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$fieldid = (! empty($ref)?'facnumber':'rowid');
|
$fieldid = (! empty($ref)?'facnumber':'rowid');
|
||||||
if (! empty($user->societe_id)) $socid=$user->societe_id;
|
if (! empty($user->societe_id)) $socid=$user->societe_id;
|
||||||
@ -140,14 +140,14 @@ $checkedtypetiers=0;
|
|||||||
$arrayfields=array(
|
$arrayfields=array(
|
||||||
'f.facnumber'=>array('label'=>$langs->trans("Ref"), 'checked'=>1),
|
'f.facnumber'=>array('label'=>$langs->trans("Ref"), 'checked'=>1),
|
||||||
'f.ref_client'=>array('label'=>$langs->trans("RefCustomer"), 'checked'=>1),
|
'f.ref_client'=>array('label'=>$langs->trans("RefCustomer"), 'checked'=>1),
|
||||||
|
'f.date'=>array('label'=>$langs->trans("DateInvoice"), 'checked'=>1),
|
||||||
|
'f.date_lim_reglement'=>array('label'=>$langs->trans("DateDue"), 'checked'=>1),
|
||||||
's.nom'=>array('label'=>$langs->trans("ThirdParty"), 'checked'=>1),
|
's.nom'=>array('label'=>$langs->trans("ThirdParty"), 'checked'=>1),
|
||||||
's.town'=>array('label'=>$langs->trans("Town"), 'checked'=>1),
|
's.town'=>array('label'=>$langs->trans("Town"), 'checked'=>1),
|
||||||
's.zip'=>array('label'=>$langs->trans("Zip"), 'checked'=>1),
|
's.zip'=>array('label'=>$langs->trans("Zip"), 'checked'=>1),
|
||||||
'state.nom'=>array('label'=>$langs->trans("StateShort"), 'checked'=>0),
|
'state.nom'=>array('label'=>$langs->trans("StateShort"), 'checked'=>0),
|
||||||
'country.code_iso'=>array('label'=>$langs->trans("Country"), 'checked'=>0),
|
'country.code_iso'=>array('label'=>$langs->trans("Country"), 'checked'=>0),
|
||||||
'typent.code'=>array('label'=>$langs->trans("ThirdPartyType"), 'checked'=>$checkedtypetiers),
|
'typent.code'=>array('label'=>$langs->trans("ThirdPartyType"), 'checked'=>$checkedtypetiers),
|
||||||
'f.date'=>array('label'=>$langs->trans("DateInvoice"), 'checked'=>1),
|
|
||||||
'f.date_lim_reglement'=>array('label'=>$langs->trans("DateDue"), 'checked'=>1),
|
|
||||||
'f.fk_mode_reglement'=>array('label'=>$langs->trans("PaymentMode"), 'checked'=>1),
|
'f.fk_mode_reglement'=>array('label'=>$langs->trans("PaymentMode"), 'checked'=>1),
|
||||||
'f.total_ht'=>array('label'=>$langs->trans("AmountHT"), 'checked'=>1),
|
'f.total_ht'=>array('label'=>$langs->trans("AmountHT"), 'checked'=>1),
|
||||||
'f.total_vat'=>array('label'=>$langs->trans("AmountVAT"), 'checked'=>0),
|
'f.total_vat'=>array('label'=>$langs->trans("AmountVAT"), 'checked'=>0),
|
||||||
@ -189,6 +189,7 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter") || GETPOS
|
|||||||
$search_product_category='';
|
$search_product_category='';
|
||||||
$search_ref='';
|
$search_ref='';
|
||||||
$search_refcustomer='';
|
$search_refcustomer='';
|
||||||
|
$search_project='';
|
||||||
$search_societe='';
|
$search_societe='';
|
||||||
$search_montant_ht='';
|
$search_montant_ht='';
|
||||||
$search_montant_vat='';
|
$search_montant_vat='';
|
||||||
@ -624,8 +625,6 @@ if (empty($reshook))
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
llxHeader('',$langs->trans('Bill'),'EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes');
|
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
$formother = new FormOther($db);
|
$formother = new FormOther($db);
|
||||||
$formfile = new FormFile($db);
|
$formfile = new FormFile($db);
|
||||||
@ -633,6 +632,8 @@ $bankaccountstatic=new Account($db);
|
|||||||
$facturestatic=new Facture($db);
|
$facturestatic=new Facture($db);
|
||||||
$formcompany=new FormCompany($db);
|
$formcompany=new FormCompany($db);
|
||||||
|
|
||||||
|
llxHeader('',$langs->trans('CustomersInvoices'),'EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes');
|
||||||
|
|
||||||
$sql = 'SELECT';
|
$sql = 'SELECT';
|
||||||
if ($sall || $search_product_category > 0) $sql = 'SELECT DISTINCT';
|
if ($sall || $search_product_category > 0) $sql = 'SELECT DISTINCT';
|
||||||
$sql.= ' f.rowid as facid, f.facnumber, f.ref_client, f.type, f.note_private, f.note_public, f.increment, f.fk_mode_reglement, f.total as total_ht, f.tva as total_vat, f.total_ttc,';
|
$sql.= ' f.rowid as facid, f.facnumber, f.ref_client, f.type, f.note_private, f.note_public, f.increment, f.fk_mode_reglement, f.total as total_ht, f.tva as total_vat, f.total_ttc,';
|
||||||
@ -687,6 +688,7 @@ if ($filtre)
|
|||||||
}
|
}
|
||||||
if ($search_ref) $sql .= natural_search('f.facnumber', $search_ref);
|
if ($search_ref) $sql .= natural_search('f.facnumber', $search_ref);
|
||||||
if ($search_refcustomer) $sql .= natural_search('f.ref_client', $search_refcustomer);
|
if ($search_refcustomer) $sql .= natural_search('f.ref_client', $search_refcustomer);
|
||||||
|
if ($search_project) $sql .= natural_search('p.ref', $search_project);
|
||||||
if ($search_societe) $sql .= natural_search('s.nom', $search_societe);
|
if ($search_societe) $sql .= natural_search('s.nom', $search_societe);
|
||||||
if ($search_town) $sql.= natural_search('s.town', $search_town);
|
if ($search_town) $sql.= natural_search('s.town', $search_town);
|
||||||
if ($search_zip) $sql.= natural_search("s.zip",$search_zip);
|
if ($search_zip) $sql.= natural_search("s.zip",$search_zip);
|
||||||
@ -697,7 +699,13 @@ if ($search_company) $sql .= natural_search('s.nom', $search_company);
|
|||||||
if ($search_montant_ht != '') $sql.= natural_search('f.total', $search_montant_ht, 1);
|
if ($search_montant_ht != '') $sql.= natural_search('f.total', $search_montant_ht, 1);
|
||||||
if ($search_montant_vat != '') $sql.= natural_search('f.total_vat', $search_montant_vat, 1);
|
if ($search_montant_vat != '') $sql.= natural_search('f.total_vat', $search_montant_vat, 1);
|
||||||
if ($search_montant_ttc != '') $sql.= natural_search('f.total_ttc', $search_montant_ttc, 1);
|
if ($search_montant_ttc != '') $sql.= natural_search('f.total_ttc', $search_montant_ttc, 1);
|
||||||
if ($search_status != '' && $search_status >= 0) $sql.= " AND f.fk_statut = ".$db->escape($search_status);
|
if ($search_status != '' && $search_status >= 0)
|
||||||
|
{
|
||||||
|
if ($search_status == '0') $sql.=" AND f.fk_statut = 0"; // draft
|
||||||
|
if ($search_status == '1') $sql.=" AND f.fk_statut = 1"; // unpayed
|
||||||
|
if ($search_status == '2') $sql.=" AND f.fk_statut = 2"; // payed Not that some correupted data may contains f.fk_statut = 1 AND f.paye = 1 (it means payed too but should not happend. If yes, reopen and reclassify billed)
|
||||||
|
if ($search_status == '3') $sql.=" AND f.fk_statut = 3"; // abandonned
|
||||||
|
}
|
||||||
if ($search_paymentmode > 0) $sql .= " AND f.fk_mode_reglement = ".$search_paymentmode."";
|
if ($search_paymentmode > 0) $sql .= " AND f.fk_mode_reglement = ".$search_paymentmode."";
|
||||||
if ($month > 0)
|
if ($month > 0)
|
||||||
{
|
{
|
||||||
@ -795,23 +803,23 @@ if ($resql)
|
|||||||
$param='&socid='.$socid;
|
$param='&socid='.$socid;
|
||||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||||
if ($day) $param.='&day='.$day;
|
if ($day) $param.='&day='.urlencode($day);
|
||||||
if ($month) $param.='&month='.$month;
|
if ($month) $param.='&month='.urlencode($month);
|
||||||
if ($year) $param.='&year=' .$year;
|
if ($year) $param.='&year=' .urlencode($year);
|
||||||
if ($day_lim) $param.='&day_lim='.$day_lim;
|
if ($day_lim) $param.='&day_lim='.urlencode($day_lim);
|
||||||
if ($month_lim) $param.='&month_lim='.$month_lim;
|
if ($month_lim) $param.='&month_lim='.urlencode($month_lim);
|
||||||
if ($year_lim) $param.='&year_lim=' .$year_lim;
|
if ($year_lim) $param.='&year_lim=' .urlencode($year_lim);
|
||||||
if ($search_ref) $param.='&search_ref=' .$search_ref;
|
if ($search_ref) $param.='&search_ref=' .urlencode($search_ref);
|
||||||
if ($search_refcustomer) $param.='&search_refcustomer=' .$search_refcustomer;
|
if ($search_refcustomer) $param.='&search_refcustomer=' .urlencode($search_refcustomer);
|
||||||
if ($search_societe) $param.='&search_societe=' .$search_societe;
|
if ($search_societe) $param.='&search_societe=' .urlencode($search_societe);
|
||||||
if ($search_sale > 0) $param.='&search_sale=' .$search_sale;
|
if ($search_sale > 0) $param.='&search_sale=' .urlencode($search_sale);
|
||||||
if ($search_user > 0) $param.='&search_user=' .$search_user;
|
if ($search_user > 0) $param.='&search_user=' .urlencode($search_user);
|
||||||
if ($search_product_category > 0) $param.='$search_product_category=' .$search_product_category;
|
if ($search_product_category > 0) $param.='$search_product_category=' .urlencode($search_product_category);
|
||||||
if ($search_montant_ht != '') $param.='&search_montant_ht='.$search_montant_ht;
|
if ($search_montant_ht != '') $param.='&search_montant_ht='.urlencode($search_montant_ht);
|
||||||
if ($search_montant_vat != '') $param.='&search_montant_vat='.$search_montant_vat;
|
if ($search_montant_vat != '') $param.='&search_montant_vat='.urlencode($search_montant_vat);
|
||||||
if ($search_montant_ttc != '') $param.='&search_montant_ttc='.$search_montant_ttc;
|
if ($search_montant_ttc != '') $param.='&search_montant_ttc='.urlencode($search_montant_ttc);
|
||||||
if ($search_status != '') $param.='&search_status='.$search_status;
|
if ($search_status != '') $param.='&search_status='.urlencode($search_status);
|
||||||
if ($search_paymentmode > 0) $param.='search_paymentmode='.$search_paymentmode;
|
if ($search_paymentmode > 0) $param.='search_paymentmode='.urlencode($search_paymentmode);
|
||||||
if ($show_files) $param.='&show_files=' .$show_files;
|
if ($show_files) $param.='&show_files=' .$show_files;
|
||||||
if ($option) $param.="&option=".$option;
|
if ($option) $param.="&option=".$option;
|
||||||
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
||||||
@ -1061,12 +1069,12 @@ if ($resql)
|
|||||||
// Thirpdarty
|
// Thirpdarty
|
||||||
if (! empty($arrayfields['s.nom']['checked']))
|
if (! empty($arrayfields['s.nom']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre" align="left"><input class="flat" type="text" size="8" name="search_societe" value="'.$search_societe.'"></td>';
|
print '<td class="liste_titre" align="left"><input class="flat" type="text" size="6" name="search_societe" value="'.$search_societe.'"></td>';
|
||||||
}
|
}
|
||||||
// Town
|
// Town
|
||||||
if (! empty($arrayfields['s.town']['checked'])) print '<td class="liste_titre"><input class="flat" type="text" size="6" name="search_town" value="'.$search_town.'"></td>';
|
if (! empty($arrayfields['s.town']['checked'])) print '<td class="liste_titre"><input class="flat" type="text" size="6" name="search_town" value="'.$search_town.'"></td>';
|
||||||
// Zip
|
// Zip
|
||||||
if (! empty($arrayfields['s.zip']['checked'])) print '<td class="liste_titre"><input class="flat" type="text" size="6" name="search_zip" value="'.$search_zip.'"></td>';
|
if (! empty($arrayfields['s.zip']['checked'])) print '<td class="liste_titre"><input class="flat" type="text" size="4" name="search_zip" value="'.$search_zip.'"></td>';
|
||||||
// State
|
// State
|
||||||
if (! empty($arrayfields['state.nom']['checked']))
|
if (! empty($arrayfields['state.nom']['checked']))
|
||||||
{
|
{
|
||||||
@ -1191,17 +1199,17 @@ if ($resql)
|
|||||||
$var=!$var;
|
$var=!$var;
|
||||||
|
|
||||||
$datelimit=$db->jdate($obj->datelimite);
|
$datelimit=$db->jdate($obj->datelimite);
|
||||||
|
$facturestatic->id=$obj->facid;
|
||||||
|
$facturestatic->ref=$obj->facnumber;
|
||||||
|
$facturestatic->type=$obj->type;
|
||||||
|
$facturestatic->statut=$obj->fk_statut;
|
||||||
|
$facturestatic->date_lim_reglement=$db->jdate($obj->datelimite);
|
||||||
|
|
||||||
print '<tr '.$bc[$var].'>';
|
print '<tr '.$bc[$var].'>';
|
||||||
if (! empty($arrayfields['f.facnumber']['checked']))
|
if (! empty($arrayfields['f.facnumber']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="nowrap">';
|
print '<td class="nowrap">';
|
||||||
|
|
||||||
$facturestatic->id=$obj->facid;
|
|
||||||
$facturestatic->ref=$obj->facnumber;
|
|
||||||
$facturestatic->type=$obj->type;
|
|
||||||
$facturestatic->statut=$obj->fk_statut;
|
|
||||||
$facturestatic->date_lim_reglement=$db->jdate($obj->datelimite);
|
|
||||||
$notetoshow=dol_string_nohtmltag(($user->societe_id>0?$obj->note_public:$obj->note_private),1);
|
$notetoshow=dol_string_nohtmltag(($user->societe_id>0?$obj->note_public:$obj->note_private),1);
|
||||||
$paiement = $facturestatic->getSommePaiement();
|
$paiement = $facturestatic->getSommePaiement();
|
||||||
$remaintopay = $obj->total_ttc - $paiement;
|
$remaintopay = $obj->total_ttc - $paiement;
|
||||||
@ -1477,7 +1485,7 @@ if ($resql)
|
|||||||
$paramwithoutshowfiles=preg_replace('/show_files=1&?/','',$param);
|
$paramwithoutshowfiles=preg_replace('/show_files=1&?/','',$param);
|
||||||
$title=$langs->trans("MassFilesArea").' <a href="'.$_SERVER["PHP_SELF"].'?'.$paramwithoutshowfiles.'">('.$langs->trans("Hide").')</a>';
|
$title=$langs->trans("MassFilesArea").' <a href="'.$_SERVER["PHP_SELF"].'?'.$paramwithoutshowfiles.'">('.$langs->trans("Hide").')</a>';
|
||||||
|
|
||||||
print $formfile->showdocuments('massfilesarea','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
print $formfile->showdocuments('massfilesarea_facture','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
@ -483,20 +483,27 @@ if ($object->id > 0)
|
|||||||
// Add a withdraw request
|
// Add a withdraw request
|
||||||
if ($object->statut > Facture::STATUS_DRAFT && $object->paye == 0 && $num == 0)
|
if ($object->statut > Facture::STATUS_DRAFT && $object->paye == 0 && $num == 0)
|
||||||
{
|
{
|
||||||
if ($user->rights->prelevement->bons->creer)
|
if ($resteapayer > 0)
|
||||||
{
|
{
|
||||||
print '<form method="POST" action="">';
|
if ($user->rights->prelevement->bons->creer)
|
||||||
print '<input type="hidden" name="id" value="' . $object->id . '" />';
|
{
|
||||||
print '<input type="hidden" name="action" value="new" />';
|
print '<form method="POST" action="">';
|
||||||
print '<label for="withdraw_request_amount">' . $langs->trans('WithdrawRequestAmount') . ' </label>';
|
print '<input type="hidden" name="id" value="' . $object->id . '" />';
|
||||||
print '<input type="text" id="withdraw_request_amount" name="withdraw_request_amount" value="' . $resteapayer . '" size="10" />';
|
print '<input type="hidden" name="action" value="new" />';
|
||||||
print '<input type="submit" class="butAction" value="'.$langs->trans("MakeWithdrawRequest").'" />';
|
print '<label for="withdraw_request_amount">' . $langs->trans('WithdrawRequestAmount') . ' </label>';
|
||||||
print '</form>';
|
print '<input type="text" id="withdraw_request_amount" name="withdraw_request_amount" value="' . $resteapayer . '" size="10" />';
|
||||||
}
|
print '<input type="submit" class="butAction" value="'.$langs->trans("MakeWithdrawRequest").'" />';
|
||||||
else
|
print '</form>';
|
||||||
{
|
}
|
||||||
print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("MakeWithdrawRequest").'</a>';
|
else
|
||||||
}
|
{
|
||||||
|
print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("MakeWithdrawRequest").'</a>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("AmountMustBePositive")).'">'.$langs->trans("MakeWithdrawRequest").'</a>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -824,7 +824,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
$total_ttc += $obj->total_ttc;
|
$total_ttc += $obj->total_ttc;
|
||||||
$total += $obj->total;
|
$total += $obj->total_ht;
|
||||||
$totalam += $obj->am;
|
$totalam += $obj->am;
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
$i++;
|
$i++;
|
||||||
|
|||||||
@ -440,7 +440,7 @@ if ($action == 'new')
|
|||||||
|
|
||||||
if ($i == 0)
|
if ($i == 0)
|
||||||
{
|
{
|
||||||
print '<b>'.$langs->trans("NoWaitingChecks").'</b><br>';
|
print '<div class="opacitymedium">'.$langs->trans("NoWaitingChecks").'</div><br>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -50,7 +50,7 @@ $paymentstatic=new Paiement($db);
|
|||||||
$accountstatic=new Account($db);
|
$accountstatic=new Account($db);
|
||||||
$companystatic=new Societe($db);
|
$companystatic=new Societe($db);
|
||||||
|
|
||||||
$search_ref=GETPOST("search_ref","int");
|
$search_ref=GETPOST("search_ref","alpha");
|
||||||
$search_account=GETPOST("search_account","int");
|
$search_account=GETPOST("search_account","int");
|
||||||
$search_paymenttype=GETPOST("search_paymenttype");
|
$search_paymenttype=GETPOST("search_paymenttype");
|
||||||
$search_amount=GETPOST("search_amount",'alpha'); // alpha because we must be able to search on "< x"
|
$search_amount=GETPOST("search_amount",'alpha'); // alpha because we must be able to search on "< x"
|
||||||
|
|||||||
@ -87,8 +87,6 @@ class BonPrelevement extends CommonObject
|
|||||||
|
|
||||||
$this->factures = array();
|
$this->factures = array();
|
||||||
|
|
||||||
$this->numero_national_emetteur = "";
|
|
||||||
|
|
||||||
$this->methodes_trans = array();
|
$this->methodes_trans = array();
|
||||||
|
|
||||||
$this->methodes_trans[0] = "Internet";
|
$this->methodes_trans[0] = "Internet";
|
||||||
@ -919,7 +917,10 @@ class BonPrelevement extends CommonObject
|
|||||||
$row = $this->db->fetch_row($resql);
|
$row = $this->db->fetch_row($resql);
|
||||||
$ref = "T".$ref.str_pad(dol_substr("00".intval($row[0])+1,0,2),2,"0",STR_PAD_LEFT);
|
$ref = "T".$ref.str_pad(dol_substr("00".intval($row[0])+1,0,2),2,"0",STR_PAD_LEFT);
|
||||||
|
|
||||||
$this->filename = $conf->prelevement->dir_output.'/receipts/'.$ref.'.xml';
|
$dir=$conf->prelevement->dir_output.'/receipts';
|
||||||
|
if (! is_dir($dir)) dol_mkdir($dir);
|
||||||
|
|
||||||
|
$this->filename = $dir.'/receipts/'.$ref.'.xml';
|
||||||
|
|
||||||
// Create withdraw receipt in database
|
// Create withdraw receipt in database
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."prelevement_bons (";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."prelevement_bons (";
|
||||||
@ -935,10 +936,6 @@ class BonPrelevement extends CommonObject
|
|||||||
{
|
{
|
||||||
$prev_id = $this->db->last_insert_id(MAIN_DB_PREFIX."prelevement_bons");
|
$prev_id = $this->db->last_insert_id(MAIN_DB_PREFIX."prelevement_bons");
|
||||||
$this->id = $prev_id;
|
$this->id = $prev_id;
|
||||||
|
|
||||||
$dir=$conf->prelevement->dir_output.'/receipts';
|
|
||||||
$file=$filebonprev;
|
|
||||||
if (! is_dir($dir)) dol_mkdir($dir);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1018,7 +1015,6 @@ class BonPrelevement extends CommonObject
|
|||||||
$this->date_echeance = $datetimeprev;
|
$this->date_echeance = $datetimeprev;
|
||||||
$this->reference_remise = $ref;
|
$this->reference_remise = $ref;
|
||||||
|
|
||||||
$this->numero_national_emetteur = $conf->global->PRELEVEMENT_NUMERO_NATIONAL_EMETTEUR;
|
|
||||||
$this->raison_sociale = $conf->global->PRELEVEMENT_RAISON_SOCIALE;
|
$this->raison_sociale = $conf->global->PRELEVEMENT_RAISON_SOCIALE;
|
||||||
|
|
||||||
$this->emetteur_code_banque = $conf->global->PRELEVEMENT_CODE_BANQUE;
|
$this->emetteur_code_banque = $conf->global->PRELEVEMENT_CODE_BANQUE;
|
||||||
@ -1027,14 +1023,14 @@ class BonPrelevement extends CommonObject
|
|||||||
$this->emetteur_number_key = $conf->global->PRELEVEMENT_NUMBER_KEY;
|
$this->emetteur_number_key = $conf->global->PRELEVEMENT_NUMBER_KEY;
|
||||||
$this->emetteur_iban = $conf->global->PRELEVEMENT_IBAN;
|
$this->emetteur_iban = $conf->global->PRELEVEMENT_IBAN;
|
||||||
$this->emetteur_bic = $conf->global->PRELEVEMENT_BIC;
|
$this->emetteur_bic = $conf->global->PRELEVEMENT_BIC;
|
||||||
$this->emetteur_ics = $conf->global->PRELEVEMENT_ICS; // TODO Add this into setup of admin/prelevement.php. Ex: PRELEVEMENT_ICS = "FR78ZZZ123456";
|
$this->emetteur_ics = $conf->global->PRELEVEMENT_ICS; // Ex: PRELEVEMENT_ICS = "FR78ZZZ123456";
|
||||||
|
|
||||||
$this->factures = $factures_prev_id;
|
$this->factures = $factures_prev_id;
|
||||||
|
|
||||||
// Generation of SEPA file
|
// Generation of SEPA file
|
||||||
$this->generate();
|
$this->generate();
|
||||||
}
|
}
|
||||||
dol_syslog(__METHOD__."::End withdraw receipt, file ".$filebonprev, LOG_DEBUG);
|
dol_syslog(__METHOD__."::End withdraw receipt, file ".$this->filename, LOG_DEBUG);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1462,7 +1458,7 @@ class BonPrelevement extends CommonObject
|
|||||||
|
|
||||||
fputs($this->file, " "); // Zone Reservee B2
|
fputs($this->file, " "); // Zone Reservee B2
|
||||||
|
|
||||||
fputs($this->file, $this->numero_national_emetteur); // Numero National d'emmetteur B3
|
fputs($this->file, $this->emetteur_ics); // ICS
|
||||||
|
|
||||||
// Date d'echeance C1
|
// Date d'echeance C1
|
||||||
|
|
||||||
@ -1611,7 +1607,7 @@ class BonPrelevement extends CommonObject
|
|||||||
|
|
||||||
fputs($this->file, " "); // Zone Reservee B2
|
fputs($this->file, " "); // Zone Reservee B2
|
||||||
|
|
||||||
fputs($this->file, $this->numero_national_emetteur); // Numero National d'emmetteur B3
|
fputs($this->file, $this->emetteur_ics); // ICS
|
||||||
|
|
||||||
// Date d'echeance C1
|
// Date d'echeance C1
|
||||||
|
|
||||||
@ -1778,7 +1774,7 @@ class BonPrelevement extends CommonObject
|
|||||||
|
|
||||||
fputs($this->file, " "); // Zone Reservee B2
|
fputs($this->file, " "); // Zone Reservee B2
|
||||||
|
|
||||||
fputs($this->file, $this->numero_national_emetteur); // Numero National d'emmetteur B3
|
fputs($this->file, $this->emetteur_ics); // ICS
|
||||||
|
|
||||||
// Reserve C1
|
// Reserve C1
|
||||||
|
|
||||||
|
|||||||
@ -159,7 +159,7 @@ if ($resql)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<tr '.$bc[false].'><td colspan="2">'.$langs->trans("NoInvoiceToWithdraw").'</td></tr>';
|
print '<tr '.$bc[false].'><td colspan="2" class="opacitymedium">'.$langs->trans("NoInvoiceToWithdraw").'</td></tr>';
|
||||||
}
|
}
|
||||||
print "</table><br>";
|
print "</table><br>";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -220,6 +220,25 @@ $dolibarr_main_authentication='dolibarr';
|
|||||||
//
|
//
|
||||||
$dolibarr_main_force_https='0';
|
$dolibarr_main_force_https='0';
|
||||||
|
|
||||||
|
// dolibarr_main_prod
|
||||||
|
// When this parameter is defined, all errors messages are not reported.
|
||||||
|
// This feature exists for production usage to avoid to give any information to hackers.
|
||||||
|
// Default value: 0
|
||||||
|
// Possible values: 0 or 1
|
||||||
|
// Examples:
|
||||||
|
// $dolibarr_main_prod='0';
|
||||||
|
//
|
||||||
|
$dolibarr_main_prod='0';
|
||||||
|
|
||||||
|
// $dolibarr_main_restrict_os_commands
|
||||||
|
// To restrict commands you can execute by the backup feature, enter allowed command here.
|
||||||
|
// Note: If you can, defining permission on OS linux (using SELinux for example) may be a better choice.
|
||||||
|
// Default value: 'mysqldump, mysql, pg_dump, pgrestore'
|
||||||
|
// Examples:
|
||||||
|
// $dolibarr_main_restrict_os_commands='mysqldump, /usr/local/bin/otherdumptool';
|
||||||
|
//
|
||||||
|
$dolibarr_main_restrict_os_commands='mysqldump, mysql, pg_dump, pgrestore';
|
||||||
|
|
||||||
// dolibarr_nocsrfcheck
|
// dolibarr_nocsrfcheck
|
||||||
// This parameter can be used to disable CSRF protection.
|
// This parameter can be used to disable CSRF protection.
|
||||||
// This might be required if you access Dolibarr behind a proxy that make
|
// This might be required if you access Dolibarr behind a proxy that make
|
||||||
@ -231,15 +250,11 @@ $dolibarr_main_force_https='0';
|
|||||||
//
|
//
|
||||||
$dolibarr_nocsrfcheck='0';
|
$dolibarr_nocsrfcheck='0';
|
||||||
|
|
||||||
// dolibarr_main_prod
|
// dolibarr_mailing_limit_sendbyweb
|
||||||
// When this parameter is defined, all errors messages are not reported.
|
// Can set a limit for mailing send by web. Can be used for a restricted mode.
|
||||||
// This feature exists for production usage to avoid to give any information to hackers.
|
// Default value: 0 (use database value if exist)
|
||||||
// Default value: 0
|
|
||||||
// Possible values: 0 or 1
|
|
||||||
// Examples:
|
// Examples:
|
||||||
// $dolibarr_main_prod='0';
|
// $dolibarr_mailing_limit_sendbyweb='0';
|
||||||
//
|
|
||||||
$dolibarr_main_prod='0';
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -251,8 +266,6 @@ $dolibarr_main_prod='0';
|
|||||||
// This parameter contains prefix of Dolibarr database. 'llx_' if not defined.
|
// This parameter contains prefix of Dolibarr database. 'llx_' if not defined.
|
||||||
// Examples:
|
// Examples:
|
||||||
// $dolibarr_main_db_prefix='llx_';
|
// $dolibarr_main_db_prefix='llx_';
|
||||||
//
|
|
||||||
$dolibarr_main_db_prefix='';
|
|
||||||
|
|
||||||
// dolibarr_main_limit_users
|
// dolibarr_main_limit_users
|
||||||
// Can set a limit on the number of users it will be possible to create
|
// Can set a limit on the number of users it will be possible to create
|
||||||
@ -261,12 +274,6 @@ $dolibarr_main_db_prefix='';
|
|||||||
// Examples:
|
// Examples:
|
||||||
// $dolibarr_main_limit_users='0';
|
// $dolibarr_main_limit_users='0';
|
||||||
|
|
||||||
// dolibarr_mailing_limit_sendbyweb
|
|
||||||
// Can set a limit for mailing send by web. Can be used for a restricted mode.
|
|
||||||
// Default value: 0 (use database value if exist)
|
|
||||||
// Examples:
|
|
||||||
// $dolibarr_mailing_limit_sendbyweb='0';
|
|
||||||
|
|
||||||
// dolibarr_strict_mode
|
// dolibarr_strict_mode
|
||||||
// Set this to 1 to enable the PHP strict mode. For dev environment only.
|
// Set this to 1 to enable the PHP strict mode. For dev environment only.
|
||||||
// Default value: 0 (use database value if exist)
|
// Default value: 0 (use database value if exist)
|
||||||
|
|||||||
@ -57,6 +57,8 @@ $search_email=GETPOST("search_email");
|
|||||||
$search_skype=GETPOST("search_skype");
|
$search_skype=GETPOST("search_skype");
|
||||||
$search_priv=GETPOST("search_priv");
|
$search_priv=GETPOST("search_priv");
|
||||||
$search_categ=GETPOST("search_categ",'int');
|
$search_categ=GETPOST("search_categ",'int');
|
||||||
|
$search_categ_thirdparty=GETPOST("search_categ_thirdparty",'int');
|
||||||
|
$search_categ_supplier=GETPOST("search_categ_supplier",'int');
|
||||||
$search_status=GETPOST("search_status",'int');
|
$search_status=GETPOST("search_status",'int');
|
||||||
$search_type=GETPOST('search_type','alpha');
|
$search_type=GETPOST('search_type','alpha');
|
||||||
if ($search_status=='') $search_status=1; // always display activ customer first
|
if ($search_status=='') $search_status=1; // always display activ customer first
|
||||||
@ -191,6 +193,10 @@ if (GETPOST('button_removefilter_x') || GETPOST('button_removefilter.x') || GETP
|
|||||||
$search_skype="";
|
$search_skype="";
|
||||||
$search_priv="";
|
$search_priv="";
|
||||||
$search_status=-1;
|
$search_status=-1;
|
||||||
|
$search_categ='';
|
||||||
|
$search_categ_thirdparty='';
|
||||||
|
$search_categ_supplier='';
|
||||||
|
$search_array_options=array();
|
||||||
}
|
}
|
||||||
if ($search_priv < 0) $search_priv='';
|
if ($search_priv < 0) $search_priv='';
|
||||||
|
|
||||||
@ -220,7 +226,9 @@ $sql.= " FROM ".MAIN_DB_PREFIX."socpeople as p";
|
|||||||
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople_extrafields as ef on (p.rowid = ef.fk_object)";
|
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople_extrafields as ef on (p.rowid = ef.fk_object)";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as co ON co.rowid = p.fk_pays";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as co ON co.rowid = p.fk_pays";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = p.fk_soc";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = p.fk_soc";
|
||||||
if (! empty($search_categ)) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_contact as cs ON p.rowid = cs.fk_socpeople"; // We need this table joined to the select in order to filter by categ
|
if (! empty($search_categ)) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_contact as cc ON p.rowid = cc.fk_socpeople"; // We need this table joined to the select in order to filter by categ
|
||||||
|
if (! empty($search_categ_thirdparty)) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cs ON s.rowid = cs.fk_soc"; // We need this table joined to the select in order to filter by categ
|
||||||
|
if (! empty($search_categ_supplier)) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_fournisseur as cs2 ON s.rowid = cs2.fk_soc"; // We need this table joined to the select in order to filter by categ
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc";
|
if (!$user->rights->societe->client->voir && !$socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc";
|
||||||
$sql.= ' WHERE p.entity IN ('.getEntity('societe', 1).')';
|
$sql.= ' WHERE p.entity IN ('.getEntity('societe', 1).')';
|
||||||
if (!$user->rights->societe->client->voir && !$socid) //restriction
|
if (!$user->rights->societe->client->voir && !$socid) //restriction
|
||||||
@ -243,8 +251,12 @@ else
|
|||||||
if ($search_priv == '1') $sql .= " AND (p.priv='1' AND p.fk_user_creat=".$user->id.")";
|
if ($search_priv == '1') $sql .= " AND (p.priv='1' AND p.fk_user_creat=".$user->id.")";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($search_categ > 0) $sql.= " AND cs.fk_categorie = ".$db->escape($search_categ);
|
if ($search_categ > 0) $sql.= " AND cc.fk_categorie = ".$db->escape($search_categ);
|
||||||
if ($search_categ == -2) $sql.= " AND cs.fk_categorie IS NULL";
|
if ($search_categ == -2) $sql.= " AND cc.fk_categorie IS NULL";
|
||||||
|
if ($search_categ_thirdparty > 0) $sql.= " AND cs.fk_categorie = ".$db->escape($search_categ_thirdparty);
|
||||||
|
if ($search_categ_thirdparty == -2) $sql.= " AND cs.fk_categorie IS NULL";
|
||||||
|
if ($search_categ_supplier > 0) $sql.= " AND cs2.fk_categorie = ".$db->escape($search_categ_supplier);
|
||||||
|
if ($search_categ_supplier == -2) $sql.= " AND cs2.fk_categorie IS NULL";
|
||||||
|
|
||||||
if ($search_firstlast_only) {
|
if ($search_firstlast_only) {
|
||||||
$sql .= natural_search(array('p.lastname','p.firstname'), $search_firstlast_only);
|
$sql .= natural_search(array('p.lastname','p.firstname'), $search_firstlast_only);
|
||||||
@ -333,7 +345,7 @@ $reshook=$hookmanager->executeHooks('printFieldListWhere',$parameters); // No
|
|||||||
$sql.=$hookmanager->resPrint;
|
$sql.=$hookmanager->resPrint;
|
||||||
|
|
||||||
// Add order
|
// Add order
|
||||||
if($view == "recent")
|
if ($view == "recent")
|
||||||
{
|
{
|
||||||
$sql.= $db->order("p.datec","DESC");
|
$sql.= $db->order("p.datec","DESC");
|
||||||
}
|
}
|
||||||
@ -350,15 +362,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
|||||||
$nbtotalofrecords = $db->num_rows($result);
|
$nbtotalofrecords = $db->num_rows($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add limit
|
$sql.= $db->plimit($limit+1, $offset);
|
||||||
if($view == "recent")
|
|
||||||
{
|
|
||||||
$sql.= $db->plimit($limit+1, $offset);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$sql.= $db->plimit($limit+1, $offset);
|
|
||||||
}
|
|
||||||
|
|
||||||
//print $sql;
|
//print $sql;
|
||||||
dol_syslog("contact/list.php", LOG_DEBUG);
|
dol_syslog("contact/list.php", LOG_DEBUG);
|
||||||
@ -374,6 +378,8 @@ if ($result)
|
|||||||
$param.='&begin='.urlencode($begin).'&view='.urlencode($view).'&userid='.urlencode($userid).'&contactname='.urlencode($sall);
|
$param.='&begin='.urlencode($begin).'&view='.urlencode($view).'&userid='.urlencode($userid).'&contactname='.urlencode($sall);
|
||||||
$param.='&type='.urlencode($type).'&view='.urlencode($view);
|
$param.='&type='.urlencode($type).'&view='.urlencode($view);
|
||||||
if (!empty($search_categ)) $param.='&search_categ='.urlencode($search_categ);
|
if (!empty($search_categ)) $param.='&search_categ='.urlencode($search_categ);
|
||||||
|
if (!empty($search_categ_thirdparty)) $param.='&search_categ_thirdparty='.urlencode($search_categ_thirdparty);
|
||||||
|
if (!empty($search_categ_supplier)) $param.='&search_categ_supplier='.urlencode($search_categ_supplier);
|
||||||
if ($search_lastname != '') $param.='&search_lastname='.urlencode($search_lastname);
|
if ($search_lastname != '') $param.='&search_lastname='.urlencode($search_lastname);
|
||||||
if ($search_firstname != '') $param.='&search_firstname='.urlencode($search_firstname);
|
if ($search_firstname != '') $param.='&search_firstname='.urlencode($search_firstname);
|
||||||
if ($search_societe != '') $param.='&search_societe='.urlencode($search_societe);
|
if ($search_societe != '') $param.='&search_societe='.urlencode($search_societe);
|
||||||
@ -423,6 +429,22 @@ if ($result)
|
|||||||
$moreforfilter.=$langs->trans('Categories'). ': ';
|
$moreforfilter.=$langs->trans('Categories'). ': ';
|
||||||
$moreforfilter.=$formother->select_categories(Categorie::TYPE_CONTACT,$search_categ,'search_categ',1);
|
$moreforfilter.=$formother->select_categories(Categorie::TYPE_CONTACT,$search_categ,'search_categ',1);
|
||||||
$moreforfilter.='</div>';
|
$moreforfilter.='</div>';
|
||||||
|
if (empty($type) || $type == 'c' || $type == 'p')
|
||||||
|
{
|
||||||
|
$moreforfilter.='<div class="divsearchfield">';
|
||||||
|
if ($type == 'c') $moreforfilter.=$langs->trans('CustomersCategoriesShort'). ': ';
|
||||||
|
else if ($type == 'p') $moreforfilter.=$langs->trans('ProspectsCategoriesShort'). ': ';
|
||||||
|
else $moreforfilter.=$langs->trans('CustomersProspectsCategoriesShort'). ': ';
|
||||||
|
$moreforfilter.=$formother->select_categories(Categorie::TYPE_CUSTOMER,$search_categ_thirdparty,'search_categ_thirdparty',1);
|
||||||
|
$moreforfilter.='</div>';
|
||||||
|
}
|
||||||
|
if (empty($type) || $type == 'f')
|
||||||
|
{
|
||||||
|
$moreforfilter.='<div class="divsearchfield">';
|
||||||
|
$moreforfilter.=$langs->trans('SuppliersCategoriesShort'). ': ';
|
||||||
|
$moreforfilter.=$formother->select_categories(Categorie::TYPE_SUPPLIER,$search_categ_supplier,'search_categ_supplier',1);
|
||||||
|
$moreforfilter.='</div>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ($moreforfilter)
|
if ($moreforfilter)
|
||||||
{
|
{
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user