diff --git a/COPYRIGHT b/COPYRIGHT
index 137682bc514..2964c915ec1 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -41,7 +41,7 @@ Ace 1.4.8 BSD Yes
ChartJS 2.9.3 MIT License Yes JS library for graph
jQuery 3.4.1 MIT License Yes JS library
jQuery UI 1.12.1 GPL and MIT License Yes JS library plugin UI
-jQuery select2 4.0.13 GPL and Apache License Yes JS library plugin for sexier multiselect
+jQuery select2 4.0.13 GPL and Apache License Yes JS library plugin for sexier multiselect. Warning: 4.0.6+ create troubles without patching css
jQuery blockUI 2.70.0 GPL and MIT License Yes JS library plugin blockUI (to use ajax popups)
jQuery Colorpicker 1.1 MIT License Yes JS library for color picker for a defined list of colors
jQuery JCrop 0.9.8 GPL and MIT License Yes JS library plugin Crop (to crop images)
diff --git a/ChangeLog b/ChangeLog
index 0de59b03184..68cd7695057 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,7 +13,7 @@ For Developers or integrators:
- replace $page = GETPOST('page', 'int') with $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
- remove input field in form ' ';'
- add parameter $pagenavastextinput to value 1 when calling print_barre_liste
-
+* UserGroup class has been refactored with new architecture. Triggers of class UserGroup are now USERGROUP_CREATE, USERGROUP_MODIFY, USERGROUP_DELETE
WARNING:
diff --git a/build/exe/doliwamp/Languages/MyGerman.isl b/build/exe/doliwamp/Languages/MyGerman.isl
index 9c3a1d38bfc..8bfd78dbea2 100644
--- a/build/exe/doliwamp/Languages/MyGerman.isl
+++ b/build/exe/doliwamp/Languages/MyGerman.isl
@@ -2,7 +2,7 @@
[CustomMessages]
NameAndVersion=%1 Version %2
-AdditionalIcons=Zustzliche Symbole:
+AdditionalIcons=Zusätzliche Symbole:
CreateDesktopIcon=&Desktop-Symbol erstellen
CreateQuickLaunchIcon=Symbol in der Schnellstartleiste erstellen
ProgramOnTheWeb=%1 im Internet
@@ -10,3 +10,38 @@ UninstallProgram=%1 entfernen
LaunchProgram=%1 starten
AssocFileExtension=&Registriere %1 mit der %2-Dateierweiterung
AssocingFileExtension=%1 wird mit der %2-Dateierweiterung registriert...
+
+
+YouWillInstallDoliWamp=Sie installieren DoliWamp (also Dolibarr + alle erforderliche Software von Drittanbietern wie Apache, MySQL und PHP) auf Ihrem Computer.
+ThisAssistantInstallOrUpgrade=WARNUNG: Die Verwendung eines auf einem lokalen Computer installierten ERP-CRM kann gefährlich sein: Wenn Ihr Computer ausfällt, können Sie alle Ihre Daten verlieren. Tun Sie dies, wenn Sie bereit sind, das Backup selbst ernsthaft zu verwalten. Wenn nicht, verwenden Sie stattdessen eine Installation in Saas (siehe https://saas.dolibarr.org).
+IfYouHaveTechnicalKnowledge=Wenn Sie über technische Kenntnisse verfügen und Apache, MySQL und PHP selbst verwalten möchten, sollten Sie diesen Assistenten nicht verwenden und eine manuelle Installation von Dolibarr auf Ihrem vorhandenen Server mit Apache, MySQL und PHP durchführen.
+ButIfYouLook=Aber wenn Sie auf Ihrem lokalen Computer nach einer automatischen Einrichtung suchen, sind Sie auf dem besten Weg ...
+DoYouWantToStart=Möchten Sie den Installationsprozess starten?
+
+TechnicalParameters=technische Parameter
+IfFirstInstall=Geben Sie bei der Erstinstallation einige technische Parameter an. Wenn Sie nicht verstehen, sich nicht sicher sind oder ein Upgrade durchführen, belassen Sie einfach die Standardwerte.
+
+; WARNING !!! STRINGS HERE MUST BE LOWER THAN 60 CHARACTERS
+SMTPServer=SMTP Server (your own or ISP SMTP server, first install only) :
+ApachePort=Apache Port (first install only, Standard ist 80) :
+MySqlPort=MySQL Port (first install only, Standard ist 3306) :
+MySqlPassword=MySQL Server und Datenbank Passwort für root (first install only):
+
+FailedToDeleteLock=Fehler beim Löschen der Datei %1/www/dolibarr/install.lock. Sie können die Warnung ignorieren, müssen sie jedoch möglicherweise später manuell entfernen, wenn Sie dazu aufgefordert werden. Klicken Sie auf OK, um fortzufahren ...
+
+PortAlreadyInUse=Port %1 scheint bereits verwendet zu werden. Sie sollten zurückgehen und einen anderen Wert für %2 Port wählen. Auswahl abbrechen und einen anderen Wert wählen ?
+
+FirefoxDetected=Firefox wurde auf Ihrem Computer erkannt. Möchten Sie ihn als Standardbrowser für Dolibarr verwenden?
+ChromeDetected=Chrome wurde auf Ihrem Computer erkannt. Möchten Sie ihn als Standardbrowser für Dolibarr verwenden?
+ChooseDefaultBrowser=Bitte wählen Sie Ihren Standardbrowser (iexplore.exe, firefox.exe, chrome.exe, MicrosoftEdge.exe...). Wenn Sie sich nicht sicher sind, klicken Sie einfach auf Öffnen:
+
+LaunchNow=Starten Sie jetzt Dolibarr
+
+ProgramHasBeenRemoved=Die Dolibarr-Programmdateien wurden entfernt. Alle Ihre Daten befinden sich jedoch noch im Verzeichnis %1. Für eine vollständige Deinstallation, müssen Sie dieses Verzeichnis manuell entfernen.
+DoliWampWillStartApacheMysql=Die DoliWamp-Installation wird nun starten oder Apache und MySQL neu starten. Dies kann nach dieser Bestätigung einige Sekunden bis eine Minute dauern. Wollen Sie mit der Installation oder Aktualisierung des von Dolibarr benötigten Web- und Datenbankservers starten ?
+
+OldVersionFoundAndMoveInNew=Eine alte Datenbankversion wurde gefunden und verschoben, um von der neuen Dolibarr-Version verwendet zu werden.
+OldVersionFoundButFailedToMoveInNew=Eine alte Datenbankversion wurde gefunden, konnte jedoch nicht verschoben werden, um mit der neuen Dolibarr-Version verwendet zu werden.
+
+DLLMissing=Your Windows installation is missing The "Micrsoft Visual C++ Redistributable for Visual Studio 2012" component. Please install the 32-bit version (vcredist_x86.exe) first (you can find it at https://www.microsoft.com/en-us/download/) and restart DoliWamp installation/upgrade after.
+ContinueAnyway=Fahren Sie trotzdem fort (der Installationsvorgang kann ohne diese Voraussetzung fehlschlagen).
diff --git a/dev/dolibarr_changes.txt b/dev/dolibarr_changes.txt
index 81a273d102a..79f927160ee 100644
--- a/dev/dolibarr_changes.txt
+++ b/dev/dolibarr_changes.txt
@@ -104,6 +104,27 @@ with
//return false;
}
+* Replace in tcpdf.php
+
+ if (($imgsrc[0] === '/') AND !empty($_SERVER['DOCUMENT_ROOT']) AND ($_SERVER['DOCUMENT_ROOT'] != '/')) {
+
+with
+
+ // @CHANGE LDR Add support for src="file://..." links
+ if (strpos($imgsrc, 'file://') === 0) {
+ $imgsrc = str_replace('file://', '/', $imgsrc);
+ $imgsrc = urldecode($imgsrc);
+ $testscrtype = @parse_url($imgsrc);
+ if (empty($testscrtype['query'])) {
+ // convert URL to server path
+ $imgsrc = str_replace(K_PATH_URL, K_PATH_MAIN, $imgsrc);
+ } elseif (preg_match('|^https?://|', $imgsrc) !== 1) {
+ // convert URL to server path
+ $imgsrc = str_replace(K_PATH_MAIN, K_PATH_URL, $imgsrc);
+ }
+ }
+ elseif (($imgsrc[0] === '/') AND !empty($_SERVER['DOCUMENT_ROOT']) AND ($_SERVER['DOCUMENT_ROOT'] != '/')) {
+
* In tecnickcom/tcpdf/include/tcpdf_static, in function fopenLocal, replace
@@ -277,3 +298,15 @@ JEDITABLE.JS
* =>
* =>
+
+
+SELECT2
+-------
+
+Edit CSS to restore line removed between 4.0.5 and 4.0.6. It generates this bug: https://github.com/select2/select2/issues/5832
+
+.select2-hidden-accessible {
+ margin: -1px !important; /* line to restore */
+}
+
+
diff --git a/dev/initdemo/mysqldump_dolibarr_11.0.0.sql b/dev/initdemo/mysqldump_dolibarr_11.0.0.sql
index f9f2b5185d8..848e6720ef1 100644
--- a/dev/initdemo/mysqldump_dolibarr_11.0.0.sql
+++ b/dev/initdemo/mysqldump_dolibarr_11.0.0.sql
@@ -7729,7 +7729,7 @@ CREATE TABLE `llx_menu` (
LOCK TABLES `llx_menu` WRITE;
/*!40000 ALTER TABLE `llx_menu` DISABLE KEYS */;
-INSERT INTO `llx_menu` VALUES (103094,'all',2,'agenda','top','agenda',0,NULL,NULL,100,'/comm/action/index.php','','Agenda','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103095,'all',2,'agenda','left','agenda',103094,NULL,NULL,100,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Actions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103096,'all',2,'agenda','left','agenda',103095,NULL,NULL,101,'/comm/action/card.php?mainmenu=agenda&leftmenu=agenda&action=create','','NewAction','commercial',NULL,NULL,'($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create)','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103097,'all',2,'agenda','left','agenda',103095,NULL,NULL,102,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Calendar','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103098,'all',2,'agenda','left','agenda',103097,NULL,NULL,103,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103099,'all',2,'agenda','left','agenda',103097,NULL,NULL,104,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103100,'all',2,'agenda','left','agenda',103097,NULL,NULL,105,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-03-13 15:29:19'),(103101,'all',2,'agenda','left','agenda',103097,NULL,NULL,106,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-03-13 15:29:19'),(103102,'all',2,'agenda','left','agenda',103095,NULL,NULL,112,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda','','List','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103103,'all',2,'agenda','left','agenda',103102,NULL,NULL,113,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103104,'all',2,'agenda','left','agenda',103102,NULL,NULL,114,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103105,'all',2,'agenda','left','agenda',103102,NULL,NULL,115,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-03-13 15:29:19'),(103106,'all',2,'agenda','left','agenda',103102,NULL,NULL,116,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-03-13 15:29:19'),(103107,'all',2,'agenda','left','agenda',103095,NULL,NULL,120,'/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda','','Reportings','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103134,'all',2,'opensurvey','top','opensurvey',0,NULL,NULL,200,'/opensurvey/index.php','','Surveys','opensurvey',NULL,NULL,'$user->rights->opensurvey->survey->read','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(103135,'all',2,'opensurvey','left','opensurvey',-1,NULL,'opensurvey',200,'/opensurvey/index.php?mainmenu=opensurvey&leftmenu=opensurvey','','Survey','opensurvey@opensurvey',NULL,'opensurvey','','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(103136,'all',2,'opensurvey','left','opensurvey',-1,'opensurvey','opensurvey',210,'/opensurvey/public/index.php','_blank','NewSurvey','opensurvey@opensurvey',NULL,'opensurvey_new','','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(103137,'all',2,'opensurvey','left','opensurvey',-1,'opensurvey','opensurvey',220,'/opensurvey/list.php','','List','opensurvey@opensurvey',NULL,'opensurvey_list','','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(145127,'all',1,'printing','left','home',-1,'admintools','home',300,'/printing/index.php?mainmenu=home&leftmenu=admintools','','MenuDirectPrinting','printing',NULL,NULL,'$user->rights->printing->read','$conf->printing->enabled && $leftmenu==\'admintools\'',0,'2017-01-29 15:12:44'),(161088,'auguria',1,'','top','home',0,NULL,NULL,10,'/index.php?mainmenu=home&leftmenu=','','Home','',-1,'','','1',2,'2017-08-30 15:14:30'),(161089,'auguria',1,'societe|fournisseur','top','companies',0,NULL,NULL,20,'/societe/index.php?mainmenu=companies&leftmenu=','','ThirdParties','companies',-1,'','$user->rights->societe->lire || $user->rights->societe->contact->lire','( ! empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || ! empty($conf->fournisseur->enabled)',2,'2017-08-30 15:14:30'),(161090,'auguria',1,'product|service','top','products',0,NULL,NULL,30,'/product/index.php?mainmenu=products&leftmenu=','','Products/Services','products',-1,'','$user->rights->produit->lire||$user->rights->service->lire','$conf->product->enabled || $conf->service->enabled',0,'2017-08-30 15:14:30'),(161092,'auguria',1,'propal|commande|fournisseur|contrat|ficheinter','top','commercial',0,NULL,NULL,40,'/comm/index.php?mainmenu=commercial&leftmenu=','','Commercial','commercial',-1,'','$user->rights->societe->lire || $user->rights->societe->contact->lire','$conf->propal->enabled || $conf->commande->enabled || $conf->supplier_order->enabled || $conf->contrat->enabled || $conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(161093,'auguria',1,'comptabilite|accounting|facture|don|tax|salaries|loan','top','accountancy',0,NULL,NULL,50,'/compta/index.php?mainmenu=accountancy&leftmenu=','','MenuFinancial','compta',-1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->plancompte->lire || $user->rights->facture->lire|| $user->rights->don->lire || $user->rights->tax->charges->lire || $user->rights->salaries->read || $user->rights->loan->read','$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->don->enabled || $conf->tax->enabled || $conf->salaries->enabled || $conf->supplier_invoice->enabled || $conf->loan->enabled',2,'2017-08-30 15:14:30'),(161094,'auguria',1,'projet','top','project',0,NULL,NULL,70,'/projet/index.php?mainmenu=project&leftmenu=','','Projects','projects',-1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(161095,'auguria',1,'mailing|export|import|opensurvey|resource','top','tools',0,NULL,NULL,90,'/core/tools.php?mainmenu=tools&leftmenu=','','Tools','other',-1,'','$user->rights->mailing->lire || $user->rights->export->lire || $user->rights->import->run || $user->rights->opensurvey->read || $user->rights->resource->read','$conf->mailing->enabled || $conf->export->enabled || $conf->import->enabled || $conf->opensurvey->enabled || $conf->resource->enabled',2,'2017-08-30 15:14:30'),(161101,'auguria',1,'banque|prelevement','top','bank',0,NULL,NULL,60,'/compta/bank/index.php?mainmenu=bank&leftmenu=bank','','MenuBankCash','banks',-1,'','$user->rights->banque->lire || $user->rights->prelevement->bons->lire','$conf->banque->enabled || $conf->prelevement->enabled',0,'2017-08-30 15:14:30'),(161102,'auguria',1,'hrm|holiday|deplacement|expensereport','top','hrm',0,NULL,NULL,80,'/hrm/index.php?mainmenu=hrm&leftmenu=','','HRM','holiday',-1,'','$user->rights->hrm->employee->read || $user->rights->holiday->write || $user->rights->deplacement->lire || $user->rights->expensereport->lire','$conf->hrm->enabled || $conf->holiday->enabled || $conf->deplacement->enabled || $conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(161177,'auguria',1,'','left','home',161088,NULL,NULL,0,'/index.php','','MyDashboard','',0,'','','1',2,'2017-08-30 15:14:30'),(161187,'auguria',1,'','left','home',161088,NULL,NULL,1,'/admin/index.php?leftmenu=setup','','Setup','admin',0,'setup','','$user->admin',2,'2017-08-30 15:14:30'),(161188,'auguria',1,'','left','home',161187,NULL,NULL,1,'/admin/company.php?leftmenu=setup','','MenuCompanySetup','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161189,'auguria',1,'','left','home',161187,NULL,NULL,4,'/admin/ihm.php?leftmenu=setup','','GUISetup','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161190,'auguria',1,'','left','home',161187,NULL,NULL,2,'/admin/modules.php?leftmenu=setup','','Modules','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161191,'auguria',1,'','left','home',161187,NULL,NULL,6,'/admin/boxes.php?leftmenu=setup','','Boxes','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161192,'auguria',1,'','left','home',161187,NULL,NULL,3,'/admin/menus.php?leftmenu=setup','','Menus','admin',1,'','','$leftmenu==\'setup\'',2,'2017-09-06 08:29:47'),(161193,'auguria',1,'','left','home',161187,NULL,NULL,7,'/admin/delais.php?leftmenu=setup','','Alerts','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161194,'auguria',1,'','left','home',161187,NULL,NULL,10,'/admin/pdf.php?leftmenu=setup','','PDF','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161195,'auguria',1,'','left','home',161187,NULL,NULL,8,'/admin/security_other.php?leftmenu=setup','','Security','admin',1,'','','$leftmenu==\'setup\'',2,'2017-09-06 08:29:36'),(161196,'auguria',1,'','left','home',161187,NULL,NULL,11,'/admin/mails.php?leftmenu=setup','','Emails','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161197,'auguria',1,'','left','home',161187,NULL,NULL,9,'/admin/limits.php?leftmenu=setup','','MenuLimits','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161198,'auguria',1,'','left','home',161187,NULL,NULL,13,'/admin/dict.php?leftmenu=setup','','Dictionary','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161199,'auguria',1,'','left','home',161187,NULL,NULL,14,'/admin/const.php?leftmenu=setup','','OtherSetup','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161200,'auguria',1,'','left','home',161187,NULL,NULL,12,'/admin/sms.php?leftmenu=setup','','SMS','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161201,'auguria',1,'','left','home',161187,NULL,NULL,4,'/admin/translation.php?leftmenu=setup','','Translation','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161288,'auguria',1,'','left','home',161387,NULL,NULL,0,'/admin/system/dolibarr.php?leftmenu=admintools','','InfoDolibarr','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161289,'auguria',1,'','left','home',161288,NULL,NULL,2,'/admin/system/modules.php?leftmenu=admintools','','Modules','admin',2,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161290,'auguria',1,'','left','home',161288,NULL,NULL,3,'/admin/triggers.php?leftmenu=admintools','','Triggers','admin',2,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161291,'auguria',1,'','left','home',161288,NULL,NULL,4,'/admin/system/filecheck.php?leftmenu=admintools','','FileCheck','admin',2,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161292,'auguria',1,'','left','home',161387,NULL,NULL,1,'/admin/system/browser.php?leftmenu=admintools','','InfoBrowser','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161293,'auguria',1,'','left','home',161387,NULL,NULL,2,'/admin/system/os.php?leftmenu=admintools','','InfoOS','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161294,'auguria',1,'','left','home',161387,NULL,NULL,3,'/admin/system/web.php?leftmenu=admintools','','InfoWebServer','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161295,'auguria',1,'','left','home',161387,NULL,NULL,4,'/admin/system/phpinfo.php?leftmenu=admintools','','InfoPHP','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161297,'auguria',1,'','left','home',161387,NULL,NULL,5,'/admin/system/database.php?leftmenu=admintools','','InfoDatabase','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161387,'auguria',1,'','left','home',161088,NULL,NULL,2,'/admin/tools/index.php?leftmenu=admintools','','AdminTools','admin',0,'admintools','','$user->admin',2,'2017-08-30 15:14:30'),(161388,'auguria',1,'','left','home',161387,NULL,NULL,6,'/admin/tools/dolibarr_export.php?leftmenu=admintools','','Backup','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161389,'auguria',1,'','left','home',161387,NULL,NULL,7,'/admin/tools/dolibarr_import.php?leftmenu=admintools','','Restore','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161392,'auguria',1,'','left','home',161387,NULL,NULL,8,'/admin/tools/update.php?leftmenu=admintools','','MenuUpgrade','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161393,'auguria',1,'','left','home',161387,NULL,NULL,9,'/admin/tools/eaccelerator.php?leftmenu=admintools','','EAccelerator','admin',1,'','','$leftmenu==\"admintools\" && function_exists(\"eaccelerator_info\")',2,'2017-08-30 15:14:30'),(161394,'auguria',1,'','left','home',161387,NULL,NULL,10,'/admin/tools/listevents.php?leftmenu=admintools','','Audit','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161395,'auguria',1,'','left','home',161387,NULL,NULL,11,'/admin/tools/listsessions.php?leftmenu=admintools','','Sessions','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161396,'auguria',1,'','left','home',161387,NULL,NULL,12,'/admin/tools/purge.php?leftmenu=admintools','','Purge','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161398,'auguria',1,'','left','home',161387,NULL,NULL,14,'/admin/system/about.php?leftmenu=admintools','','ExternalResources','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161407,'auguria',1,'','left','home',161387,NULL,NULL,15,'/product/admin/product_tools.php?mainmenu=home&leftmenu=admintools','','ProductVatMassChange','products',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161487,'auguria',1,'','left','home',161088,NULL,NULL,4,'/user/home.php?leftmenu=users','','MenuUsersAndGroups','users',0,'users','','1',2,'2017-08-30 15:14:30'),(161488,'auguria',1,'','left','home',161487,NULL,NULL,0,'/user/index.php?leftmenu=users','','Users','users',1,'','$user->rights->user->user->lire || $user->admin','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161489,'auguria',1,'','left','home',161488,NULL,NULL,0,'/user/card.php?leftmenu=users&action=create','','NewUser','users',2,'','($user->rights->user->user->creer || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161490,'auguria',1,'','left','home',161487,NULL,NULL,1,'/user/group/index.php?leftmenu=users','','Groups','users',1,'','(($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->read:$user->rights->user->user->lire) || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161491,'auguria',1,'','left','home',161490,NULL,NULL,0,'/user/group/card.php?leftmenu=users&action=create','','NewGroup','users',2,'','(($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->write:$user->rights->user->user->creer) || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161587,'auguria',1,'','left','companies',161089,NULL,NULL,0,'/societe/index.php?leftmenu=thirdparties','','ThirdParty','companies',0,'thirdparties','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161588,'auguria',1,'','left','companies',161587,NULL,NULL,0,'/societe/card.php?action=create','','MenuNewThirdParty','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161589,'auguria',1,'','left','companies',161587,NULL,NULL,0,'/societe/list.php?action=create','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161590,'auguria',1,'','left','companies',161587,NULL,NULL,5,'/societe/list.php?type=f&leftmenu=suppliers','','ListSuppliersShort','suppliers',1,'','$user->rights->societe->lire && $user->rights->fournisseur->lire','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2017-08-30 15:14:30'),(161591,'auguria',1,'','left','companies',161590,NULL,NULL,0,'/societe/card.php?leftmenu=supplier&action=create&type=f','','NewSupplier','suppliers',2,'','$user->rights->societe->creer','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2017-08-30 15:14:30'),(161593,'auguria',1,'','left','companies',161587,NULL,NULL,3,'/societe/list.php?type=p&leftmenu=prospects','','ListProspectsShort','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161594,'auguria',1,'','left','companies',161593,NULL,NULL,0,'/societe/card.php?leftmenu=prospects&action=create&type=p','','MenuNewProspect','companies',2,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161596,'auguria',1,'','left','companies',161587,NULL,NULL,4,'/societe/list.php?type=c&leftmenu=customers','','ListCustomersShort','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161597,'auguria',1,'','left','companies',161596,NULL,NULL,0,'/societe/card.php?leftmenu=customers&action=create&type=c','','MenuNewCustomer','companies',2,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161687,'auguria',1,'','left','companies',161089,NULL,NULL,1,'/contact/list.php?leftmenu=contacts','','ContactsAddresses','companies',0,'contacts','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161688,'auguria',1,'','left','companies',161687,NULL,NULL,0,'/contact/card.php?leftmenu=contacts&action=create','','NewContactAddress','companies',1,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161689,'auguria',1,'','left','companies',161687,NULL,NULL,1,'/contact/list.php?leftmenu=contacts','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161691,'auguria',1,'','left','companies',161689,NULL,NULL,1,'/contact/list.php?leftmenu=contacts&type=p','','ThirdPartyProspects','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161692,'auguria',1,'','left','companies',161689,NULL,NULL,2,'/contact/list.php?leftmenu=contacts&type=c','','ThirdPartyCustomers','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161693,'auguria',1,'','left','companies',161689,NULL,NULL,3,'/contact/list.php?leftmenu=contacts&type=f','','ThirdPartySuppliers','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2017-08-30 15:14:30'),(161694,'auguria',1,'','left','companies',161689,NULL,NULL,4,'/contact/list.php?leftmenu=contacts&type=o','','Others','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161737,'auguria',1,'','left','companies',161089,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=1','','SuppliersCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->societe->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161738,'auguria',1,'','left','companies',161737,NULL,NULL,0,'/categories/card.php?action=create&type=1','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->societe->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161747,'auguria',1,'','left','companies',161089,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=2','','CustomersProspectsCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->fournisseur->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161748,'auguria',1,'','left','companies',161747,NULL,NULL,0,'/categories/card.php?action=create&type=2','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->fournisseur->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161757,'auguria',1,'','left','companies',161089,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=4','','ContactCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->societe->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161758,'auguria',1,'','left','companies',161757,NULL,NULL,0,'/categories/card.php?action=create&type=4','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->societe->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(162187,'auguria',1,'','left','commercial',161092,NULL,NULL,4,'/comm/propal/index.php?leftmenu=propals','','Prop','propal',0,'propals','$user->rights->propale->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162188,'auguria',1,'','left','commercial',162187,NULL,NULL,0,'/comm/propal/card.php?action=create&leftmenu=propals','','NewPropal','propal',1,'','$user->rights->propale->creer','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162189,'auguria',1,'','left','commercial',162187,NULL,NULL,1,'/comm/propal/list.php?leftmenu=propals','','List','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162190,'auguria',1,'','left','commercial',162189,NULL,NULL,2,'/comm/propal/list.php?leftmenu=propals&viewstatut=0','','PropalsDraft','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162191,'auguria',1,'','left','commercial',162189,NULL,NULL,3,'/comm/propal/list.php?leftmenu=propals&viewstatut=1','','PropalsOpened','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162192,'auguria',1,'','left','commercial',162189,NULL,NULL,4,'/comm/propal/list.php?leftmenu=propals&viewstatut=2','','PropalStatusSigned','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162193,'auguria',1,'','left','commercial',162189,NULL,NULL,5,'/comm/propal/list.php?leftmenu=propals&viewstatut=3','','PropalStatusNotSigned','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162194,'auguria',1,'','left','commercial',162189,NULL,NULL,6,'/comm/propal/list.php?leftmenu=propals&viewstatut=4','','PropalStatusBilled','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162197,'auguria',1,'','left','commercial',162187,NULL,NULL,4,'/comm/propal/stats/index.php?leftmenu=propals','','Statistics','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162287,'auguria',1,'','left','commercial',161092,NULL,NULL,5,'/commande/index.php?leftmenu=orders','','CustomersOrders','orders',0,'orders','$user->rights->commande->lire','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162288,'auguria',1,'','left','commercial',162287,NULL,NULL,0,'/commande/card.php?action=create&leftmenu=orders','','NewOrder','orders',1,'','$user->rights->commande->creer','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162289,'auguria',1,'','left','commercial',162287,NULL,NULL,1,'/commande/list.php?leftmenu=orders','','List','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162290,'auguria',1,'','left','commercial',162289,NULL,NULL,2,'/commande/list.php?leftmenu=orders&viewstatut=0','','StatusOrderDraftShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162291,'auguria',1,'','left','commercial',162289,NULL,NULL,3,'/commande/list.php?leftmenu=orders&viewstatut=1','','StatusOrderValidated','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162292,'auguria',1,'','left','commercial',162289,NULL,NULL,4,'/commande/list.php?leftmenu=orders&viewstatut=2','','StatusOrderOnProcessShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162293,'auguria',1,'','left','commercial',162289,NULL,NULL,5,'/commande/list.php?leftmenu=orders&viewstatut=3','','StatusOrderToBill','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162294,'auguria',1,'','left','commercial',162289,NULL,NULL,6,'/commande/list.php?leftmenu=orders&viewstatut=4','','StatusOrderProcessed','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162295,'auguria',1,'','left','commercial',162289,NULL,NULL,7,'/commande/list.php?leftmenu=orders&viewstatut=-1','','StatusOrderCanceledShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162296,'auguria',1,'','left','commercial',162287,NULL,NULL,4,'/commande/stats/index.php?leftmenu=orders','','Statistics','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162387,'auguria',1,'','left','commercial',161090,NULL,NULL,6,'/expedition/index.php?leftmenu=sendings','','Shipments','sendings',0,'sendings','$user->rights->expedition->lire','$conf->expedition->enabled',2,'2017-08-30 15:14:30'),(162388,'auguria',1,'','left','commercial',162387,NULL,NULL,0,'/expedition/card.php?action=create2&leftmenu=sendings','','NewSending','sendings',1,'','$user->rights->expedition->creer','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2017-08-30 15:14:30'),(162389,'auguria',1,'','left','commercial',162387,NULL,NULL,1,'/expedition/list.php?leftmenu=sendings','','List','sendings',1,'','$user->rights->expedition->lire','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2017-08-30 15:14:30'),(162390,'auguria',1,'','left','commercial',162387,NULL,NULL,2,'/expedition/stats/index.php?leftmenu=sendings','','Statistics','sendings',1,'','$user->rights->expedition->lire','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2017-08-30 15:14:30'),(162487,'auguria',1,'','left','commercial',161092,NULL,NULL,7,'/contrat/index.php?leftmenu=contracts','','Contracts','contracts',0,'contracts','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162488,'auguria',1,'','left','commercial',162487,NULL,NULL,0,'/contrat/card.php?&action=create&leftmenu=contracts','','NewContract','contracts',1,'','$user->rights->contrat->creer','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162489,'auguria',1,'','left','commercial',162487,NULL,NULL,1,'/contrat/list.php?leftmenu=contracts','','List','contracts',1,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162490,'auguria',1,'','left','commercial',162487,NULL,NULL,2,'/contrat/services.php?leftmenu=contracts','','MenuServices','contracts',1,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162491,'auguria',1,'','left','commercial',162490,NULL,NULL,0,'/contrat/services.php?leftmenu=contracts&mode=0','','MenuInactiveServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled && $leftmenu==\"contracts\"',2,'2017-08-30 15:14:30'),(162492,'auguria',1,'','left','commercial',162490,NULL,NULL,1,'/contrat/services.php?leftmenu=contracts&mode=4','','MenuRunningServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled && $leftmenu==\"contracts\"',2,'2017-08-30 15:14:30'),(162493,'auguria',1,'','left','commercial',162490,NULL,NULL,2,'/contrat/services.php?leftmenu=contracts&mode=4&filter=expired','','MenuExpiredServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled && $leftmenu==\"contracts\"',2,'2017-08-30 15:14:30'),(162494,'auguria',1,'','left','commercial',162490,NULL,NULL,3,'/contrat/services.php?leftmenu=contracts&mode=5','','MenuClosedServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled && $leftmenu==\"contracts\"',2,'2017-08-30 15:14:30'),(162587,'auguria',1,'','left','commercial',161092,NULL,NULL,8,'/fichinter/list.php?leftmenu=ficheinter','','Interventions','interventions',0,'ficheinter','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162588,'auguria',1,'','left','commercial',162587,NULL,NULL,0,'/fichinter/card.php?action=create&leftmenu=ficheinter','','NewIntervention','interventions',1,'','$user->rights->ficheinter->creer','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162589,'auguria',1,'','left','commercial',162587,NULL,NULL,1,'/fichinter/list.php?leftmenu=ficheinter','','List','interventions',1,'','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162590,'auguria',1,'','left','commercial',162587,NULL,NULL,2,'/fichinter/stats/index.php?leftmenu=ficheinter','','Statistics','interventions',1,'','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162687,'auguria',1,'','left','accountancy',161093,NULL,NULL,3,'/fourn/facture/list.php?leftmenu=suppliers_bills','','BillsSuppliers','bills',0,'supplier_bills','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162688,'auguria',1,'','left','accountancy',162687,NULL,NULL,0,'/fourn/facture/card.php?action=create&leftmenu=suppliers_bills','','NewBill','bills',1,'','$user->rights->fournisseur->facture->creer','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162689,'auguria',1,'','left','accountancy',162687,NULL,NULL,1,'/fourn/facture/list.php?leftmenu=suppliers_bills','','List','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162690,'auguria',1,'','left','accountancy',162687,NULL,NULL,2,'/fourn/facture/paiement.php?leftmenu=suppliers_bills','','Payments','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162691,'auguria',1,'','left','accountancy',162687,NULL,NULL,8,'/compta/facture/stats/index.php?leftmenu=customers_bills&mode=supplier','','Statistics','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162692,'auguria',1,'','left','accountancy',162690,NULL,NULL,1,'/fourn/facture/rapport.php?leftmenu=suppliers_bills','','Reporting','bills',2,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162787,'auguria',1,'','left','accountancy',161093,NULL,NULL,3,'/compta/facture/list.php?leftmenu=customers_bills','','BillsCustomers','bills',0,'customer_bills','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162788,'auguria',1,'','left','accountancy',162787,NULL,NULL,3,'/compta/facture/card.php?action=create&leftmenu=customers_bills','','NewBill','bills',1,'','$user->rights->facture->creer','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162789,'auguria',1,'','left','accountancy',162787,NULL,NULL,5,'/compta/facture/fiche-rec.php?leftmenu=customers_bills','','ListOfTemplates','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162791,'auguria',1,'','left','accountancy',162787,NULL,NULL,6,'/compta/paiement/list.php?leftmenu=customers_bills','','Payments','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162792,'auguria',1,'','left','accountancy',162787,NULL,NULL,4,'/compta/facture/list.php?leftmenu=customers_bills','','List','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162797,'auguria',1,'','left','accountancy',162791,NULL,NULL,1,'/compta/paiement/rapport.php?leftmenu=customers_bills','','Reportings','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162798,'auguria',1,'','left','accountancy',161101,NULL,NULL,9,'/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank','','MenuChequeDeposits','bills',0,'checks','$user->rights->banque->lire','empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))',2,'2017-08-30 15:14:30'),(162799,'auguria',1,'','left','accountancy',162798,NULL,NULL,0,'/compta/paiement/cheque/card.php?leftmenu=checks&action=new','','NewCheckDeposit','compta',1,'','$user->rights->banque->lire','empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))',2,'2017-08-30 15:14:30'),(162800,'auguria',1,'','left','accountancy',162798,NULL,NULL,1,'/compta/paiement/cheque/list.php?leftmenu=checks','','List','bills',1,'','$user->rights->banque->lire','empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))',2,'2017-08-30 15:14:30'),(162801,'auguria',1,'','left','accountancy',162787,NULL,NULL,8,'/compta/facture/stats/index.php?leftmenu=customers_bills','','Statistics','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162807,'auguria',1,'','left','accountancy',162792,NULL,NULL,1,'/compta/facture/list.php?leftmenu=customers_bills&search_status=0','','BillShortStatusDraft','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162808,'auguria',1,'','left','accountancy',162792,NULL,NULL,2,'/compta/facture/list.php?leftmenu=customers_bills&search_status=1','','BillShortStatusNotPaid','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162809,'auguria',1,'','left','accountancy',162792,NULL,NULL,3,'/compta/facture/list.php?leftmenu=customers_bills&search_status=2','','BillShortStatusPaid','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162810,'auguria',1,'','left','accountancy',162792,NULL,NULL,4,'/compta/facture/list.php?leftmenu=customers_bills&search_status=3','','BillShortStatusCanceled','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162987,'auguria',1,'','left','accountancy',161093,NULL,NULL,3,'/commande/list.php?leftmenu=orders&viewstatut=3','','MenuOrdersToBill','orders',0,'orders','$user->rights->commande->lire','$conf->commande->enabled',0,'2017-08-30 15:14:30'),(163087,'auguria',1,'','left','accountancy',161093,NULL,NULL,4,'/don/index.php?leftmenu=donations&mainmenu=accountancy','','Donations','donations',0,'donations','$user->rights->don->lire','$conf->don->enabled',2,'2017-08-30 15:14:30'),(163088,'auguria',1,'','left','accountancy',163087,NULL,NULL,0,'/don/card.php?leftmenu=donations&mainmenu=accountancy&action=create','','NewDonation','donations',1,'','$user->rights->don->creer','$conf->don->enabled && $leftmenu==\"donations\"',2,'2017-08-30 15:14:30'),(163089,'auguria',1,'','left','accountancy',163087,NULL,NULL,1,'/don/list.php?leftmenu=donations&mainmenu=accountancy','','List','donations',1,'','$user->rights->don->lire','$conf->don->enabled && $leftmenu==\"donations\"',2,'2017-08-30 15:14:30'),(163187,'auguria',1,'','left','accountancy',161102,NULL,NULL,5,'/compta/deplacement/index.php?leftmenu=tripsandexpenses','','TripsAndExpenses','trips',0,'tripsandexpenses','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163188,'auguria',1,'','left','accountancy',163187,NULL,NULL,1,'/compta/deplacement/card.php?action=create&leftmenu=tripsandexpenses','','New','trips',1,'','$user->rights->deplacement->creer','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163189,'auguria',1,'','left','accountancy',163187,NULL,NULL,2,'/compta/deplacement/list.php?leftmenu=tripsandexpenses','','List','trips',1,'','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163190,'auguria',1,'','left','accountancy',163187,NULL,NULL,2,'/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses','','Statistics','trips',1,'','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163287,'auguria',1,'','left','accountancy',161093,NULL,NULL,6,'/compta/charges/index.php?leftmenu=tax&mainmenu=accountancy','','MenuSpecialExpenses','compta',0,'tax','(! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) || (! empty($conf->salaries->enabled) && $user->rights->salaries->read)','$conf->tax->enabled || $conf->salaries->enabled',0,'2017-08-30 15:14:30'),(163297,'auguria',1,'','left','accountancy',163287,NULL,NULL,1,'/compta/salaries/index.php?leftmenu=tax_salary&mainmenu=accountancy','','Salaries','salaries',1,'tax_sal','$user->rights->salaries->payment->read','$conf->salaries->enabled',0,'2017-08-30 15:14:30'),(163298,'auguria',1,'','left','accountancy',163297,NULL,NULL,2,'/compta/salaries/card.php?leftmenu=tax_salary&action=create','','NewPayment','companies',2,'','$user->rights->salaries->payment->write','$conf->salaries->enabled && $leftmenu==\"tax_salary\"',0,'2017-08-30 15:14:30'),(163299,'auguria',1,'','left','accountancy',163297,NULL,NULL,3,'/compta/salaries/index.php?leftmenu=tax_salary','','Payments','companies',2,'','$user->rights->salaries->payment->read','$conf->salaries->enabled && $leftmenu==\"tax_salary\"',0,'2017-08-30 15:14:30'),(163307,'auguria',1,'','left','accountancy',163287,NULL,NULL,1,'/loan/index.php?leftmenu=tax_loan&mainmenu=accountancy','','Loans','loan',1,'tax_loan','$user->rights->loan->read','$conf->loan->enabled',0,'2017-08-30 15:14:30'),(163308,'auguria',1,'','left','accountancy',163307,NULL,NULL,2,'/loan/card.php?leftmenu=tax_loan&action=create','','NewLoan','loan',2,'','$user->rights->loan->write','$conf->loan->enabled && $leftmenu==\"tax_loan\"',0,'2017-08-30 15:14:30'),(163310,'auguria',1,'','left','accountancy',163307,NULL,NULL,4,'/loan/calc.php?leftmenu=tax_loan','','Calculator','companies',2,'','$user->rights->loan->calc','$conf->loan->enabled && $leftmenu==\"tax_loan\" && ! empty($conf->global->LOAN_SHOW_CALCULATOR)',0,'2017-08-30 15:14:30'),(163337,'auguria',1,'','left','accountancy',163287,NULL,NULL,1,'/compta/sociales/index.php?leftmenu=tax_social','','SocialContributions','',1,'tax_social','$user->rights->tax->charges->lire','$conf->tax->enabled',0,'2017-08-30 15:14:30'),(163338,'auguria',1,'','left','accountancy',163337,NULL,NULL,2,'/compta/sociales/card.php?leftmenu=tax_social&action=create','','MenuNewSocialContribution','',2,'','$user->rights->tax->charges->creer','$conf->tax->enabled && $leftmenu==\"tax_social\"',0,'2017-08-30 15:14:30'),(163339,'auguria',1,'','left','accountancy',163337,NULL,NULL,3,'/compta/sociales/payments.php?leftmenu=tax_social&mainmenu=accountancy&mode=sconly','','Payments','',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && $leftmenu==\"tax_social\"',0,'2017-08-30 15:14:30'),(163387,'auguria',1,'','left','accountancy',163287,NULL,NULL,7,'/compta/tva/index.php?leftmenu=tax_vat&mainmenu=accountancy','','VAT','companies',1,'tax_vat','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS)',0,'2017-08-30 15:14:30'),(163388,'auguria',1,'','left','accountancy',163387,NULL,NULL,0,'/compta/tva/card.php?leftmenu=tax_vat&action=create','','New','companies',2,'','$user->rights->tax->charges->creer','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2017-08-30 15:14:30'),(163389,'auguria',1,'','left','accountancy',163387,NULL,NULL,1,'/compta/tva/reglement.php?leftmenu=tax_vat','','List','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2017-08-30 15:14:30'),(163390,'auguria',1,'','left','accountancy',163387,NULL,NULL,2,'/compta/tva/clients.php?leftmenu=tax_vat','','ReportByCustomers','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2017-08-30 15:14:30'),(163391,'auguria',1,'','left','accountancy',163387,NULL,NULL,3,'/compta/tva/quadri_detail.php?leftmenu=tax_vat','','ReportByQuarter','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2017-08-30 15:14:30'),(163487,'auguria',1,'','left','accountancy',161093,NULL,NULL,7,'/accountancy/index.php?leftmenu=accountancy','','MenuAccountancy','accountancy',0,'accounting','! empty($conf->accounting->enabled) || $user->rights->accounting->bind->write || $user->rights->accounting->bind->write || $user->rights->compta->resultat->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163488,'auguria',1,'','left','accountancy',163487,NULL,NULL,2,'/accountancy/customer/index.php?leftmenu=dispatch_customer','','CustomersVentilation','accountancy',1,'dispatch_customer','$user->rights->accounting->bind->write','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163489,'auguria',1,'','left','accountancy',163488,NULL,NULL,3,'/accountancy/customer/list.php','','ToDispatch','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $leftmenu==\"dispatch_customer\"',0,'2017-08-30 15:14:30'),(163490,'auguria',1,'','left','accountancy',163488,NULL,NULL,4,'/accountancy/customer/lines.php','','Dispatched','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $leftmenu==\"dispatch_customer\"',0,'2017-08-30 15:14:30'),(163497,'auguria',1,'','left','accountancy',163487,NULL,NULL,5,'/accountancy/supplier/index.php?leftmenu=dispatch_supplier','','SuppliersVentilation','accountancy',1,'ventil_supplier','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->fournisseur->enabled',0,'2017-08-30 15:14:30'),(163498,'auguria',1,'','left','accountancy',163497,NULL,NULL,6,'/accountancy/supplier/list.php','','ToDispatch','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->fournisseur->enabled && $leftmenu==\"dispatch_supplier\"',0,'2017-08-30 15:14:30'),(163499,'auguria',1,'','left','accountancy',163497,NULL,NULL,7,'/accountancy/supplier/lines.php','','Dispatched','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->fournisseur->enabled && $leftmenu==\"dispatch_supplier\"',0,'2017-08-30 15:14:30'),(163507,'auguria',1,'','left','accountancy',163487,NULL,NULL,5,'/accountancy/expensereport/index.php?leftmenu=dispatch_expensereport','','ExpenseReportsVentilation','accountancy',1,'ventil_expensereport','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(163508,'auguria',1,'','left','accountancy',163507,NULL,NULL,6,'/accountancy/expensereport/list.php','','ToDispatch','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->expensereport->enabled && $leftmenu==\"dispatch_expensereport\"',0,'2017-08-30 15:14:30'),(163509,'auguria',1,'','left','accountancy',163507,NULL,NULL,7,'/accountancy/expensereport/lines.php','','Dispatched','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->expensereport->enabled && $leftmenu==\"dispatch_expensereport\"',0,'2017-08-30 15:14:30'),(163517,'auguria',1,'','left','accountancy',163487,NULL,NULL,15,'/accountancy/bookkeeping/list.php','','Bookkeeping','accountancy',1,'bookkeeping','$user->rights->accounting->mouvements->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163522,'auguria',1,'','left','accountancy',163487,NULL,NULL,16,'/accountancy/bookkeeping/balance.php','','AccountBalance','accountancy',1,'balance','$user->rights->accounting->mouvements->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163527,'auguria',1,'','left','accountancy',163487,NULL,NULL,17,'/accountancy/report/result.php?mainmenu=accountancy&leftmenu=accountancy','','Reportings','main',1,'report','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163528,'auguria',1,'','left','accountancy',163527,NULL,NULL,19,'/compta/resultat/index.php?mainmenu=accountancy&leftmenu=accountancy','','ReportInOut','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163529,'auguria',1,'','left','accountancy',163528,NULL,NULL,18,'/accountancy/report/result.php?mainmenu=accountancy&leftmenu=accountancy','','ByAccounts','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163530,'auguria',1,'','left','accountancy',163528,NULL,NULL,20,'/compta/resultat/clientfourn.php?mainmenu=accountancy&leftmenu=accountancy','','ByCompanies','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163531,'auguria',1,'','left','accountancy',163527,NULL,NULL,21,'/compta/stats/index.php?mainmenu=accountancy&leftmenu=accountancy','','ReportTurnover','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163532,'auguria',1,'','left','accountancy',163531,NULL,NULL,22,'/compta/stats/casoc.php?mainmenu=accountancy&leftmenu=accountancy','','ByCompanies','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163533,'auguria',1,'','left','accountancy',163531,NULL,NULL,23,'/compta/stats/cabyuser.php?mainmenu=accountancy&leftmenu=accountancy','','ByUsers','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163534,'auguria',1,'','left','accountancy',163531,NULL,NULL,24,'/compta/stats/cabyprodserv.php?mainmenu=accountancy&leftmenu=accountancy','','ByProductsAndServices','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163537,'auguria',1,'','left','accountancy',163538,NULL,NULL,80,'/accountancy/admin/fiscalyear.php?mainmenu=accountancy&leftmenu=accountancy_admin','','FiscalPeriod','admin',1,'accountancy_admin_period','','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\" && $conf->global->MAIN_FEATURES_LEVEL > 0',2,'2017-08-30 15:14:30'),(163538,'auguria',1,'','left','accountancy',163487,NULL,NULL,1,'/accountancy/index.php?mainmenu=accountancy&leftmenu=accountancy_admin','','Setup','accountancy',1,'accountancy_admin','$user->rights->accounting->chartofaccount','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163541,'auguria',1,'','left','accountancy',163538,NULL,NULL,10,'/accountancy/admin/journals_list.php?id=35&mainmenu=accountancy&leftmenu=accountancy_admin','','AccountingJournals','accountancy',2,'accountancy_admin_journal','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163542,'auguria',1,'','left','accountancy',163538,NULL,NULL,20,'/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin','','Pcg_version','accountancy',2,'accountancy_admin_chartmodel','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163543,'auguria',1,'','left','accountancy',163538,NULL,NULL,30,'/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin','','Chartofaccounts','accountancy',2,'accountancy_admin_chart','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163544,'auguria',1,'','left','accountancy',163538,NULL,NULL,40,'/accountancy/admin/categories_list.php?id=32&mainmenu=accountancy&leftmenu=accountancy_admin','','AccountingCategory','accountancy',2,'accountancy_admin_chart_group','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163545,'auguria',1,'','left','accountancy',163538,NULL,NULL,50,'/accountancy/admin/defaultaccounts.php?mainmenu=accountancy&leftmenu=accountancy_admin','','MenuDefaultAccounts','accountancy',2,'accountancy_admin_default','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163546,'auguria',1,'','left','accountancy',163538,NULL,NULL,60,'/admin/dict.php?id=10&from=accountancy&search_country_id=__MYCOUNTRYID__&mainmenu=accountancy&leftmenu=accountancy_admin','','MenuVatAccounts','accountancy',2,'accountancy_admin_vat','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163547,'auguria',1,'','left','accountancy',163538,NULL,NULL,70,'/admin/dict.php?id=7&from=accountancy&search_country_id=__MYCOUNTRYID__&mainmenu=accountancy&leftmenu=accountancy_admin','','MenuTaxAccounts','accountancy',2,'accountancy_admin_tax','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163548,'auguria',1,'','left','accountancy',163538,NULL,NULL,80,'/admin/dict.php?id=17&from=accountancy&mainmenu=accountancy&leftmenu=accountancy_admin','','MenuExpenseReportAccounts','accountancy',2,'accountancy_admin_expensereport','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $conf->expensereport->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163549,'auguria',1,'','left','accountancy',163538,NULL,NULL,90,'/accountancy/admin/productaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin','','MenuProductsAccounts','accountancy',2,'accountancy_admin_product','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163587,'auguria',1,'','left','accountancy',161101,NULL,NULL,9,'/compta/prelevement/index.php?leftmenu=withdraw&mainmenu=bank','','StandingOrders','withdrawals',0,'withdraw','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled',2,'2017-08-30 15:14:30'),(163589,'auguria',1,'','left','accountancy',163587,NULL,NULL,0,'/compta/prelevement/create.php?leftmenu=withdraw','','NewStandingOrder','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163590,'auguria',1,'','left','accountancy',163587,NULL,NULL,2,'/compta/prelevement/bons.php?leftmenu=withdraw','','WithdrawalsReceipts','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163591,'auguria',1,'','left','accountancy',163587,NULL,NULL,3,'/compta/prelevement/list.php?leftmenu=withdraw','','WithdrawalsLines','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163593,'auguria',1,'','left','accountancy',163587,NULL,NULL,5,'/compta/prelevement/rejets.php?leftmenu=withdraw','','Rejects','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163594,'auguria',1,'','left','accountancy',163587,NULL,NULL,6,'/compta/prelevement/stats.php?leftmenu=withdraw','','Statistics','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163687,'auguria',1,'','left','accountancy',161101,NULL,NULL,1,'/compta/bank/index.php?leftmenu=bank&mainmenu=bank','','MenuBankCash','banks',0,'bank','$user->rights->banque->lire','$conf->banque->enabled',0,'2017-08-30 15:14:30'),(163688,'auguria',1,'','left','accountancy',163687,NULL,NULL,0,'/compta/bank/card.php?action=create&leftmenu=bank','','MenuNewFinancialAccount','banks',1,'','$user->rights->banque->configurer','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2017-08-30 15:14:30'),(163690,'auguria',1,'','left','accountancy',163687,NULL,NULL,2,'/compta/bank/bankentries.php?leftmenu=bank','','ListTransactions','banks',1,'','$user->rights->banque->lire','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2017-08-30 15:14:30'),(163691,'auguria',1,'','left','accountancy',163687,NULL,NULL,3,'/compta/bank/budget.php?leftmenu=bank','','ListTransactionsByCategory','banks',1,'','$user->rights->banque->lire','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2017-08-30 15:14:30'),(163693,'auguria',1,'','left','accountancy',163687,NULL,NULL,5,'/compta/bank/transfer.php?leftmenu=bank','','BankTransfers','banks',1,'','$user->rights->banque->transfer','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2017-08-30 15:14:30'),(163737,'auguria',1,'','left','accountancy',161101,NULL,NULL,4,'/categories/index.php?leftmenu=bank&type=5','','Categories','categories',0,'cat','$user->rights->categorie->lire','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(163738,'auguria',1,'','left','accountancy',163737,NULL,NULL,0,'/categories/card.php?leftmenu=bank&action=create&type=5','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(163787,'auguria',1,'','left','accountancy',161093,NULL,NULL,11,'/compta/resultat/index.php?leftmenu=ca&mainmenu=accountancy','','Reportings','main',0,'ca','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled',0,'2017-08-30 15:14:30'),(163792,'auguria',1,'','left','accountancy',163487,NULL,NULL,1,'','','Journalization','main',1,'','$user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163793,'auguria',1,'','left','accountancy',163792,NULL,NULL,4,'/accountancy/journal/sellsjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=1','','SellsJournal','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163794,'auguria',1,'','left','accountancy',163792,NULL,NULL,1,'/accountancy/journal/bankjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=3','','BankJournal','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163795,'auguria',1,'','left','accountancy',163792,NULL,NULL,2,'/accountancy/journal/expensereportsjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=6','','ExpenseReportJournal','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163796,'auguria',1,'','left','accountancy',163792,NULL,NULL,3,'/accountancy/journal/purchasesjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=2','','PurchasesJournal','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163798,'auguria',1,'','left','accountancy',163787,NULL,NULL,0,'/compta/resultat/index.php?leftmenu=ca','','ReportInOut','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163799,'auguria',1,'','left','accountancy',163788,NULL,NULL,0,'/compta/resultat/clientfourn.php?leftmenu=ca','','ByCompanies','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163800,'auguria',1,'','left','accountancy',163787,NULL,NULL,1,'/compta/stats/index.php?leftmenu=ca','','ReportTurnover','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163801,'auguria',1,'','left','accountancy',163790,NULL,NULL,0,'/compta/stats/casoc.php?leftmenu=ca','','ByCompanies','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163802,'auguria',1,'','left','accountancy',163790,NULL,NULL,1,'/compta/stats/cabyuser.php?leftmenu=ca','','ByUsers','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163803,'auguria',1,'','left','accountancy',163790,NULL,NULL,1,'/compta/stats/cabyprodserv.php?leftmenu=ca','','ByProductsAndServices','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163887,'auguria',1,'','left','products',161090,NULL,NULL,0,'/product/index.php?leftmenu=product&type=0','','Products','products',0,'product','$user->rights->produit->lire','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163888,'auguria',1,'','left','products',163887,NULL,NULL,0,'/product/card.php?leftmenu=product&action=create&type=0','','NewProduct','products',1,'','$user->rights->produit->creer','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163889,'auguria',1,'','left','products',163887,NULL,NULL,1,'/product/list.php?leftmenu=product&type=0','','List','products',1,'','$user->rights->produit->lire','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163890,'auguria',1,'','left','products',163887,NULL,NULL,4,'/product/reassort.php?type=0','','Stocks','products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163891,'auguria',1,'','left','products',163887,NULL,NULL,7,'/product/stats/card.php?id=all&leftmenu=stats&type=0','','Statistics','main',1,'','$user->rights->produit->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(163892,'auguria',1,'','left','products',163887,NULL,NULL,5,'/product/reassortlot.php?type=0','','StocksByLotSerial','products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->productbatch->enabled',2,'2017-08-30 15:14:30'),(163893,'auguria',1,'','left','products',163887,NULL,NULL,6,'/product/stock/productlot_list.php','','LotSerial','products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->productbatch->enabled',2,'2017-08-30 15:14:30'),(163987,'auguria',1,'','left','products',161090,NULL,NULL,1,'/product/index.php?leftmenu=service&type=1','','Services','products',0,'service','$user->rights->service->lire','$conf->service->enabled',2,'2017-08-30 15:14:30'),(163988,'auguria',1,'','left','products',163987,NULL,NULL,0,'/product/card.php?leftmenu=service&action=create&type=1','','NewService','products',1,'','$user->rights->service->creer','$conf->service->enabled',2,'2017-08-30 15:14:30'),(163989,'auguria',1,'','left','products',163987,NULL,NULL,1,'/product/list.php?leftmenu=service&type=1','','List','products',1,'','$user->rights->service->lire','$conf->service->enabled',2,'2017-08-30 15:14:30'),(163990,'auguria',1,'','left','products',163987,NULL,NULL,5,'/product/stats/card.php?id=all&leftmenu=stats&type=1','','Statistics','main',1,'','$user->rights->service->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(164187,'auguria',1,'','left','products',161090,NULL,NULL,3,'/product/stock/index.php?leftmenu=stock','','Stock','stocks',0,'stock','$user->rights->stock->lire','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164188,'auguria',1,'','left','products',164187,NULL,NULL,0,'/product/stock/card.php?action=create','','MenuNewWarehouse','stocks',1,'','$user->rights->stock->creer','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164189,'auguria',1,'','left','products',164187,NULL,NULL,1,'/product/stock/list.php','','List','stocks',1,'','$user->rights->stock->lire','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164191,'auguria',1,'','left','products',164187,NULL,NULL,3,'/product/stock/mouvement.php','','Movements','stocks',1,'','$user->rights->stock->mouvement->lire','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164192,'auguria',1,'','left','products',164187,NULL,NULL,4,'/product/stock/replenish.php','','Replenishments','stocks',1,'','$user->rights->stock->mouvement->creer && $user->rights->fournisseur->lire','$conf->stock->enabled && $conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(164193,'auguria',1,'','left','products',164187,NULL,NULL,5,'/product/stock/massstockmove.php','','MassStockTransferShort','stocks',1,'','$user->rights->stock->mouvement->creer','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164287,'auguria',1,'','left','products',161090,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=0','','Categories','categories',0,'cat','$user->rights->categorie->lire','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164288,'auguria',1,'','left','products',164287,NULL,NULL,0,'/categories/card.php?action=create&type=0','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164487,'auguria',1,'','left','project',161094,NULL,NULL,3,'/projet/activity/perweek.php?leftmenu=projects','','NewTimeSpent','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164687,'auguria',1,'','left','project',161094,NULL,NULL,0,'/projet/index.php?leftmenu=projects','','Projects','projects',0,'projects','$user->rights->projet->lire','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164688,'auguria',1,'','left','project',164687,NULL,NULL,1,'/projet/card.php?leftmenu=projects&action=create','','NewProject','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164689,'auguria',1,'','left','project',164687,NULL,NULL,2,'/projet/list.php?leftmenu=projects','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164690,'auguria',1,'','left','project',164687,NULL,NULL,3,'/projet/stats/index.php?leftmenu=projects','','Statistics','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164787,'auguria',1,'','left','project',161094,NULL,NULL,0,'/projet/activity/index.php?leftmenu=projects','','Activities','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164788,'auguria',1,'','left','project',164787,NULL,NULL,1,'/projet/tasks.php?leftmenu=projects&action=create','','NewTask','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164789,'auguria',1,'','left','project',164787,NULL,NULL,2,'/projet/tasks/list.php?leftmenu=projects','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164791,'auguria',1,'','left','project',164787,NULL,NULL,4,'/projet/tasks/stats/index.php?leftmenu=projects','','Statistics','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164891,'auguria',1,'','left','project',161094,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=6','','Categories','categories',0,'cat','$user->rights->categorie->lire','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164892,'auguria',1,'','left','project',164891,NULL,NULL,0,'/categories/card.php?action=create&type=6','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164987,'auguria',1,'','left','tools',161095,NULL,NULL,0,'/comm/mailing/index.php?leftmenu=mailing','','EMailings','mails',0,'mailing','$user->rights->mailing->lire','$conf->mailing->enabled',0,'2017-08-30 15:14:30'),(164988,'auguria',1,'','left','tools',164987,NULL,NULL,0,'/comm/mailing/card.php?leftmenu=mailing&action=create','','NewMailing','mails',1,'','$user->rights->mailing->creer','$conf->mailing->enabled',0,'2017-08-30 15:14:30'),(164989,'auguria',1,'','left','tools',164987,NULL,NULL,1,'/comm/mailing/list.php?leftmenu=mailing','','List','mails',1,'','$user->rights->mailing->lire','$conf->mailing->enabled',0,'2017-08-30 15:14:30'),(165187,'auguria',1,'','left','tools',161095,NULL,NULL,2,'/exports/index.php?leftmenu=export','','FormatedExport','exports',0,'export','$user->rights->export->lire','$conf->export->enabled',2,'2017-08-30 15:14:30'),(165188,'auguria',1,'','left','tools',165187,NULL,NULL,0,'/exports/export.php?leftmenu=export','','NewExport','exports',1,'','$user->rights->export->creer','$conf->export->enabled',2,'2017-08-30 15:14:30'),(165217,'auguria',1,'','left','tools',161095,NULL,NULL,2,'/imports/index.php?leftmenu=import','','FormatedImport','exports',0,'import','$user->rights->import->run','$conf->import->enabled',2,'2017-08-30 15:14:30'),(165218,'auguria',1,'','left','tools',165217,NULL,NULL,0,'/imports/import.php?leftmenu=import','','NewImport','exports',1,'','$user->rights->import->run','$conf->import->enabled',2,'2017-08-30 15:14:30'),(165287,'auguria',1,'','left','members',161100,NULL,NULL,0,'/adherents/index.php?leftmenu=members&mainmenu=members','','Members','members',0,'members','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165288,'auguria',1,'','left','members',165287,NULL,NULL,0,'/adherents/card.php?leftmenu=members&action=create','','NewMember','members',1,'','$user->rights->adherent->creer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165289,'auguria',1,'','left','members',165287,NULL,NULL,1,'/adherents/list.php','','List','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165290,'auguria',1,'','left','members',165289,NULL,NULL,2,'/adherents/list.php?leftmenu=members&statut=-1','','MenuMembersToValidate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165291,'auguria',1,'','left','members',165289,NULL,NULL,3,'/adherents/list.php?leftmenu=members&statut=1','','MenuMembersValidated','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165292,'auguria',1,'','left','members',165289,NULL,NULL,4,'/adherents/list.php?leftmenu=members&statut=1&filter=outofdate','','MenuMembersNotUpToDate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165293,'auguria',1,'','left','members',165289,NULL,NULL,5,'/adherents/list.php?leftmenu=members&statut=1&filter=uptodate','','MenuMembersUpToDate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165294,'auguria',1,'','left','members',165289,NULL,NULL,6,'/adherents/list.php?leftmenu=members&statut=0','','MenuMembersResiliated','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165295,'auguria',1,'','left','members',165287,NULL,NULL,7,'/adherents/stats/geo.php?leftmenu=members&mode=memberbycountry','','MenuMembersStats','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165387,'auguria',1,'','left','members',161100,NULL,NULL,1,'/adherents/index.php?leftmenu=members&mainmenu=members','','Subscriptions','compta',0,'','$user->rights->adherent->cotisation->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165388,'auguria',1,'','left','members',165387,NULL,NULL,0,'/adherents/list.php?statut=-1&leftmenu=accountancy&mainmenu=members','','NewSubscription','compta',1,'','$user->rights->adherent->cotisation->creer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165389,'auguria',1,'','left','members',165387,NULL,NULL,1,'/adherents/subscription/list.php?leftmenu=members','','List','compta',1,'','$user->rights->adherent->cotisation->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165390,'auguria',1,'','left','members',165387,NULL,NULL,7,'/adherents/stats/index.php?leftmenu=members','','MenuMembersStats','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165589,'auguria',1,'','left','members',165287,NULL,NULL,9,'/adherents/htpasswd.php?leftmenu=export','','Filehtpasswd','members',1,'','$user->rights->adherent->export','! empty($conf->global->MEMBER_LINK_TO_HTPASSWDFILE) && $conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165590,'auguria',1,'','left','members',165287,NULL,NULL,10,'/adherents/cartes/carte.php?leftmenu=export','','MembersCards','members',1,'','$user->rights->adherent->export','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165687,'auguria',1,'','left','hrm',161102,NULL,NULL,1,'/user/index.php?leftmenu=hrm&mode=employee','','Employees','hrm',0,'hrm','$user->rights->hrm->employee->read','$conf->hrm->enabled',0,'2017-08-30 15:14:30'),(165688,'auguria',1,'','left','hrm',165687,NULL,NULL,1,'/user/card.php?action=create&employee=1','','NewEmployee','hrm',1,'','$user->rights->hrm->employee->write','$conf->hrm->enabled',0,'2017-08-30 15:14:30'),(165689,'auguria',1,'','left','hrm',165687,NULL,NULL,2,'/user/index.php?$leftmenu=hrm&mode=employee&contextpage=employeelist','','List','hrm',1,'','$user->rights->hrm->employee->read','$conf->hrm->enabled',0,'2017-08-30 15:14:30'),(165787,'auguria',1,'','left','members',161100,NULL,NULL,5,'/adherents/type.php?leftmenu=setup&mainmenu=members','','MembersTypes','members',0,'setup','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165788,'auguria',1,'','left','members',165787,NULL,NULL,0,'/adherents/type.php?leftmenu=setup&mainmenu=members&action=create','','New','members',1,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165789,'auguria',1,'','left','members',165787,NULL,NULL,1,'/adherents/type.php?leftmenu=setup&mainmenu=members','','List','members',1,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(166087,'auguria',1,'','left','hrm',161102,NULL,NULL,1,'/holiday/list.php?&leftmenu=hrm','','CPTitreMenu','holiday',0,'hrm','$user->rights->holiday->read','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166088,'auguria',1,'','left','hrm',166087,NULL,NULL,1,'/holiday/card.php?&action=request','','MenuAddCP','holiday',1,'','$user->rights->holiday->write','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166089,'auguria',1,'','left','hrm',166087,NULL,NULL,1,'/holiday/list.php?&leftmenu=hrm','','List','holiday',1,'','$user->rights->holiday->read','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166090,'auguria',1,'','left','hrm',166089,NULL,NULL,1,'/holiday/list.php?select_statut=2&leftmenu=hrm','','ListToApprove','trips',2,'','$user->rights->holiday->read','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166091,'auguria',1,'','left','hrm',166087,NULL,NULL,2,'/holiday/define_holiday.php?&action=request','','MenuConfCP','holiday',1,'','$user->rights->holiday->define_holiday','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166092,'auguria',1,'','left','hrm',166087,NULL,NULL,3,'/holiday/view_log.php?&action=request','','MenuLogCP','holiday',1,'','$user->rights->holiday->define_holiday','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166187,'auguria',1,'','left','commercial',161092,NULL,NULL,6,'/fourn/commande/index.php?leftmenu=orders_suppliers','','SuppliersOrders','orders',0,'orders_suppliers','$user->rights->fournisseur->commande->lire','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166188,'auguria',1,'','left','commercial',166187,NULL,NULL,0,'/fourn/commande/card.php?action=create&leftmenu=orders_suppliers','','NewOrder','orders',1,'','$user->rights->fournisseur->commande->creer','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166189,'auguria',1,'','left','commercial',166187,NULL,NULL,1,'/fourn/commande/list.php?leftmenu=orders_suppliers&viewstatut=0','','List','orders',1,'','$user->rights->fournisseur->commande->lire','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166195,'auguria',1,'','left','commercial',166187,NULL,NULL,7,'/commande/stats/index.php?leftmenu=orders_suppliers&mode=supplier','','Statistics','orders',1,'','$user->rights->fournisseur->commande->lire','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166287,'auguria',1,'','left','members',161100,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=3','','MembersCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->adherent->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(166288,'auguria',1,'','left','members',166287,NULL,NULL,0,'/categories/card.php?action=create&type=3','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->adherent->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(166387,'auguria',1,'','left','hrm',161102,NULL,NULL,5,'/expensereport/index.php?leftmenu=expensereport','','TripsAndExpenses','trips',0,'expensereport','$user->rights->expensereport->lire','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166388,'auguria',1,'','left','hrm',166387,NULL,NULL,1,'/expensereport/card.php?action=create&leftmenu=expensereport','','New','trips',1,'','$user->rights->expensereport->creer','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166389,'auguria',1,'','left','hrm',166387,NULL,NULL,2,'/expensereport/list.php?leftmenu=expensereport','','List','trips',1,'','$user->rights->expensereport->lire','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166390,'auguria',1,'','left','hrm',166389,NULL,NULL,2,'/expensereport/list.php?search_status=2&leftmenu=expensereport','','ListToApprove','trips',2,'','$user->rights->expensereport->approve','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166391,'auguria',1,'','left','hrm',166387,NULL,NULL,2,'/expensereport/stats/index.php?leftmenu=expensereport','','Statistics','trips',1,'','$user->rights->expensereport->lire','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166467,'all',1,'variants','left','products',-1,'product','products',100,'/variants/list.php','','VariantAttributes','products',NULL,'product','1','$conf->product->enabled',0,'2018-01-19 11:28:04'),(166541,'all',1,'ticket','top','ticket',0,NULL,NULL,88,'/ticket/index.php','','Ticket','ticket',NULL,'1','$user->rights->ticket->read','$conf->ticket->enabled',2,'2019-06-05 09:15:29'),(166542,'all',1,'ticket','left','ticket',-1,NULL,'ticket',101,'/ticket/index.php','','Ticket','ticket',NULL,'ticket','$user->rights->ticket->read','$conf->ticket->enabled',2,'2019-06-05 09:15:29'),(166543,'all',1,'ticket','left','ticket',-1,'ticket','ticket',102,'/ticket/card.php?action=create','','NewTicket','ticket',NULL,NULL,'$user->rights->ticket->write','$conf->ticket->enabled',2,'2019-06-05 09:15:29'),(166544,'all',1,'ticket','left','ticket',-1,'ticket','ticket',103,'/ticket/list.php?search_fk_status=non_closed','','List','ticket',NULL,'ticketlist','$user->rights->ticket->read','$conf->ticket->enabled',2,'2019-06-05 09:15:29'),(166545,'all',1,'ticket','left','ticket',-1,'ticket','ticket',105,'/ticket/list.php?mode=mine&search_fk_status=non_closed','','MenuTicketMyAssign','ticket',NULL,'ticketmy','$user->rights->ticket->read','$conf->ticket->enabled',0,'2019-06-05 09:15:29'),(166546,'all',1,'ticket','left','ticket',-1,'ticket','ticket',107,'/ticket/stats/index.php','','Statistics','ticket',NULL,NULL,'$user->rights->ticket->read','$conf->ticket->enabled',0,'2019-06-05 09:15:29'),(166547,'all',1,'takepos','top','takepos',0,NULL,NULL,1001,'/takepos/takepos.php','takepos','PointOfSaleShort','cashdesk',NULL,NULL,'1','$conf->takepos->enabled',2,'2019-06-05 09:15:58'),(166919,'all',1,'supplier_proposal','left','commercial',-1,NULL,'commercial',300,'/supplier_proposal/index.php','','SupplierProposalsShort','supplier_proposal',NULL,'supplier_proposalsubmenu','$user->rights->supplier_proposal->lire','$conf->supplier_proposal->enabled',2,'2020-01-13 14:37:09'),(166920,'all',1,'supplier_proposal','left','commercial',-1,'supplier_proposalsubmenu','commercial',301,'/supplier_proposal/card.php?action=create&leftmenu=supplier_proposals','','SupplierProposalNew','supplier_proposal',NULL,NULL,'$user->rights->supplier_proposal->creer','$conf->supplier_proposal->enabled',2,'2020-01-13 14:37:09'),(166921,'all',1,'supplier_proposal','left','commercial',-1,'supplier_proposalsubmenu','commercial',302,'/supplier_proposal/list.php?leftmenu=supplier_proposals','','List','supplier_proposal',NULL,NULL,'$user->rights->supplier_proposal->lire','$conf->supplier_proposal->enabled',2,'2020-01-13 14:37:09'),(166922,'all',1,'supplier_proposal','left','commercial',-1,'supplier_proposalsubmenu','commercial',303,'/comm/propal/stats/index.php?leftmenu=supplier_proposals&mode=supplier','','Statistics','supplier_proposal',NULL,NULL,'$user->rights->supplier_proposal->lire','$conf->supplier_proposal->enabled',2,'2020-01-13 14:37:09'),(166923,'all',1,'resource','left','tools',-1,NULL,'tools',100,'/resource/list.php','','MenuResourceIndex','resource',NULL,'resource','$user->rights->resource->read','1',0,'2020-01-20 11:46:00'),(166924,'all',1,'resource','left','tools',-1,'resource','tools',101,'/resource/card.php?action=create','','MenuResourceAdd','resource',NULL,'resource_add','$user->rights->resource->write','1',0,'2020-01-20 11:46:00'),(166925,'all',1,'resource','left','tools',-1,'resource','tools',102,'/resource/list.php','','List','resource',NULL,'resource_list','$user->rights->resource->read','1',0,'2020-01-20 11:46:00'),(166951,'all',1,'agenda','top','agenda',0,NULL,NULL,86,'/comm/action/index.php','','TMenuAgenda','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-01-20 11:47:19'),(166952,'all',1,'agenda','left','agenda',166951,NULL,NULL,100,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Actions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-01-20 11:47:19'),(166953,'all',1,'agenda','left','agenda',166952,NULL,NULL,101,'/comm/action/card.php?mainmenu=agenda&leftmenu=agenda&action=create','','NewAction','commercial',NULL,NULL,'($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create)','$conf->agenda->enabled',2,'2020-01-20 11:47:19'),(166954,'all',1,'agenda','left','agenda',166952,NULL,NULL,140,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda','','Calendar','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-01-20 11:47:19'),(166955,'all',1,'agenda','left','agenda',166954,NULL,NULL,141,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-01-20 11:47:19'),(166956,'all',1,'agenda','left','agenda',166954,NULL,NULL,142,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-01-20 11:47:19'),(166957,'all',1,'agenda','left','agenda',166954,NULL,NULL,143,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2020-01-20 11:47:19'),(166958,'all',1,'agenda','left','agenda',166954,NULL,NULL,144,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2020-01-20 11:47:19'),(166959,'all',1,'agenda','left','agenda',166952,NULL,NULL,110,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda','','List','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-01-20 11:47:19'),(166960,'all',1,'agenda','left','agenda',166959,NULL,NULL,111,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-01-20 11:47:19'),(166961,'all',1,'agenda','left','agenda',166959,NULL,NULL,112,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-01-20 11:47:19'),(166962,'all',1,'agenda','left','agenda',166959,NULL,NULL,113,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2020-01-20 11:47:19'),(166963,'all',1,'agenda','left','agenda',166959,NULL,NULL,114,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2020-01-20 11:47:19'),(166964,'all',1,'agenda','left','agenda',166952,NULL,NULL,160,'/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda','','Reportings','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$conf->agenda->enabled',2,'2020-01-20 11:47:19'),(166965,'all',1,'barcode','left','tools',-1,NULL,'tools',200,'/barcode/printsheet.php?mainmenu=tools&leftmenu=barcodeprint','','BarCodePrintsheet','products',NULL,'barcodeprint','($conf->global->MAIN_USE_ADVANCED_PERMS && $user->rights->barcode->lire_advance) || (! $conf->global->MAIN_USE_ADVANCED_PERMS)','$conf->barcode->enabled',2,'2020-01-20 11:47:19'),(166966,'all',1,'barcode','left','home',-1,'admintools','home',300,'/barcode/codeinit.php?mainmenu=home&leftmenu=admintools','','MassBarcodeInit','products',NULL,NULL,'($conf->global->MAIN_USE_ADVANCED_PERMS && $user->rights->barcode->creer_advance) || (! $conf->global->MAIN_USE_ADVANCED_PERMS)','$conf->barcode->enabled && preg_match(\'/^(admintools|all)/\',$leftmenu)',0,'2020-01-20 11:47:19'),(166967,'all',1,'cron','left','home',-1,'admintools','home',200,'/cron/list.php?leftmenu=admintools','','CronList','cron',NULL,NULL,'$user->rights->cron->read','$conf->cron->enabled && preg_match(\'/^(admintools|all)/\', $leftmenu)',2,'2020-01-20 11:47:19'),(166968,'all',1,'ecm','top','ecm',0,NULL,NULL,82,'/ecm/index.php','','MenuECM','ecm',NULL,NULL,'$user->rights->ecm->read || $user->rights->ecm->upload || $user->rights->ecm->setup','$conf->ecm->enabled',2,'2020-01-20 11:47:20'),(166969,'all',1,'ecm','left','ecm',-1,NULL,'ecm',101,'/ecm/index.php?mainmenu=ecm&leftmenu=ecm','','ECMArea','ecm',NULL,'ecm','$user->rights->ecm->read || $user->rights->ecm->upload','$user->rights->ecm->read || $user->rights->ecm->upload',2,'2020-01-20 11:47:20'),(166970,'all',1,'ecm','left','ecm',-1,'ecm','ecm',102,'/ecm/index.php?action=file_manager&mainmenu=ecm&leftmenu=ecm','','ECMSectionsManual','ecm',NULL,'ecm_manual','$user->rights->ecm->read || $user->rights->ecm->upload','$user->rights->ecm->read || $user->rights->ecm->upload',2,'2020-01-20 11:47:20'),(166971,'all',1,'ecm','left','ecm',-1,'ecm','ecm',103,'/ecm/index_auto.php?action=file_manager&mainmenu=ecm&leftmenu=ecm','','ECMSectionsAuto','ecm',NULL,NULL,'$user->rights->ecm->read || $user->rights->ecm->upload','($user->rights->ecm->read || $user->rights->ecm->upload) && ! empty($conf->global->ECM_AUTO_TREE_ENABLED)',2,'2020-01-20 11:47:20'),(166972,'all',1,'opensurvey','left','tools',-1,NULL,'tools',200,'/opensurvey/index.php?mainmenu=tools&leftmenu=opensurvey','','Survey','opensurvey',NULL,'opensurvey','$user->rights->opensurvey->read','$conf->opensurvey->enabled',0,'2020-01-20 11:47:20'),(166973,'all',1,'opensurvey','left','tools',-1,'opensurvey','tools',210,'/opensurvey/wizard/index.php','','NewSurvey','opensurvey',NULL,'opensurvey_new','$user->rights->opensurvey->write','$conf->opensurvey->enabled',0,'2020-01-20 11:47:20'),(166974,'all',1,'opensurvey','left','tools',-1,'opensurvey','tools',220,'/opensurvey/list.php','','List','opensurvey',NULL,'opensurvey_list','$user->rights->opensurvey->read','$conf->opensurvey->enabled',0,'2020-01-20 11:47:20'),(166975,'all',1,'website','top','website',0,NULL,NULL,100,'/website/index.php','','WebSites','website',NULL,NULL,'$user->rights->website->read','$conf->website->enabled',2,'2020-01-20 11:47:21');
+INSERT INTO `llx_menu` VALUES (103094,'all',2,'agenda','top','agenda',0,NULL,NULL,100,'/comm/action/index.php','','Agenda','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103095,'all',2,'agenda','left','agenda',103094,NULL,NULL,100,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Actions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103096,'all',2,'agenda','left','agenda',103095,NULL,NULL,101,'/comm/action/card.php?mainmenu=agenda&leftmenu=agenda&action=create','','NewAction','commercial',NULL,NULL,'($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create)','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103097,'all',2,'agenda','left','agenda',103095,NULL,NULL,102,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Calendar','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103098,'all',2,'agenda','left','agenda',103097,NULL,NULL,103,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103099,'all',2,'agenda','left','agenda',103097,NULL,NULL,104,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103100,'all',2,'agenda','left','agenda',103097,NULL,NULL,105,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-03-13 15:29:19'),(103101,'all',2,'agenda','left','agenda',103097,NULL,NULL,106,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-03-13 15:29:19'),(103102,'all',2,'agenda','left','agenda',103095,NULL,NULL,112,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda','','List','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103103,'all',2,'agenda','left','agenda',103102,NULL,NULL,113,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103104,'all',2,'agenda','left','agenda',103102,NULL,NULL,114,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103105,'all',2,'agenda','left','agenda',103102,NULL,NULL,115,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-03-13 15:29:19'),(103106,'all',2,'agenda','left','agenda',103102,NULL,NULL,116,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-03-13 15:29:19'),(103107,'all',2,'agenda','left','agenda',103095,NULL,NULL,120,'/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda','','Reportings','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103134,'all',2,'opensurvey','top','opensurvey',0,NULL,NULL,200,'/opensurvey/index.php','','Surveys','opensurvey',NULL,NULL,'$user->rights->opensurvey->survey->read','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(103135,'all',2,'opensurvey','left','opensurvey',-1,NULL,'opensurvey',200,'/opensurvey/index.php?mainmenu=opensurvey&leftmenu=opensurvey','','Survey','opensurvey@opensurvey',NULL,'opensurvey','','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(103136,'all',2,'opensurvey','left','opensurvey',-1,'opensurvey','opensurvey',210,'/opensurvey/public/index.php','_blank','NewSurvey','opensurvey@opensurvey',NULL,'opensurvey_new','','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(103137,'all',2,'opensurvey','left','opensurvey',-1,'opensurvey','opensurvey',220,'/opensurvey/list.php','','List','opensurvey@opensurvey',NULL,'opensurvey_list','','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(145127,'all',1,'printing','left','home',-1,'admintools','home',300,'/printing/index.php?mainmenu=home&leftmenu=admintools','','MenuDirectPrinting','printing',NULL,NULL,'$user->rights->printing->read','$conf->printing->enabled && $leftmenu==\'admintools\'',0,'2017-01-29 15:12:44'),(161088,'auguria',1,'','top','home',0,NULL,NULL,10,'/index.php?mainmenu=home&leftmenu=','','Home','',-1,'','','1',2,'2017-08-30 15:14:30'),(161089,'auguria',1,'societe|fournisseur','top','companies',0,NULL,NULL,20,'/societe/index.php?mainmenu=companies&leftmenu=','','ThirdParties','companies',-1,'','$user->rights->societe->lire || $user->rights->societe->contact->lire','( ! empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || ! empty($conf->fournisseur->enabled)',2,'2017-08-30 15:14:30'),(161090,'auguria',1,'product|service','top','products',0,NULL,NULL,30,'/product/index.php?mainmenu=products&leftmenu=','','Products/Services','products',-1,'','$user->rights->produit->lire||$user->rights->service->lire','$conf->product->enabled || $conf->service->enabled',0,'2017-08-30 15:14:30'),(161092,'auguria',1,'propal|commande|fournisseur|contrat|ficheinter','top','commercial',0,NULL,NULL,40,'/comm/index.php?mainmenu=commercial&leftmenu=','','Commercial','commercial',-1,'','$user->rights->societe->lire || $user->rights->societe->contact->lire','$conf->propal->enabled || $conf->commande->enabled || $conf->supplier_order->enabled || $conf->contrat->enabled || $conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(161093,'auguria',1,'comptabilite|accounting|facture|don|tax|salaries|loan','top','accountancy',0,NULL,NULL,50,'/compta/index.php?mainmenu=accountancy&leftmenu=','','MenuFinancial','compta',-1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->plancompte->lire || $user->rights->facture->lire|| $user->rights->don->lire || $user->rights->tax->charges->lire || $user->rights->salaries->read || $user->rights->loan->read','$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->don->enabled || $conf->tax->enabled || $conf->salaries->enabled || $conf->supplier_invoice->enabled || $conf->loan->enabled',2,'2017-08-30 15:14:30'),(161094,'auguria',1,'projet','top','project',0,NULL,NULL,70,'/projet/index.php?mainmenu=project&leftmenu=','','Projects','projects',-1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(161095,'auguria',1,'mailing|export|import|opensurvey|resource','top','tools',0,NULL,NULL,90,'/core/tools.php?mainmenu=tools&leftmenu=','','Tools','other',-1,'','$user->rights->mailing->lire || $user->rights->export->lire || $user->rights->import->run || $user->rights->opensurvey->read || $user->rights->resource->read','$conf->mailing->enabled || $conf->export->enabled || $conf->import->enabled || $conf->opensurvey->enabled || $conf->resource->enabled',2,'2017-08-30 15:14:30'),(161101,'auguria',1,'banque|prelevement','top','bank',0,NULL,NULL,60,'/compta/bank/index.php?mainmenu=bank&leftmenu=bank','','MenuBankCash','banks',-1,'','$user->rights->banque->lire || $user->rights->prelevement->bons->lire','$conf->banque->enabled || $conf->prelevement->enabled',0,'2017-08-30 15:14:30'),(161102,'auguria',1,'hrm|holiday|deplacement|expensereport','top','hrm',0,NULL,NULL,80,'/hrm/index.php?mainmenu=hrm&leftmenu=','','HRM','holiday',-1,'','$user->rights->hrm->employee->read || $user->rights->holiday->write || $user->rights->deplacement->lire || $user->rights->expensereport->lire','$conf->hrm->enabled || $conf->holiday->enabled || $conf->deplacement->enabled || $conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(161177,'auguria',1,'','left','home',161088,NULL,NULL,0,'/index.php','','MyDashboard','',0,'','','1',2,'2017-08-30 15:14:30'),(161187,'auguria',1,'','left','home',161088,NULL,NULL,1,'/admin/index.php?leftmenu=setup','','Setup','admin',0,'setup','','$user->admin',2,'2017-08-30 15:14:30'),(161188,'auguria',1,'','left','home',161187,NULL,NULL,1,'/admin/company.php?leftmenu=setup','','MenuCompanySetup','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161189,'auguria',1,'','left','home',161187,NULL,NULL,4,'/admin/ihm.php?leftmenu=setup','','GUISetup','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161190,'auguria',1,'','left','home',161187,NULL,NULL,2,'/admin/modules.php?leftmenu=setup','','Modules','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161191,'auguria',1,'','left','home',161187,NULL,NULL,6,'/admin/boxes.php?leftmenu=setup','','Boxes','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161192,'auguria',1,'','left','home',161187,NULL,NULL,3,'/admin/menus.php?leftmenu=setup','','Menus','admin',1,'','','$leftmenu==\'setup\'',2,'2017-09-06 08:29:47'),(161193,'auguria',1,'','left','home',161187,NULL,NULL,7,'/admin/delais.php?leftmenu=setup','','Alerts','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161194,'auguria',1,'','left','home',161187,NULL,NULL,10,'/admin/pdf.php?leftmenu=setup','','PDF','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161195,'auguria',1,'','left','home',161187,NULL,NULL,8,'/admin/security_other.php?leftmenu=setup','','Security','admin',1,'','','$leftmenu==\'setup\'',2,'2017-09-06 08:29:36'),(161196,'auguria',1,'','left','home',161187,NULL,NULL,11,'/admin/mails.php?leftmenu=setup','','Emails','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161197,'auguria',1,'','left','home',161187,NULL,NULL,9,'/admin/limits.php?leftmenu=setup','','MenuLimits','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161198,'auguria',1,'','left','home',161187,NULL,NULL,13,'/admin/dict.php?leftmenu=setup','','Dictionary','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161199,'auguria',1,'','left','home',161187,NULL,NULL,14,'/admin/const.php?leftmenu=setup','','OtherSetup','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161200,'auguria',1,'','left','home',161187,NULL,NULL,12,'/admin/sms.php?leftmenu=setup','','SMS','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161201,'auguria',1,'','left','home',161187,NULL,NULL,4,'/admin/translation.php?leftmenu=setup','','Translation','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161288,'auguria',1,'','left','home',161387,NULL,NULL,0,'/admin/system/dolibarr.php?leftmenu=admintools','','InfoDolibarr','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161289,'auguria',1,'','left','home',161288,NULL,NULL,2,'/admin/system/modules.php?leftmenu=admintools','','Modules','admin',2,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161290,'auguria',1,'','left','home',161288,NULL,NULL,3,'/admin/triggers.php?leftmenu=admintools','','Triggers','admin',2,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161291,'auguria',1,'','left','home',161288,NULL,NULL,4,'/admin/system/filecheck.php?leftmenu=admintools','','FileCheck','admin',2,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161292,'auguria',1,'','left','home',161387,NULL,NULL,1,'/admin/system/browser.php?leftmenu=admintools','','InfoBrowser','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161293,'auguria',1,'','left','home',161387,NULL,NULL,2,'/admin/system/os.php?leftmenu=admintools','','InfoOS','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161294,'auguria',1,'','left','home',161387,NULL,NULL,3,'/admin/system/web.php?leftmenu=admintools','','InfoWebServer','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161295,'auguria',1,'','left','home',161387,NULL,NULL,4,'/admin/system/phpinfo.php?leftmenu=admintools','','InfoPHP','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161297,'auguria',1,'','left','home',161387,NULL,NULL,5,'/admin/system/database.php?leftmenu=admintools','','InfoDatabase','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161387,'auguria',1,'','left','home',161088,NULL,NULL,2,'/admin/tools/index.php?leftmenu=admintools','','AdminTools','admin',0,'admintools','','$user->admin',2,'2017-08-30 15:14:30'),(161388,'auguria',1,'','left','home',161387,NULL,NULL,6,'/admin/tools/dolibarr_export.php?leftmenu=admintools','','Backup','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161389,'auguria',1,'','left','home',161387,NULL,NULL,7,'/admin/tools/dolibarr_import.php?leftmenu=admintools','','Restore','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161392,'auguria',1,'','left','home',161387,NULL,NULL,8,'/admin/tools/update.php?leftmenu=admintools','','MenuUpgrade','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161393,'auguria',1,'','left','home',161387,NULL,NULL,9,'/admin/tools/eaccelerator.php?leftmenu=admintools','','EAccelerator','admin',1,'','','$leftmenu==\"admintools\" && function_exists(\"eaccelerator_info\")',2,'2017-08-30 15:14:30'),(161394,'auguria',1,'','left','home',161387,NULL,NULL,10,'/admin/tools/listevents.php?leftmenu=admintools','','Audit','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161395,'auguria',1,'','left','home',161387,NULL,NULL,11,'/admin/tools/listsessions.php?leftmenu=admintools','','Sessions','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161396,'auguria',1,'','left','home',161387,NULL,NULL,12,'/admin/tools/purge.php?leftmenu=admintools','','Purge','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161398,'auguria',1,'','left','home',161387,NULL,NULL,14,'/admin/system/about.php?leftmenu=admintools','','ExternalResources','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161407,'auguria',1,'','left','home',161387,NULL,NULL,15,'/product/admin/product_tools.php?mainmenu=home&leftmenu=admintools','','ProductVatMassChange','products',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161487,'auguria',1,'','left','home',161088,NULL,NULL,4,'/user/home.php?leftmenu=users','','MenuUsersAndGroups','users',0,'users','','1',2,'2017-08-30 15:14:30'),(161488,'auguria',1,'','left','home',161487,NULL,NULL,0,'/user/index.php?leftmenu=users','','Users','users',1,'','$user->rights->user->user->lire || $user->admin','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161489,'auguria',1,'','left','home',161488,NULL,NULL,0,'/user/card.php?leftmenu=users&action=create','','NewUser','users',2,'','($user->rights->user->user->creer || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161490,'auguria',1,'','left','home',161487,NULL,NULL,1,'/user/group/index.php?leftmenu=users','','Groups','users',1,'','(($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->read:$user->rights->user->user->lire) || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161491,'auguria',1,'','left','home',161490,NULL,NULL,0,'/user/group/card.php?leftmenu=users&action=create','','NewGroup','users',2,'','(($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->write:$user->rights->user->user->creer) || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161587,'auguria',1,'','left','companies',161089,NULL,NULL,0,'/societe/index.php?leftmenu=thirdparties','','ThirdParty','companies',0,'thirdparties','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161588,'auguria',1,'','left','companies',161587,NULL,NULL,0,'/societe/card.php?action=create','','MenuNewThirdParty','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161589,'auguria',1,'','left','companies',161587,NULL,NULL,0,'/societe/list.php?action=create','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161590,'auguria',1,'','left','companies',161587,NULL,NULL,5,'/societe/list.php?type=f&leftmenu=suppliers','','ListSuppliersShort','suppliers',1,'','$user->rights->societe->lire && $user->rights->fournisseur->lire','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2017-08-30 15:14:30'),(161591,'auguria',1,'','left','companies',161590,NULL,NULL,0,'/societe/card.php?leftmenu=supplier&action=create&type=f','','NewSupplier','suppliers',2,'','$user->rights->societe->creer','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2017-08-30 15:14:30'),(161593,'auguria',1,'','left','companies',161587,NULL,NULL,3,'/societe/list.php?type=p&leftmenu=prospects','','ListProspectsShort','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161594,'auguria',1,'','left','companies',161593,NULL,NULL,0,'/societe/card.php?leftmenu=prospects&action=create&type=p','','MenuNewProspect','companies',2,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161596,'auguria',1,'','left','companies',161587,NULL,NULL,4,'/societe/list.php?type=c&leftmenu=customers','','ListCustomersShort','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161597,'auguria',1,'','left','companies',161596,NULL,NULL,0,'/societe/card.php?leftmenu=customers&action=create&type=c','','MenuNewCustomer','companies',2,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161687,'auguria',1,'','left','companies',161089,NULL,NULL,1,'/contact/list.php?leftmenu=contacts','','ContactsAddresses','companies',0,'contacts','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161688,'auguria',1,'','left','companies',161687,NULL,NULL,0,'/contact/card.php?leftmenu=contacts&action=create','','NewContactAddress','companies',1,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161689,'auguria',1,'','left','companies',161687,NULL,NULL,1,'/contact/list.php?leftmenu=contacts','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161691,'auguria',1,'','left','companies',161689,NULL,NULL,1,'/contact/list.php?leftmenu=contacts&type=p','','ThirdPartyProspects','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161692,'auguria',1,'','left','companies',161689,NULL,NULL,2,'/contact/list.php?leftmenu=contacts&type=c','','ThirdPartyCustomers','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161693,'auguria',1,'','left','companies',161689,NULL,NULL,3,'/contact/list.php?leftmenu=contacts&type=f','','ThirdPartySuppliers','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2017-08-30 15:14:30'),(161694,'auguria',1,'','left','companies',161689,NULL,NULL,4,'/contact/list.php?leftmenu=contacts&type=o','','Others','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161737,'auguria',1,'','left','companies',161089,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=1','','SuppliersCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->societe->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161738,'auguria',1,'','left','companies',161737,NULL,NULL,0,'/categories/card.php?action=create&type=1','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->societe->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161747,'auguria',1,'','left','companies',161089,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=2','','CustomersProspectsCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->fournisseur->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161748,'auguria',1,'','left','companies',161747,NULL,NULL,0,'/categories/card.php?action=create&type=2','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->fournisseur->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161757,'auguria',1,'','left','companies',161089,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=4','','ContactCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->societe->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161758,'auguria',1,'','left','companies',161757,NULL,NULL,0,'/categories/card.php?action=create&type=4','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->societe->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(162187,'auguria',1,'','left','commercial',161092,NULL,NULL,4,'/comm/propal/index.php?leftmenu=propals','','Prop','propal',0,'propals','$user->rights->propale->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162188,'auguria',1,'','left','commercial',162187,NULL,NULL,0,'/comm/propal/card.php?action=create&leftmenu=propals','','NewPropal','propal',1,'','$user->rights->propale->creer','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162189,'auguria',1,'','left','commercial',162187,NULL,NULL,1,'/comm/propal/list.php?leftmenu=propals','','List','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162190,'auguria',1,'','left','commercial',162189,NULL,NULL,2,'/comm/propal/list.php?leftmenu=propals&search_status=0','','PropalsDraft','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162191,'auguria',1,'','left','commercial',162189,NULL,NULL,3,'/comm/propal/list.php?leftmenu=propals&search_status=1','','PropalsOpened','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162192,'auguria',1,'','left','commercial',162189,NULL,NULL,4,'/comm/propal/list.php?leftmenu=propals&search_status=2','','PropalStatusSigned','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162193,'auguria',1,'','left','commercial',162189,NULL,NULL,5,'/comm/propal/list.php?leftmenu=propals&search_status=3','','PropalStatusNotSigned','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162194,'auguria',1,'','left','commercial',162189,NULL,NULL,6,'/comm/propal/list.php?leftmenu=propals&search_status=4','','PropalStatusBilled','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162197,'auguria',1,'','left','commercial',162187,NULL,NULL,4,'/comm/propal/stats/index.php?leftmenu=propals','','Statistics','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162287,'auguria',1,'','left','commercial',161092,NULL,NULL,5,'/commande/index.php?leftmenu=orders','','CustomersOrders','orders',0,'orders','$user->rights->commande->lire','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162288,'auguria',1,'','left','commercial',162287,NULL,NULL,0,'/commande/card.php?action=create&leftmenu=orders','','NewOrder','orders',1,'','$user->rights->commande->creer','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162289,'auguria',1,'','left','commercial',162287,NULL,NULL,1,'/commande/list.php?leftmenu=orders','','List','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162290,'auguria',1,'','left','commercial',162289,NULL,NULL,2,'/commande/list.php?leftmenu=orders&search_status=0','','StatusOrderDraftShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162291,'auguria',1,'','left','commercial',162289,NULL,NULL,3,'/commande/list.php?leftmenu=orders&search_status=1','','StatusOrderValidated','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162292,'auguria',1,'','left','commercial',162289,NULL,NULL,4,'/commande/list.php?leftmenu=orders&search_status=2','','StatusOrderOnProcessShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162293,'auguria',1,'','left','commercial',162289,NULL,NULL,5,'/commande/list.php?leftmenu=orders&search_status=3','','StatusOrderToBill','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162294,'auguria',1,'','left','commercial',162289,NULL,NULL,6,'/commande/list.php?leftmenu=orders&search_status=4','','StatusOrderProcessed','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162295,'auguria',1,'','left','commercial',162289,NULL,NULL,7,'/commande/list.php?leftmenu=orders&search_status=-1','','StatusOrderCanceledShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162296,'auguria',1,'','left','commercial',162287,NULL,NULL,4,'/commande/stats/index.php?leftmenu=orders','','Statistics','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162387,'auguria',1,'','left','commercial',161090,NULL,NULL,6,'/expedition/index.php?leftmenu=sendings','','Shipments','sendings',0,'sendings','$user->rights->expedition->lire','$conf->expedition->enabled',2,'2017-08-30 15:14:30'),(162388,'auguria',1,'','left','commercial',162387,NULL,NULL,0,'/expedition/card.php?action=create2&leftmenu=sendings','','NewSending','sendings',1,'','$user->rights->expedition->creer','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2017-08-30 15:14:30'),(162389,'auguria',1,'','left','commercial',162387,NULL,NULL,1,'/expedition/list.php?leftmenu=sendings','','List','sendings',1,'','$user->rights->expedition->lire','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2017-08-30 15:14:30'),(162390,'auguria',1,'','left','commercial',162387,NULL,NULL,2,'/expedition/stats/index.php?leftmenu=sendings','','Statistics','sendings',1,'','$user->rights->expedition->lire','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2017-08-30 15:14:30'),(162487,'auguria',1,'','left','commercial',161092,NULL,NULL,7,'/contrat/index.php?leftmenu=contracts','','Contracts','contracts',0,'contracts','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162488,'auguria',1,'','left','commercial',162487,NULL,NULL,0,'/contrat/card.php?&action=create&leftmenu=contracts','','NewContract','contracts',1,'','$user->rights->contrat->creer','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162489,'auguria',1,'','left','commercial',162487,NULL,NULL,1,'/contrat/list.php?leftmenu=contracts','','List','contracts',1,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162490,'auguria',1,'','left','commercial',162487,NULL,NULL,2,'/contrat/services.php?leftmenu=contracts','','MenuServices','contracts',1,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162491,'auguria',1,'','left','commercial',162490,NULL,NULL,0,'/contrat/services.php?leftmenu=contracts&mode=0','','MenuInactiveServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled && $leftmenu==\"contracts\"',2,'2017-08-30 15:14:30'),(162492,'auguria',1,'','left','commercial',162490,NULL,NULL,1,'/contrat/services.php?leftmenu=contracts&mode=4','','MenuRunningServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled && $leftmenu==\"contracts\"',2,'2017-08-30 15:14:30'),(162493,'auguria',1,'','left','commercial',162490,NULL,NULL,2,'/contrat/services.php?leftmenu=contracts&mode=4&filter=expired','','MenuExpiredServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled && $leftmenu==\"contracts\"',2,'2017-08-30 15:14:30'),(162494,'auguria',1,'','left','commercial',162490,NULL,NULL,3,'/contrat/services.php?leftmenu=contracts&mode=5','','MenuClosedServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled && $leftmenu==\"contracts\"',2,'2017-08-30 15:14:30'),(162587,'auguria',1,'','left','commercial',161092,NULL,NULL,8,'/fichinter/list.php?leftmenu=ficheinter','','Interventions','interventions',0,'ficheinter','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162588,'auguria',1,'','left','commercial',162587,NULL,NULL,0,'/fichinter/card.php?action=create&leftmenu=ficheinter','','NewIntervention','interventions',1,'','$user->rights->ficheinter->creer','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162589,'auguria',1,'','left','commercial',162587,NULL,NULL,1,'/fichinter/list.php?leftmenu=ficheinter','','List','interventions',1,'','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162590,'auguria',1,'','left','commercial',162587,NULL,NULL,2,'/fichinter/stats/index.php?leftmenu=ficheinter','','Statistics','interventions',1,'','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162687,'auguria',1,'','left','accountancy',161093,NULL,NULL,3,'/fourn/facture/list.php?leftmenu=suppliers_bills','','BillsSuppliers','bills',0,'supplier_bills','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162688,'auguria',1,'','left','accountancy',162687,NULL,NULL,0,'/fourn/facture/card.php?action=create&leftmenu=suppliers_bills','','NewBill','bills',1,'','$user->rights->fournisseur->facture->creer','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162689,'auguria',1,'','left','accountancy',162687,NULL,NULL,1,'/fourn/facture/list.php?leftmenu=suppliers_bills','','List','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162690,'auguria',1,'','left','accountancy',162687,NULL,NULL,2,'/fourn/facture/paiement.php?leftmenu=suppliers_bills','','Payments','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162691,'auguria',1,'','left','accountancy',162687,NULL,NULL,8,'/compta/facture/stats/index.php?leftmenu=customers_bills&mode=supplier','','Statistics','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162692,'auguria',1,'','left','accountancy',162690,NULL,NULL,1,'/fourn/facture/rapport.php?leftmenu=suppliers_bills','','Reporting','bills',2,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162787,'auguria',1,'','left','accountancy',161093,NULL,NULL,3,'/compta/facture/list.php?leftmenu=customers_bills','','BillsCustomers','bills',0,'customer_bills','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162788,'auguria',1,'','left','accountancy',162787,NULL,NULL,3,'/compta/facture/card.php?action=create&leftmenu=customers_bills','','NewBill','bills',1,'','$user->rights->facture->creer','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162789,'auguria',1,'','left','accountancy',162787,NULL,NULL,5,'/compta/facture/fiche-rec.php?leftmenu=customers_bills','','ListOfTemplates','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162791,'auguria',1,'','left','accountancy',162787,NULL,NULL,6,'/compta/paiement/list.php?leftmenu=customers_bills','','Payments','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162792,'auguria',1,'','left','accountancy',162787,NULL,NULL,4,'/compta/facture/list.php?leftmenu=customers_bills','','List','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162797,'auguria',1,'','left','accountancy',162791,NULL,NULL,1,'/compta/paiement/rapport.php?leftmenu=customers_bills','','Reportings','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162798,'auguria',1,'','left','accountancy',161101,NULL,NULL,9,'/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank','','MenuChequeDeposits','bills',0,'checks','$user->rights->banque->lire','empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))',2,'2017-08-30 15:14:30'),(162799,'auguria',1,'','left','accountancy',162798,NULL,NULL,0,'/compta/paiement/cheque/card.php?leftmenu=checks&action=new','','NewCheckDeposit','compta',1,'','$user->rights->banque->lire','empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))',2,'2017-08-30 15:14:30'),(162800,'auguria',1,'','left','accountancy',162798,NULL,NULL,1,'/compta/paiement/cheque/list.php?leftmenu=checks','','List','bills',1,'','$user->rights->banque->lire','empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))',2,'2017-08-30 15:14:30'),(162801,'auguria',1,'','left','accountancy',162787,NULL,NULL,8,'/compta/facture/stats/index.php?leftmenu=customers_bills','','Statistics','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162807,'auguria',1,'','left','accountancy',162792,NULL,NULL,1,'/compta/facture/list.php?leftmenu=customers_bills&search_status=0','','BillShortStatusDraft','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162808,'auguria',1,'','left','accountancy',162792,NULL,NULL,2,'/compta/facture/list.php?leftmenu=customers_bills&search_status=1','','BillShortStatusNotPaid','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162809,'auguria',1,'','left','accountancy',162792,NULL,NULL,3,'/compta/facture/list.php?leftmenu=customers_bills&search_status=2','','BillShortStatusPaid','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162810,'auguria',1,'','left','accountancy',162792,NULL,NULL,4,'/compta/facture/list.php?leftmenu=customers_bills&search_status=3','','BillShortStatusCanceled','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162987,'auguria',1,'','left','accountancy',161093,NULL,NULL,3,'/commande/list.php?leftmenu=orders&search_status=3','','MenuOrdersToBill','orders',0,'orders','$user->rights->commande->lire','$conf->commande->enabled',0,'2017-08-30 15:14:30'),(163087,'auguria',1,'','left','accountancy',161093,NULL,NULL,4,'/don/index.php?leftmenu=donations&mainmenu=accountancy','','Donations','donations',0,'donations','$user->rights->don->lire','$conf->don->enabled',2,'2017-08-30 15:14:30'),(163088,'auguria',1,'','left','accountancy',163087,NULL,NULL,0,'/don/card.php?leftmenu=donations&mainmenu=accountancy&action=create','','NewDonation','donations',1,'','$user->rights->don->creer','$conf->don->enabled && $leftmenu==\"donations\"',2,'2017-08-30 15:14:30'),(163089,'auguria',1,'','left','accountancy',163087,NULL,NULL,1,'/don/list.php?leftmenu=donations&mainmenu=accountancy','','List','donations',1,'','$user->rights->don->lire','$conf->don->enabled && $leftmenu==\"donations\"',2,'2017-08-30 15:14:30'),(163187,'auguria',1,'','left','accountancy',161102,NULL,NULL,5,'/compta/deplacement/index.php?leftmenu=tripsandexpenses','','TripsAndExpenses','trips',0,'tripsandexpenses','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163188,'auguria',1,'','left','accountancy',163187,NULL,NULL,1,'/compta/deplacement/card.php?action=create&leftmenu=tripsandexpenses','','New','trips',1,'','$user->rights->deplacement->creer','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163189,'auguria',1,'','left','accountancy',163187,NULL,NULL,2,'/compta/deplacement/list.php?leftmenu=tripsandexpenses','','List','trips',1,'','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163190,'auguria',1,'','left','accountancy',163187,NULL,NULL,2,'/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses','','Statistics','trips',1,'','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163287,'auguria',1,'','left','accountancy',161093,NULL,NULL,6,'/compta/charges/index.php?leftmenu=tax&mainmenu=accountancy','','MenuSpecialExpenses','compta',0,'tax','(! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) || (! empty($conf->salaries->enabled) && $user->rights->salaries->read)','$conf->tax->enabled || $conf->salaries->enabled',0,'2017-08-30 15:14:30'),(163297,'auguria',1,'','left','accountancy',163287,NULL,NULL,1,'/compta/salaries/index.php?leftmenu=tax_salary&mainmenu=accountancy','','Salaries','salaries',1,'tax_sal','$user->rights->salaries->payment->read','$conf->salaries->enabled',0,'2017-08-30 15:14:30'),(163298,'auguria',1,'','left','accountancy',163297,NULL,NULL,2,'/compta/salaries/card.php?leftmenu=tax_salary&action=create','','NewPayment','companies',2,'','$user->rights->salaries->payment->write','$conf->salaries->enabled && $leftmenu==\"tax_salary\"',0,'2017-08-30 15:14:30'),(163299,'auguria',1,'','left','accountancy',163297,NULL,NULL,3,'/compta/salaries/index.php?leftmenu=tax_salary','','Payments','companies',2,'','$user->rights->salaries->payment->read','$conf->salaries->enabled && $leftmenu==\"tax_salary\"',0,'2017-08-30 15:14:30'),(163307,'auguria',1,'','left','accountancy',163287,NULL,NULL,1,'/loan/index.php?leftmenu=tax_loan&mainmenu=accountancy','','Loans','loan',1,'tax_loan','$user->rights->loan->read','$conf->loan->enabled',0,'2017-08-30 15:14:30'),(163308,'auguria',1,'','left','accountancy',163307,NULL,NULL,2,'/loan/card.php?leftmenu=tax_loan&action=create','','NewLoan','loan',2,'','$user->rights->loan->write','$conf->loan->enabled && $leftmenu==\"tax_loan\"',0,'2017-08-30 15:14:30'),(163310,'auguria',1,'','left','accountancy',163307,NULL,NULL,4,'/loan/calc.php?leftmenu=tax_loan','','Calculator','companies',2,'','$user->rights->loan->calc','$conf->loan->enabled && $leftmenu==\"tax_loan\" && ! empty($conf->global->LOAN_SHOW_CALCULATOR)',0,'2017-08-30 15:14:30'),(163337,'auguria',1,'','left','accountancy',163287,NULL,NULL,1,'/compta/sociales/index.php?leftmenu=tax_social','','SocialContributions','',1,'tax_social','$user->rights->tax->charges->lire','$conf->tax->enabled',0,'2017-08-30 15:14:30'),(163338,'auguria',1,'','left','accountancy',163337,NULL,NULL,2,'/compta/sociales/card.php?leftmenu=tax_social&action=create','','MenuNewSocialContribution','',2,'','$user->rights->tax->charges->creer','$conf->tax->enabled && $leftmenu==\"tax_social\"',0,'2017-08-30 15:14:30'),(163339,'auguria',1,'','left','accountancy',163337,NULL,NULL,3,'/compta/sociales/payments.php?leftmenu=tax_social&mainmenu=accountancy&mode=sconly','','Payments','',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && $leftmenu==\"tax_social\"',0,'2017-08-30 15:14:30'),(163387,'auguria',1,'','left','accountancy',163287,NULL,NULL,7,'/compta/tva/index.php?leftmenu=tax_vat&mainmenu=accountancy','','VAT','companies',1,'tax_vat','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS)',0,'2017-08-30 15:14:30'),(163388,'auguria',1,'','left','accountancy',163387,NULL,NULL,0,'/compta/tva/card.php?leftmenu=tax_vat&action=create','','New','companies',2,'','$user->rights->tax->charges->creer','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2017-08-30 15:14:30'),(163389,'auguria',1,'','left','accountancy',163387,NULL,NULL,1,'/compta/tva/reglement.php?leftmenu=tax_vat','','List','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2017-08-30 15:14:30'),(163390,'auguria',1,'','left','accountancy',163387,NULL,NULL,2,'/compta/tva/clients.php?leftmenu=tax_vat','','ReportByCustomers','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2017-08-30 15:14:30'),(163391,'auguria',1,'','left','accountancy',163387,NULL,NULL,3,'/compta/tva/quadri_detail.php?leftmenu=tax_vat','','ReportByQuarter','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2017-08-30 15:14:30'),(163487,'auguria',1,'','left','accountancy',161093,NULL,NULL,7,'/accountancy/index.php?leftmenu=accountancy','','MenuAccountancy','accountancy',0,'accounting','! empty($conf->accounting->enabled) || $user->rights->accounting->bind->write || $user->rights->accounting->bind->write || $user->rights->compta->resultat->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163488,'auguria',1,'','left','accountancy',163487,NULL,NULL,2,'/accountancy/customer/index.php?leftmenu=dispatch_customer','','CustomersVentilation','accountancy',1,'dispatch_customer','$user->rights->accounting->bind->write','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163489,'auguria',1,'','left','accountancy',163488,NULL,NULL,3,'/accountancy/customer/list.php','','ToDispatch','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $leftmenu==\"dispatch_customer\"',0,'2017-08-30 15:14:30'),(163490,'auguria',1,'','left','accountancy',163488,NULL,NULL,4,'/accountancy/customer/lines.php','','Dispatched','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $leftmenu==\"dispatch_customer\"',0,'2017-08-30 15:14:30'),(163497,'auguria',1,'','left','accountancy',163487,NULL,NULL,5,'/accountancy/supplier/index.php?leftmenu=dispatch_supplier','','SuppliersVentilation','accountancy',1,'ventil_supplier','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->fournisseur->enabled',0,'2017-08-30 15:14:30'),(163498,'auguria',1,'','left','accountancy',163497,NULL,NULL,6,'/accountancy/supplier/list.php','','ToDispatch','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->fournisseur->enabled && $leftmenu==\"dispatch_supplier\"',0,'2017-08-30 15:14:30'),(163499,'auguria',1,'','left','accountancy',163497,NULL,NULL,7,'/accountancy/supplier/lines.php','','Dispatched','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->fournisseur->enabled && $leftmenu==\"dispatch_supplier\"',0,'2017-08-30 15:14:30'),(163507,'auguria',1,'','left','accountancy',163487,NULL,NULL,5,'/accountancy/expensereport/index.php?leftmenu=dispatch_expensereport','','ExpenseReportsVentilation','accountancy',1,'ventil_expensereport','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(163508,'auguria',1,'','left','accountancy',163507,NULL,NULL,6,'/accountancy/expensereport/list.php','','ToDispatch','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->expensereport->enabled && $leftmenu==\"dispatch_expensereport\"',0,'2017-08-30 15:14:30'),(163509,'auguria',1,'','left','accountancy',163507,NULL,NULL,7,'/accountancy/expensereport/lines.php','','Dispatched','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->expensereport->enabled && $leftmenu==\"dispatch_expensereport\"',0,'2017-08-30 15:14:30'),(163517,'auguria',1,'','left','accountancy',163487,NULL,NULL,15,'/accountancy/bookkeeping/list.php','','Bookkeeping','accountancy',1,'bookkeeping','$user->rights->accounting->mouvements->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163522,'auguria',1,'','left','accountancy',163487,NULL,NULL,16,'/accountancy/bookkeeping/balance.php','','AccountBalance','accountancy',1,'balance','$user->rights->accounting->mouvements->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163527,'auguria',1,'','left','accountancy',163487,NULL,NULL,17,'/accountancy/report/result.php?mainmenu=accountancy&leftmenu=accountancy','','Reportings','main',1,'report','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163528,'auguria',1,'','left','accountancy',163527,NULL,NULL,19,'/compta/resultat/index.php?mainmenu=accountancy&leftmenu=accountancy','','ReportInOut','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163529,'auguria',1,'','left','accountancy',163528,NULL,NULL,18,'/accountancy/report/result.php?mainmenu=accountancy&leftmenu=accountancy','','ByAccounts','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163530,'auguria',1,'','left','accountancy',163528,NULL,NULL,20,'/compta/resultat/clientfourn.php?mainmenu=accountancy&leftmenu=accountancy','','ByCompanies','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163531,'auguria',1,'','left','accountancy',163527,NULL,NULL,21,'/compta/stats/index.php?mainmenu=accountancy&leftmenu=accountancy','','ReportTurnover','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163532,'auguria',1,'','left','accountancy',163531,NULL,NULL,22,'/compta/stats/casoc.php?mainmenu=accountancy&leftmenu=accountancy','','ByCompanies','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163533,'auguria',1,'','left','accountancy',163531,NULL,NULL,23,'/compta/stats/cabyuser.php?mainmenu=accountancy&leftmenu=accountancy','','ByUsers','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163534,'auguria',1,'','left','accountancy',163531,NULL,NULL,24,'/compta/stats/cabyprodserv.php?mainmenu=accountancy&leftmenu=accountancy','','ByProductsAndServices','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163537,'auguria',1,'','left','accountancy',163538,NULL,NULL,80,'/accountancy/admin/fiscalyear.php?mainmenu=accountancy&leftmenu=accountancy_admin','','FiscalPeriod','admin',1,'accountancy_admin_period','','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\" && $conf->global->MAIN_FEATURES_LEVEL > 0',2,'2017-08-30 15:14:30'),(163538,'auguria',1,'','left','accountancy',163487,NULL,NULL,1,'/accountancy/index.php?mainmenu=accountancy&leftmenu=accountancy_admin','','Setup','accountancy',1,'accountancy_admin','$user->rights->accounting->chartofaccount','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163541,'auguria',1,'','left','accountancy',163538,NULL,NULL,10,'/accountancy/admin/journals_list.php?id=35&mainmenu=accountancy&leftmenu=accountancy_admin','','AccountingJournals','accountancy',2,'accountancy_admin_journal','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163542,'auguria',1,'','left','accountancy',163538,NULL,NULL,20,'/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin','','Pcg_version','accountancy',2,'accountancy_admin_chartmodel','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163543,'auguria',1,'','left','accountancy',163538,NULL,NULL,30,'/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin','','Chartofaccounts','accountancy',2,'accountancy_admin_chart','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163544,'auguria',1,'','left','accountancy',163538,NULL,NULL,40,'/accountancy/admin/categories_list.php?id=32&mainmenu=accountancy&leftmenu=accountancy_admin','','AccountingCategory','accountancy',2,'accountancy_admin_chart_group','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163545,'auguria',1,'','left','accountancy',163538,NULL,NULL,50,'/accountancy/admin/defaultaccounts.php?mainmenu=accountancy&leftmenu=accountancy_admin','','MenuDefaultAccounts','accountancy',2,'accountancy_admin_default','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163546,'auguria',1,'','left','accountancy',163538,NULL,NULL,60,'/admin/dict.php?id=10&from=accountancy&search_country_id=__MYCOUNTRYID__&mainmenu=accountancy&leftmenu=accountancy_admin','','MenuVatAccounts','accountancy',2,'accountancy_admin_vat','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163547,'auguria',1,'','left','accountancy',163538,NULL,NULL,70,'/admin/dict.php?id=7&from=accountancy&search_country_id=__MYCOUNTRYID__&mainmenu=accountancy&leftmenu=accountancy_admin','','MenuTaxAccounts','accountancy',2,'accountancy_admin_tax','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163548,'auguria',1,'','left','accountancy',163538,NULL,NULL,80,'/admin/dict.php?id=17&from=accountancy&mainmenu=accountancy&leftmenu=accountancy_admin','','MenuExpenseReportAccounts','accountancy',2,'accountancy_admin_expensereport','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $conf->expensereport->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163549,'auguria',1,'','left','accountancy',163538,NULL,NULL,90,'/accountancy/admin/productaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin','','MenuProductsAccounts','accountancy',2,'accountancy_admin_product','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163587,'auguria',1,'','left','accountancy',161101,NULL,NULL,9,'/compta/prelevement/index.php?leftmenu=withdraw&mainmenu=bank','','StandingOrders','withdrawals',0,'withdraw','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled',2,'2017-08-30 15:14:30'),(163589,'auguria',1,'','left','accountancy',163587,NULL,NULL,0,'/compta/prelevement/create.php?leftmenu=withdraw','','NewStandingOrder','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163590,'auguria',1,'','left','accountancy',163587,NULL,NULL,2,'/compta/prelevement/bons.php?leftmenu=withdraw','','WithdrawalsReceipts','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163591,'auguria',1,'','left','accountancy',163587,NULL,NULL,3,'/compta/prelevement/list.php?leftmenu=withdraw','','WithdrawalsLines','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163593,'auguria',1,'','left','accountancy',163587,NULL,NULL,5,'/compta/prelevement/rejets.php?leftmenu=withdraw','','Rejects','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163594,'auguria',1,'','left','accountancy',163587,NULL,NULL,6,'/compta/prelevement/stats.php?leftmenu=withdraw','','Statistics','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163687,'auguria',1,'','left','accountancy',161101,NULL,NULL,1,'/compta/bank/index.php?leftmenu=bank&mainmenu=bank','','MenuBankCash','banks',0,'bank','$user->rights->banque->lire','$conf->banque->enabled',0,'2017-08-30 15:14:30'),(163688,'auguria',1,'','left','accountancy',163687,NULL,NULL,0,'/compta/bank/card.php?action=create&leftmenu=bank','','MenuNewFinancialAccount','banks',1,'','$user->rights->banque->configurer','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2017-08-30 15:14:30'),(163690,'auguria',1,'','left','accountancy',163687,NULL,NULL,2,'/compta/bank/bankentries.php?leftmenu=bank','','ListTransactions','banks',1,'','$user->rights->banque->lire','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2017-08-30 15:14:30'),(163691,'auguria',1,'','left','accountancy',163687,NULL,NULL,3,'/compta/bank/budget.php?leftmenu=bank','','ListTransactionsByCategory','banks',1,'','$user->rights->banque->lire','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2017-08-30 15:14:30'),(163693,'auguria',1,'','left','accountancy',163687,NULL,NULL,5,'/compta/bank/transfer.php?leftmenu=bank','','BankTransfers','banks',1,'','$user->rights->banque->transfer','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2017-08-30 15:14:30'),(163737,'auguria',1,'','left','accountancy',161101,NULL,NULL,4,'/categories/index.php?leftmenu=bank&type=5','','Categories','categories',0,'cat','$user->rights->categorie->lire','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(163738,'auguria',1,'','left','accountancy',163737,NULL,NULL,0,'/categories/card.php?leftmenu=bank&action=create&type=5','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(163787,'auguria',1,'','left','accountancy',161093,NULL,NULL,11,'/compta/resultat/index.php?leftmenu=ca&mainmenu=accountancy','','Reportings','main',0,'ca','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled',0,'2017-08-30 15:14:30'),(163792,'auguria',1,'','left','accountancy',163487,NULL,NULL,1,'','','Journalization','main',1,'','$user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163793,'auguria',1,'','left','accountancy',163792,NULL,NULL,4,'/accountancy/journal/sellsjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=1','','SellsJournal','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163794,'auguria',1,'','left','accountancy',163792,NULL,NULL,1,'/accountancy/journal/bankjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=3','','BankJournal','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163795,'auguria',1,'','left','accountancy',163792,NULL,NULL,2,'/accountancy/journal/expensereportsjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=6','','ExpenseReportJournal','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163796,'auguria',1,'','left','accountancy',163792,NULL,NULL,3,'/accountancy/journal/purchasesjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=2','','PurchasesJournal','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163798,'auguria',1,'','left','accountancy',163787,NULL,NULL,0,'/compta/resultat/index.php?leftmenu=ca','','ReportInOut','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163799,'auguria',1,'','left','accountancy',163788,NULL,NULL,0,'/compta/resultat/clientfourn.php?leftmenu=ca','','ByCompanies','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163800,'auguria',1,'','left','accountancy',163787,NULL,NULL,1,'/compta/stats/index.php?leftmenu=ca','','ReportTurnover','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163801,'auguria',1,'','left','accountancy',163790,NULL,NULL,0,'/compta/stats/casoc.php?leftmenu=ca','','ByCompanies','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163802,'auguria',1,'','left','accountancy',163790,NULL,NULL,1,'/compta/stats/cabyuser.php?leftmenu=ca','','ByUsers','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163803,'auguria',1,'','left','accountancy',163790,NULL,NULL,1,'/compta/stats/cabyprodserv.php?leftmenu=ca','','ByProductsAndServices','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163887,'auguria',1,'','left','products',161090,NULL,NULL,0,'/product/index.php?leftmenu=product&type=0','','Products','products',0,'product','$user->rights->produit->lire','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163888,'auguria',1,'','left','products',163887,NULL,NULL,0,'/product/card.php?leftmenu=product&action=create&type=0','','NewProduct','products',1,'','$user->rights->produit->creer','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163889,'auguria',1,'','left','products',163887,NULL,NULL,1,'/product/list.php?leftmenu=product&type=0','','List','products',1,'','$user->rights->produit->lire','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163890,'auguria',1,'','left','products',163887,NULL,NULL,4,'/product/reassort.php?type=0','','Stocks','products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163891,'auguria',1,'','left','products',163887,NULL,NULL,7,'/product/stats/card.php?id=all&leftmenu=stats&type=0','','Statistics','main',1,'','$user->rights->produit->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(163892,'auguria',1,'','left','products',163887,NULL,NULL,5,'/product/reassortlot.php?type=0','','StocksByLotSerial','products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->productbatch->enabled',2,'2017-08-30 15:14:30'),(163893,'auguria',1,'','left','products',163887,NULL,NULL,6,'/product/stock/productlot_list.php','','LotSerial','products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->productbatch->enabled',2,'2017-08-30 15:14:30'),(163987,'auguria',1,'','left','products',161090,NULL,NULL,1,'/product/index.php?leftmenu=service&type=1','','Services','products',0,'service','$user->rights->service->lire','$conf->service->enabled',2,'2017-08-30 15:14:30'),(163988,'auguria',1,'','left','products',163987,NULL,NULL,0,'/product/card.php?leftmenu=service&action=create&type=1','','NewService','products',1,'','$user->rights->service->creer','$conf->service->enabled',2,'2017-08-30 15:14:30'),(163989,'auguria',1,'','left','products',163987,NULL,NULL,1,'/product/list.php?leftmenu=service&type=1','','List','products',1,'','$user->rights->service->lire','$conf->service->enabled',2,'2017-08-30 15:14:30'),(163990,'auguria',1,'','left','products',163987,NULL,NULL,5,'/product/stats/card.php?id=all&leftmenu=stats&type=1','','Statistics','main',1,'','$user->rights->service->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(164187,'auguria',1,'','left','products',161090,NULL,NULL,3,'/product/stock/index.php?leftmenu=stock','','Stock','stocks',0,'stock','$user->rights->stock->lire','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164188,'auguria',1,'','left','products',164187,NULL,NULL,0,'/product/stock/card.php?action=create','','MenuNewWarehouse','stocks',1,'','$user->rights->stock->creer','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164189,'auguria',1,'','left','products',164187,NULL,NULL,1,'/product/stock/list.php','','List','stocks',1,'','$user->rights->stock->lire','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164191,'auguria',1,'','left','products',164187,NULL,NULL,3,'/product/stock/mouvement.php','','Movements','stocks',1,'','$user->rights->stock->mouvement->lire','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164192,'auguria',1,'','left','products',164187,NULL,NULL,4,'/product/stock/replenish.php','','Replenishments','stocks',1,'','$user->rights->stock->mouvement->creer && $user->rights->fournisseur->lire','$conf->stock->enabled && $conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(164193,'auguria',1,'','left','products',164187,NULL,NULL,5,'/product/stock/massstockmove.php','','MassStockTransferShort','stocks',1,'','$user->rights->stock->mouvement->creer','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164287,'auguria',1,'','left','products',161090,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=0','','Categories','categories',0,'cat','$user->rights->categorie->lire','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164288,'auguria',1,'','left','products',164287,NULL,NULL,0,'/categories/card.php?action=create&type=0','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164487,'auguria',1,'','left','project',161094,NULL,NULL,3,'/projet/activity/perweek.php?leftmenu=projects','','NewTimeSpent','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164687,'auguria',1,'','left','project',161094,NULL,NULL,0,'/projet/index.php?leftmenu=projects','','Projects','projects',0,'projects','$user->rights->projet->lire','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164688,'auguria',1,'','left','project',164687,NULL,NULL,1,'/projet/card.php?leftmenu=projects&action=create','','NewProject','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164689,'auguria',1,'','left','project',164687,NULL,NULL,2,'/projet/list.php?leftmenu=projects','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164690,'auguria',1,'','left','project',164687,NULL,NULL,3,'/projet/stats/index.php?leftmenu=projects','','Statistics','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164787,'auguria',1,'','left','project',161094,NULL,NULL,0,'/projet/activity/index.php?leftmenu=projects','','Activities','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164788,'auguria',1,'','left','project',164787,NULL,NULL,1,'/projet/tasks.php?leftmenu=projects&action=create','','NewTask','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164789,'auguria',1,'','left','project',164787,NULL,NULL,2,'/projet/tasks/list.php?leftmenu=projects','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164791,'auguria',1,'','left','project',164787,NULL,NULL,4,'/projet/tasks/stats/index.php?leftmenu=projects','','Statistics','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164891,'auguria',1,'','left','project',161094,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=6','','Categories','categories',0,'cat','$user->rights->categorie->lire','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164892,'auguria',1,'','left','project',164891,NULL,NULL,0,'/categories/card.php?action=create&type=6','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164987,'auguria',1,'','left','tools',161095,NULL,NULL,0,'/comm/mailing/index.php?leftmenu=mailing','','EMailings','mails',0,'mailing','$user->rights->mailing->lire','$conf->mailing->enabled',0,'2017-08-30 15:14:30'),(164988,'auguria',1,'','left','tools',164987,NULL,NULL,0,'/comm/mailing/card.php?leftmenu=mailing&action=create','','NewMailing','mails',1,'','$user->rights->mailing->creer','$conf->mailing->enabled',0,'2017-08-30 15:14:30'),(164989,'auguria',1,'','left','tools',164987,NULL,NULL,1,'/comm/mailing/list.php?leftmenu=mailing','','List','mails',1,'','$user->rights->mailing->lire','$conf->mailing->enabled',0,'2017-08-30 15:14:30'),(165187,'auguria',1,'','left','tools',161095,NULL,NULL,2,'/exports/index.php?leftmenu=export','','FormatedExport','exports',0,'export','$user->rights->export->lire','$conf->export->enabled',2,'2017-08-30 15:14:30'),(165188,'auguria',1,'','left','tools',165187,NULL,NULL,0,'/exports/export.php?leftmenu=export','','NewExport','exports',1,'','$user->rights->export->creer','$conf->export->enabled',2,'2017-08-30 15:14:30'),(165217,'auguria',1,'','left','tools',161095,NULL,NULL,2,'/imports/index.php?leftmenu=import','','FormatedImport','exports',0,'import','$user->rights->import->run','$conf->import->enabled',2,'2017-08-30 15:14:30'),(165218,'auguria',1,'','left','tools',165217,NULL,NULL,0,'/imports/import.php?leftmenu=import','','NewImport','exports',1,'','$user->rights->import->run','$conf->import->enabled',2,'2017-08-30 15:14:30'),(165287,'auguria',1,'','left','members',161100,NULL,NULL,0,'/adherents/index.php?leftmenu=members&mainmenu=members','','Members','members',0,'members','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165288,'auguria',1,'','left','members',165287,NULL,NULL,0,'/adherents/card.php?leftmenu=members&action=create','','NewMember','members',1,'','$user->rights->adherent->creer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165289,'auguria',1,'','left','members',165287,NULL,NULL,1,'/adherents/list.php','','List','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165290,'auguria',1,'','left','members',165289,NULL,NULL,2,'/adherents/list.php?leftmenu=members&statut=-1','','MenuMembersToValidate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165291,'auguria',1,'','left','members',165289,NULL,NULL,3,'/adherents/list.php?leftmenu=members&statut=1','','MenuMembersValidated','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165292,'auguria',1,'','left','members',165289,NULL,NULL,4,'/adherents/list.php?leftmenu=members&statut=1&filter=outofdate','','MenuMembersNotUpToDate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165293,'auguria',1,'','left','members',165289,NULL,NULL,5,'/adherents/list.php?leftmenu=members&statut=1&filter=uptodate','','MenuMembersUpToDate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165294,'auguria',1,'','left','members',165289,NULL,NULL,6,'/adherents/list.php?leftmenu=members&statut=0','','MenuMembersResiliated','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165295,'auguria',1,'','left','members',165287,NULL,NULL,7,'/adherents/stats/geo.php?leftmenu=members&mode=memberbycountry','','MenuMembersStats','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165387,'auguria',1,'','left','members',161100,NULL,NULL,1,'/adherents/index.php?leftmenu=members&mainmenu=members','','Subscriptions','compta',0,'','$user->rights->adherent->cotisation->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165388,'auguria',1,'','left','members',165387,NULL,NULL,0,'/adherents/list.php?statut=-1&leftmenu=accountancy&mainmenu=members','','NewSubscription','compta',1,'','$user->rights->adherent->cotisation->creer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165389,'auguria',1,'','left','members',165387,NULL,NULL,1,'/adherents/subscription/list.php?leftmenu=members','','List','compta',1,'','$user->rights->adherent->cotisation->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165390,'auguria',1,'','left','members',165387,NULL,NULL,7,'/adherents/stats/index.php?leftmenu=members','','MenuMembersStats','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165589,'auguria',1,'','left','members',165287,NULL,NULL,9,'/adherents/htpasswd.php?leftmenu=export','','Filehtpasswd','members',1,'','$user->rights->adherent->export','! empty($conf->global->MEMBER_LINK_TO_HTPASSWDFILE) && $conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165590,'auguria',1,'','left','members',165287,NULL,NULL,10,'/adherents/cartes/carte.php?leftmenu=export','','MembersCards','members',1,'','$user->rights->adherent->export','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165687,'auguria',1,'','left','hrm',161102,NULL,NULL,1,'/user/index.php?leftmenu=hrm&mode=employee','','Employees','hrm',0,'hrm','$user->rights->hrm->employee->read','$conf->hrm->enabled',0,'2017-08-30 15:14:30'),(165688,'auguria',1,'','left','hrm',165687,NULL,NULL,1,'/user/card.php?action=create&employee=1','','NewEmployee','hrm',1,'','$user->rights->hrm->employee->write','$conf->hrm->enabled',0,'2017-08-30 15:14:30'),(165689,'auguria',1,'','left','hrm',165687,NULL,NULL,2,'/user/index.php?$leftmenu=hrm&mode=employee&contextpage=employeelist','','List','hrm',1,'','$user->rights->hrm->employee->read','$conf->hrm->enabled',0,'2017-08-30 15:14:30'),(165787,'auguria',1,'','left','members',161100,NULL,NULL,5,'/adherents/type.php?leftmenu=setup&mainmenu=members','','MembersTypes','members',0,'setup','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165788,'auguria',1,'','left','members',165787,NULL,NULL,0,'/adherents/type.php?leftmenu=setup&mainmenu=members&action=create','','New','members',1,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165789,'auguria',1,'','left','members',165787,NULL,NULL,1,'/adherents/type.php?leftmenu=setup&mainmenu=members','','List','members',1,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(166087,'auguria',1,'','left','hrm',161102,NULL,NULL,1,'/holiday/list.php?&leftmenu=hrm','','CPTitreMenu','holiday',0,'hrm','$user->rights->holiday->read','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166088,'auguria',1,'','left','hrm',166087,NULL,NULL,1,'/holiday/card.php?&action=request','','MenuAddCP','holiday',1,'','$user->rights->holiday->write','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166089,'auguria',1,'','left','hrm',166087,NULL,NULL,1,'/holiday/list.php?&leftmenu=hrm','','List','holiday',1,'','$user->rights->holiday->read','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166090,'auguria',1,'','left','hrm',166089,NULL,NULL,1,'/holiday/list.php?select_statut=2&leftmenu=hrm','','ListToApprove','trips',2,'','$user->rights->holiday->read','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166091,'auguria',1,'','left','hrm',166087,NULL,NULL,2,'/holiday/define_holiday.php?&action=request','','MenuConfCP','holiday',1,'','$user->rights->holiday->define_holiday','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166092,'auguria',1,'','left','hrm',166087,NULL,NULL,3,'/holiday/view_log.php?&action=request','','MenuLogCP','holiday',1,'','$user->rights->holiday->define_holiday','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166187,'auguria',1,'','left','commercial',161092,NULL,NULL,6,'/fourn/commande/index.php?leftmenu=orders_suppliers','','SuppliersOrders','orders',0,'orders_suppliers','$user->rights->fournisseur->commande->lire','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166188,'auguria',1,'','left','commercial',166187,NULL,NULL,0,'/fourn/commande/card.php?action=create&leftmenu=orders_suppliers','','NewOrder','orders',1,'','$user->rights->fournisseur->commande->creer','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166189,'auguria',1,'','left','commercial',166187,NULL,NULL,1,'/fourn/commande/list.php?leftmenu=orders_suppliers&search_status=0','','List','orders',1,'','$user->rights->fournisseur->commande->lire','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166195,'auguria',1,'','left','commercial',166187,NULL,NULL,7,'/commande/stats/index.php?leftmenu=orders_suppliers&mode=supplier','','Statistics','orders',1,'','$user->rights->fournisseur->commande->lire','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166287,'auguria',1,'','left','members',161100,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=3','','MembersCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->adherent->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(166288,'auguria',1,'','left','members',166287,NULL,NULL,0,'/categories/card.php?action=create&type=3','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->adherent->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(166387,'auguria',1,'','left','hrm',161102,NULL,NULL,5,'/expensereport/index.php?leftmenu=expensereport','','TripsAndExpenses','trips',0,'expensereport','$user->rights->expensereport->lire','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166388,'auguria',1,'','left','hrm',166387,NULL,NULL,1,'/expensereport/card.php?action=create&leftmenu=expensereport','','New','trips',1,'','$user->rights->expensereport->creer','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166389,'auguria',1,'','left','hrm',166387,NULL,NULL,2,'/expensereport/list.php?leftmenu=expensereport','','List','trips',1,'','$user->rights->expensereport->lire','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166390,'auguria',1,'','left','hrm',166389,NULL,NULL,2,'/expensereport/list.php?search_status=2&leftmenu=expensereport','','ListToApprove','trips',2,'','$user->rights->expensereport->approve','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166391,'auguria',1,'','left','hrm',166387,NULL,NULL,2,'/expensereport/stats/index.php?leftmenu=expensereport','','Statistics','trips',1,'','$user->rights->expensereport->lire','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166467,'all',1,'variants','left','products',-1,'product','products',100,'/variants/list.php','','VariantAttributes','products',NULL,'product','1','$conf->product->enabled',0,'2018-01-19 11:28:04'),(166541,'all',1,'ticket','top','ticket',0,NULL,NULL,88,'/ticket/index.php','','Ticket','ticket',NULL,'1','$user->rights->ticket->read','$conf->ticket->enabled',2,'2019-06-05 09:15:29'),(166542,'all',1,'ticket','left','ticket',-1,NULL,'ticket',101,'/ticket/index.php','','Ticket','ticket',NULL,'ticket','$user->rights->ticket->read','$conf->ticket->enabled',2,'2019-06-05 09:15:29'),(166543,'all',1,'ticket','left','ticket',-1,'ticket','ticket',102,'/ticket/card.php?action=create','','NewTicket','ticket',NULL,NULL,'$user->rights->ticket->write','$conf->ticket->enabled',2,'2019-06-05 09:15:29'),(166544,'all',1,'ticket','left','ticket',-1,'ticket','ticket',103,'/ticket/list.php?search_fk_status=non_closed','','List','ticket',NULL,'ticketlist','$user->rights->ticket->read','$conf->ticket->enabled',2,'2019-06-05 09:15:29'),(166545,'all',1,'ticket','left','ticket',-1,'ticket','ticket',105,'/ticket/list.php?mode=mine&search_fk_status=non_closed','','MenuTicketMyAssign','ticket',NULL,'ticketmy','$user->rights->ticket->read','$conf->ticket->enabled',0,'2019-06-05 09:15:29'),(166546,'all',1,'ticket','left','ticket',-1,'ticket','ticket',107,'/ticket/stats/index.php','','Statistics','ticket',NULL,NULL,'$user->rights->ticket->read','$conf->ticket->enabled',0,'2019-06-05 09:15:29'),(166547,'all',1,'takepos','top','takepos',0,NULL,NULL,1001,'/takepos/takepos.php','takepos','PointOfSaleShort','cashdesk',NULL,NULL,'1','$conf->takepos->enabled',2,'2019-06-05 09:15:58'),(166919,'all',1,'supplier_proposal','left','commercial',-1,NULL,'commercial',300,'/supplier_proposal/index.php','','SupplierProposalsShort','supplier_proposal',NULL,'supplier_proposalsubmenu','$user->rights->supplier_proposal->lire','$conf->supplier_proposal->enabled',2,'2020-01-13 14:37:09'),(166920,'all',1,'supplier_proposal','left','commercial',-1,'supplier_proposalsubmenu','commercial',301,'/supplier_proposal/card.php?action=create&leftmenu=supplier_proposals','','SupplierProposalNew','supplier_proposal',NULL,NULL,'$user->rights->supplier_proposal->creer','$conf->supplier_proposal->enabled',2,'2020-01-13 14:37:09'),(166921,'all',1,'supplier_proposal','left','commercial',-1,'supplier_proposalsubmenu','commercial',302,'/supplier_proposal/list.php?leftmenu=supplier_proposals','','List','supplier_proposal',NULL,NULL,'$user->rights->supplier_proposal->lire','$conf->supplier_proposal->enabled',2,'2020-01-13 14:37:09'),(166922,'all',1,'supplier_proposal','left','commercial',-1,'supplier_proposalsubmenu','commercial',303,'/comm/propal/stats/index.php?leftmenu=supplier_proposals&mode=supplier','','Statistics','supplier_proposal',NULL,NULL,'$user->rights->supplier_proposal->lire','$conf->supplier_proposal->enabled',2,'2020-01-13 14:37:09'),(166923,'all',1,'resource','left','tools',-1,NULL,'tools',100,'/resource/list.php','','MenuResourceIndex','resource',NULL,'resource','$user->rights->resource->read','1',0,'2020-01-20 11:46:00'),(166924,'all',1,'resource','left','tools',-1,'resource','tools',101,'/resource/card.php?action=create','','MenuResourceAdd','resource',NULL,'resource_add','$user->rights->resource->write','1',0,'2020-01-20 11:46:00'),(166925,'all',1,'resource','left','tools',-1,'resource','tools',102,'/resource/list.php','','List','resource',NULL,'resource_list','$user->rights->resource->read','1',0,'2020-01-20 11:46:00'),(166951,'all',1,'agenda','top','agenda',0,NULL,NULL,86,'/comm/action/index.php','','TMenuAgenda','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-01-20 11:47:19'),(166952,'all',1,'agenda','left','agenda',166951,NULL,NULL,100,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Actions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-01-20 11:47:19'),(166953,'all',1,'agenda','left','agenda',166952,NULL,NULL,101,'/comm/action/card.php?mainmenu=agenda&leftmenu=agenda&action=create','','NewAction','commercial',NULL,NULL,'($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create)','$conf->agenda->enabled',2,'2020-01-20 11:47:19'),(166954,'all',1,'agenda','left','agenda',166952,NULL,NULL,140,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda','','Calendar','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-01-20 11:47:19'),(166955,'all',1,'agenda','left','agenda',166954,NULL,NULL,141,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-01-20 11:47:19'),(166956,'all',1,'agenda','left','agenda',166954,NULL,NULL,142,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-01-20 11:47:19'),(166957,'all',1,'agenda','left','agenda',166954,NULL,NULL,143,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2020-01-20 11:47:19'),(166958,'all',1,'agenda','left','agenda',166954,NULL,NULL,144,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2020-01-20 11:47:19'),(166959,'all',1,'agenda','left','agenda',166952,NULL,NULL,110,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda','','List','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-01-20 11:47:19'),(166960,'all',1,'agenda','left','agenda',166959,NULL,NULL,111,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-01-20 11:47:19'),(166961,'all',1,'agenda','left','agenda',166959,NULL,NULL,112,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-01-20 11:47:19'),(166962,'all',1,'agenda','left','agenda',166959,NULL,NULL,113,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2020-01-20 11:47:19'),(166963,'all',1,'agenda','left','agenda',166959,NULL,NULL,114,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2020-01-20 11:47:19'),(166964,'all',1,'agenda','left','agenda',166952,NULL,NULL,160,'/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda','','Reportings','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$conf->agenda->enabled',2,'2020-01-20 11:47:19'),(166965,'all',1,'barcode','left','tools',-1,NULL,'tools',200,'/barcode/printsheet.php?mainmenu=tools&leftmenu=barcodeprint','','BarCodePrintsheet','products',NULL,'barcodeprint','($conf->global->MAIN_USE_ADVANCED_PERMS && $user->rights->barcode->lire_advance) || (! $conf->global->MAIN_USE_ADVANCED_PERMS)','$conf->barcode->enabled',2,'2020-01-20 11:47:19'),(166966,'all',1,'barcode','left','home',-1,'admintools','home',300,'/barcode/codeinit.php?mainmenu=home&leftmenu=admintools','','MassBarcodeInit','products',NULL,NULL,'($conf->global->MAIN_USE_ADVANCED_PERMS && $user->rights->barcode->creer_advance) || (! $conf->global->MAIN_USE_ADVANCED_PERMS)','$conf->barcode->enabled && preg_match(\'/^(admintools|all)/\',$leftmenu)',0,'2020-01-20 11:47:19'),(166967,'all',1,'cron','left','home',-1,'admintools','home',200,'/cron/list.php?leftmenu=admintools','','CronList','cron',NULL,NULL,'$user->rights->cron->read','$conf->cron->enabled && preg_match(\'/^(admintools|all)/\', $leftmenu)',2,'2020-01-20 11:47:19'),(166968,'all',1,'ecm','top','ecm',0,NULL,NULL,82,'/ecm/index.php','','MenuECM','ecm',NULL,NULL,'$user->rights->ecm->read || $user->rights->ecm->upload || $user->rights->ecm->setup','$conf->ecm->enabled',2,'2020-01-20 11:47:20'),(166969,'all',1,'ecm','left','ecm',-1,NULL,'ecm',101,'/ecm/index.php?mainmenu=ecm&leftmenu=ecm','','ECMArea','ecm',NULL,'ecm','$user->rights->ecm->read || $user->rights->ecm->upload','$user->rights->ecm->read || $user->rights->ecm->upload',2,'2020-01-20 11:47:20'),(166970,'all',1,'ecm','left','ecm',-1,'ecm','ecm',102,'/ecm/index.php?action=file_manager&mainmenu=ecm&leftmenu=ecm','','ECMSectionsManual','ecm',NULL,'ecm_manual','$user->rights->ecm->read || $user->rights->ecm->upload','$user->rights->ecm->read || $user->rights->ecm->upload',2,'2020-01-20 11:47:20'),(166971,'all',1,'ecm','left','ecm',-1,'ecm','ecm',103,'/ecm/index_auto.php?action=file_manager&mainmenu=ecm&leftmenu=ecm','','ECMSectionsAuto','ecm',NULL,NULL,'$user->rights->ecm->read || $user->rights->ecm->upload','($user->rights->ecm->read || $user->rights->ecm->upload) && ! empty($conf->global->ECM_AUTO_TREE_ENABLED)',2,'2020-01-20 11:47:20'),(166972,'all',1,'opensurvey','left','tools',-1,NULL,'tools',200,'/opensurvey/index.php?mainmenu=tools&leftmenu=opensurvey','','Survey','opensurvey',NULL,'opensurvey','$user->rights->opensurvey->read','$conf->opensurvey->enabled',0,'2020-01-20 11:47:20'),(166973,'all',1,'opensurvey','left','tools',-1,'opensurvey','tools',210,'/opensurvey/wizard/index.php','','NewSurvey','opensurvey',NULL,'opensurvey_new','$user->rights->opensurvey->write','$conf->opensurvey->enabled',0,'2020-01-20 11:47:20'),(166974,'all',1,'opensurvey','left','tools',-1,'opensurvey','tools',220,'/opensurvey/list.php','','List','opensurvey',NULL,'opensurvey_list','$user->rights->opensurvey->read','$conf->opensurvey->enabled',0,'2020-01-20 11:47:20'),(166975,'all',1,'website','top','website',0,NULL,NULL,100,'/website/index.php','','WebSites','website',NULL,NULL,'$user->rights->website->read','$conf->website->enabled',2,'2020-01-20 11:47:21');
/*!40000 ALTER TABLE `llx_menu` ENABLE KEYS */;
UNLOCK TABLES;
diff --git a/htdocs/accountancy/admin/fiscalyear_card.php b/htdocs/accountancy/admin/fiscalyear_card.php
index facbb5052e2..88890aa004f 100644
--- a/htdocs/accountancy/admin/fiscalyear_card.php
+++ b/htdocs/accountancy/admin/fiscalyear_card.php
@@ -274,23 +274,23 @@ if ($action == 'create')
// Label
print '
';
- print $form->editfieldkey("Label", 'label', $object->label, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'alpha:32');
+ print $form->editfieldkey("Label", 'label', $object->label, $object, 1, 'alpha:32');
print ' ';
- print $form->editfieldval("Label", 'label', $object->label, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'alpha:32');
+ print $form->editfieldval("Label", 'label', $object->label, $object, 1, 'alpha:32');
print " ";
// Date start
print '';
- print $form->editfieldkey("DateStart", 'date_start', $object->date_start, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker');
+ print $form->editfieldkey("DateStart", 'date_start', $object->date_start, $object, 1, 'datepicker');
print ' ';
- print $form->editfieldval("DateStart", 'date_start', $object->date_start, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker');
+ print $form->editfieldval("DateStart", 'date_start', $object->date_start, $object, 1, 'datepicker');
print ' ';
// Date end
print '';
- print $form->editfieldkey("DateEnd", 'date_end', $object->date_end, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker');
+ print $form->editfieldkey("DateEnd", 'date_end', $object->date_end, $object, 1, 'datepicker');
print ' ';
- print $form->editfieldval("DateEnd", 'date_end', $object->date_end, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker');
+ print $form->editfieldval("DateEnd", 'date_end', $object->date_end, $object, 1, 'datepicker');
print ' ';
// Statut
diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php
index 065a72a5257..545ac855b29 100644
--- a/htdocs/accountancy/bookkeeping/list.php
+++ b/htdocs/accountancy/bookkeeping/list.php
@@ -1006,7 +1006,7 @@ while ($i < min($num, $limit))
// Amount debit
if (!empty($arrayfields['t.debit']['checked']))
{
- print ''.($line->debit ? price($line->debit) : '').' ';
+ print ''.($line->debit != 0 ? price($line->debit) : '').' ';
if (!$i) $totalarray['nbfield']++;
if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'totaldebit';
$totalarray['val']['totaldebit'] += $line->debit;
@@ -1015,7 +1015,7 @@ while ($i < min($num, $limit))
// Amount credit
if (!empty($arrayfields['t.credit']['checked']))
{
- print ''.($line->credit ? price($line->credit) : '').' ';
+ print ''.($line->credit != 0 ? price($line->credit) : '').' ';
if (!$i) $totalarray['nbfield']++;
if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'totalcredit';
$totalarray['val']['totalcredit'] += $line->credit;
diff --git a/htdocs/accountancy/supplier/lines.php b/htdocs/accountancy/supplier/lines.php
index 8d3f3937823..6d1a0ccd610 100644
--- a/htdocs/accountancy/supplier/lines.php
+++ b/htdocs/accountancy/supplier/lines.php
@@ -373,7 +373,7 @@ if ($result) {
print ''.dol_print_date($db->jdate($objp->datef), 'day').' ';
// Ref product
- print '';
+ print ' ';
if ($product_static->id > 0) print $product_static->getNomUrl(1);
if ($product_static->id > 0 && $objp->product_label) print ' ';
if ($objp->product_label) print $objp->product_label;
diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php
index 302c4410111..ce354c789f3 100644
--- a/htdocs/accountancy/supplier/list.php
+++ b/htdocs/accountancy/supplier/list.php
@@ -462,7 +462,7 @@ if ($result) {
}
} elseif ($objp->type_l == 0) {
if ($objp->country_code == $mysoc->country_code || empty($objp->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country)
- $objp->code_buy_l = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : '');
+ $objp->code_buy_l = (!empty($conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT : '');
$suggestedaccountingaccountbydefaultfor = '';
} else {
if ($isSellerInEEC && $isBuyerInEEC) { // European intravat sale
diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php
index 538e433cd16..4225dad5f31 100644
--- a/htdocs/adherents/class/adherent.class.php
+++ b/htdocs/adherents/class/adherent.class.php
@@ -273,7 +273,7 @@ class Adherent extends CommonObject
'zip' => array('type' => 'varchar(10)', 'label' => 'Zip', 'enabled' => 1, 'visible' => -1, 'position' => 80),
'town' => array('type' => 'varchar(50)', 'label' => 'Town', 'enabled' => 1, 'visible' => -1, 'position' => 85),
'state_id' => array('type' => 'integer', 'label' => 'State id', 'enabled' => 1, 'visible' => -1, 'position' => 90),
- 'country' => array('type' => 'integer', 'label' => 'Country', 'enabled' => 1, 'visible' => -1, 'position' => 95),
+ 'country' => array('type' => 'integer:Ccountry:core/class/ccountry.class.php', 'label' => 'Country', 'enabled' => 1, 'visible' => -1, 'position' => 95),
'email' => array('type' => 'varchar(255)', 'label' => 'Email', 'enabled' => 1, 'visible' => -1, 'position' => 100),
'socialnetworks' => array('type' => 'text', 'label' => 'Socialnetworks', 'enabled' => 1, 'visible' => -1, 'position' => 105),
'phone' => array('type' => 'varchar(30)', 'label' => 'Phone', 'enabled' => 1, 'visible' => -1, 'position' => 115),
diff --git a/htdocs/adherents/class/api_members.class.php b/htdocs/adherents/class/api_members.class.php
index bbc03c3387f..8e2e0d278f0 100644
--- a/htdocs/adherents/class/api_members.class.php
+++ b/htdocs/adherents/class/api_members.class.php
@@ -86,13 +86,14 @@ class Members extends DolibarrApi
* @param int $limit Limit for list
* @param int $page Page number
* @param string $typeid ID of the type of member
+ * @param int $category Use this param to filter list by category
* @param string $sqlfilters Other criteria to filter answers separated by a comma.
* Example: "(t.ref:like:'SO-%') and ((t.date_creation:<:'20160101') or (t.nature:is:NULL))"
* @return array Array of member objects
*
* @throws RestException
*/
- public function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $typeid = '', $sqlfilters = '')
+ public function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $typeid = '', $category = 0, $sqlfilters = '')
{
global $db, $conf;
@@ -104,11 +105,19 @@ class Members extends DolibarrApi
$sql = "SELECT t.rowid";
$sql .= " FROM ".MAIN_DB_PREFIX."adherent as t";
+ if ($category > 0) {
+ $sql .= ", ".MAIN_DB_PREFIX."categorie_member as c";
+ }
$sql .= ' WHERE t.entity IN ('.getEntity('adherent').')';
if (!empty($typeid))
{
$sql .= ' AND t.fk_adherent_type='.$typeid;
}
+ // Select members of given category
+ if ($category > 0) {
+ $sql .= " AND c.fk_categorie = ".$db->escape($category);
+ $sql .= " AND c.fk_member = t.rowid ";
+ }
// Add sql filters
if ($sqlfilters)
{
diff --git a/htdocs/adherents/document.php b/htdocs/adherents/document.php
index cc3e06207be..05ccf20169c 100644
--- a/htdocs/adherents/document.php
+++ b/htdocs/adherents/document.php
@@ -45,11 +45,12 @@ $confirm = GETPOST('confirm', 'alpha');
$result = restrictedArea($user, 'adherent', $id);
// Get parameters
+$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
-$offset = $conf->liste_limit * $page;
+$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (!$sortorder) $sortorder = "ASC";
diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php
index 0a9fc7cd2c6..7ed417750a7 100644
--- a/htdocs/adherents/list.php
+++ b/htdocs/adherents/list.php
@@ -425,10 +425,9 @@ print ' ';
print ' ';
print ' ';
-print ' ';
print ' ';
-print_barre_liste($titre, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'members', 0, $newcardbutton, '', $limit);
+print_barre_liste($titre, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'members', 0, $newcardbutton, '', $limit, 0, 0, 1);
$topicmail = "Information";
$modelmail = "member";
@@ -950,8 +949,6 @@ print "\n";
print "";
print '';
-if ($num > $limit || $page) print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'generic', 0, '', '', $limit, 1);
-
// End of page
llxFooter();
$db->close();
diff --git a/htdocs/adherents/stats/byproperties.php b/htdocs/adherents/stats/byproperties.php
index abc9b6d80a7..7927c2e3f00 100644
--- a/htdocs/adherents/stats/byproperties.php
+++ b/htdocs/adherents/stats/byproperties.php
@@ -58,7 +58,7 @@ llxHeader('', $langs->trans("MembersStatisticsByProperties"), '', '', 0, 0, arra
$title = $langs->trans("MembersStatisticsByProperties");
-print load_fiche_titre($title, '');
+print load_fiche_titre($title, '', 'object_group');
dol_mkdir($dir);
@@ -113,7 +113,8 @@ if (!count($data))
}
else
{
- print load_fiche_titre($langs->trans("MembersByNature"), '', '');
+ print $langs->trans("MembersByNature").' ';
+ print ' ';
}
// Print array
diff --git a/htdocs/adherents/stats/geo.php b/htdocs/adherents/stats/geo.php
index 683ae558d28..5b51008a9a2 100644
--- a/htdocs/adherents/stats/geo.php
+++ b/htdocs/adherents/stats/geo.php
@@ -64,7 +64,7 @@ if ($mode == 'memberbyregion') $title = $langs->trans("MembersStatisticsByRegion
llxHeader('', $title, '', '', 0, 0, $arrayjs);
-print load_fiche_titre($title, $mesg);
+print load_fiche_titre($title, '', 'object_group');
dol_mkdir($dir);
diff --git a/htdocs/adherents/subscription/list.php b/htdocs/adherents/subscription/list.php
index b9f5611f7e8..faba2c50ac2 100644
--- a/htdocs/adherents/subscription/list.php
+++ b/htdocs/adherents/subscription/list.php
@@ -259,10 +259,9 @@ print ' ';
print ' ';
print ' ';
-print ' ';
print ' ';
-print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'members', 0, $newcardbutton, '', $limit);
+print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'members', 0, $newcardbutton, '', $limit, 0, 0, 1);
$topicmail = "Information";
$modelmail = "subscription";
diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php
index 969117c4bdc..c190398c1db 100644
--- a/htdocs/adherents/type.php
+++ b/htdocs/adherents/type.php
@@ -6,6 +6,7 @@
* Copyright (C) 2013 Florian Henry
* Copyright (C) 2015 Alexandre Spangaro
* Copyright (C) 2019 Thibault Foucart
+ * Copyright (C) 2020 Josep Lluís Amador
*
* 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
@@ -239,6 +240,8 @@ if (!$rowid && $action != 'create' && $action != 'edit')
$i = 0;
$param = '';
+ if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.$contextpage;
+ if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.$limit;
$newcardbutton = '';
if ($user->rights->adherent->configurer)
@@ -252,10 +255,9 @@ if (!$rowid && $action != 'create' && $action != 'edit')
print ' ';
print ' ';
print ' ';
- print ' ';
print ' ';
- print_barre_liste($langs->trans("MembersTypes"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'members', 0, $newcardbutton, '', $limit);
+ print_barre_liste($langs->trans("MembersTypes"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'members', 0, $newcardbutton, '', $limit, 0, 0, 1);
$moreforfilter = '';
@@ -375,13 +377,8 @@ if ($action == 'create')
print ' ';
// Other attributes
- $parameters = array();
- $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
- print $hookmanager->resPrint;
- if (empty($reshook))
- {
- print $object->showOptionals($extrafields, 'edit', $parameters);
- }
+ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php';
+
print '';
print "\n";
@@ -822,15 +819,6 @@ if ($rowid > 0)
// Other attributes
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_edit.tpl.php';
- // Other attributes
- $parameters = array();
- $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
- print $hookmanager->resPrint;
- if (empty($reshook))
- {
- print $object->showOptionals($extrafields, 'edit', $parameters);
- }
-
print '';
dol_fiche_end();
diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php
index e8163c72f56..76f04d94c15 100644
--- a/htdocs/admin/commande.php
+++ b/htdocs/admin/commande.php
@@ -192,7 +192,8 @@ elseif ($action == 'set_ORDER_FREE_TEXT')
{
setEventMessages($langs->trans("Error"), null, 'errors');
}
-} elseif ($action == "setshippableiconinlist") {
+}
+elseif ($action == "setshippableiconinlist") {
// Activate Set Shippable Icon In List
$setshippableiconinlist = GETPOST('value', 'int');
$res = dolibarr_set_const($db, "SHIPPABLE_ORDER_ICON_IN_LIST", $setshippableiconinlist, 'yesno', 0, '', $conf->entity);
@@ -203,6 +204,25 @@ elseif ($action == 'set_ORDER_FREE_TEXT')
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
+elseif ($action == 'setribchq')
+{
+ $rib = GETPOST('rib', 'alpha');
+ $chq = GETPOST('chq', 'alpha');
+
+ $res = dolibarr_set_const($db, "FACTURE_RIB_NUMBER", $rib, 'chaine', 0, '', $conf->entity);
+ $res = dolibarr_set_const($db, "FACTURE_CHQ_NUMBER", $chq, 'chaine', 0, '', $conf->entity);
+
+ if (!$res > 0) $error++;
+
+ if (!$error)
+ {
+ setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
+ }
+ else
+ {
+ setEventMessages($langs->trans("Error"), null, 'errors');
+ }
+}
// Activate ask for payment bank
elseif ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_ORDER')
@@ -517,7 +537,122 @@ foreach ($dirmodels as $reldir)
}
print '';
-print " ";
+
+
+/*
+ * Payment mode
+ */
+
+print ' ';
+print load_fiche_titre($langs->trans("SuggestedPaymentModesIfNotDefinedInOrder"), '', '');
+
+print '";
+
+
+print ' ';
/*
* Other options
diff --git a/htdocs/admin/const.php b/htdocs/admin/const.php
index e228ab58e8a..9f3accfe549 100644
--- a/htdocs/admin/const.php
+++ b/htdocs/admin/const.php
@@ -208,18 +208,18 @@ if (!empty($conf->multicompany->enabled) && !$user->entity)
{
print getTitleFieldOfList('Entity', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ')."\n";
}
-print getTitleFieldOfList("Action", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'center ');
+print getTitleFieldOfList("", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'center ');
print "\n";
// Line to add new record
print "\n";
-print ' '."\n";
+print ' '."\n";
print '';
-print ' ';
+print ' ';
print ' ';
-print ' ';
+print ' ';
print ' ';
print '';
print ' ';
diff --git a/htdocs/admin/events.php b/htdocs/admin/events.php
index c3b9b372915..75976f0b07b 100644
--- a/htdocs/admin/events.php
+++ b/htdocs/admin/events.php
@@ -37,7 +37,7 @@ $langs->loadLangs(array("users", "admin", "other"));
$action = GETPOST('action', 'aZ09');
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'myobjectlist'; // To manage different context of search
-$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
+$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
// Load variable for pagination
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
diff --git a/htdocs/admin/external_rss.php b/htdocs/admin/external_rss.php
index f2412175880..cc2edb550a0 100644
--- a/htdocs/admin/external_rss.php
+++ b/htdocs/admin/external_rss.php
@@ -6,6 +6,7 @@
* Copyright (C) 2004 Benoit Mortier
* Copyright (C) 2005-2011 Regis Houssin
* Copyright (C) 2011 Juanjo Menent
+ * Copyright (C) 2020 Tobias Sekan
*
* 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
@@ -30,6 +31,7 @@
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/rssparser.class.php';
+require_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php';
// Load translation files required by the page
$langs->load("admin");
@@ -222,10 +224,13 @@ print '';
print ' ';
print ' ';
print ' ';
-print '
';
+print '';
print '';
+print ' ';
+print ''.$langs->trans('RssNote').' - '.$langs->trans('JumpToBoxes').' ';
+print ' ';
$sql = "SELECT rowid, file, note FROM ".MAIN_DB_PREFIX."boxes_def";
$sql .= " WHERE file = 'box_external_rss.php'";
@@ -235,8 +240,9 @@ dol_syslog("select rss boxes", LOG_DEBUG);
$resql = $db->query($sql);
if ($resql)
{
- $num = $db->num_rows($resql);
- $i = 0;
+ $boxlist = InfoBox::listBoxes($db, 'activated', -1, null);
+ $num = $db->num_rows($resql);
+ $i = 0;
while ($i < $num)
{
@@ -252,32 +258,32 @@ if ($resql)
$result = $rssparser->parser($conf->global->$keyrssurl, 5, 300, $conf->externalrss->dir_temp);
print " ";
- print ""."\n";
$i++;
}
@@ -327,3 +340,23 @@ else
// End of page
llxFooter();
$db->close();
+
+/**
+ * Check if the given RSS feed if inside the list of boxes/widgets
+ *
+ * @param int $idrss The id of the RSS feed
+ * @param array $boxlist A list with boxes/widgets
+ * @return bool true if the rss feed is inside the box/widget list, otherwise false
+ */
+function _isInBoxList($idrss, array $boxlist)
+{
+ foreach($boxlist as $box)
+ {
+ if($box->boxcode === "lastrssinfos" && strpos($box->note, $idrss) !== false)
+ {
+ return true;
+ }
+ }
+
+ return false;
+}
diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php
index 8d917088d51..1a484ec8c7e 100644
--- a/htdocs/admin/facture.php
+++ b/htdocs/admin/facture.php
@@ -643,7 +643,7 @@ if (!empty($conf->global->INVOICE_USE_DEFAULT_DOCUMENT)) // Hidden conf
}
/*
- * Modes de reglement
+ * Payment modes
*/
print ' ';
print load_fiche_titre($langs->trans("SuggestedPaymentModesIfNotDefinedInInvoice"), '', '');
diff --git a/htdocs/admin/facture_situation.php b/htdocs/admin/facture_situation.php
index f565169b111..ce327cc5187 100644
--- a/htdocs/admin/facture_situation.php
+++ b/htdocs/admin/facture_situation.php
@@ -36,13 +36,13 @@ require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
// Load translation files required by the page
$langs->loadLangs(array('admin', 'errors', 'other', 'bills'));
-if (!$user->admin) accessforbidden();
+if (! $user->admin) accessforbidden();
$action = GETPOST('action', 'alpha');
$value = GETPOST('value', 'alpha');
$label = GETPOST('label', 'alpha');
$scandir = GETPOST('scan_dir', 'alpha');
-$type = 'invoice';
+$type='invoice';
/*
@@ -57,17 +57,17 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
* View
*/
-$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
+$dirmodels=array_merge(array('/'), (array) $conf->modules_parts['models']);
llxHeader(
"", $langs->trans("BillsSetup"),
'EN:Invoice_Configuration|FR:Configuration_module_facture|ES:ConfiguracionFactura'
);
-$form = new Form($db);
+$form=new Form($db);
-$linkback = ''.$langs->trans("BackToModuleList").' ';
+$linkback=''.$langs->trans("BackToModuleList").' ';
print load_fiche_titre($langs->trans("BillsSetup"), $linkback, 'title_setup');
$head = invoice_admin_prepare_head();
@@ -96,7 +96,26 @@ print " \n";
_printOnOff('INVOICE_USE_SITUATION', $langs->trans('UseSituationInvoices'));
_printOnOff('INVOICE_USE_SITUATION_CREDIT_NOTE', $langs->trans('UseSituationInvoicesCreditNote'));
-_printOnOff('INVOICE_USE_SITUATION_RETAINED_WARRANTY', $langs->trans('Retainedwarranty'));
+//_printOnOff('INVOICE_USE_RETAINED_WARRANTY', $langs->trans('Retainedwarranty'));
+
+$confkey = 'INVOICE_USE_RETAINED_WARRANTY';
+
+$arrayAvailableType = array(
+ Facture::TYPE_SITUATION => $langs->trans("InvoiceSituation"),
+ Facture::TYPE_STANDARD.'+'.Facture::TYPE_SITUATION => $langs->trans("InvoiceSituation").' + '.$langs->trans("InvoiceStandard"),
+);
+$selected = array();
+$implodeglue = '+';
+if(!empty($conf->global->{$confkey}) && !is_array($conf->global->{$confkey})){
+ $selected = explode('+', $conf->global->{$confkey});
+}
+
+$curentInput = (empty($inputCount)?1:($inputCount+1));
+$formSelectInvoiceType = $form->selectarray('value'. $curentInput, $arrayAvailableType, $selected, 1);
+_printInputFormPart($confkey, $langs->trans('AllowedInvoiceForRetainedWarranty'), '', array(), $formSelectInvoiceType);
+
+//_printOnOff('INVOICE_RETAINED_WARRANTY_LIMITED_TO_SITUATION', $langs->trans('RetainedwarrantyOnlyForSituation'));
+_printOnOff('INVOICE_RETAINED_WARRANTY_LIMITED_TO_FINAL_SITUATION', $langs->trans('RetainedwarrantyOnlyForSituationFinal'));
$metas = array(
'type' => 'number',
@@ -107,7 +126,7 @@ $metas = array(
_printInputFormPart('INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_PERCENT', $langs->trans('RetainedwarrantyDefaultPercent'), '', $metas);
// Conditions paiements
-$inputCount = empty($inputCount) ? 1 : ($inputCount + 1);
+$inputCount = empty($inputCount)?1:($inputCount+1);
print '';
print ''.$langs->trans('PaymentConditionsShortRetainedWarranty').' ';
print ' ';
@@ -159,7 +178,7 @@ function _printOnOff($confkey, $title = false, $desc = '')
global $langs;
print ' ';
- print ''.($title ? $title : $langs->trans($confkey));
+ print ' '.($title?$title:$langs->trans($confkey));
if (!empty($desc)) {
print ''.$langs->trans($desc).' ';
}
@@ -187,14 +206,14 @@ function _printInputFormPart($confkey, $title = false, $desc = '', $metas = arra
{
global $langs, $conf, $db, $inputCount;
- $inputCount = empty($inputCount) ? 1 : ($inputCount + 1);
- $form = new Form($db);
+ $inputCount = empty($inputCount)?1:($inputCount+1);
+ $form=new Form($db);
$defaultMetas = array(
'name' => 'value'.$inputCount
);
- if ($type != 'textarea') {
+ if ($type!='textarea') {
$defaultMetas['type'] = 'text';
$defaultMetas['value'] = $conf->global->{$confkey};
}
@@ -210,9 +229,9 @@ function _printInputFormPart($confkey, $title = false, $desc = '', $metas = arra
print ' ';
if (!empty($help)) {
- print $form->textwithtooltip(($title ? $title : $langs->trans($confkey)), $langs->trans($help), 2, 1, img_help(1, ''));
+ print $form->textwithtooltip(($title?$title:$langs->trans($confkey)), $langs->trans($help), 2, 1, img_help(1, ''));
} else {
- print $title ? $title : $langs->trans($confkey);
+ print $title?$title:$langs->trans($confkey);
}
if (!empty($desc)) {
@@ -225,10 +244,14 @@ function _printInputFormPart($confkey, $title = false, $desc = '', $metas = arra
print ' ';
print ' ';
- if ($type == 'textarea') {
+ if ($type=='textarea') {
print '';
- } else {
+ }elseif($type=='input'){
print ' ';
+ }
+ else{
+ // custom
+ print $type;
}
print ' ';
}
diff --git a/htdocs/admin/ldap.php b/htdocs/admin/ldap.php
index 83505747fcd..bd24e793374 100644
--- a/htdocs/admin/ldap.php
+++ b/htdocs/admin/ldap.php
@@ -3,7 +3,7 @@
* Copyright (C) 2004 Sebastien Di Cintio
* Copyright (C) 2004 Benoit Mortier
* Copyright (C) 2005-2017 Regis Houssin
- * Copyright (C) 2006-2011 Laurent Destailleur
+ * Copyright (C) 2006-2020 Laurent Destailleur
* Copyright (C) 2011-2013 Juanjo Menent
*
* This program is free software; you can redistribute it and/or modify
@@ -23,7 +23,7 @@
/**
* \file htdocs/admin/ldap.php
* \ingroup ldap
- * \brief Page d'administration/configuration du module Ldap
+ * \brief Page to setup module LDAP
*/
require '../main.inc.php';
@@ -57,19 +57,20 @@ if (empty($reshook))
$error = 0;
$db->begin();
- if (!dolibarr_set_const($db, 'LDAP_SERVER_TYPE', GETPOST("type"), 'chaine', 0, '', $conf->entity)) $error++;
- if (!dolibarr_set_const($db, 'LDAP_SERVER_PROTOCOLVERSION', GETPOST("LDAP_SERVER_PROTOCOLVERSION"), 'chaine', 0, '', $conf->entity)) $error++;
- if (!dolibarr_set_const($db, 'LDAP_SERVER_HOST', GETPOST("host"), 'chaine', 0, '', $conf->entity)) $error++;
- if (!dolibarr_set_const($db, 'LDAP_SERVER_HOST_SLAVE', GETPOST("slave"), 'chaine', 0, '', $conf->entity)) $error++;
- if (!dolibarr_set_const($db, 'LDAP_SERVER_PORT', GETPOST("port"), 'chaine', 0, '', $conf->entity)) $error++;
- if (!dolibarr_set_const($db, 'LDAP_SERVER_DN', GETPOST("dn"), 'chaine', 0, '', $conf->entity)) $error++;
- if (!dolibarr_set_const($db, 'LDAP_ADMIN_DN', GETPOST("admin"), 'chaine', 0, '', $conf->entity)) $error++;
- if (!dolibarr_set_const($db, 'LDAP_ADMIN_PASS', GETPOST("pass"), 'chaine', 0, '', $conf->entity)) $error++;
- if (!dolibarr_set_const($db, 'LDAP_SERVER_USE_TLS', GETPOST("usetls"), 'chaine', 0, '', $conf->entity)) $error++;
- if (!dolibarr_set_const($db, 'LDAP_SYNCHRO_ACTIVE', GETPOST("activesynchro"), 'chaine', 0, '', $conf->entity)) $error++;
- if (!dolibarr_set_const($db, 'LDAP_CONTACT_ACTIVE', GETPOST("activecontact"), 'chaine', 0, '', $conf->entity)) $error++;
- if (!dolibarr_set_const($db, 'LDAP_MEMBER_ACTIVE', GETPOST("activemembers"), 'chaine', 0, '', $conf->entity)) $error++;
- if (!dolibarr_set_const($db, 'LDAP_MEMBER_TYPE_ACTIVE', GETPOST("activememberstypes"), 'chaine', 0, '', $conf->entity)) $error++;
+
+ if (!dolibarr_set_const($db, 'LDAP_SERVER_TYPE', GETPOST("type", 'aZ09'), 'chaine', 0, '', $conf->entity)) $error++;
+ if (!dolibarr_set_const($db, 'LDAP_SERVER_PROTOCOLVERSION', GETPOST("LDAP_SERVER_PROTOCOLVERSION", 'aZ09'), 'chaine', 0, '', $conf->entity)) $error++;
+ if (!dolibarr_set_const($db, 'LDAP_SERVER_HOST', GETPOST("host", 'alphanohtml'), 'chaine', 0, '', $conf->entity)) $error++;
+ if (!dolibarr_set_const($db, 'LDAP_SERVER_HOST_SLAVE', GETPOST("slave", 'alphanohtml'), 'chaine', 0, '', $conf->entity)) $error++;
+ if (!dolibarr_set_const($db, 'LDAP_SERVER_PORT', GETPOST("port", 'int'), 'chaine', 0, '', $conf->entity)) $error++;
+ if (!dolibarr_set_const($db, 'LDAP_SERVER_DN', GETPOST("dn", 'alphanohtml'), 'chaine', 0, '', $conf->entity)) $error++;
+ if (!dolibarr_set_const($db, 'LDAP_ADMIN_DN', GETPOST("admin", 'alphanohtml'), 'chaine', 0, '', $conf->entity)) $error++;
+ if (!dolibarr_set_const($db, 'LDAP_ADMIN_PASS', GETPOST("pass", 'none'), 'chaine', 0, '', $conf->entity)) $error++;
+ if (!dolibarr_set_const($db, 'LDAP_SERVER_USE_TLS', GETPOST("usetls", 'aZ09'), 'chaine', 0, '', $conf->entity)) $error++;
+ if (!dolibarr_set_const($db, 'LDAP_SYNCHRO_ACTIVE', GETPOST("activesynchro", 'aZ09'), 'chaine', 0, '', $conf->entity)) $error++;
+ if (!dolibarr_set_const($db, 'LDAP_CONTACT_ACTIVE', GETPOST("activecontact", 'aZ09'), 'chaine', 0, '', $conf->entity)) $error++;
+ if (!dolibarr_set_const($db, 'LDAP_MEMBER_ACTIVE', GETPOST("activemembers", 'aZ09'), 'chaine', 0, '', $conf->entity)) $error++;
+ if (!dolibarr_set_const($db, 'LDAP_MEMBER_TYPE_ACTIVE', GETPOST("activememberstypes", 'aZ09'), 'chaine', 0, '', $conf->entity)) $error++;
if (!$error)
{
diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php
index f2d27cf2849..cc8a92f819b 100644
--- a/htdocs/admin/mails_templates.php
+++ b/htdocs/admin/mails_templates.php
@@ -754,9 +754,9 @@ if ($resql)
print '';
print ' ';
print ' ';
- print ' ';
+ print ' ';
print '
';
- print ' ';
+ print ' ';
print ' ';
$fieldsforcontent = array('topic', 'joinfiles', 'content');
@@ -902,10 +902,10 @@ if ($resql)
// Modify link / Delete link
print '';
- if ($canbemodified) print ''.img_edit().' ';
+ if ($canbemodified) print ''.img_edit().' ';
if ($iserasable)
{
- print ' '.img_delete().' ';
+ print ''.img_delete().' ';
//else print ''.img_delete().' '; // Some dictionary can be edited by other profile than admin
}
print ' ';
diff --git a/htdocs/admin/modulehelp.php b/htdocs/admin/modulehelp.php
index 5a444c92ae1..339b98be44a 100644
--- a/htdocs/admin/modulehelp.php
+++ b/htdocs/admin/modulehelp.php
@@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
// Load translation files required by the page
-$langs->loadLangs(array('errors', 'admin'));
+$langs->loadLangs(array('errors', 'admin', 'modulebuilder'));
$mode = GETPOST('mode', 'alpha');
$action = GETPOST('action', 'alpha');
@@ -318,10 +318,13 @@ if ($mode == 'desc')
$text .= ''.$langs->trans("Version").': '.$version;
+ $moduledescriptorfile = get_class($objMod).'.class.php';
+ $text .= ''.$langs->trans("DescriptorFile").': '.$moduledescriptorfile;
+
$textexternal = '';
if ($objMod->isCoreOrExternalModule() == 'external')
{
- $textexternal .= ''.$langs->trans("Origin").': '.$langs->trans("ExternalModule", $dirofmodule);
+ $textexternal .= ''.$langs->trans("Origin").': '.$langs->trans("ExternalModule").' - '.$langs->trans("InstalledInto", $dirofmodule);
if ($objMod->editor_name != 'dolibarr') $textexternal .= ''.$langs->trans("Publisher").': '.(empty($objMod->editor_name) ? $langs->trans("Unknown") : $objMod->editor_name);
$editor_url = $objMod->editor_url;
if (!preg_match('/^http/', $editor_url)) $editor_url = 'http://'.$editor_url;
diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php
index 9608b0270a3..926a4c34f70 100644
--- a/htdocs/admin/modules.php
+++ b/htdocs/admin/modules.php
@@ -482,8 +482,8 @@ if ($nbofactivatedmodules <= 1) $moreinfo .= ' '.img_warning($langs->trans("YouM
print load_fiche_titre($langs->trans("ModulesSetup"), '', 'title_setup');
// Start to show page
-if ($mode == 'common') print ''.$langs->trans("ModulesDesc")." \n";
-if ($mode == 'commonkanban') print ''.$langs->trans("ModulesDesc")." \n";
+if ($mode == 'common') print ''.$langs->trans("ModulesDesc", img_picto('', 'switch_off'))." \n";
+if ($mode == 'commonkanban') print ''.$langs->trans("ModulesDesc", img_picto('', 'switch_off'))." \n";
if ($mode == 'marketplace') print ''.$langs->trans("ModulesMarketPlaceDesc")." \n";
if ($mode == 'deploy') print ''.$langs->trans("ModulesDeployDesc", $langs->transnoentitiesnoconv("AvailableModules"))." \n";
if ($mode == 'develop') print ''.$langs->trans("ModulesDevelopDesc")." \n";
@@ -541,8 +541,8 @@ if ($mode == 'common' || $mode == 'commonkanban')
$moreforfilter .= '';
$moreforfilter .= '';
- $moreforfilter .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-list-alt paddingleft imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.$param, '', 1, array('morecss'=>'reposition'));
$moreforfilter .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list paddingleft imgforviewmode', $_SERVER["PHP_SELF"].'?mode=commonkanban'.$param, '', 1, array('morecss'=>'reposition'));
+ $moreforfilter .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-list-alt paddingleft imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.$param, '', 1, array('morecss'=>'reposition'));
$moreforfilter .= '
';
$moreforfilter .= ''.$moreinfo.'
';
@@ -868,7 +868,7 @@ if ($mode == 'common' || $mode == 'commonkanban')
// Help
print '';
//print $form->textwithpicto('', $text, 1, $imginfo, 'minheight20', 0, 2, 1);
- print ''.img_picto($langs->trans("ClickToShowDescription"), $imginfo).' ';
+ print ''.img_picto(($objMod->isCoreOrExternalModule() == 'external' ? $langs->trans("ExternalModule").' - ' : '').$langs->trans("ClickToShowDescription"), $imginfo).' ';
print ' ';
// Version
diff --git a/htdocs/admin/notification.php b/htdocs/admin/notification.php
index 88f973b8a20..99643401386 100644
--- a/htdocs/admin/notification.php
+++ b/htdocs/admin/notification.php
@@ -1,8 +1,9 @@
* Copyright (C) 2005-2015 Laurent Destailleur
- * Copyright (C) 2013 Juanjo Menent
+ * Copyright (C) 2013 Juanjo Menent
* Copyright (C) 2015 Bahfir Abbes
+ * Copyright (C) 2020 Thibault FOUCART
*
* 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
@@ -43,6 +44,32 @@ $action = GETPOST('action', 'aZ09');
* Actions
*/
+// Action to update or add a constant
+if ($action == 'update' || $action == 'add')
+{
+ $constlineid = GETPOST('rowid', 'int');
+ $constname=GETPOST('constname', 'alpha');
+
+ $constvalue=(GETPOSTISSET('constvalue_'.$constname) ? GETPOST('constvalue_'.$constname, 'alpha') : GETPOST('constvalue'));
+ $consttype=(GETPOSTISSET('consttype_'.$constname) ? GETPOST('consttype_'.$constname, 'alphanohtml') : GETPOST('consttype'));
+ $constnote=(GETPOSTISSET('constnote_'.$constname) ? GETPOST('constnote_'.$constname, 'none') : GETPOST('constnote'));
+
+ $typetouse = empty($oldtypetonewone[$consttype]) ? $consttype : $oldtypetonewone[$consttype];
+
+ $res=dolibarr_set_const($db, $constname, $constvalue, $typetouse, 0, $constnote, $conf->entity);
+
+ if (! $res > 0) $error++;
+
+ if (! $error)
+ {
+ setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
+ }
+ else
+ {
+ setEventMessages($langs->trans("Error"), null, 'errors');
+ }
+}
+
if ($action == 'setvalue' && $user->admin)
{
$db->begin();
@@ -149,46 +176,82 @@ $title = $langs->trans("ListOfNotificationsPerUser");
if (!empty($conf->societe->enabled)) $title = $langs->trans("ListOfNotificationsPerUserOrContact");
print load_fiche_titre($title, '', '');
-print '';
-print '';
-print ''.$langs->trans("Label").' ';
-/*print ''.$langs->trans("Code").' ';
- print ''.$langs->trans("Label").' ';*/
-//print ''.$langs->trans("NbOfTargetedContacts").' ';
-print " \n";
-
// Load array of available notifications
$notificationtrigger = new InterfaceNotification($db);
$listofnotifiedevents = $notificationtrigger->getListOfManagedEvents();
-print '';
-print '';
-$i = 0;
-foreach ($listofnotifiedevents as $notifiedevent)
-{
- $label = $langs->trans("Notify_".$notifiedevent['code']); //!=$langs->trans("Notify_".$notifiedevent['code'])?$langs->trans("Notify_".$notifiedevent['code']):$notifiedevent['label'];
- $elementLabel = $langs->trans(ucfirst($notifiedevent['elementtype']));
+if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
+ // Editing global variables not related to a specific theme
+ $constantes=array();
+ foreach ($listofnotifiedevents as $notifiedevent)
+ {
+ $label = $langs->trans("Notify_".$notifiedevent['code']); //!=$langs->trans("Notify_".$notifiedevent['code'])?$langs->trans("Notify_".$notifiedevent['code']):$notifiedevent['label'];
+ $elementLabel = $langs->trans(ucfirst($notifiedevent['elementtype']));
- if ($notifiedevent['elementtype'] == 'order_supplier') $elementLabel = $langs->trans('SupplierOrder');
- elseif ($notifiedevent['elementtype'] == 'propal') $elementLabel = $langs->trans('Proposal');
- elseif ($notifiedevent['elementtype'] == 'facture') $elementLabel = $langs->trans('Bill');
- elseif ($notifiedevent['elementtype'] == 'commande') $elementLabel = $langs->trans('Order');
- elseif ($notifiedevent['elementtype'] == 'ficheinter') $elementLabel = $langs->trans('Intervention');
- elseif ($notifiedevent['elementtype'] == 'shipping') $elementLabel = $langs->trans('Shipping');
- elseif ($notifiedevent['elementtype'] == 'expensereport') $elementLabel = $langs->trans('ExpenseReport');
+ if ($notifiedevent['elementtype'] == 'order_supplier') $elementLabel = $langs->trans('SupplierOrder');
+ elseif ($notifiedevent['elementtype'] == 'propal') $elementLabel = $langs->trans('Proposal');
+ elseif ($notifiedevent['elementtype'] == 'facture') $elementLabel = $langs->trans('Bill');
+ elseif ($notifiedevent['elementtype'] == 'commande') $elementLabel = $langs->trans('Order');
+ elseif ($notifiedevent['elementtype'] == 'ficheinter') $elementLabel = $langs->trans('Intervention');
+ elseif ($notifiedevent['elementtype'] == 'shipping') $elementLabel = $langs->trans('Shipping');
+ elseif ($notifiedevent['elementtype'] == 'expensereport') $elementLabel = $langs->trans('ExpenseReport');
- if ($i) print ', ';
- print $label;
+ if ($notifiedevent['elementtype'] == 'propal') $model = 'propal_send';
+ elseif ($notifiedevent['elementtype'] == 'commande') $model = 'order_send';
+ elseif ($notifiedevent['elementtype'] == 'facture') $model = 'facture_send';
+ elseif ($notifiedevent['elementtype'] == 'shipping') $model = 'shipping_send';
+ elseif ($notifiedevent['elementtype'] == 'ficheinter') $model = 'fichinter_send';
+ elseif ($notifiedevent['elementtype'] == 'expensereport') $model = 'expensereport_send';
+ elseif ($notifiedevent['elementtype'] == 'order_supplier') $model = 'order_supplier_send';
+ //elseif ($notifiedevent['elementtype'] == 'invoice_supplier') $model = 'invoice_supplier_send';
+ elseif ($notifiedevent['elementtype'] == 'member') $model = 'member';
- $i++;
+ $constantes[$notifiedevent['code'].'_TEMPLATE'] = array('type'=>'emailtemplate:'.$model, 'label'=>$label);
+ }
+
+ $helptext='';
+ form_constantes($constantes, 0, $helptext);
+} else {
+ print '';
+ print '';
+ print ''.$langs->trans("Label").' ';
+ /*print ''.$langs->trans("Code").' ';
+ print ''.$langs->trans("Label").' ';*/
+ //print ''.$langs->trans("NbOfTargetedContacts").' ';
+ print " \n";
+
+ print '';
+ print '';
+
+ $i = 0;
+ foreach ($listofnotifiedevents as $notifiedevent)
+ {
+ $label = $langs->trans("Notify_".$notifiedevent['code']); //!=$langs->trans("Notify_".$notifiedevent['code'])?$langs->trans("Notify_".$notifiedevent['code']):$notifiedevent['label'];
+ $elementLabel = $langs->trans(ucfirst($notifiedevent['elementtype']));
+
+ if ($notifiedevent['elementtype'] == 'order_supplier') $elementLabel = $langs->trans('SupplierOrder');
+ elseif ($notifiedevent['elementtype'] == 'propal') $elementLabel = $langs->trans('Proposal');
+ elseif ($notifiedevent['elementtype'] == 'facture') $elementLabel = $langs->trans('Bill');
+ elseif ($notifiedevent['elementtype'] == 'commande') $elementLabel = $langs->trans('Order');
+ elseif ($notifiedevent['elementtype'] == 'ficheinter') $elementLabel = $langs->trans('Intervention');
+ elseif ($notifiedevent['elementtype'] == 'shipping') $elementLabel = $langs->trans('Shipping');
+ elseif ($notifiedevent['elementtype'] == 'expensereport') $elementLabel = $langs->trans('ExpenseReport');
+
+ if ($i) print ', ';
+ print $label;
+
+ $i++;
+ }
+
+ print ' ';
+ print '
';
}
-print ' ';
-print '
';
print '';
print '* '.$langs->trans("GoOntoUserCardToAddMore").' ';
if (!empty($conf->societe->enabled)) print '** '.$langs->trans("GoOntoContactCardToAddMore").' ';
+
print '
';
print ' ';
@@ -205,10 +268,6 @@ print ''.$langs->trans("Threshold").' ';
print ''.' ';
print "\n";
-// Load array of available notifications
-$notificationtrigger = new InterfaceNotification($db);
-$listofnotifiedevents = $notificationtrigger->getListOfManagedEvents();
-
foreach ($listofnotifiedevents as $notifiedevent)
{
$label = $langs->trans("Notify_".$notifiedevent['code']); //!=$langs->trans("Notify_".$notifiedevent['code'])?$langs->trans("Notify_".$notifiedevent['code']):$notifiedevent['label'];
diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php
index 781d7da5f6f..73703829b8c 100644
--- a/htdocs/admin/propal.php
+++ b/htdocs/admin/propal.php
@@ -515,29 +515,35 @@ foreach ($dirmodels as $reldir)
print '';
+
/*
* Payment mode
*/
+
+print ' ';
+print load_fiche_titre($langs->trans("SuggestedPaymentModesIfNotDefinedInProposal"), '', '');
+
+print '";
+
print ' ';
diff --git a/htdocs/admin/ticket.php b/htdocs/admin/ticket.php
index cd982ef0f5c..981ce2a0ccf 100644
--- a/htdocs/admin/ticket.php
+++ b/htdocs/admin/ticket.php
@@ -32,7 +32,7 @@ $langs->loadLangs(array("admin", "ticket"));
// Access control
if (!$user->admin) {
- accessforbidden();
+ accessforbidden();
}
// Parameters
@@ -49,117 +49,117 @@ $error = 0;
*/
if ($action == 'updateMask') {
- $maskconstticket = GETPOST('maskconstticket', 'alpha');
- $maskticket = GETPOST('maskticket', 'alpha');
+ $maskconstticket = GETPOST('maskconstticket', 'alpha');
+ $maskticket = GETPOST('maskticket', 'alpha');
- if ($maskconstticket) {
- $res = dolibarr_set_const($db, $maskconstticket, $maskticket, 'chaine', 0, '', $conf->entity);
- }
+ if ($maskconstticket) {
+ $res = dolibarr_set_const($db, $maskconstticket, $maskticket, 'chaine', 0, '', $conf->entity);
+ }
- if (!$res > 0) {
- $error++;
- }
+ if (!$res > 0) {
+ $error++;
+ }
- if (!$error)
- {
- setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
- }
- else
- {
- setEventMessages($langs->trans("Error"), null, 'errors');
- }
+ if (!$error)
+ {
+ setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
+ }
+ else
+ {
+ setEventMessages($langs->trans("Error"), null, 'errors');
+ }
} elseif ($action == 'setmod') {
- // TODO Verifier si module numerotation choisi peut etre active
- // par appel methode canBeActivated
+ // TODO Verifier si module numerotation choisi peut etre active
+ // par appel methode canBeActivated
- dolibarr_set_const($db, "TICKET_ADDON", $value, 'chaine', 0, '', $conf->entity);
+ dolibarr_set_const($db, "TICKET_ADDON", $value, 'chaine', 0, '', $conf->entity);
} elseif ($action == 'setvar') {
- include_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php";
+ include_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php";
- $notification_email = GETPOST('TICKET_NOTIFICATION_EMAIL_FROM', 'alpha');
- if (!empty($notification_email)) {
- $res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_EMAIL_FROM', $notification_email, 'chaine', 0, '', $conf->entity);
- } else {
- $res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_EMAIL_FROM', '', 'chaine', 0, '', $conf->entity);
- }
- if (!$res > 0) {
- $error++;
- }
+ $notification_email = GETPOST('TICKET_NOTIFICATION_EMAIL_FROM', 'alpha');
+ if (!empty($notification_email)) {
+ $res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_EMAIL_FROM', $notification_email, 'chaine', 0, '', $conf->entity);
+ } else {
+ $res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_EMAIL_FROM', '', 'chaine', 0, '', $conf->entity);
+ }
+ if (!$res > 0) {
+ $error++;
+ }
- // altairis : differentiate notification email FROM and TO
- $notification_email_to = GETPOST('TICKET_NOTIFICATION_EMAIL_TO', 'alpha');
- if (!empty($notification_email_to)) {
- $res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_EMAIL_TO', $notification_email_to, 'chaine', 0, '', $conf->entity);
- } else {
- $res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_EMAIL_TO', '', 'chaine', 0, '', $conf->entity);
- }
- if (!$res > 0) {
- $error++;
- }
+ // altairis : differentiate notification email FROM and TO
+ $notification_email_to = GETPOST('TICKET_NOTIFICATION_EMAIL_TO', 'alpha');
+ if (!empty($notification_email_to)) {
+ $res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_EMAIL_TO', $notification_email_to, 'chaine', 0, '', $conf->entity);
+ } else {
+ $res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_EMAIL_TO', '', 'chaine', 0, '', $conf->entity);
+ }
+ if (!$res > 0) {
+ $error++;
+ }
- $mail_intro = GETPOST('TICKET_MESSAGE_MAIL_INTRO', 'restricthtml');
- if (!empty($mail_intro)) {
- $res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_INTRO', $mail_intro, 'chaine', 0, '', $conf->entity);
- } else {
- $res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_INTRO', $langs->trans('TicketMessageMailIntroText'), 'chaine', 0, '', $conf->entity);
- }
- if (!$res > 0) {
- $error++;
- }
+ $mail_intro = GETPOST('TICKET_MESSAGE_MAIL_INTRO', 'restricthtml');
+ if (!empty($mail_intro)) {
+ $res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_INTRO', $mail_intro, 'chaine', 0, '', $conf->entity);
+ } else {
+ $res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_INTRO', $langs->trans('TicketMessageMailIntroText'), 'chaine', 0, '', $conf->entity);
+ }
+ if (!$res > 0) {
+ $error++;
+ }
- $mail_signature = GETPOST('TICKET_MESSAGE_MAIL_SIGNATURE', 'restricthtml');
- if (!empty($mail_signature)) {
- $res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_SIGNATURE', $mail_signature, 'chaine', 0, '', $conf->entity);
- } else {
- $res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_SIGNATURE', $langs->trans('TicketMessageMailSignatureText'), 'chaine', 0, '', $conf->entity);
- }
- if (!$res > 0) {
- $error++;
- }
+ $mail_signature = GETPOST('TICKET_MESSAGE_MAIL_SIGNATURE', 'restricthtml');
+ if (!empty($mail_signature)) {
+ $res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_SIGNATURE', $mail_signature, 'chaine', 0, '', $conf->entity);
+ } else {
+ $res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_SIGNATURE', $langs->trans('TicketMessageMailSignatureText'), 'chaine', 0, '', $conf->entity);
+ }
+ if (!$res > 0) {
+ $error++;
+ }
}
if ($action == 'setvarother') {
- $param_must_exists = GETPOST('TICKET_EMAIL_MUST_EXISTS', 'alpha');
- $res = dolibarr_set_const($db, 'TICKET_EMAIL_MUST_EXISTS', $param_must_exists, 'chaine', 0, '', $conf->entity);
- if (!$res > 0) {
- $error++;
- }
+ $param_must_exists = GETPOST('TICKET_EMAIL_MUST_EXISTS', 'alpha');
+ $res = dolibarr_set_const($db, 'TICKET_EMAIL_MUST_EXISTS', $param_must_exists, 'chaine', 0, '', $conf->entity);
+ if (!$res > 0) {
+ $error++;
+ }
- $param_disable_email = GETPOST('TICKET_DISABLE_NOTIFICATION_MAILS', 'alpha');
- $res = dolibarr_set_const($db, 'TICKET_DISABLE_NOTIFICATION_MAILS', $param_disable_email, 'chaine', 0, '', $conf->entity);
- if (!$res > 0) {
- $error++;
- }
+ $param_disable_email = GETPOST('TICKET_DISABLE_NOTIFICATION_MAILS', 'alpha');
+ $res = dolibarr_set_const($db, 'TICKET_DISABLE_NOTIFICATION_MAILS', $param_disable_email, 'chaine', 0, '', $conf->entity);
+ if (!$res > 0) {
+ $error++;
+ }
- if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
- {
- $param_show_module_logo = GETPOST('TICKET_SHOW_MODULE_LOGO', 'alpha');
- $res = dolibarr_set_const($db, 'TICKET_SHOW_MODULE_LOGO', $param_show_module_logo, 'chaine', 0, '', $conf->entity);
- if (!$res > 0) {
- $error++;
- }
- }
+ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
+ {
+ $param_show_module_logo = GETPOST('TICKET_SHOW_MODULE_LOGO', 'alpha');
+ $res = dolibarr_set_const($db, 'TICKET_SHOW_MODULE_LOGO', $param_show_module_logo, 'chaine', 0, '', $conf->entity);
+ if (!$res > 0) {
+ $error++;
+ }
+ }
- if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
- {
- $param_notification_also_main_addressemail = GETPOST('TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS', 'alpha');
- $res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS', $param_notification_also_main_addressemail, 'chaine', 0, '', $conf->entity);
- if (!$res > 0) {
- $error++;
- }
- }
+ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
+ {
+ $param_notification_also_main_addressemail = GETPOST('TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS', 'alpha');
+ $res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS', $param_notification_also_main_addressemail, 'chaine', 0, '', $conf->entity);
+ if (!$res > 0) {
+ $error++;
+ }
+ }
- $param_limit_view = GETPOST('TICKET_LIMIT_VIEW_ASSIGNED_ONLY', 'alpha');
- $res = dolibarr_set_const($db, 'TICKET_LIMIT_VIEW_ASSIGNED_ONLY', $param_limit_view, 'chaine', 0, '', $conf->entity);
- if (!$res > 0) {
- $error++;
- }
+ $param_limit_view = GETPOST('TICKET_LIMIT_VIEW_ASSIGNED_ONLY', 'alpha');
+ $res = dolibarr_set_const($db, 'TICKET_LIMIT_VIEW_ASSIGNED_ONLY', $param_limit_view, 'chaine', 0, '', $conf->entity);
+ if (!$res > 0) {
+ $error++;
+ }
- $param_auto_assign = GETPOST('TICKET_AUTO_ASSIGN_USER_CREATE', 'alpha');
- $res = dolibarr_set_const($db, 'TICKET_AUTO_ASSIGN_USER_CREATE', $param_auto_assign, 'chaine', 0, '', $conf->entity);
- if (!$res > 0) {
- $error++;
- }
+ $param_auto_assign = GETPOST('TICKET_AUTO_ASSIGN_USER_CREATE', 'alpha');
+ $res = dolibarr_set_const($db, 'TICKET_AUTO_ASSIGN_USER_CREATE', $param_auto_assign, 'chaine', 0, '', $conf->entity);
+ if (!$res > 0) {
+ $error++;
+ }
}
@@ -195,7 +195,7 @@ dol_fiche_end();
* Projects Numbering model
*/
-print load_fiche_titre($langs->trans("TicketNumberingModules"));
+print load_fiche_titre($langs->trans("TicketNumberingModules"), '', '');
print '';
print '
';
@@ -210,82 +210,82 @@ print "\n";
clearstatcache();
foreach ($dirmodels as $reldir) {
- $dir = dol_buildpath($reldir."core/modules/ticket");
+ $dir = dol_buildpath($reldir."core/modules/ticket");
- if (is_dir($dir)) {
- $handle = opendir($dir);
- if (is_resource($handle)) {
- while (($file = readdir($handle)) !== false) {
- if (preg_match('/^(mod_.*)\.php$/i', $file, $reg)) {
- $file = $reg[1];
- $classname = substr($file, 4);
+ if (is_dir($dir)) {
+ $handle = opendir($dir);
+ if (is_resource($handle)) {
+ while (($file = readdir($handle)) !== false) {
+ if (preg_match('/^(mod_.*)\.php$/i', $file, $reg)) {
+ $file = $reg[1];
+ $classname = substr($file, 4);
- include_once $dir.'/'.$file.'.php';
+ include_once $dir.'/'.$file.'.php';
- $module = new $file;
+ $module = new $file;
- // Show modules according to features level
- if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) {
- continue;
- }
+ // Show modules according to features level
+ if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) {
+ continue;
+ }
- if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) {
- continue;
- }
+ if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) {
+ continue;
+ }
- if ($module->isEnabled()) {
- print ''.$module->name." \n";
- print $module->info();
- print ' ';
+ if ($module->isEnabled()) {
+ print ''.$module->name." \n";
+ print $module->info();
+ print ' ';
- // Show example of numbering model
- print '';
- $tmp = $module->getExample();
- if (preg_match('/^Error/', $tmp)) {
- print ''.$langs->trans($tmp).'
';
- } elseif ($tmp == 'NotConfigured') {
- print $langs->trans($tmp);
- } else {
- print $tmp;
- }
+ // Show example of numbering model
+ print ' ';
+ $tmp = $module->getExample();
+ if (preg_match('/^Error/', $tmp)) {
+ print ''.$langs->trans($tmp).'
';
+ } elseif ($tmp == 'NotConfigured') {
+ print $langs->trans($tmp);
+ } else {
+ print $tmp;
+ }
- print ' '."\n";
+ print ''."\n";
- print '';
- if ($conf->global->TICKET_ADDON == 'mod_'.$classname) {
- print img_picto($langs->trans("Activated"), 'switch_on');
- } else {
- print ''.img_picto($langs->trans("Disabled"), 'switch_off').' ';
- }
- print ' ';
+ print '';
+ if ($conf->global->TICKET_ADDON == 'mod_'.$classname) {
+ print img_picto($langs->trans("Activated"), 'switch_on');
+ } else {
+ print ''.img_picto($langs->trans("Disabled"), 'switch_off').' ';
+ }
+ print ' ';
- $ticket = new Ticket($db);
- $ticket->initAsSpecimen();
+ $ticket = new Ticket($db);
+ $ticket->initAsSpecimen();
- // Info
- $htmltooltip = '';
- $htmltooltip .= ''.$langs->trans("Version").': '.$module->getVersion().' ';
- $nextval = $module->getNextValue($mysoc, $ticket);
- if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
- $htmltooltip .= ''.$langs->trans("NextValue").': ';
- if ($nextval) {
- $htmltooltip .= $nextval.' ';
- } else {
- $htmltooltip .= $langs->trans($module->error).' ';
- }
- }
+ // Info
+ $htmltooltip = '';
+ $htmltooltip .= ''.$langs->trans("Version").': '.$module->getVersion().' ';
+ $nextval = $module->getNextValue($mysoc, $ticket);
+ if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
+ $htmltooltip .= ''.$langs->trans("NextValue").': ';
+ if ($nextval) {
+ $htmltooltip .= $nextval.' ';
+ } else {
+ $htmltooltip .= $langs->trans($module->error).' ';
+ }
+ }
- print '';
- print $form->textwithpicto('', $htmltooltip, 1, 0);
- print ' ';
+ print '';
+ print $form->textwithpicto('', $htmltooltip, 1, 0);
+ print ' ';
- print ' ';
- }
- }
- }
- closedir($handle);
- }
- }
+ print '';
+ }
+ }
+ }
+ closedir($handle);
+ }
+ }
}
print '
';
@@ -293,12 +293,12 @@ print '
';
print ' ';
if (!$conf->use_javascript_ajax) {
- print '';
- print ' ';
- print ' ';
+ print ' ';
+ print ' ';
+ print ' ';
}
-print load_fiche_titre($langs->trans("TicketParams"));
+print load_fiche_titre($langs->trans("Other"), '', '');
print '';
print '';
@@ -307,86 +307,14 @@ print ' ';
print ' ';
print " \n";
-// Activate email notifications
-/*
-print '' . $langs->trans("TicketsDisableEmail") . ' ';
-print '';
-if ($conf->use_javascript_ajax) {
- print ajax_constantonoff('TICKET_DISABLE_ALL_MAILS');
-} else {
- $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
- print $form->selectarray("TICKET_DISABLE_ALL_MAILS", $arrval, $conf->global->TICKET_DISABLE_ALL_MAILS);
-}
-print ' ';
-print '';
-print $form->textwithpicto('', $langs->trans("TicketsDisableEmailHelp"), 1, 'help');
-print ' ';
-print ' ';
-
-// Activate log by email
-print '' . $langs->trans("TicketsLogEnableEmail") . ' ';
-print '';
-if ($conf->use_javascript_ajax) {
- print ajax_constantonoff('TICKET_ACTIVATE_LOG_BY_EMAIL');
-} else {
- $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
- print $form->selectarray("TICKET_ACTIVATE_LOG_BY_EMAIL", $arrval, $conf->global->TICKET_ACTIVATE_LOG_BY_EMAIL);
-}
-print ' ';
-print '';
-print $form->textwithpicto('', $langs->trans("TicketsLogEnableEmailHelp"), 1, 'help');
-print ' ';
-print ' ';
-*/
-
-// Also send to main email address
-if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
-{
- print ''.$langs->trans("TicketsEmailAlsoSendToMainAddress").' ';
- print '';
- if ($conf->use_javascript_ajax) {
- print ajax_constantonoff('TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS');
- } else {
- $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
- print $form->selectarray("TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS", $arrval, $conf->global->TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS);
- }
- print ' ';
- print '';
- print $form->textwithpicto('', $langs->trans("TicketsEmailAlsoSendToMainAddressHelp"), 1, 'help');
- print ' ';
- print ' ';
-}
-
-// Limiter la vue des tickets à ceux assignés à l'utilisateur
-/*
-print '' . $langs->trans("TicketsLimitViewAssignedOnly") . ' ';
-print '';
-if ($conf->use_javascript_ajax) {
- print ajax_constantonoff('TICKET_LIMIT_VIEW_ASSIGNED_ONLY');
-} else {
- $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
- print $form->selectarray("TICKET_LIMIT_VIEW_ASSIGNED_ONLY", $arrval, $conf->global->TICKET_LIMIT_VIEW_ASSIGNED_ONLY);
-}
-print ' ';
-print '';
-print $form->textwithpicto('', $langs->trans("TicketsLimitViewAssignedOnlyHelp"), 1, 'help');
-print ' ';
-print ' ';
-*/
-
-/*if (!$conf->use_javascript_ajax) {
- print ' ';
- print ' ';
-}*/
-
// Auto assign ticket at user who created it
print ''.$langs->trans("TicketsAutoAssignTicket").' ';
print '';
if ($conf->use_javascript_ajax) {
- print ajax_constantonoff('TICKET_AUTO_ASSIGN_USER_CREATE');
+ print ajax_constantonoff('TICKET_AUTO_ASSIGN_USER_CREATE');
} else {
- $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
- print $form->selectarray("TICKET_AUTO_ASSIGN_USER_CREATE", $arrval, $conf->global->TICKET_AUTO_ASSIGN_USER_CREATE);
+ $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
+ print $form->selectarray("TICKET_AUTO_ASSIGN_USER_CREATE", $arrval, $conf->global->TICKET_AUTO_ASSIGN_USER_CREATE);
}
print ' ';
print '';
@@ -397,11 +325,11 @@ print ' ';
print '
';
if (!$conf->use_javascript_ajax) {
- print ' ';
+ print '';
}
// Admin var of module
-print load_fiche_titre($langs->trans("Notification"));
+print load_fiche_titre($langs->trans("Notification"), '', '');
print '';
@@ -414,27 +342,11 @@ print ''.$langs->trans("Email").' ';
print "\n";
if (empty($conf->global->FCKEDITOR_ENABLE_MAIL)) {
- print '';
- print ''.$langs->trans("TicketCkEditorEmailNotActivated").'
';
- print " \n";
+ print '';
+ print ''.$langs->trans("TicketCkEditorEmailNotActivated").'
';
+ print " \n";
}
-// Activate log by email
-/*print '' . $langs->trans("TicketsLogEnableEmail") . ' ';
-print '';
-if ($conf->use_javascript_ajax) {
- print ajax_constantonoff('TICKET_ACTIVATE_LOG_BY_EMAIL');
-} else {
- $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
- print $form->selectarray("TICKET_ACTIVATE_LOG_BY_EMAIL", $arrval, $conf->global->TICKET_ACTIVATE_LOG_BY_EMAIL);
-}
-print ' ';
-print '';
-print $form->textwithpicto('', $langs->trans("TicketsLogEnableEmailHelp"), 1, 'help');
-print ' ';
-print ' ';
-*/
-
// @todo Use module notification instead...
// Email d'envoi des notifications
@@ -446,18 +358,36 @@ print $form->textwithpicto('', $langs->trans("TicketEmailNotificationFromHelp"),
print '';
print '';
-// Email de réception des notifications
-print ''.$langs->trans("TicketEmailNotificationTo").' ';
+// Email for notification of TICKET_CREATE
+print ''.$langs->trans("TicketEmailNotificationTo").' ('.$langs->trans("Creation").') ';
print '';
-print ' ';
+print ' ';
print '';
print $form->textwithpicto('', $langs->trans("TicketEmailNotificationToHelp"), 1, 'help');
print ' ';
print ' ';
+// Also send to TICKET_NOTIFICATION_EMAIL_TO for responses (not only creation)
+if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
+{
+ print ''.$langs->trans("TicketsEmailAlsoSendToMainAddress").' ';
+ print '';
+ if ($conf->use_javascript_ajax) {
+ print ajax_constantonoff('TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS');
+ } else {
+ $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
+ print $form->selectarray("TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS", $arrval, $conf->global->TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS);
+ }
+ print ' ';
+ print '';
+ print $form->textwithpicto('', $langs->trans("TicketsEmailAlsoSendToMainAddressHelp"), 1, 'help');
+ print ' ';
+ print ' ';
+}
+
// Texte d'introduction
$mail_intro = $conf->global->TICKET_MESSAGE_MAIL_INTRO ? $conf->global->TICKET_MESSAGE_MAIL_INTRO : $langs->trans('TicketMessageMailIntroText');
-print ''.$langs->trans("TicketMessageMailIntroLabelAdmin").'';
+print ' '.$langs->trans("TicketMessageMailIntroLabelAdmin").' ('.$langs->trans("Responses").')';
print ' ';
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor('TICKET_MESSAGE_MAIL_INTRO', $mail_intro, '100%', 120, 'dolibarr_mailings', '', false, true, $conf->global->FCKEDITOR_ENABLE_MAIL, ROWS_2, 70);
diff --git a/htdocs/admin/tools/listsessions.php b/htdocs/admin/tools/listsessions.php
index eb4caa4bf3d..253f4919092 100644
--- a/htdocs/admin/tools/listsessions.php
+++ b/htdocs/admin/tools/listsessions.php
@@ -41,11 +41,12 @@ if ($user->socid > 0)
$socid = $user->socid;
}
+$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
-$offset = $conf->liste_limit * $page;
+$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (!$sortorder) $sortorder = "DESC";
diff --git a/htdocs/asset/document.php b/htdocs/asset/document.php
index c6762c5c946..4724173cd19 100644
--- a/htdocs/asset/document.php
+++ b/htdocs/asset/document.php
@@ -45,11 +45,12 @@ $ref = GETPOST('ref', 'alpha');
//$result = restrictedArea($user, 'asset', $id);
// Get parameters
+$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
-$offset = $conf->liste_limit * $page;
+$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (!$sortorder) $sortorder = "ASC";
diff --git a/htdocs/asset/list.php b/htdocs/asset/list.php
index e414193fb83..39fd0e0761d 100644
--- a/htdocs/asset/list.php
+++ b/htdocs/asset/list.php
@@ -328,12 +328,11 @@ print ' ';
print ' ';
print ' ';
-print ' ';
print ' ';
$newcardbutton = dolGetButtonTitle($langs->trans('NewAsset'), '', 'fa fa-plus-circle', dol_buildpath('/asset/card.php', 1).'?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permissiontoadd);
-print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'accountancy', 0, $newcardbutton, '', $limit);
+print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'accountancy', 0, $newcardbutton, '', $limit, 0, 0, 1);
// Add code for pre mass action (confirmation or email presend form)
$topicmail = "SendAssetsRef";
diff --git a/htdocs/barcode/codeinit.php b/htdocs/barcode/codeinit.php
index dd700de8ce3..d2afa5e6871 100644
--- a/htdocs/barcode/codeinit.php
+++ b/htdocs/barcode/codeinit.php
@@ -253,7 +253,7 @@ if ($conf->product->enabled || $conf->product->service)
$nbno = $nbtotal = 0;
- print load_fiche_titre($langs->trans("BarcodeInitForProductsOrServices"), '', 'products');
+ print load_fiche_titre($langs->trans("BarcodeInitForProductsOrServices"), '', 'product');
print ' '."\n";
$sql = "SELECT count(rowid) as nb, fk_product_type, datec";
diff --git a/htdocs/bom/bom_card.php b/htdocs/bom/bom_card.php
index 1f4498cf9cc..48e9c9d965a 100644
--- a/htdocs/bom/bom_card.php
+++ b/htdocs/bom/bom_card.php
@@ -256,7 +256,7 @@ jQuery(document).ready(function() {
// Part to create
if ($action == 'create')
{
- print load_fiche_titre($langs->trans("NewBOM"), '', 'cubes');
+ print load_fiche_titre($langs->trans("NewBOM"), '', 'bom');
print '';
print ' ';
diff --git a/htdocs/bom/bom_document.php b/htdocs/bom/bom_document.php
index 0fc68ed276e..a7dca41fff6 100644
--- a/htdocs/bom/bom_document.php
+++ b/htdocs/bom/bom_document.php
@@ -46,11 +46,12 @@ $ref = GETPOST('ref', 'alpha');
//$result = restrictedArea($user, 'bom', $id);
// Get parameters
+$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
-$offset = $conf->liste_limit * $page;
+$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (!$sortorder) $sortorder = "ASC";
diff --git a/htdocs/bom/bom_list.php b/htdocs/bom/bom_list.php
index 7f8826bf9e0..e2bafbecb48 100644
--- a/htdocs/bom/bom_list.php
+++ b/htdocs/bom/bom_list.php
@@ -440,12 +440,11 @@ print ' ';
print ' ';
print ' ';
-print ' ';
print ' ';
$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/bom/bom_card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $user->rights->bom->write);
-print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'cubes', 0, $newcardbutton, '', $limit);
+print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'bom', 0, $newcardbutton, '', $limit, 0, 0, 1);
// Add code for pre mass action (confirmation or email presend form)
$topicmail = "SendBillOfMaterialsRef";
diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php
index 44ab989f528..6ab6bc283b6 100644
--- a/htdocs/bookmarks/card.php
+++ b/htdocs/bookmarks/card.php
@@ -172,7 +172,7 @@ if ($action == 'create')
// Owner
print ''.$langs->trans("Owner").' ';
- print $form->select_dolusers(isset($_POST['userid']) ? $_POST['userid'] : $user->id, 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
+ print img_picto('', 'user').' '.$form->select_dolusers(isset($_POST['userid']) ? $_POST['userid'] : $user->id, 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
print ' ';
// Position
@@ -276,11 +276,11 @@ if ($id > 0 && !preg_match('/^add/i', $action))
print ''.$langs->trans("Owner").' ';
if ($action == 'edit' && $user->admin)
{
- print $form->select_dolusers(isset($_POST['userid']) ? $_POST['userid'] : ($object->fk_user ? $object->fk_user : ''), 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
+ print img_picto('', 'user').' '.$form->select_dolusers(isset($_POST['userid']) ? $_POST['userid'] : ($object->fk_user ? $object->fk_user : ''), 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
}
else
{
- if ($object->fk_user)
+ if ($object->fk_user > 0)
{
$fuser = new User($db);
$fuser->fetch($object->fk_user);
diff --git a/htdocs/bookmarks/list.php b/htdocs/bookmarks/list.php
index 067e2abeaa9..5dd1718b263 100644
--- a/htdocs/bookmarks/list.php
+++ b/htdocs/bookmarks/list.php
@@ -155,13 +155,12 @@ print ' ';
print ' ';
print ' ';
-print ' ';
print ' ';
$newcardbutton = '';
$newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/bookmarks/card.php?action=create', '', !empty($user->rights->bookmark->creer));
-print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'bookmark', 0, $newcardbutton, '', $limit);
+print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'bookmark', 0, $newcardbutton, '', $limit, 0, 0, 1);
print '';
print '
'."\n";
@@ -178,6 +177,8 @@ print_liste_field_titre("Position", $_SERVER["PHP_SELF"], "b.position", "", $par
print_liste_field_titre('');
print "\n";
+$cacheOfUsers = array();
+
$i = 0;
while ($i < min($num, $limit))
{
@@ -222,9 +223,13 @@ while ($i < min($num, $limit))
print '';
if ($obj->fk_user)
{
- $userstatic->id = $obj->fk_user;
- $userstatic->lastname = $obj->login;
- print $userstatic->getNomUrl(1);
+ if (empty($cacheOfUsers[$obj->fk_user])) {
+ $tmpuser = new User($db);
+ $tmpuser->fetch($obj->fk_user);
+ $cacheOfUsers[$obj->fk_user] = $tmpuser;
+ }
+ $tmpuser = $cacheOfUsers[$obj->fk_user];
+ print $tmpuser->getNomUrl(1);
}
else
{
@@ -242,11 +247,11 @@ while ($i < min($num, $limit))
print ' ';
if ($user->rights->bookmark->creer)
{
- print 'rowid."&backtopage=".urlencode($_SERVER["PHP_SELF"]).'">'.img_edit()." ";
+ print 'rowid."&backtopage=".urlencode($_SERVER["PHP_SELF"]).'">'.img_edit()." ";
}
if ($user->rights->bookmark->supprimer)
{
- print "rowid\">".img_delete()." ";
+ print 'rowid.'">'.img_delete().' ';
}
else
{
diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php
index eb6dfaafcc6..9c0985078e7 100644
--- a/htdocs/categories/class/categorie.class.php
+++ b/htdocs/categories/class/categorie.class.php
@@ -144,6 +144,26 @@ class Categorie extends CommonObject
'website_page' => 'WebsitePage'
);
+ /**
+ * @var array Title Area mapping from type string
+ *
+ * @note Move to const array when PHP 5.6 will be our minimum target
+ */
+ public static $MAP_TYPE_TITLE_AREA = array(
+ 'product' => 'ProductsCategoriesArea',
+ 'customer' => 'CustomersCategoriesArea',
+ 'supplier' => 'SuppliersCategoriesArea',
+ 'member' => 'MembersCategoriesArea',
+ 'contact' => 'ContactsCategoriesArea',
+ 'user' => 'UsersCategoriesArea',
+ 'account' => 'AccountsCategoriesArea', // old for bank account
+ 'bank_account' => 'AccountsCategoriesArea',
+ 'project' => 'ProjectsCategoriesArea',
+ 'warehouse'=> 'StocksCategoriesArea',
+ 'actioncomm' => 'ActioncommCategoriesArea',
+ 'website_page' => 'WebsitePageCategoriesArea'
+ );
+
/**
* @var array Object table mapping from type string (table llx_...) when value of key does not match table name.
*
@@ -291,6 +311,7 @@ class Categorie extends CommonObject
if (!is_numeric($type)) $type = $this->MAP_ID[$type];
$sql = "SELECT rowid, fk_parent, entity, label, description, color, fk_soc, visible, type, ref_ext";
+ $sql .= ", date_creation, tms, fk_user_creat, fk_user_modif";
$sql .= " FROM ".MAIN_DB_PREFIX."categorie";
if ($id > 0)
{
@@ -315,16 +336,20 @@ class Categorie extends CommonObject
$res = $this->db->fetch_array($resql);
$this->id = $res['rowid'];
- //$this->ref = $res['rowid'];
+ //$this->ref = $res['rowid'];
$this->fk_parent = $res['fk_parent'];
$this->label = $res['label'];
$this->description = $res['description'];
$this->color = $res['color'];
$this->socid = $res['fk_soc'];
$this->visible = $res['visible'];
- $this->type = $res['type'];
+ $this->type = $res['type'];
$this->ref_ext = $res['ref_ext'];
$this->entity = $res['entity'];
+ $this->date_creation = $this->db->jdate($res['date_creation']);
+ $this->date_modification = $this->db->jdate($res['tms']);
+ $this->user_creation = $res['fk_user_creat'];
+ $this->user_modification = $res['fk_user_modif'];
// Retreive all extrafield
// fetch optionals attributes and labels
@@ -389,7 +414,7 @@ class Categorie extends CommonObject
}
$this->db->begin();
-
+ $now = dol_now();
$sql = "INSERT INTO ".MAIN_DB_PREFIX."categorie (";
$sql .= "fk_parent,";
$sql .= " label,";
@@ -403,7 +428,9 @@ class Categorie extends CommonObject
$sql .= " type,";
$sql .= " import_key,";
$sql .= " ref_ext,";
- $sql .= " entity";
+ $sql .= " entity,";
+ $sql .= " date_creation,";
+ $sql .= " fk_user_creat";
$sql .= ") VALUES (";
$sql .= $this->db->escape($this->fk_parent).",";
$sql .= "'".$this->db->escape($this->label)."',";
@@ -417,7 +444,9 @@ class Categorie extends CommonObject
$sql .= $this->db->escape($type).",";
$sql .= (!empty($this->import_key) ? "'".$this->db->escape($this->import_key)."'" : 'null').",";
$sql .= (!empty($this->ref_ext) ? "'".$this->db->escape($this->ref_ext)."'" : 'null').",";
- $sql .= $this->db->escape($conf->entity);
+ $sql .= $this->db->escape($conf->entity).",";
+ $sql .= "'".$this->db->idate($now)."', ";
+ $sql .= (int) $user->id;
$sql .= ")";
$res = $this->db->query($sql);
@@ -515,6 +544,7 @@ class Categorie extends CommonObject
}
$sql .= ", visible = '".$this->db->escape($this->visible)."'";
$sql .= ", fk_parent = ".$this->fk_parent;
+ $sql .= ", fk_user_modif = ".(int) $user->id;
$sql .= " WHERE rowid = ".$this->id;
dol_syslog(get_class($this)."::update", LOG_DEBUG);
diff --git a/htdocs/categories/index.php b/htdocs/categories/index.php
index d3b8f81c94d..2103a4081d3 100644
--- a/htdocs/categories/index.php
+++ b/htdocs/categories/index.php
@@ -197,7 +197,7 @@ print '';
print ''.$langs->trans("Categories").' ';
if (!empty($conf->use_javascript_ajax))
{
- print '';
+ print '';
}
print ' ';
diff --git a/htdocs/categories/info.php b/htdocs/categories/info.php
new file mode 100644
index 00000000000..644886c7387
--- /dev/null
+++ b/htdocs/categories/info.php
@@ -0,0 +1,95 @@
+
+ * Copyright (C) 2005-2009 Regis Houssin
+ * Copyright (C) 2017 Ferran Marcet
+ *
+ * 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 .
+ */
+
+/**
+ * \file htdocs/categories/info.php
+ * \ingroup categories
+ * \brief Category info page
+ */
+
+require '../main.inc.php';
+require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
+require_once DOL_DOCUMENT_ROOT.'/core/lib/categories.lib.php';
+
+if (!$user->rights->categorie->lire) {
+ accessforbidden();
+}
+
+// Load translation files required by the page
+$langs->loadLangs(array('categories', 'sendings'));
+
+$socid = 0;
+$id = GETPOST('id', 'int');
+
+// Security check
+if ($user->socid) $socid = $user->socid;
+$result = restrictedArea($user, 'categorie', $id, '&category');
+
+$object = new Categorie($db);
+if (!$object->fetch($id) > 0) {
+ dol_print_error($db);
+ exit;
+}
+$type = $object->type;
+if (is_numeric($type)) $type = Categorie::$MAP_ID_TO_CODE[$type]; // For backward compatibility
+
+/*
+ * View
+ */
+
+$form = new Form($db);
+
+llxHeader('', $langs->trans('Categories'), '');
+
+//$object->info($object->id);
+
+$head = categories_prepare_head($object, $type);
+
+$title = Categorie::$MAP_TYPE_TITLE_AREA[$type];
+
+dol_fiche_head($head, 'info', $langs->trans($title), -1, 'category');
+$backtolist = (GETPOST('backtolist') ? GETPOST('backtolist') : DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.$type);
+$linkback = ''.$langs->trans("BackToList").' ';
+$object->next_prev_filter = ' type = '.$type;
+$object->ref = $object->label;
+$morehtmlref = ''.$langs->trans("Root").' >> ';
+$ways = $object->print_all_ways(" >> ", '', 1);
+foreach ($ways as $way) {
+ $morehtmlref .= $way."
\n";
+}
+$morehtmlref .= '
';
+
+dol_banner_tab($object, 'label', $linkback, ($user->socid ? 0 : 1), 'label', 'label', $morehtmlref, '&type='.$type, 0, '', '', 1);
+
+print '';
+print '
';
+
+print '
';
+
+print '
';
+dol_print_object_info($object);
+print '
';
+print '
';
+
+dol_fiche_end();
+
+// End of page
+llxFooter();
+$db->close();
diff --git a/htdocs/categories/photos.php b/htdocs/categories/photos.php
index 598d060e5f6..07e5d56d268 100644
--- a/htdocs/categories/photos.php
+++ b/htdocs/categories/photos.php
@@ -112,20 +112,12 @@ $formother = new FormOther($db);
if ($object->id)
{
- if ($type == Categorie::TYPE_PRODUCT) $title = $langs->trans("ProductsCategoryShort");
- elseif ($type == Categorie::TYPE_SUPPLIER) $title = $langs->trans("SuppliersCategoryShort");
- elseif ($type == Categorie::TYPE_CUSTOMER) $title = $langs->trans("CustomersCategoryShort");
- elseif ($type == Categorie::TYPE_MEMBER) $title = $langs->trans("MembersCategoryShort");
- elseif ($type == Categorie::TYPE_CONTACT) $title = $langs->trans("ContactCategoriesShort");
- elseif ($type == Categorie::TYPE_ACCOUNT) $title = $langs->trans("AccountsCategoriesShort");
- elseif ($type == Categorie::TYPE_PROJECT) $title = $langs->trans("ProjectsCategoriesShort");
- elseif ($type == Categorie::TYPE_USER) $title = $langs->trans("UsersCategoriesShort");
- else $title = $langs->trans("Category");
+ $title = Categorie::$MAP_TYPE_TITLE_AREA[$type];
$head = categories_prepare_head($object, $type);
- dol_fiche_head($head, 'photos', $title, -1, 'category');
+ dol_fiche_head($head, 'photos', $langs->trans($title), -1, 'category');
$linkback = ''.$langs->trans("BackToList").' ';
$object->next_prev_filter = ' type = '.$object->type;
diff --git a/htdocs/categories/traduction.php b/htdocs/categories/traduction.php
index caf79d81e04..c3f87e404b7 100644
--- a/htdocs/categories/traduction.php
+++ b/htdocs/categories/traduction.php
@@ -173,15 +173,7 @@ $form = new Form($db);
$formadmin = new FormAdmin($db);
$formother = new FormOther($db);
-if ($type == Categorie::TYPE_PRODUCT) $title = $langs->trans("ProductsCategoryShort");
-elseif ($type == Categorie::TYPE_SUPPLIER) $title = $langs->trans("SuppliersCategoryShort");
-elseif ($type == Categorie::TYPE_CUSTOMER) $title = $langs->trans("CustomersCategoryShort");
-elseif ($type == Categorie::TYPE_MEMBER) $title = $langs->trans("MembersCategoryShort");
-elseif ($type == Categorie::TYPE_CONTACT) $title = $langs->trans("ContactCategoriesShort");
-elseif ($type == Categorie::TYPE_ACCOUNT) $title = $langs->trans("AccountsCategoriesShort");
-elseif ($type == Categorie::TYPE_PROJECT) $title = $langs->trans("ProjectsCategoriesShort");
-elseif ($type == Categorie::TYPE_USER) $title = $langs->trans("UsersCategoriesShort");
-else $title = $langs->trans("Category");
+$title = Categorie::$MAP_TYPE_TITLE_AREA[$type];
$head = categories_prepare_head($object, $type);
@@ -195,7 +187,7 @@ if (!empty($object->multilangs))
}
}
-dol_fiche_head($head, 'translation', $title, -1, 'category');
+dol_fiche_head($head, 'translation', $langs->trans($title), -1, 'category');
$linkback = ''.$langs->trans("BackToList").' ';
$object->next_prev_filter = ' type = '.$object->type;
diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php
index 5b31d2285fc..c4366ebf19c 100644
--- a/htdocs/categories/viewcat.php
+++ b/htdocs/categories/viewcat.php
@@ -207,21 +207,12 @@ $arrayofcss = array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css
$helpurl = '';
llxHeader("", $langs->trans("Categories"), $helpurl, '', 0, 0, $arrayofjs, $arrayofcss);
-if ($type == Categorie::TYPE_PRODUCT) { $title = $langs->trans("ProductsCategoriesArea"); $typetext = 'product'; }
-elseif ($type == Categorie::TYPE_SUPPLIER) { $title = $langs->trans("SuppliersCategoriesArea"); $typetext = 'supplier'; }
-elseif ($type == Categorie::TYPE_CUSTOMER) { $title = $langs->trans("CustomersCategoriesArea"); $typetext = 'customer'; }
-elseif ($type == Categorie::TYPE_MEMBER) { $title = $langs->trans("MembersCategoriesArea"); $typetext = 'member'; }
-elseif ($type == Categorie::TYPE_CONTACT) { $title = $langs->trans("ContactsCategoriesArea"); $typetext = 'contact'; }
-elseif ($type == Categorie::TYPE_ACCOUNT) { $title = $langs->trans("AccountsCategoriesArea"); $typetext = 'bank_account'; }
-elseif ($type == Categorie::TYPE_PROJECT) { $title = $langs->trans("ProjectsCategoriesArea"); $typetext = 'project'; }
-elseif ($type == Categorie::TYPE_USER) { $title = $langs->trans("UsersCategoriesArea"); $typetext = 'user'; }
-elseif ($type == Categorie::TYPE_WAREHOUSE) { $title = $langs->trans("StocksCategoriesArea"); $typetext = 'warehouse'; }
-else { $title = $langs->trans("CategoriesArea"); $typetext = 'unknown'; }
+$title = Categorie::$MAP_TYPE_TITLE_AREA[$type];
$head = categories_prepare_head($object, $type);
-dol_fiche_head($head, 'card', $title, -1, 'category');
+dol_fiche_head($head, 'card', $langs->trans($title), -1, 'category');
$backtolist = (GETPOST('backtolist') ? GETPOST('backtolist') : DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.$type);
$linkback = ''.$langs->trans("BackToList").' ';
$object->next_prev_filter = ' type = '.$object->type;
@@ -326,9 +317,9 @@ print '';
if (!empty($conf->use_javascript_ajax))
{
print '';
}
@@ -350,7 +341,7 @@ else
{
$categstatic = new Categorie($db);
- $fulltree = $categstatic->get_full_arbo($typetext, $object->id, 1);
+ $fulltree = $categstatic->get_full_arbo($type, $object->id, 1);
// Load possible missing includes
if ($conf->global->CATEGORY_SHOW_COUNTS)
diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php
index 65fd69a9a8b..8c1e2051a81 100644
--- a/htdocs/comm/action/class/actioncomm.class.php
+++ b/htdocs/comm/action/class/actioncomm.class.php
@@ -5,7 +5,7 @@
* Copyright (C) 2011-2017 Juanjo Menent
* Copyright (C) 2015 Marcos García
* Copyright (C) 2018 Nicolas ZABOURI
- * Copyright (C) 2018 Frédéric France
+ * Copyright (C) 2018-2020 Frédéric France
*
* 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
@@ -898,33 +898,37 @@ class ActionComm extends CommonObject
$error = 0;
+ dol_syslog(get_class($this)."::delete", LOG_DEBUG);
+
$this->db->begin();
- $sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm";
- $sql .= " WHERE id=".$this->id;
+ // remove categorie association
+ if (!$error) {
+ $sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_actioncomm";
+ $sql .= " WHERE fk_actioncomm=".$this->id;
- dol_syslog(get_class($this)."::delete", LOG_DEBUG);
- $res = $this->db->query($sql);
- if (!$res) {
- $this->error=$this->db->lasterror();
- $error++;
+ $res = $this->db->query($sql);
+ if (!$res) {
+ $this->error = $this->db->lasterror();
+ $error++;
+ }
}
+ // remove actioncomm_resources
if (!$error) {
$sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm_resources";
$sql .= " WHERE fk_actioncomm=".$this->id;
- dol_syslog(get_class($this)."::delete", LOG_DEBUG);
$res = $this->db->query($sql);
if (!$res) {
- $this->error=$this->db->lasterror();
+ $this->error = $this->db->lasterror();
$error++;
}
}
// Removed extrafields
if (!$error) {
- $result = $this->deleteExtraFields();
+ $result = $this->deleteExtraFields();
if ($result < 0)
{
$error++;
@@ -932,6 +936,18 @@ class ActionComm extends CommonObject
}
}
+ // remove actioncomm
+ if (!$error) {
+ $sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm";
+ $sql .= " WHERE id=".$this->id;
+
+ $res = $this->db->query($sql);
+ if (!$res) {
+ $this->error = $this->db->lasterror();
+ $error++;
+ }
+ }
+
if (!$error)
{
if (!$notrigger)
@@ -1381,7 +1397,7 @@ class ActionComm extends CommonObject
if ($this->type_code != 'AC_OTH_AUTO') $labeltype = $langs->trans('ActionAC_MANUAL');
}
- $tooltip = ''.$langs->trans('ShowAction').' ';
+ $tooltip = ''.$langs->trans('Action').' ';
if (!empty($this->ref))
$tooltip .= ''.$langs->trans('Ref').': '.$this->ref;
if (!empty($label))
diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php
index 20e76b6e7d5..9e770f70a93 100644
--- a/htdocs/comm/action/document.php
+++ b/htdocs/comm/action/document.php
@@ -62,11 +62,12 @@ if ($id > 0)
}
// Get parameters
+$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
-$offset = $conf->liste_limit * $page;
+$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (!$sortorder) $sortorder = "ASC";
diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php
index 3b738452699..9f28d278ed1 100644
--- a/htdocs/comm/action/list.php
+++ b/htdocs/comm/action/list.php
@@ -382,7 +382,6 @@ if ($resql)
print ' ';
print ' ';
print ' ';
- print ' ';
print ' ';
$nav = '';
@@ -443,7 +442,7 @@ if ($resql)
$newcardbutton .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.sprintf("%04d%02d%02d", $tmpforcreatebutton['year'], $tmpforcreatebutton['mon'], $tmpforcreatebutton['mday']).$hourminsec.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($newparam ? '?'.$newparam : '')));
}
- print_barre_liste($s, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, -1 * $nbtotalofrecords, '', 0, $nav.$newcardbutton, '', $limit);
+ print_barre_liste($s, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, -1 * $nbtotalofrecords, '', 0, $nav.$newcardbutton, '', $limit, 0, 0, 1);
$moreforfilter = '';
diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php
index f1ea3c0923d..7c6335d146b 100644
--- a/htdocs/comm/card.php
+++ b/htdocs/comm/card.php
@@ -65,11 +65,12 @@ $result = restrictedArea($user, 'societe', $id, '&societe');
$action = GETPOST('action', 'aZ09');
$mode = GETPOST("mode");
+$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
-$offset = $conf->liste_limit * $page;
+$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (!$sortorder) $sortorder = "ASC";
diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php
index 0bb38aeaa38..f11c53f3352 100644
--- a/htdocs/comm/index.php
+++ b/htdocs/comm/index.php
@@ -171,7 +171,7 @@ if (!empty($conf->propal->enabled) && $user->rights->propal->lire)
print '';
print '
';
print '';
- print ''.$langs->trans("ProposalsDraft").' '.$num.' ';
+ print ''.$langs->trans("ProposalsDraft").' '.$num.' ';
if ($num > 0)
{
@@ -755,7 +755,7 @@ if (!empty($conf->propal->enabled) && $user->rights->propal->lire)
{
print '';
print '
';
- print ''.$langs->trans("ProposalsOpened").' '.$num.' ';
+ print ''.$langs->trans("ProposalsOpened").' '.$num.' ';
$nbofloop = min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD) ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD));
while ($i < $nbofloop)
@@ -863,7 +863,7 @@ if (!empty($conf->commande->enabled) && $user->rights->commande->lire)
{
print '';
print '
';
- print ''.$langs->trans("OrdersOpened").' '.$num.' ';
+ print ''.$langs->trans("OrdersOpened").' '.$num.' ';
$nbofloop = min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD) ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD));
while ($i < $nbofloop)
diff --git a/htdocs/comm/mailing/list.php b/htdocs/comm/mailing/list.php
index 1eadb2d0da0..8feaa5a4d93 100644
--- a/htdocs/comm/mailing/list.php
+++ b/htdocs/comm/mailing/list.php
@@ -34,6 +34,7 @@ $result = restrictedArea($user, 'mailing');
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
+$optioncss = GETPOST('optioncss', 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action
$offset = $limit * $page;
@@ -129,8 +130,6 @@ if ($filteremail)
if ($search_all) $sql .= " AND (m.titre like '%".$db->escape($search_all)."%' OR m.sujet like '%".$db->escape($search_all)."%' OR m.body like '%".$db->escape($search_all)."%')";
if (!$sortorder) $sortorder = "ASC";
if (!$sortfield) $sortfield = "m.rowid";
- $sql .= $db->order($sortfield, $sortorder);
- $sql .= $db->plimit($conf->liste_limit + 1, $offset);
}
else
{
@@ -141,15 +140,30 @@ else
if ($search_all) $sql .= " AND (m.titre like '%".$db->escape($search_all)."%' OR m.sujet like '%".$db->escape($search_all)."%' OR m.body like '%".$db->escape($search_all)."%')";
if (!$sortorder) $sortorder = "ASC";
if (!$sortfield) $sortfield = "m.rowid";
- $sql .= $db->order($sortfield, $sortorder);
- $sql .= $db->plimit($conf->liste_limit + 1, $offset);
}
-//print $sql;
-$result = $db->query($sql);
-if ($result)
+$sql .= $db->order($sortfield, $sortorder);
+
+$nbtotalofrecords = '';
+if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
- $num = $db->num_rows($result);
+ $resql = $db->query($sql);
+ $nbtotalofrecords = $db->num_rows($resql);
+ if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0
+ {
+ $page = 0;
+ $offset = 0;
+ }
+}
+
+$sql .= $db->plimit($limit + 1, $offset);
+//print $sql;
+
+dol_syslog("comm/mailing/list.php", LOG_DEBUG);
+$resql = $db->query($sql);
+if ($resql)
+{
+ $num = $db->num_rows($resql);
$title = $langs->trans("ListOfEMailings");
if ($filteremail) $title .= ' ('.$langs->trans("SentTo", $filteremail).')';
@@ -163,17 +177,18 @@ if ($result)
$i = 0;
$param = "&search_all=".urlencode($search_all);
+ if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage);
+ if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit);
if ($filteremail) $param .= '&filteremail='.urlencode($filteremail);
- print '';
+ print ' ';
if ($optioncss != '') print ' ';
print ' ';
print ' ';
print ' ';
print ' ';
- print ' ';
- print_barre_liste($title, $page, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', $num, '', 'generic', 0, $newcardbutton);
+ print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit, 0, 0, 1);
$moreforfilter = '';
@@ -214,12 +229,12 @@ if ($result)
while ($i < min($num, $limit))
{
- $obj = $db->fetch_object($result);
+ $obj = $db->fetch_object($resql);
$email->id = $obj->rowid;
$email->ref = $obj->rowid;
- print "";
+ print ' ';
print '';
print $email->getNomUrl(1);
@@ -280,7 +295,8 @@ if ($result)
print '
';
print '
';
print '';
- $db->free($result);
+
+ $db->free($resql);
}
else
{
diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php
index d6e8208f792..92338ebf68e 100644
--- a/htdocs/comm/propal/card.php
+++ b/htdocs/comm/propal/card.php
@@ -1513,7 +1513,6 @@ if ($action == 'create')
$projectid = (!empty($objectsrc->fk_project) ? $objectsrc->fk_project : 0);
$ref_client = (!empty($objectsrc->ref_client) ? $objectsrc->ref_client : '');
- $ref_int = (!empty($objectsrc->ref_int) ? $objectsrc->ref_int : '');
$soc = $objectsrc->thirdparty;
diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php
index 53fa6113caa..6a2eac53f95 100644
--- a/htdocs/comm/propal/class/propal.class.php
+++ b/htdocs/comm/propal/class/propal.class.php
@@ -258,7 +258,6 @@ class Propal extends CommonObject
'ref' =>array('type'=>'varchar(30)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'showoncombobox'=>1, 'position'=>20),
'ref_client' =>array('type'=>'varchar(255)', 'label'=>'RefCustomer', 'enabled'=>1, 'visible'=>-1, 'position'=>22),
'ref_ext' =>array('type'=>'varchar(255)', 'label'=>'RefExt', 'enabled'=>1, 'visible'=>0, 'position'=>40),
- 'ref_int' =>array('type'=>'varchar(255)', 'label'=>'RefInt', 'enabled'=>1, 'visible'=>0, 'position'=>45), // deprecated
'fk_soc' =>array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'enabled'=>1, 'visible'=>-1, 'position'=>23),
'fk_projet' =>array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Fk projet', 'enabled'=>1, 'visible'=>-1, 'position'=>24),
'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>25),
@@ -3404,8 +3403,8 @@ class Propal extends CommonObject
$response->warning_delay = $delay_warning / 60 / 60 / 24;
$response->label = $label;
$response->labelShort = $labelShort;
- $response->url = DOL_URL_ROOT.'/comm/propal/list.php?viewstatut='.$status.'&mainmenu=commercial&leftmenu=propals';
- $response->url_late = DOL_URL_ROOT.'/comm/propal/list.php?viewstatut='.$status.'&mainmenu=commercial&leftmenu=propals&sortfield=p.datep&sortorder=asc';
+ $response->url = DOL_URL_ROOT.'/comm/propal/list.php?search_status='.$status.'&mainmenu=commercial&leftmenu=propals';
+ $response->url_late = DOL_URL_ROOT.'/comm/propal/list.php?search_status='.$status.'&mainmenu=commercial&leftmenu=propals&sortfield=p.datep&sortorder=asc';
$response->img = img_object('', "propal");
// This assignment in condition is not a bug. It allows walking the results.
@@ -3659,7 +3658,7 @@ class Propal extends CommonObject
if ($user->rights->propal->lire)
{
- $label = ''.$langs->trans("ShowPropal").' ';
+ $label = ''.$langs->trans("Proposal").' ';
if (!empty($this->ref))
$label .= ''.$langs->trans('Ref').': '.$this->ref;
if (!empty($this->ref_client))
@@ -3670,6 +3669,11 @@ class Propal extends CommonObject
$label .= ''.$langs->trans('VAT').': '.price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency);
if (!empty($this->total_ttc))
$label .= ''.$langs->trans('AmountTTC').': '.price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency);
+ if (isset($this->statut)) {
+ $label .= ''.$langs->trans("Status").": ".$this->getLibStatut(5);
+ }
+
+
if ($option == '') {
$url = DOL_URL_ROOT.'/comm/propal/card.php?id='.$this->id.$get_params;
}
@@ -3697,7 +3701,7 @@ class Propal extends CommonObject
{
if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
{
- $label = $langs->trans("ShowPropal");
+ $label = $langs->trans("Proposal");
$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
}
$linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"';
diff --git a/htdocs/comm/propal/document.php b/htdocs/comm/propal/document.php
index 02d801860a5..d9d12c5efb4 100644
--- a/htdocs/comm/propal/document.php
+++ b/htdocs/comm/propal/document.php
@@ -53,11 +53,12 @@ if (!empty($user->socid))
$result = restrictedArea($user, 'propal', $id);
// Get parameters
+$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
-$offset = $conf->liste_limit * $page;
+$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
diff --git a/htdocs/comm/propal/index.php b/htdocs/comm/propal/index.php
index a931af375c5..a0aac3e0387 100644
--- a/htdocs/comm/propal/index.php
+++ b/htdocs/comm/propal/index.php
@@ -195,7 +195,7 @@ if (!empty($conf->propal->enabled))
print '';
print '';
$langs->load("propal");
- print ''.$langs->trans("DraftPropals").' '.$num.' ';
+ print ''.$langs->trans("DraftPropals").' '.$num.' ';
$i = 0;
$nbofloop = min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD) ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD));
@@ -345,7 +345,7 @@ if (!empty($conf->propal->enabled) && $user->rights->propale->lire)
{
print '';
print '
';
- print ''.$langs->trans("ProposalsOpened").' '.$num.' ';
+ print ''.$langs->trans("ProposalsOpened").' '.$num.' ';
$nbofloop = min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD) ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD));
while ($i < $nbofloop)
@@ -434,7 +434,7 @@ if (! empty($conf->propal->enabled))
print '';
print '
';
print '';
- print ''.$langs->trans("ProposalsToProcess").' '.$num.' ';
+ print ''.$langs->trans("ProposalsToProcess").' '.$num.' ';
if ($num)
{
@@ -507,7 +507,7 @@ if (! empty($conf->propal->enabled))
print '';
print '
';
print '';
- print ''.$langs->trans("OnProcessOrders").' '.$num.' ';
+ print ''.$langs->trans("OnProcessOrders").' '.$num.' ';
if ($num)
{
diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php
index 7119bf2e01d..955c4f38832 100644
--- a/htdocs/comm/propal/list.php
+++ b/htdocs/comm/propal/list.php
@@ -92,7 +92,7 @@ $search_categ_cus = trim(GETPOST("search_categ_cus", 'int'));
$search_btn = GETPOST('button_search', 'alpha');
$search_remove_btn = GETPOST('button_removefilter', 'alpha');
-$viewstatut = GETPOST('viewstatut', 'alpha');
+$search_status = GETPOST('search_status', 'alpha');
$optioncss = GETPOST('optioncss', 'alpha');
$object_statut = GETPOST('search_statut', 'alpha');
@@ -155,8 +155,8 @@ $arrayfields = array(
'p.ref'=>array('label'=>"Ref", 'checked'=>1),
'p.ref_client'=>array('label'=>"RefCustomer", 'checked'=>1),
'pr.ref'=>array('label'=>"ProjectRef", 'checked'=>1, 'enabled'=>(empty($conf->projet->enabled) ? 0 : 1)),
- 'pr.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(empty($conf->projet->enabled) ? 0 : 1)),
- 's.nom'=>array('label'=>"ThirdParty", 'checked'=>1),
+ 'pr.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(empty($conf->projet->enabled) ? 0 : 1)),
+ 's.nom'=>array('label'=>"ThirdParty", 'checked'=>1),
's.town'=>array('label'=>"Town", 'checked'=>1),
's.zip'=>array('label'=>"Zip", 'checked'=>1),
'state.nom'=>array('label'=>"StateShort", 'checked'=>0),
@@ -243,13 +243,13 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x'
$search_datedelivery_start = '';
$search_datedelivery_end = '';
$search_availability = '';
- $viewstatut = '';
+ $search_status = '';
$object_statut = '';
$toselect = '';
$search_array_options = array();
$search_categ_cus = 0;
}
-if ($object_statut != '') $viewstatut = $object_statut;
+if ($object_statut != '') $search_status = $object_statut;
if (empty($reshook))
{
@@ -287,7 +287,7 @@ $sql .= ' s.rowid as socid, s.nom as name, s.email, s.town, s.zip, s.fk_pays, s.
$sql .= " typent.code as typent_code,";
$sql .= " ava.rowid as availability,";
$sql .= " state.code_departement as state_code, state.nom as state_name,";
-$sql .= ' p.rowid, p.entity, p.note_private, p.total_ht, p.tva as total_vat, p.total as total_ttc, p.localtax1, p.localtax2, p.ref, p.ref_client, p.fk_statut, p.fk_user_author, p.datep as dp, p.fin_validite as dfv,p.date_livraison as ddelivery,';
+$sql .= ' p.rowid, p.entity, p.note_private, p.total_ht, p.tva as total_vat, p.total as total_ttc, p.localtax1, p.localtax2, p.ref, p.ref_client, p.fk_statut as status, p.fk_user_author, p.datep as dp, p.fin_validite as dfv,p.date_livraison as ddelivery,';
$sql .= ' p.fk_multicurrency, p.multicurrency_code, p.multicurrency_tx, p.multicurrency_total_ht, p.multicurrency_total_tva as multicurrency_total_vat, p.multicurrency_total_ttc,';
$sql .= ' p.datec as date_creation, p.tms as date_update, p.date_cloture as date_cloture,';
$sql .= ' p.note_public, p.note_private,';
@@ -359,9 +359,9 @@ if ($search_categ_cus == -2) $sql .= " AND cc.fk_categorie IS NULL";
if ($search_product_category > 0) $sql .= " AND cp.fk_categorie = ".$db->escape($search_product_category);
if ($socid > 0) $sql .= ' AND s.rowid = '.$socid;
-if ($viewstatut != '' && $viewstatut != '-1')
+if ($search_status != '' && $search_status != '-1')
{
- $sql .= ' AND p.fk_statut IN ('.$db->escape($viewstatut).')';
+ $sql .= ' AND p.fk_statut IN ('.$db->escape($search_status).')';
}
if ($search_date_start) $sql .= " AND p.datep >= '".$db->idate($search_date_start)."'";
if ($search_date_end) $sql .= " AND p.datep <= '".$db->idate($search_date_end)."'";
@@ -408,7 +408,7 @@ if ($resql)
$objectstatic = new Propal($db);
$userstatic = new User($db);
- if ($socid > 0)
+ if ($socid > 0)
{
$soc = new Societe($db);
$soc->fetch($socid);
@@ -436,7 +436,7 @@ if ($resql)
llxHeader('', $langs->trans('Proposal'), $help_url);
- $param = '&viewstatut='.urlencode($viewstatut);
+ $param = '&search_status='.urlencode($search_status);
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage);
if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit);
if ($sall) $param .= '&sall='.urlencode($sall);
@@ -473,7 +473,7 @@ if ($resql)
$arrayofmassactions = array(
'generate_doc'=>$langs->trans("ReGeneratePDF"),
'builddoc'=>$langs->trans("PDFMerge"),
- 'presend'=>$langs->trans("SendByMail"),
+ 'presend'=>$langs->trans("SendByMail"),
);
if ($user->rights->propal->supprimer) $arrayofmassactions['predelete'] = ' '.$langs->trans("Delete");
if ($user->rights->propal->cloturer) $arrayofmassactions['closed'] = $langs->trans("Close");
@@ -483,8 +483,8 @@ if ($resql)
$newcardbutton = '';
if ($user->rights->propal->creer)
{
- $newcardbutton .= dolGetButtonTitle($langs->trans('NewPropal'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/propal/card.php?action=create');
- }
+ $newcardbutton .= dolGetButtonTitle($langs->trans('NewPropal'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/propal/card.php?action=create');
+ }
// Fields title search
print '';
@@ -494,10 +494,9 @@ if ($resql)
print ' ';
print ' ';
print ' ';
- print ' ';
print ' ';
- print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'commercial', 0, $newcardbutton, '', $limit);
+ print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'commercial', 0, $newcardbutton, '', $limit, 0, 0, 1);
$topicmail = "SendPropalRef";
$modelmail = "proposal_send";
@@ -515,19 +514,19 @@ if ($resql)
$moreforfilter = '';
- // If the user can view prospects other than his'
- if ($user->rights->societe->client->voir || $socid)
- {
- $langs->load("commercial");
- $moreforfilter .= '';
- $moreforfilter .= $langs->trans('ThirdPartiesOfSaleRepresentative').': ';
- $moreforfilter .= $formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, 1, 'maxwidth200');
- $moreforfilter .= '
';
- }
// If the user can view prospects other than his'
if ($user->rights->societe->client->voir || $socid)
{
- $moreforfilter .= '';
+ $langs->load("commercial");
+ $moreforfilter .= '
';
+ $moreforfilter .= $langs->trans('ThirdPartiesOfSaleRepresentative').': ';
+ $moreforfilter .= $formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, 1, 'maxwidth200');
+ $moreforfilter .= '
';
+ }
+ // If the user can view prospects other than his'
+ if ($user->rights->societe->client->voir || $socid)
+ {
+ $moreforfilter .= '
';
$moreforfilter .= $langs->trans('LinkedToSpecificUsers').': ';
$moreforfilter .= $form->select_dolusers($search_user, 'search_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth200');
$moreforfilter .= '
';
@@ -546,9 +545,9 @@ if ($resql)
{
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
$moreforfilter .= '
';
- $moreforfilter .= $langs->trans('CustomersProspectsCategoriesShort').': ';
+ $moreforfilter .= $langs->trans('CustomersProspectsCategoriesShort').': ';
$moreforfilter .= $formother->select_categories('customer', $search_categ_cus, 'search_categ_cus', 1);
- $moreforfilter .= '
';
+ $moreforfilter .= '
';
}
$parameters = array();
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook
@@ -573,40 +572,40 @@ if ($resql)
if (!empty($arrayfields['p.ref']['checked']))
{
print '';
- print ' ';
- print ' ';
+ print ' ';
+ print '';
}
if (!empty($arrayfields['p.ref_client']['checked']))
{
print '';
- print ' ';
- print ' ';
+ print ' ';
+ print '';
}
if (!empty($arrayfields['pr.ref']['checked']))
{
- print '';
- print ' ';
- print ' ';
+ print '';
+ print ' ';
+ print ' ';
}
if (!empty($arrayfields['pr.title']['checked']))
{
- print '';
- print ' ';
- print ' ';
+ print '';
+ print ' ';
+ print ' ';
}
if (!empty($arrayfields['s.nom']['checked']))
{
print '';
- print ' ';
- print ' ';
+ print ' ';
+ print '';
}
- if (!empty($arrayfields['s.town']['checked'])) print ' ';
- if (!empty($arrayfields['s.zip']['checked'])) print ' ';
+ if (!empty($arrayfields['s.town']['checked'])) print ' ';
+ if (!empty($arrayfields['s.zip']['checked'])) print ' ';
// State
if (!empty($arrayfields['state.nom']['checked']))
{
print '';
- print ' ';
+ print ' ';
print ' ';
}
// Country
@@ -619,7 +618,7 @@ if ($resql)
// Company type
if (!empty($arrayfields['typent.code']['checked']))
{
- print '';
+ print ' ';
print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT));
print ajax_combobox('search_type_thirdparty');
print ' ';
@@ -669,7 +668,7 @@ if ($resql)
// Availability
if (!empty($arrayfields['ava.rowid']['checked']))
{
- print '';
+ print ' ';
$form->selectAvailabilityDelay($search_availability, 'search_availability', '', 1);
print ajax_combobox('search_availability');
print ' ';
@@ -784,7 +783,7 @@ if ($resql)
print '';
print ' ';
}
- // Date cloture
+ // Date cloture
if (!empty($arrayfields['p.date_cloture']['checked']))
{
print '';
@@ -794,7 +793,7 @@ if ($resql)
if (!empty($arrayfields['p.fk_statut']['checked']))
{
print ' ';
- $formpropal->selectProposalStatus($viewstatut, 1, 0, 1, 'customer', 'search_statut');
+ $formpropal->selectProposalStatus($search_status, 1, 0, 1, 'customer', 'search_statut');
print ' ';
}
// Action column
@@ -863,6 +862,8 @@ if ($resql)
$objectstatic->ref_client = $obj->ref_client;
$objectstatic->note_public = $obj->note_public;
$objectstatic->note_private = $obj->note_private;
+ $objectstatic->statut = $obj->status;
+ $objectstatic->status = $obj->status;
$companystatic->id = $obj->socid;
$companystatic->name = $obj->name;
@@ -901,16 +902,16 @@ if ($resql)
if (!empty($arrayfields['p.ref']['checked']))
{
- print '';
+ print ' ';
print '';
// Picto + Ref
- print '';
+ print ' ';
print $objectstatic->getNomUrl(1, '', '', 0, 1, (isset($conf->global->PROPAL_LIST_SHOW_NOTES) ? $conf->global->PROPAL_LIST_SHOW_NOTES : 1));
print ' ';
// Warning
$warnornote = '';
- if ($obj->fk_statut == 1 && $db->jdate($obj->dfv) < ($now - $conf->propal->cloture->warning_delay)) $warnornote .= img_warning($langs->trans("Late"));
+ if ($obj->status == Propal::STATUS_VALIDATED && $db->jdate($obj->dfv) < ($now - $conf->propal->cloture->warning_delay)) $warnornote .= img_warning($langs->trans("Late"));
if ($warnornote)
{
print '';
@@ -940,24 +941,24 @@ if ($resql)
if (!empty($arrayfields['pr.ref']['checked']))
{
- // Project ref
- print ' ';
- if ($obj->project_id > 0) {
+ // Project ref
+ print ' ';
+ if ($obj->project_id > 0) {
print $projectstatic->getNomUrl(1);
}
- print ' ';
- if (!$i) $totalarray['nbfield']++;
+ print '';
+ if (!$i) $totalarray['nbfield']++;
}
if (!empty($arrayfields['pr.title']['checked']))
{
- // Project label
- print '';
- if ($obj->project_id > 0) {
- print $projectstatic->title;
- }
- print ' ';
- if (!$i) $totalarray['nbfield']++;
+ // Project label
+ print '';
+ if ($obj->project_id > 0) {
+ print $projectstatic->title;
+ }
+ print ' ';
+ if (!$i) $totalarray['nbfield']++;
}
// Thirdparty
@@ -1060,10 +1061,10 @@ if ($resql)
// Amount HT
if (!empty($arrayfields['p.total_ht']['checked']))
{
- print ''.price($obj->total_ht)." \n";
- if (!$i) $totalarray['nbfield']++;
- if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'p.total_ht';
- $totalarray['val']['p.total_ht'] += $obj->total_ht;
+ print ''.price($obj->total_ht)." \n";
+ if (!$i) $totalarray['nbfield']++;
+ if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'p.total_ht';
+ $totalarray['val']['p.total_ht'] += $obj->total_ht;
}
// Amount VAT
if (!empty($arrayfields['p.total_vat']['checked']))
@@ -1082,42 +1083,42 @@ if ($resql)
$totalarray['val']['p.total_ttc'] += $obj->total_ttc;
}
// Amount invoiced
- if (!empty($arrayfields['p.total_ht_invoiced']['checked']))
- {
- print ''.price($totalInvoicedHT)." \n";
- if (!$i) $totalarray['nbfield']++;
- if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'p.total_ht_invoiced';
- $totalarray['val']['p.total_ht_invoiced'] += $totalInvoicedHT;
- }
- // Amount invoiced
- if (!empty($arrayfields['p.total_invoiced']['checked']))
- {
- print ''.price($totalInvoicedTTC)." \n";
- if (!$i) $totalarray['nbfield']++;
- if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'p.total_invoiced';
- $totalarray['val']['p.total_invoiced'] += $totalInvoicedTTC;
- }
+ if (!empty($arrayfields['p.total_ht_invoiced']['checked']))
+ {
+ print ''.price($totalInvoicedHT)." \n";
+ if (!$i) $totalarray['nbfield']++;
+ if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'p.total_ht_invoiced';
+ $totalarray['val']['p.total_ht_invoiced'] += $totalInvoicedHT;
+ }
+ // Amount invoiced
+ if (!empty($arrayfields['p.total_invoiced']['checked']))
+ {
+ print ''.price($totalInvoicedTTC)." \n";
+ if (!$i) $totalarray['nbfield']++;
+ if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'p.total_invoiced';
+ $totalarray['val']['p.total_invoiced'] += $totalInvoicedTTC;
+ }
// Currency
if (!empty($arrayfields['p.multicurrency_code']['checked']))
{
- print ''.$obj->multicurrency_code.' - '.$langs->trans('Currency'.$obj->multicurrency_code)." \n";
- if (!$i) $totalarray['nbfield']++;
+ print ''.$obj->multicurrency_code.' - '.$langs->trans('Currency'.$obj->multicurrency_code)." \n";
+ if (!$i) $totalarray['nbfield']++;
}
// Currency rate
if (!empty($arrayfields['p.multicurrency_tx']['checked']))
{
- print '';
- $form->form_multicurrency_rate($_SERVER['PHP_SELF'].'?id='.$obj->rowid, $obj->multicurrency_tx, 'none', $obj->multicurrency_code);
- print " \n";
- if (!$i) $totalarray['nbfield']++;
+ print '';
+ $form->form_multicurrency_rate($_SERVER['PHP_SELF'].'?id='.$obj->rowid, $obj->multicurrency_tx, 'none', $obj->multicurrency_code);
+ print " \n";
+ if (!$i) $totalarray['nbfield']++;
}
// Amount HT
if (!empty($arrayfields['p.multicurrency_total_ht']['checked']))
{
- print ''.price($obj->multicurrency_total_ht)." \n";
- if (!$i) $totalarray['nbfield']++;
+ print ''.price($obj->multicurrency_total_ht)." \n";
+ if (!$i) $totalarray['nbfield']++;
}
// Amount VAT
if (!empty($arrayfields['p.multicurrency_total_vat']['checked']))
@@ -1132,17 +1133,17 @@ if ($resql)
if (!$i) $totalarray['nbfield']++;
}
// Amount invoiced
- if (!empty($arrayfields['p.multicurrency_total_ht_invoiced']['checked']))
- {
- print ''.price($multicurrency_totalInvoicedHT)." \n";
- if (!$i) $totalarray['nbfield']++;
- }
- // Amount invoiced
- if (!empty($arrayfields['p.multicurrency_total_invoiced']['checked']))
- {
- print ''.price($multicurrency_totalInvoicedTTC)." \n";
- if (!$i) $totalarray['nbfield']++;
- }
+ if (!empty($arrayfields['p.multicurrency_total_ht_invoiced']['checked']))
+ {
+ print ''.price($multicurrency_totalInvoicedHT)." \n";
+ if (!$i) $totalarray['nbfield']++;
+ }
+ // Amount invoiced
+ if (!empty($arrayfields['p.multicurrency_total_invoiced']['checked']))
+ {
+ print ''.price($multicurrency_totalInvoicedTTC)." \n";
+ if (!$i) $totalarray['nbfield']++;
+ }
$userstatic->id = $obj->fk_user_author;
$userstatic->login = $obj->login;
@@ -1222,7 +1223,7 @@ if ($resql)
print '';
if (!$i) $totalarray['nbfield']++;
}
- // Date cloture
+ // Date cloture
if (!empty($arrayfields['p.date_cloture']['checked']))
{
print '';
@@ -1233,7 +1234,7 @@ if ($resql)
// Status
if (!empty($arrayfields['p.fk_statut']['checked']))
{
- print ' '.$objectstatic->LibStatut($obj->fk_statut, 5).' ';
+ print ''.$objectstatic->getLibStatut(5).' ';
if (!$i) $totalarray['nbfield']++;
}
// Action column
diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php
index 2a0675806dc..b43a702c2f2 100644
--- a/htdocs/commande/card.php
+++ b/htdocs/commande/card.php
@@ -113,7 +113,7 @@ $permissionnote = $usercancreate; // Used by the include of actions_setnotes.inc
$permissiondellink = $usercancreate; // Used by the include of actions_dellink.inc.php
$permissiontoadd = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
-if (!empty($conf->expedition->enabled) && $conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER = 1) {
+if (!empty($conf->expedition->enabled) && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER)) {
if (empty($object->warehouse_id) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) $object->warehouse_id = $conf->global->MAIN_DEFAULT_WAREHOUSE;
if (empty($object->warehouse_id) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER)) $object->warehouse_id = $user->fk_warehouse;
}
@@ -1506,9 +1506,10 @@ if ($action == 'create' && $usercancreate)
if (!empty($origin) && !empty($originid)) {
// Parse element/subelement (ex: project_task)
$element = $subelement = $origin;
+ $regs = array();
if (preg_match('/^([^_]+)_([^_]+)/i', $origin, $regs)) {
- $element = $regs [1];
- $subelement = $regs [2];
+ $element = $regs[1];
+ $subelement = $regs[2];
}
if ($element == 'project') {
diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php
index e1195427bc1..c39a5a05a13 100644
--- a/htdocs/commande/class/commande.class.php
+++ b/htdocs/commande/class/commande.class.php
@@ -3540,7 +3540,7 @@ class Commande extends CommonOrder
$response->warning_delay = $conf->commande->client->warning_delay / 60 / 60 / 24;
$response->label = $langs->trans("OrdersToProcess");
$response->labelShort = $langs->trans("Opened");
- $response->url = DOL_URL_ROOT.'/commande/list.php?viewstatut=-3&mainmenu=commercial&leftmenu=orders';
+ $response->url = DOL_URL_ROOT.'/commande/list.php?search_status=-3&mainmenu=commercial&leftmenu=orders';
$response->img = img_object('', "order");
$generic_commande = new Commande($this->db);
@@ -3697,7 +3697,7 @@ class Commande extends CommonOrder
$label = '';
if ($user->rights->commande->lire) {
- $label = ''.$langs->trans("ShowOrder").' ';
+ $label = ''.$langs->trans("Order").' ';
$label .= ''.$langs->trans('Ref').': '.$this->ref;
$label .= ''.$langs->trans('RefCustomer').': '.($this->ref_customer ? $this->ref_customer : $this->ref_client);
if (!empty($this->total_ht)) {
@@ -3709,6 +3709,9 @@ class Commande extends CommonOrder
if (!empty($this->total_ttc)) {
$label .= ''.$langs->trans('AmountTTC').': '.price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency);
}
+ if (isset($this->statut)) {
+ $label .= ''.$langs->trans("Status").": ".$this->getLibStatut(5);
+ }
}
$linkclose = '';
@@ -3716,7 +3719,7 @@ class Commande extends CommonOrder
{
if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
{
- $label = $langs->trans("ShowOrder");
+ $label = $langs->trans("Order");
$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
}
$linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"';
diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php
index 4fa1095998a..9d188cda104 100644
--- a/htdocs/commande/document.php
+++ b/htdocs/commande/document.php
@@ -52,11 +52,12 @@ if ($user->socid)
$result = restrictedArea($user, 'commande', $id, '');
// Get parameters
+$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
-$offset = $conf->liste_limit * $page;
+$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php
index 763371a727d..52e5108ff5f 100644
--- a/htdocs/commande/index.php
+++ b/htdocs/commande/index.php
@@ -168,6 +168,7 @@ if ($resql)
print ' ';
}
+
//if ($totalinprocess != $total)
print ''.$langs->trans("Total").' '.$total.' ';
print "
";
@@ -353,7 +354,7 @@ if (!empty($conf->commande->enabled))
print '';
print '
';
print '';
- print ''.$langs->trans("OrdersToProcess").' '.$num.' ';
+ print ''.$langs->trans("OrdersToProcess").' '.$num.' ';
if ($num)
{
@@ -439,7 +440,7 @@ if (!empty($conf->commande->enabled))
print '';
print '
';
print '';
- print ''.$langs->trans("OnProcessOrders").' '.$num.' ';
+ print ''.$langs->trans("OnProcessOrders").' '.$num.' ';
if ($num)
{
diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php
index 43fed8a4e77..dda9bee327f 100644
--- a/htdocs/commande/list.php
+++ b/htdocs/commande/list.php
@@ -10,8 +10,7 @@
* Copyright (C) 2015 Marcos García
* Copyright (C) 2015 Jean-François Ferry
* Copyright (C) 2016 Ferran Marcet
- * Copyright (C) 2018 Charlene Benke
-
+ * Copyright (C) 2018 Charlene Benke
*
* 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
@@ -86,7 +85,7 @@ $search_login = GETPOST('search_login', 'alpha');
$search_categ_cus = trim(GETPOST("search_categ_cus", 'int'));
$optioncss = GETPOST('optioncss', 'alpha');
$billed = GETPOST('billed', 'int');
-$viewstatut = GETPOST('viewstatut', 'int');
+$search_status = GETPOST('search_status', 'int');
$search_btn = GETPOST('button_search', 'alpha');
$search_remove_btn = GETPOST('button_removefilter', 'alpha');
$search_project_ref = GETPOST('search_project_ref', 'alpha');
@@ -223,7 +222,7 @@ if (empty($reshook))
$search_datedelivery_end = '';
$search_project_ref = '';
$search_project = '';
- $viewstatut = '';
+ $search_status = '';
$billed = '';
$toselect = '';
$search_array_options = array();
@@ -310,23 +309,23 @@ if ($search_ref) $sql .= natural_search('c.ref', $search_ref);
if ($search_ref_customer) $sql .= natural_search('c.ref_client', $search_ref_customer);
if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall);
if ($billed != '' && $billed >= 0) $sql .= ' AND c.facture = '.$billed;
-if ($viewstatut <> '')
+if ($search_status <> '')
{
- if ($viewstatut < 4 && $viewstatut > -3)
+ if ($search_status < 4 && $search_status > -3)
{
- if ($viewstatut == 1 && empty($conf->expedition->enabled)) $sql .= ' AND c.fk_statut IN (1,2)'; // If module expedition disabled, we include order with status 'sending in process' into 'validated'
- else $sql .= ' AND c.fk_statut = '.$viewstatut; // brouillon, validee, en cours, annulee
+ if ($search_status == 1 && empty($conf->expedition->enabled)) $sql .= ' AND c.fk_statut IN (1,2)'; // If module expedition disabled, we include order with status 'sending in process' into 'validated'
+ else $sql .= ' AND c.fk_statut = '.$search_status; // brouillon, validee, en cours, annulee
}
- if ($viewstatut == 4)
+ if ($search_status == 4)
{
$sql .= ' AND c.facture = 1'; // invoice created
}
- if ($viewstatut == -2) // To process
+ if ($search_status == -2) // To process
{
//$sql.= ' AND c.fk_statut IN (1,2,3) AND c.facture = 0';
$sql .= " AND ((c.fk_statut IN (1,2)) OR (c.fk_statut = 3 AND c.facture = 0))"; // If status is 2 and facture=1, it must be selected
}
- if ($viewstatut == -3) // To bill
+ if ($search_status == -3) // To bill
{
//$sql.= ' AND c.fk_statut in (1,2,3)';
//$sql.= ' AND c.facture = 0'; // invoice not created
@@ -349,7 +348,7 @@ if ($search_user > 0) $sql .= " AND ec.fk_c_type_contact
if ($search_total_ht != '') $sql .= natural_search('c.total_ht', $search_total_ht, 1);
if ($search_total_vat != '') $sql .= natural_search('c.tva', $search_total_vat, 1);
if ($search_total_ttc != '') $sql .= natural_search('c.total_ttc', $search_total_ttc, 1);
-if ($search_warehouse != '') $sql .= natural_search('c.fk_warehouse', $search_warehouse, 1);
+if ($search_warehouse != '' && $search_warehouse != '-1') $sql .= natural_search('c.fk_warehouse', $search_warehouse, 1);
if ($search_multicurrency_code != '') $sql .= ' AND c.multicurrency_code = "'.$db->escape($search_multicurrency_code).'"';
if ($search_multicurrency_tx != '') $sql .= natural_search('c.multicurrency_tx', $search_multicurrency_tx, 1);
if ($search_multicurrency_montant_ht != '') $sql .= natural_search('c.multicurrency_total_ht', $search_multicurrency_montant_ht, 1);
@@ -401,21 +400,21 @@ if ($resql)
{
$title = $langs->trans('ListOfOrders');
}
- if (strval($viewstatut) == '0')
+ if (strval($search_status) == '0')
$title .= ' - '.$langs->trans('StatusOrderDraftShort');
- if ($viewstatut == 1)
+ if ($search_status == 1)
$title .= ' - '.$langs->trans('StatusOrderValidatedShort');
- if ($viewstatut == 2)
+ if ($search_status == 2)
$title .= ' - '.$langs->trans('StatusOrderSentShort');
- if ($viewstatut == 3)
+ if ($search_status == 3)
$title .= ' - '.$langs->trans('StatusOrderToBillShort');
- if ($viewstatut == 4)
+ if ($search_status == 4)
$title .= ' - '.$langs->trans('StatusOrderProcessedShort');
- if ($viewstatut == -1)
+ if ($search_status == -1)
$title .= ' - '.$langs->trans('StatusOrderCanceledShort');
- if ($viewstatut == -2)
+ if ($search_status == -2)
$title .= ' - '.$langs->trans('StatusOrderToProcessShort');
- if ($viewstatut == -3)
+ if ($search_status == -3)
$title .= ' - '.$langs->trans('StatusOrderValidated').', '.(empty($conf->expedition->enabled) ? '' : $langs->trans("StatusOrderSent").', ').$langs->trans('StatusOrderToBill');
$num = $db->num_rows($resql);
@@ -438,7 +437,7 @@ if ($resql)
if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit);
if ($sall) $param .= '&sall='.urlencode($sall);
if ($socid > 0) $param .= '&socid='.urlencode($socid);
- if ($viewstatut != '') $param .= '&viewstatut='.urlencode($viewstatut);
+ if ($search_status != '') $param .= '&search_status='.urlencode($search_status);
if ($search_dateorder_start) $param .= '&search_dateorder_start='.urlencode($search_dateorder_start);
if ($search_dateorder_end) $param .= '&search_dateorder_end='.urlencode($search_dateorder_end);
if ($search_datedelivery_start) $param .= '&search_datedelivery_start='.urlencode($search_datedelivery_start);
@@ -499,13 +498,11 @@ if ($resql)
print ' ';
print ' ';
print ' ';
- print ' ';
print ' ';
- print ' ';
+ print ' ';
print ' ';
-
- print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'commercial', 0, $newcardbutton, '', $limit);
+ print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'commercial', 0, $newcardbutton, '', $limit, 0, 0, 1);
$topicmail = "SendOrderRef";
$modelmail = "order_send";
@@ -606,7 +603,7 @@ if ($resql)
$moreforfilter .= $formother->select_categories('customer', $search_categ_cus, 'search_categ_cus', 1);
$moreforfilter .= '';
}
- if (!empty($conf->expedition->enabled) && $conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER = 1) {
+ if (!empty($conf->expedition->enabled) && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER)) {
require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
$formproduct = new FormProduct($db);
$moreforfilter .= '';
@@ -816,7 +813,7 @@ if ($resql)
-3=>$langs->trans("StatusOrderValidatedShort").'+'.$langs->trans("StatusOrderSentShort").'+'.$langs->trans("StatusOrderDelivered"),
Commande::STATUS_CANCELED=>$langs->trans("StatusOrderCanceledShort")
);
- print $form->selectarray('viewstatut', $liststatus, $viewstatut, -4, 0, 0, '', 0, 0, 0, '', 'maxwidth100');
+ print $form->selectarray('search_status', $liststatus, $search_status, -4, 0, 0, '', 0, 0, 0, '', 'maxwidth100');
print '';
}
// Status billed
@@ -904,6 +901,7 @@ if ($resql)
$generic_commande->id = $obj->rowid;
$generic_commande->ref = $obj->ref;
$generic_commande->statut = $obj->fk_statut;
+ $generic_commande->billed = $obj->billed;
$generic_commande->date = $db->jdate($obj->date_commande);
$generic_commande->date_livraison = $db->jdate($obj->date_delivery);
$generic_commande->ref_client = $obj->ref_client;
@@ -922,11 +920,11 @@ if ($resql)
// Ref
if (!empty($arrayfields['c.ref']['checked']))
{
- print '
';
+ print ' ';
$generic_commande->getLinesArray(); // This set ->lines
- print $generic_commande->getNomUrl(1, ($viewstatut != 2 ? 0 : $obj->fk_statut), 0, 0, 0, 1, 1);
+ print $generic_commande->getNomUrl(1, ($search_status != 2 ? 0 : $obj->fk_statut), 0, 0, 0, 1, 1);
// Show shippable Icon (create subloop, so may be slow)
if ($conf->stock->enabled)
diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php
index 2920760b492..bad5034eac5 100644
--- a/htdocs/commande/orderstoinvoice.php
+++ b/htdocs/commande/orderstoinvoice.php
@@ -57,7 +57,7 @@ $socid = GETPOST('socid', 'int');
$selected = GETPOST('orders_to_invoice');
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
-$viewstatut = GETPOST('viewstatut', 'alpha');
+$search_status = GETPOST('search_status', 'alpha');
$error = 0;
@@ -169,7 +169,6 @@ if (($action == 'create' || $action == 'add') && !$error)
$object->note_public = trim($_POST['note_public']);
$object->note = trim($_POST['note']);
$object->ref_client = $_POST['ref_client'];
- $object->ref_int = $_POST['ref_int'];
$object->modelpdf = $_POST['model'];
$object->fk_project = $_POST['projectid'];
$object->cond_reglement_id = ($_POST['type'] == 3 ? 1 : $_POST['cond_reglement_id']);
@@ -407,8 +406,6 @@ if ($action == 'create' && !$error)
print ' ';
print ' '."\n";
print ' ';
- print ' ';
- print ' ';
print ' ';
print ' ';
print ' ';
diff --git a/htdocs/compta/bank/account_statement_document.php b/htdocs/compta/bank/account_statement_document.php
index 1df1f000a61..05f89e1bc6f 100644
--- a/htdocs/compta/bank/account_statement_document.php
+++ b/htdocs/compta/bank/account_statement_document.php
@@ -57,11 +57,12 @@ if ($user->socid)
$socid = $user->socid;
// Get parameters
+$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1) { $page = 0; }
-$offset = $conf->liste_limit * $page;
+$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (!$sortorder)
diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php
index 481ca2b03fe..7b531d31bc0 100644
--- a/htdocs/compta/bank/bankentries_list.php
+++ b/htdocs/compta/bank/bankentries_list.php
@@ -108,14 +108,6 @@ $pagenext = $page + 1;
if (!$sortorder) $sortorder = 'desc,desc,desc';
if (!$sortfield) $sortfield = 'b.datev,b.dateo,b.rowid';
-$mode_balance_ok = false;
-//if (($sortfield == 'b.datev' || $sortfield == 'b.datev,b.dateo,b.rowid')) // TODO Manage balance when account not selected
-if (($sortfield == 'b.datev' || $sortfield == 'b.datev,b.dateo,b.rowid'))
-{
- $sortfield = 'b.datev,b.dateo,b.rowid';
- if ($id > 0 || !empty($ref) || $search_account > 0) $mode_balance_ok = true;
-}
-
$object = new Account($db);
if ($id > 0 || !empty($ref))
{
@@ -130,6 +122,13 @@ if ($id > 0 || !empty($ref))
}
}
+$mode_balance_ok = false;
+//if (($sortfield == 'b.datev' || $sortfield == 'b.datev,b.dateo,b.rowid')) // TODO Manage balance when account not selected
+if (($sortfield == 'b.datev' || $sortfield == 'b.datev,b.dateo,b.rowid'))
+{
+ $sortfield = 'b.datev,b.dateo,b.rowid';
+ if ($id > 0 || !empty($ref) || $search_account > 0) $mode_balance_ok = true;
+}
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('banktransactionlist', $contextpage));
@@ -574,6 +573,7 @@ if ($page >= $nbtotalofpages)
if ($page < 0) $page = 0;
}
+
// If not account defined $mode_balance_ok=false
if (empty($search_account)) $mode_balance_ok = false;
// If a search is done $mode_balance_ok=false
@@ -583,7 +583,7 @@ if (!empty($search_type)) $mode_balance_ok = false;
if (!empty($search_debit)) $mode_balance_ok = false;
if (!empty($search_credit)) $mode_balance_ok = false;
if (!empty($search_thirdparty)) $mode_balance_ok = false;
-if ($search_conciliated != '') $mode_balance_ok = false;
+if ($search_conciliated != '' && $search_conciliated != '-1') $mode_balance_ok = false;
if (!empty($search_num_releve)) $mode_balance_ok = false;
$sql .= $db->plimit($limit + 1, $offset);
@@ -751,8 +751,8 @@ if ($resql)
print ' ';
}*/
print '';
- print ' ';
- print ' ';
+ print ' ';
+ print ' ';
print ' ';
print '
';
@@ -815,7 +815,7 @@ if ($resql)
$morehtml .= $buttonreconcile;
}
- $morehtml .= $newcardbutton;
+ $morehtml .= ''.$newcardbutton;
$picto = 'bank_account';
if ($id > 0 || !empty($ref)) $picto = '';
@@ -1187,7 +1187,13 @@ if ($resql)
$reg = array();
preg_match('/\((.+)\)/i', $objp->label, $reg); // Si texte entoure de parenthee on tente recherche de traduction
if ($reg[1] && $langs->trans($reg[1]) != $reg[1]) print $langs->trans($reg[1]);
- else print dol_trunc($objp->label, 40);
+ else {
+ if ($objp->label == '(payment_salary)') {
+ print dol_trunc($langs->trans("SalaryPayment", 40));
+ } else {
+ print dol_trunc($objp->label, 40);
+ }
+ }
//print " ";
// Add links after description
@@ -1195,6 +1201,7 @@ if ($resql)
$cachebankaccount = array();
foreach ($links as $key=>$val)
{
+ print '';
if ($links[$key]['type'] == 'withdraw')
{
$banktransferstatic->id = $links[$key]['url_id'];
@@ -1540,7 +1547,7 @@ if ($resql)
if ($user->rights->banque->modifier)
{
print '
rowid.'&id='.$objp->bankid.'&page='.$page.'">';
- print img_delete();
+ print img_delete('', 'class="marginleftonly"');
print ' ';
}
}
diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php
index d8b4424661a..ab99173b614 100644
--- a/htdocs/compta/bank/class/account.class.php
+++ b/htdocs/compta/bank/class/account.class.php
@@ -243,7 +243,7 @@ class Account extends CommonObject
/**
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
*/
- public $fields=array(
+ public $fields = array(
'rowid' =>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>10),
'ref' =>array('type'=>'varchar(12)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'showoncombobox'=>1, 'position'=>25),
'label' =>array('type'=>'varchar(30)', 'label'=>'Label', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>30),
@@ -1390,8 +1390,8 @@ class Account extends CommonObject
global $conf, $langs, $user;
$result = '';
- $label = '
'.$langs->trans("ShowAccount").' ';
- $label .= '
'.$langs->trans('BankAccount').': '.$this->label;
+ $label = '
'.$langs->trans("BankAccount").' ';
+ $label .= '
'.$langs->trans('Label').': '.$this->label;
$label .= '
'.$langs->trans('AccountNumber').': '.$this->number;
$label .= '
'.$langs->trans("AccountCurrency").': '.$this->currency_code;
diff --git a/htdocs/compta/bank/class/api_bankaccounts.class.php b/htdocs/compta/bank/class/api_bankaccounts.class.php
index 2fb97ff949c..d947d169695 100644
--- a/htdocs/compta/bank/class/api_bankaccounts.class.php
+++ b/htdocs/compta/bank/class/api_bankaccounts.class.php
@@ -57,12 +57,13 @@ class BankAccounts extends DolibarrApi
* @param string $sortorder Sort order
* @param int $limit Limit for list
* @param int $page Page number
+ * @param int $category Use this param to filter list by category
* @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.import_key:<:'20160101')"
* @return array List of account objects
*
* @throws RestException
*/
- public function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $sqlfilters = '')
+ public function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $category = 0, $sqlfilters = '')
{
$list = array();
@@ -71,7 +72,14 @@ class BankAccounts extends DolibarrApi
}
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."bank_account as t";
+ if ($category > 0) {
+ $sql .= ", ".MAIN_DB_PREFIX."categorie_account as c";
+ }
$sql .= ' WHERE t.entity IN ('.getEntity('bank_account').')';
+ // Select accounts of given category
+ if ($category > 0) {
+ $sql .= " AND c.fk_categorie = ".$db->escape($category)." AND c.fk_account = t.rowid ";
+ }
// Add sql filters
if ($sqlfilters)
{
diff --git a/htdocs/compta/bank/document.php b/htdocs/compta/bank/document.php
index 9fd2207f3ec..d003463e5af 100644
--- a/htdocs/compta/bank/document.php
+++ b/htdocs/compta/bank/document.php
@@ -54,11 +54,12 @@ if ($user->socid)
$socid = $user->socid;
// Get parameters
+$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1) { $page = 0; }
-$offset = $conf->liste_limit * $page;
+$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (!$sortorder)
diff --git a/htdocs/compta/bank/line.php b/htdocs/compta/bank/line.php
index 515759547a6..5c64c4ee5d9 100644
--- a/htdocs/compta/bank/line.php
+++ b/htdocs/compta/bank/line.php
@@ -386,7 +386,7 @@ if ($result)
print '';
}
elseif ($links[$key]['type'] == 'payment_salary') {
- print '
';
+ print ' ';
print img_object($langs->trans('ShowPaymentSalary'), 'payment').' ';
print $langs->trans("SalaryPayment");
print ' ';
diff --git a/htdocs/compta/bank/list.php b/htdocs/compta/bank/list.php
index 2d724ec2690..eaefdfb6573 100644
--- a/htdocs/compta/bank/list.php
+++ b/htdocs/compta/bank/list.php
@@ -264,7 +264,7 @@ print '
';
print '
';
print '
';
print '
';
-print '
';
+print '
';
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'bank_account', 0, $newcardbutton, '', $limit, 1);
@@ -538,7 +538,11 @@ foreach ($accounts as $key=>$type)
if ($result < 0) {
setEventMessages($objecttmp->error, $objecttmp->errors, 'errors');
} else {
- print '
'.$result->nbtodo.' ';
+ print '
';
+ print '';
+ print $result->nbtodo;
+ print ' ';
+ print ' ';
if ($result->nbtodolate) {
print '
';
print ' '.$result->nbtodolate;
diff --git a/htdocs/compta/bank/transfer.php b/htdocs/compta/bank/transfer.php
index afc1c6711e0..aa4c39e55ee 100644
--- a/htdocs/compta/bank/transfer.php
+++ b/htdocs/compta/bank/transfer.php
@@ -5,7 +5,7 @@
* Copyright (C) 2012 Juanjo Menent
* Copyright (C) 2015 Jean-François Ferry
* Copyright (C) 2015 Marcos García
- * Copyright (C) 2018 Frédéric France
+ * Copyright (C) 2018 Frédéric France
*
* 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
@@ -51,8 +51,8 @@ if ($action == 'add')
$dateo = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
$label = GETPOST('label', 'alpha');
- $amount = GETPOST('amount', 'alpha');
- $amountto = GETPOST('amountto', 'alpha');
+ $amount = price2num(GETPOST('amount', 'alpha'), 'MT');
+ $amountto = price2num(GETPOST('amountto', 'alpha'), 'MT');
if (!$label)
{
@@ -115,9 +115,9 @@ if ($action == 'add')
$typeto = 'LIQ';
}
- if (!$error) $bank_line_id_from = $accountfrom->addline($dateo, $typefrom, $label, -1 * price2num($amount), '', '', $user);
+ if (!$error) $bank_line_id_from = $accountfrom->addline($dateo, $typefrom, $label, price2num(-1 * $amount), '', '', $user);
if (!($bank_line_id_from > 0)) $error++;
- if (!$error) $bank_line_id_to = $accountto->addline($dateo, $typeto, $label, price2num($amountto), '', '', $user);
+ if (!$error) $bank_line_id_to = $accountto->addline($dateo, $typeto, $label, $amountto, '', '', $user);
if (!($bank_line_id_to > 0)) $error++;
if (!$error) $result = $accountfrom->add_url_line($bank_line_id_from, $bank_line_id_to, DOL_URL_ROOT.'/compta/bank/line.php?rowid=', '(banktransfert)', 'banktransfert');
@@ -246,7 +246,6 @@ print ''.$langs->trans("TransferFrom").' '.$langs->trans("TransferTo
print ' '.$langs->trans("AmountToOthercurrency").' ';
print '';
-$var = false;
print '';
$form->select_comptes($account_from, 'account_from', 0, '', 1, '', empty($conf->multicurrency->enabled) ? 0 : 1);
print " ";
diff --git a/htdocs/compta/bank/various_payment/card.php b/htdocs/compta/bank/various_payment/card.php
index ccd6b24c6b9..c4fdc3be56a 100644
--- a/htdocs/compta/bank/various_payment/card.php
+++ b/htdocs/compta/bank/various_payment/card.php
@@ -277,7 +277,7 @@ if ($action == 'create')
print ' ';
print ' ';
- print load_fiche_titre($langs->trans("NewVariousPayment"), '', 'invoicing');
+ print load_fiche_titre($langs->trans("NewVariousPayment"), '', 'object_payment');
dol_fiche_head('', '');
diff --git a/htdocs/compta/bank/various_payment/document.php b/htdocs/compta/bank/various_payment/document.php
index 618cc6006a5..d81b9bdd41a 100644
--- a/htdocs/compta/bank/various_payment/document.php
+++ b/htdocs/compta/bank/various_payment/document.php
@@ -43,11 +43,12 @@ if ($user->socid) $socid = $user->socid;
$result = restrictedArea($user, 'banque', '', '', '');
// Get parameters
+$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST('sortfield', 'alpha');
$sortorder = GETPOST('sortorder', 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
-$offset = $conf->liste_limit * $page;
+$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (!$sortorder) $sortorder = "ASC";
diff --git a/htdocs/compta/bank/various_payment/list.php b/htdocs/compta/bank/various_payment/list.php
index e2aa6517417..5f68440809c 100644
--- a/htdocs/compta/bank/various_payment/list.php
+++ b/htdocs/compta/bank/various_payment/list.php
@@ -58,7 +58,7 @@ $sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
-$offset = $conf->liste_limit * $page;
+$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (!$sortfield) $sortfield = "v.datep,v.rowid";
@@ -95,6 +95,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x'
$typeid = "";
}
+
/*
* View
*/
@@ -178,9 +179,8 @@ if ($result)
print ' ';
print ' ';
print ' ';
- print ' ';
- print_barre_liste($langs->trans("VariousPayments"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'invoicing', 0, $newcardbutton, '', $limit);
+ print_barre_liste($langs->trans("VariousPayments"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'object_payment', 0, $newcardbutton, '', $limit, 0, 0, 1);
print '';
print '
'."\n";
diff --git a/htdocs/compta/cashcontrol/cashcontrol_list.php b/htdocs/compta/cashcontrol/cashcontrol_list.php
index d559fad2b30..313627016c8 100644
--- a/htdocs/compta/cashcontrol/cashcontrol_list.php
+++ b/htdocs/compta/cashcontrol/cashcontrol_list.php
@@ -333,14 +333,13 @@ print ' ';
print ' ';
print ' ';
-print ' ';
print ' ';
$permforcashfence = 1;
$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/cashcontrol/cashcontrol_card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permforcashfence);
-print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'cash-register', 0, $newcardbutton, '', $limit);
+print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'cash-register', 0, $newcardbutton, '', $limit, 0, 0, 1);
// Add code for pre mass action (confirmation or email presend form)
$topicmail = "SendCashControlRef";
diff --git a/htdocs/compta/charges/index.php b/htdocs/compta/charges/index.php
index e9aa35d80b3..93065219248 100644
--- a/htdocs/compta/charges/index.php
+++ b/htdocs/compta/charges/index.php
@@ -102,11 +102,11 @@ print ' ';
if ($mode != 'sconly')
{
$center = ($year ? ''.img_previous($langs->trans("Previous"), 'class="valignbottom"')." ".$langs->trans("Year").' '.$year.' '.img_next($langs->trans("Next"), 'class="valignbottom"')." " : "");
- print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $totalnboflines, 'title_accountancy', 0, '', '', $limit, 1);
+ print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $totalnboflines, 'object_payment', 0, '', '', $limit, 1);
}
else
{
- print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $totalnboflines, 'title_accountancy', 0, '', '', $limit);
+ print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $totalnboflines, 'object_payment', 0, '', '', $limit, 0);
}
if ($year) $param .= '&year='.$year;
diff --git a/htdocs/compta/clients.php b/htdocs/compta/clients.php
index 1dc13c0580f..6c1439d5466 100644
--- a/htdocs/compta/clients.php
+++ b/htdocs/compta/clients.php
@@ -44,11 +44,12 @@ $langs->load("companies");
$mode = GETPOST("mode");
+$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
-$offset = $conf->liste_limit * $page;
+$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (!$sortorder) $sortorder = "ASC";
diff --git a/htdocs/compta/deplacement/card.php b/htdocs/compta/deplacement/card.php
index de5cdb30205..463d9ea699f 100644
--- a/htdocs/compta/deplacement/card.php
+++ b/htdocs/compta/deplacement/card.php
@@ -439,9 +439,9 @@ elseif ($id)
// Type
print '';
- print $form->editfieldkey("Type", 'type', $langs->trans($object->type), $object, $conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer, 'select:types_fees');
+ print $form->editfieldkey("Type", 'type', $langs->trans($object->type), $object, $user->rights->deplacement->creer, 'select:types_fees');
print ' ';
- print $form->editfieldval("Type", 'type', $form->cache_types_fees[$object->type], $object, $conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer, 'select:types_fees');
+ print $form->editfieldval("Type", 'type', $form->cache_types_fees[$object->type], $object, $user->rights->deplacement->creer, 'select:types_fees');
print ' ';
// Who
@@ -453,16 +453,16 @@ elseif ($id)
// Date
print '';
- print $form->editfieldkey("Date", 'dated', $object->date, $object, $conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer, 'datepicker');
+ print $form->editfieldkey("Date", 'dated', $object->date, $object, $user->rights->deplacement->creer, 'datepicker');
print ' ';
- print $form->editfieldval("Date", 'dated', $object->date, $object, $conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer, 'datepicker');
+ print $form->editfieldval("Date", 'dated', $object->date, $object, $user->rights->deplacement->creer, 'datepicker');
print ' ';
// Km/Price
print '';
- print $form->editfieldkey("FeesKilometersOrAmout", 'km', $object->km, $object, $conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer, 'numeric:6');
+ print $form->editfieldkey("FeesKilometersOrAmout", 'km', $object->km, $object, $user->rights->deplacement->creer, 'numeric:6');
print ' ';
- print $form->editfieldval("FeesKilometersOrAmout", 'km', $object->km, $object, $conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer, 'numeric:6');
+ print $form->editfieldval("FeesKilometersOrAmout", 'km', $object->km, $object, $user->rights->deplacement->creer, 'numeric:6');
print " ";
// Where
diff --git a/htdocs/compta/deplacement/document.php b/htdocs/compta/deplacement/document.php
index 4f42ae2292b..2cef0b3e6cd 100644
--- a/htdocs/compta/deplacement/document.php
+++ b/htdocs/compta/deplacement/document.php
@@ -48,11 +48,12 @@ $result = restrictedArea($user, 'deplacement', $id, '');
// Get parameters
+$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST('sortfield', 'alpha');
$sortorder = GETPOST('sortorder', 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
-$offset = $conf->liste_limit * $page;
+$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (!$sortorder) $sortorder = "ASC";
diff --git a/htdocs/compta/deplacement/index.php b/htdocs/compta/deplacement/index.php
index e95d7f95732..9d45bafd20f 100644
--- a/htdocs/compta/deplacement/index.php
+++ b/htdocs/compta/deplacement/index.php
@@ -35,11 +35,12 @@ $socid = GETPOST('socid', 'int');
if ($user->socid) $socid = $user->socid;
$result = restrictedArea($user, 'deplacement', '', '');
+$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
-$offset = $conf->liste_limit * $page;
+$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (!$sortorder) $sortorder = "DESC";
diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php
index 824d861d6cf..4f111c26f39 100644
--- a/htdocs/compta/facture/card.php
+++ b/htdocs/compta/facture/card.php
@@ -139,6 +139,11 @@ if ($user->socid) $socid = $user->socid;
$isdraft = (($object->statut == Facture::STATUS_DRAFT) ? 1 : 0);
$result = restrictedArea($user, 'facture', $id, '', '', 'fk_soc', $fieldid, $isdraft);
+// retained warranty invoice available type
+$retainedWarrantyInvoiceAvailableType=array();
+if(!empty($conf->global->INVOICE_USE_RETAINED_WARRANTY)) {
+ $retainedWarrantyInvoiceAvailableType = explode('+', $conf->global->INVOICE_USE_RETAINED_WARRANTY);
+}
/*
@@ -947,7 +952,7 @@ if (empty($reshook))
}
$discount->tva_tx = abs($tva_tx);
- $discount->vat_src_code = $vat_src_code;
+ $discount->vat_src_code =$vat_src_code;
$result = $discount->create($user);
if ($result < 0)
@@ -1355,17 +1360,22 @@ if (empty($reshook))
$object->situation_counter = 1;
$object->situation_final = 0;
$object->situation_cycle_ref = $object->newCycle();
+ }
-
+ if(in_array($object->type, $retainedWarrantyInvoiceAvailableType)){
$object->retained_warranty = GETPOST('retained_warranty', 'int');
$object->retained_warranty_fk_cond_reglement = GETPOST('retained_warranty_fk_cond_reglement', 'int');
-
- $retained_warranty_date_limit = GETPOST('retained_warranty_date_limit');
- if (!empty($retained_warranty_date_limit) && $db->jdate($retained_warranty_date_limit)) {
- $object->retained_warranty_date_limit = $db->jdate($retained_warranty_date_limit);
- }
- $object->retained_warranty_date_limit = !empty($object->retained_warranty_date_limit) ? $object->retained_warranty_date_limit : $object->calculate_date_lim_reglement($object->retained_warranty_fk_cond_reglement);
}
+ else{
+ $object->retained_warranty = 0;
+ $object->retained_warranty_fk_cond_reglement = 0;
+ }
+
+ $retained_warranty_date_limit = GETPOST('retained_warranty_date_limit');
+ if (!empty($retained_warranty_date_limit) && $db->jdate($retained_warranty_date_limit)) {
+ $object->retained_warranty_date_limit = $db->jdate($retained_warranty_date_limit);
+ }
+ $object->retained_warranty_date_limit = !empty($object->retained_warranty_date_limit) ? $object->retained_warranty_date_limit : $object->calculate_date_lim_reglement($object->retained_warranty_fk_cond_reglement);
$object->fetch_thirdparty();
@@ -1756,21 +1766,32 @@ if (empty($reshook))
$object->fk_facture_source = $_POST['situations'];
$object->type = Facture::TYPE_SITUATION;
-
- $object->retained_warranty = GETPOST('retained_warranty', 'int');
- $object->retained_warranty_fk_cond_reglement = GETPOST('retained_warranty_fk_cond_reglement', 'int');
-
- $retained_warranty_date_limit = GETPOST('retained_warranty_date_limit');
- if (!empty($retained_warranty_date_limit) && $db->jdate($retained_warranty_date_limit)) {
- $object->retained_warranty_date_limit = $db->jdate($retained_warranty_date_limit);
- }
- $object->retained_warranty_date_limit = !empty($object->retained_warranty_date_limit) ? $object->retained_warranty_date_limit : $object->calculate_date_lim_reglement($object->retained_warranty_fk_cond_reglement);
-
- if (!empty($origin) && !empty($originid))
+ if (!empty($origin) && !empty($originid))
{
$object->origin = $origin;
$object->origin_id = $originid;
+ // retained warranty
+ if(!empty($conf->global->INVOICE_USE_RETAINED_WARRANTY))
+ {
+ $retained_warranty = GETPOST('retained_warranty', 'int');
+ if(price2num($retained_warranty) > 0)
+ {
+ $object->retained_warranty = price2num($retained_warranty);
+ }
+
+ if(GETPOST('retained_warranty_fk_cond_reglement', 'int') > 0)
+ {
+ $object->retained_warranty_fk_cond_reglement = GETPOST('retained_warranty_fk_cond_reglement', 'int');
+ }
+
+ $retained_warranty_date_limit = GETPOST('retained_warranty_date_limit');
+ if (!empty($retained_warranty_date_limit) && $db->jdate($retained_warranty_date_limit)) {
+ $object->retained_warranty_date_limit = $db->jdate($retained_warranty_date_limit);
+ }
+ $object->retained_warranty_date_limit = !empty($object->retained_warranty_date_limit) ? $object->retained_warranty_date_limit : $object->calculate_date_lim_reglement($object->retained_warranty_fk_cond_reglement);
+ }
+
foreach ($object->lines as $i => &$line)
{
$line->origin = $object->origin;
@@ -2608,10 +2629,10 @@ if (empty($reshook))
$pa_ht = $originLine->pa_ht;
$label = $originLine->label;
$array_options = $originLine->array_options;
- if ($object->type == Facture::TYPE_SITUATION) {
+ if($object->type == Facture::TYPE_SITUATION){
$situation_percent = 0;
}
- else {
+ else{
$situation_percent = 100;
}
$fk_prev_id = '';
@@ -3371,54 +3392,55 @@ if ($action == 'create')
$form->select_conditions_paiements(GETPOSTISSET('cond_reglement_id') ? GETPOST('cond_reglement_id', 'int') : $cond_reglement_id, 'cond_reglement_id');
print '';
- if (!empty($conf->global->INVOICE_USE_SITUATION))
- {
- if ($conf->global->INVOICE_USE_SITUATION_RETAINED_WARRANTY) {
- $rwStyle = 'display:none;';
- if (GETPOST('type', 'int') == Facture::TYPE_SITUATION) {
- $rwStyle = '';
- }
- $retained_warranty = GETPOST('retained_warranty', 'int');
- if (empty($retained_warranty)) {
- if (!empty($objectsrc->retained_warranty)) { // use previous situation value
- $retained_warranty = $objectsrc->retained_warranty;
- } else {
- $retained_warranty = $conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_PERCENT;
- }
- }
+ if($conf->global->INVOICE_USE_RETAINED_WARRANTY){
+ $rwStyle = 'display:none;';
+ if(in_array(GETPOST('type', 'int'), $retainedWarrantyInvoiceAvailableType)){
+ $rwStyle = '';
+ }
- print ''.$langs->trans('RetainedWarranty').' ';
- print ' %';
+ $retained_warranty = GETPOST('retained_warranty', 'int');
+ if(empty($retained_warranty)){
+ if(!empty($objectsrc->retained_warranty)){ // use previous situation value
+ $retained_warranty = $objectsrc->retained_warranty;
+ }
+ }
+ $retained_warranty_js_default = !empty($retained_warranty)?$retained_warranty:$conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_PERCENT;
- // Retained warranty payment term
- print ' '.$langs->trans('PaymentConditionsShortRetainedWarranty').' ';
- $retained_warranty_fk_cond_reglement = GETPOST('retained_warranty_fk_cond_reglement', 'int');
- if (empty($retained_warranty_fk_cond_reglement)) {
- $retained_warranty_fk_cond_reglement = $conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID;
- if (!empty($objectsrc->retained_warranty_fk_cond_reglement)) { // use previous situation value
- $retained_warranty_fk_cond_reglement = $objectsrc->retained_warranty_fk_cond_reglement;
- } else {
- $retained_warranty_fk_cond_reglement = $conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID;
- }
- }
- $form->select_conditions_paiements($retained_warranty_fk_cond_reglement, 'retained_warranty_fk_cond_reglement', -1, 1);
- print ' ';
+ print ''.$langs->trans('RetainedWarranty').' ';
+ print ' %';
- print '';
- }
+ // Retained warranty payment term
+ print ' '.$langs->trans('PaymentConditionsShortRetainedWarranty').' ';
+ $retained_warranty_fk_cond_reglement = GETPOST('retained_warranty_fk_cond_reglement', 'int');
+ if(empty($retained_warranty_fk_cond_reglement)){
+ $retained_warranty_fk_cond_reglement = $conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID;
+ if(!empty($objectsrc->retained_warranty_fk_cond_reglement)){ // use previous situation value
+ $retained_warranty_fk_cond_reglement = $objectsrc->retained_warranty_fk_cond_reglement;
+ }else{
+ $retained_warranty_fk_cond_reglement = $conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID;
+ }
+ }
+ $form->select_conditions_paiements($retained_warranty_fk_cond_reglement, 'retained_warranty_fk_cond_reglement', -1, 1);
+ print ' ';
+
+ print '';
}
// Payment mode
@@ -4333,89 +4355,79 @@ elseif ($id > 0 || !empty($ref))
print '';
}
- $displayWarranty = false;
- if (($object->type == Facture::TYPE_SITUATION && (!empty($object->retained_warranty) || !empty($conf->global->INVOICE_USE_SITUATION_RETAINED_WARRANTY))))
- {
- // Check if this situation invoice is 100% for real
- if (!empty($object->situation_final) && !empty($object->lines)) {
- $displayWarranty = true;
- foreach ($object->lines as $i => $line) {
- if ($line->product_type < 2 && $line->situation_percent < 100) {
- $displayWarranty = false;
- break;
- }
- }
- }
+ if (!empty($object->retained_warranty) || !empty($conf->global->INVOICE_USE_RETAINED_WARRANTY)) {
+ $displayWarranty = true;
+ if (!in_array($object->type, $retainedWarrantyInvoiceAvailableType) && empty($object->retained_warranty)) {
+ $displayWarranty = false;
+ }
- // Retained Warranty
- print '';
- print '';
+ print ' ';
+ if ($action == 'editretainedwarranty')
+ {
+ print '';
+ print ' ';
+ print ' ';
+ print ' ';
+ print ' ';
+ print ' ';
+ }
+ else
+ {
+ print price($object->retained_warranty).'%';
+ }
+ print ' ';
- // Retained warranty payment term
- print '';
- print '';
- print $langs->trans('PaymentConditionsShortRetainedWarranty');
- print ' ';
- if ($action != 'editretainedwarrantypaymentterms' && $user->rights->facture->creer) {
- print 'id.'">'.img_edit($langs->trans('setPaymentConditionsShortRetainedWarranty'), 1).' ';
- }
+ // Retained warranty payment term
+ print '';
+ print '';
- print ' ';
- $defaultDate = !empty($object->retained_warranty_date_limit) ? $object->retained_warranty_date_limit : strtotime('-1 years', $object->date_lim_reglement);
- if ($object->date > $defaultDate) {
- $defaultDate = $object->date;
- }
+ print '
';
+ print ' ';
+ $defaultDate = !empty($object->retained_warranty_date_limit) ? $object->retained_warranty_date_limit : strtotime('-1 years', $object->date_lim_reglement);
+ if ($object->date > $defaultDate) {
+ $defaultDate = $object->date;
+ }
- if ($action == 'editretainedwarrantypaymentterms')
- {
- //date('Y-m-d',$object->date_lim_reglement)
- print '';
- print ' ';
- print ' ';
- $retained_warranty_fk_cond_reglement = GETPOST('retained_warranty_fk_cond_reglement', 'int');
- $retained_warranty_fk_cond_reglement = !empty($retained_warranty_fk_cond_reglement) ? $retained_warranty_fk_cond_reglement : $object->retained_warranty_fk_cond_reglement;
- $retained_warranty_fk_cond_reglement = !empty($retained_warranty_fk_cond_reglement) ? $retained_warranty_fk_cond_reglement : $conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID;
- $form->select_conditions_paiements($retained_warranty_fk_cond_reglement, 'retained_warranty_fk_cond_reglement', -1, 1);
- print ' ';
- print ' ';
- }
- else
- {
- $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->retained_warranty_fk_cond_reglement, 'none');
- if (!$displayWarranty) {
- print img_picto($langs->trans('RetainedWarrantyNeed100Percent'), 'warning.png', 'class="pictowarning valignmiddle" ');
- }
- }
- print ' ';
+ if ($action == 'editretainedwarrantypaymentterms')
+ {
+ //date('Y-m-d',$object->date_lim_reglement)
+ print '';
+ print ' ';
+ print ' ';
+ $retained_warranty_fk_cond_reglement = GETPOST('retained_warranty_fk_cond_reglement', 'int');
+ $retained_warranty_fk_cond_reglement = !empty($retained_warranty_fk_cond_reglement) ? $retained_warranty_fk_cond_reglement : $object->retained_warranty_fk_cond_reglement;
+ $retained_warranty_fk_cond_reglement = !empty($retained_warranty_fk_cond_reglement) ? $retained_warranty_fk_cond_reglement : $conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID;
+ $form->select_conditions_paiements($retained_warranty_fk_cond_reglement, 'retained_warranty_fk_cond_reglement', -1, 1);
+ print ' ';
+ print ' ';
+ }
+ else
+ {
+ $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->retained_warranty_fk_cond_reglement, 'none');
+ if (!$displayWarranty) {
+ print img_picto($langs->trans('RetainedWarrantyNeed100Percent'), 'warning.png', 'class="pictowarning valignmiddle" ');
+ }
+ }
+ print '';
-
- if ($displayWarranty)
- {
// Retained Warranty payment date limit
print '';
print '';
@@ -5034,8 +5046,9 @@ elseif ($id > 0 || !empty($ref))
print '';
// Show object lines
- if (!empty($object->lines))
+ if (!empty($object->lines)) {
$ret = $object->printObjectLines($action, $mysoc, $soc, $lineid, 1);
+ }
// Form to add new line
if ($object->statut == 0 && $usercancreate && $action != 'valid' && $action != 'editline')
diff --git a/htdocs/compta/facture/class/api_invoices.class.php b/htdocs/compta/facture/class/api_invoices.class.php
index 95c6af527b6..85da9cd5c37 100644
--- a/htdocs/compta/facture/class/api_invoices.class.php
+++ b/htdocs/compta/facture/class/api_invoices.class.php
@@ -502,8 +502,7 @@ class Invoices extends DolibarrApi
}
$result = $this->invoice->delete_contact($rowid);
-
- if (!$result) {
+ if ($result < 0) {
throw new RestException(500, 'Error when deleted the contact');
}
@@ -600,7 +599,7 @@ class Invoices extends DolibarrApi
/**
* Delete invoice
*
- * @param int $id Invoice ID
+ * @param int $id Invoice ID
* @return array
*/
public function delete($id)
@@ -617,7 +616,8 @@ class Invoices extends DolibarrApi
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
}
- if ($this->invoice->delete($id) < 0)
+ $result = $this->invoice->delete(DolibarrApiAccess::$user);
+ if ($result < 0)
{
throw new RestException(500);
}
diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php
index 5efaed247c3..205ca88290e 100644
--- a/htdocs/compta/facture/class/facture-rec.class.php
+++ b/htdocs/compta/facture/class/facture-rec.class.php
@@ -6,7 +6,7 @@
* Copyright (C) 2012 Cedric Salvador
* Copyright (C) 2013 Florian Henry
* Copyright (C) 2015 Marcos García
- * Copyright (C) 2017 Frédéric France
+ * Copyright (C) 2017-2020 Frédéric France
*
* 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
@@ -69,6 +69,11 @@ class FactureRec extends CommonInvoice
*/
public $entity;
+ /**
+ * {@inheritdoc}
+ */
+ protected $table_ref_field = 'titre';
+
public $number;
public $date;
public $remise;
@@ -82,7 +87,14 @@ class FactureRec extends CommonInvoice
public $nb_gen_done;
public $nb_gen_max;
+ /**
+ * @var int Frequency
+ */
public $frequency;
+
+ /**
+ * @var string Unit frequency
+ */
public $unit_frequency;
public $rang;
@@ -122,7 +134,7 @@ class FactureRec extends CommonInvoice
*/
public $fields = array(
'rowid' =>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>10),
- 'titre' =>array('type'=>'varchar(100)', 'label'=>'Titre', 'enabled'=>1, 'visible'=>-1, 'position'=>15),
+ 'titre' =>array('type'=>'varchar(100)', 'label'=>'Titre', 'enabled'=>1, 'showoncombobox' => 1, 'visible'=>-1, 'position'=>15),
'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>20, 'index'=>1),
'fk_soc' =>array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>25),
'datec' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-1, 'position'=>30),
@@ -463,10 +475,9 @@ class FactureRec extends CommonInvoice
* @param int $rowid Id of object to load
* @param string $ref Reference of recurring invoice
* @param string $ref_ext External reference of invoice
- * @param int $ref_int Internal reference of other object
* @return int >0 if OK, <0 if KO, 0 if not found
*/
- public function fetch($rowid, $ref = '', $ref_ext = '', $ref_int = '')
+ public function fetch($rowid, $ref = '', $ref_ext = '')
{
$sql = 'SELECT f.rowid, f.entity, f.titre as title, f.suspended, f.fk_soc, f.tva, f.localtax1, f.localtax2, f.total, f.total_ttc';
$sql .= ', f.remise_percent, f.remise_absolue, f.remise';
diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php
index f1a20e5b8dc..b6f9c4d7969 100644
--- a/htdocs/compta/facture/class/facture.class.php
+++ b/htdocs/compta/facture/class/facture.class.php
@@ -302,9 +302,9 @@ class Facture extends CommonInvoice
'situation_cycle_ref' =>array('type'=>'smallint(6)', 'label'=>'Situation cycle ref', 'enabled'=>'$conf->global->INVOICE_USE_SITUATION', 'visible'=>-1, 'position'=>230),
'situation_counter' =>array('type'=>'smallint(6)', 'label'=>'Situation counter', 'enabled'=>'$conf->global->INVOICE_USE_SITUATION', 'visible'=>-1, 'position'=>235),
'situation_final' =>array('type'=>'smallint(6)', 'label'=>'Situation final', 'enabled'=>'empty($conf->global->INVOICE_USE_SITUATION) ? 0 : 1', 'visible'=>-1, 'position'=>240),
- 'retained_warranty' =>array('type'=>'double', 'label'=>'Retained warranty', 'enabled'=>'$conf->global->INVOICE_USE_SITUATION_RETAINED_WARRANTY', 'visible'=>-1, 'position'=>245),
- 'retained_warranty_date_limit' =>array('type'=>'date', 'label'=>'Retained warranty date limit', 'enabled'=>'$conf->global->INVOICE_USE_SITUATION_RETAINED_WARRANTY', 'visible'=>-1, 'position'=>250),
- 'retained_warranty_fk_cond_reglement' =>array('type'=>'integer', 'label'=>'Retained warranty fk cond reglement', 'enabled'=>'$conf->global->INVOICE_USE_SITUATION_RETAINED_WARRANTY', 'visible'=>-1, 'position'=>255),
+ 'retained_warranty' =>array('type'=>'double', 'label'=>'Retained warranty', 'enabled'=>'$conf->global->INVOICE_USE_RETAINED_WARRANTY', 'visible'=>-1, 'position'=>245),
+ 'retained_warranty_date_limit' =>array('type'=>'date', 'label'=>'Retained warranty date limit', 'enabled'=>'$conf->global->INVOICE_USE_RETAINED_WARRANTY', 'visible'=>-1, 'position'=>250),
+ 'retained_warranty_fk_cond_reglement' =>array('type'=>'integer', 'label'=>'Retained warranty fk cond reglement', 'enabled'=>'$conf->global->INVOICE_USE_RETAINED_WARRANTY', 'visible'=>-1, 'position'=>255),
'fk_incoterms' =>array('type'=>'integer', 'label'=>'IncotermCode', 'enabled'=>'$conf->incoterm->enabled', 'visible'=>-1, 'position'=>260),
'location_incoterms' =>array('type'=>'varchar(255)', 'label'=>'IncotermLabel', 'enabled'=>'$conf->incoterm->enabled', 'visible'=>-1, 'position'=>265),
'date_pointoftax' =>array('type'=>'date', 'label'=>'DatePointOfTax', 'enabled'=>'$conf->global->INVOICE_POINTOFTAX_DATE', 'visible'=>-1, 'position'=>270),
@@ -813,12 +813,12 @@ class Facture extends CommonInvoice
$vatrate = $line->tva_tx;
if ($line->vat_src_code && !preg_match('/\(.*\)/', $vatrate)) $vatrate .= ' ('.$line->vat_src_code.')';
- if (!empty($conf->global->MAIN_CREATEFROM_KEEP_LINE_ORIGIN_INFORMATION)) {
- $originid = $line->origin_id;
- $origintype = $line->origin;
+ if(!empty($conf->global->MAIN_CREATEFROM_KEEP_LINE_ORIGIN_INFORMATION)) {
+ $originid=$line->origin_id;
+ $origintype=$line->origin;
} else {
- $originid = $line->id;
- $origintype = $this->element;
+ $originid=$line->id;
+ $origintype=$this->element;
}
$result = $this->addline(
@@ -3733,44 +3733,44 @@ class Facture extends CommonInvoice
}
if (!empty($addon)) {
- dol_syslog("Call getNextNumRef with ".$addonConstName." = ".$conf->global->FACTURE_ADDON.", thirdparty=".$soc->nom.", type=".$soc->typent_code, LOG_DEBUG);
+ dol_syslog("Call getNextNumRef with " . $addonConstName . " = " . $conf->global->FACTURE_ADDON . ", thirdparty=" . $soc->nom . ", type=" . $soc->typent_code, LOG_DEBUG);
$mybool = false;
- $file = $addon.'.php';
+ $file = $addon . '.php';
$classname = $addon;
// Include file with class
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
foreach ($dirmodels as $reldir) {
- $dir = dol_buildpath($reldir.'core/modules/'.$moduleName.'/');
+ $dir = dol_buildpath($reldir . 'core/modules/' . $moduleName . '/');
// Load file with numbering class (if found)
- if (is_file($dir.$file) && is_readable($dir.$file)) {
- $mybool |= include_once $dir.$file;
+ if (is_file($dir . $file) && is_readable($dir . $file)) {
+ $mybool |= include_once $dir . $file;
}
}
// For compatibility
if (!$mybool) {
- $file = $addon.'/'.$addon.'.modules.php';
- $classname = 'mod_'.$moduleName.'_'.$addon;
+ $file = $addon . '/' . $addon . '.modules.php';
+ $classname = 'mod_' . $moduleName . '_' . $addon;
$classname = preg_replace('/\-.*$/', '', $classname);
// Include file with class
foreach ($conf->file->dol_document_root as $dirroot) {
- $dir = $dirroot.'/core/modules/'.$moduleName.'/';
+ $dir = $dirroot . '/core/modules/' . $moduleName . '/';
// Load file with numbering class (if found)
- if (is_file($dir.$file) && is_readable($dir.$file)) {
- $mybool |= include_once $dir.$file;
+ if (is_file($dir . $file) && is_readable($dir . $file)) {
+ $mybool |= include_once $dir . $file;
}
}
}
if (!$mybool) {
- dol_print_error('', 'Failed to include file '.$file);
+ dol_print_error('', 'Failed to include file ' . $file);
return '';
}
@@ -3789,7 +3789,7 @@ class Facture extends CommonInvoice
return $numref;
} else {
$langs->load('errors');
- print $langs->trans('Error').' '.$langs->trans('ErrorModuleSetupNotComplete', $langs->transnoentitiesnoconv($moduleSourceName));
+ print $langs->trans('Error') . ' ' . $langs->trans('ErrorModuleSetupNotComplete', $langs->transnoentitiesnoconv($moduleSourceName));
return '';
}
}
@@ -4742,6 +4742,43 @@ class Facture extends CommonInvoice
return $hasDelay;
}
+ /**
+ * Currently used for documents generation : to know if retained warranty need to be displayed
+ * @return bool
+ */
+ public function displayRetainedWarranty()
+ {
+ global $conf;
+
+ // TODO : add a flag on invoices to store this conf : INVOICE_RETAINED_WARRANTY_LIMITED_TO_FINAL_SITUATION
+
+ // note : we dont need to test INVOICE_USE_RETAINED_WARRANTY because if $this->retained_warranty is not empty it's because it was set when this conf was active
+
+ $displayWarranty = false;
+ if(!empty($this->retained_warranty)) {
+ $displayWarranty = true;
+
+ if ($this->type == Facture::TYPE_SITUATION && !empty($conf->global->INVOICE_RETAINED_WARRANTY_LIMITED_TO_FINAL_SITUATION)) {
+ // Check if this situation invoice is 100% for real
+ $displayWarranty = false;
+ if (!empty($this->situation_final)) {
+ $displayWarranty = true;
+ } elseif (!empty($this->lines) && $this->status == Facture::STATUS_DRAFT) {
+ // $object->situation_final need validation to be done so this test is need for draft
+ $displayWarranty = true;
+
+ foreach ($this->lines as $i => $line) {
+ if ($line->product_type < 2 && $line->situation_percent < 100) {
+ $displayWarranty = false;
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ return $displayWarranty;
+ }
/**
* @param int $rounding Minimum number of decimal to show. If 0, no change, if -1, we use min($conf->global->MAIN_MAX_DECIMALS_UNIT,$conf->global->MAIN_MAX_DECIMALS_TOT)
@@ -4757,7 +4794,7 @@ class Facture extends CommonInvoice
$retainedWarrantyAmount = 0;
// Billed - retained warranty
- if ($this->type == Facture::TYPE_SITUATION)
+ if($this->type == Facture::TYPE_SITUATION && !empty($conf->global->INVOICE_RETAINED_WARRANTY_LIMITED_TO_FINAL_SITUATION))
{
$displayWarranty = true;
// Check if this situation invoice is 100% for real
@@ -4795,7 +4832,10 @@ class Facture extends CommonInvoice
if ($rounding < 0) {
$rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT, $conf->global->MAIN_MAX_DECIMALS_TOT);
- return round($retainedWarrantyAmount, 2);
+ }
+
+ if($rounding>0){
+ return round($retainedWarrantyAmount, $rounding);
}
return $retainedWarrantyAmount;
diff --git a/htdocs/compta/facture/document.php b/htdocs/compta/facture/document.php
index e09c8aee11c..a901b985342 100644
--- a/htdocs/compta/facture/document.php
+++ b/htdocs/compta/facture/document.php
@@ -56,11 +56,12 @@ if ($user->socid)
$result = restrictedArea($user, 'facture', $id, '');
// Get parameters
+$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
-$offset = $conf->liste_limit * $page;
+$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (!$sortorder) $sortorder = "ASC";
diff --git a/htdocs/compta/facture/invoicetemplate_list.php b/htdocs/compta/facture/invoicetemplate_list.php
index 14e1e124f1e..8faa0de3de5 100644
--- a/htdocs/compta/facture/invoicetemplate_list.php
+++ b/htdocs/compta/facture/invoicetemplate_list.php
@@ -328,13 +328,12 @@ if ($resql)
print ' ';
print ' ';
print ' ';
- print ' ';
print ' ';
- print ' ';
+ print ' ';
$title = $langs->trans("RepeatableInvoices");
- print_barre_liste($title, $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'invoicing', 0, '', '', $limit);
+ print_barre_liste($title, $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'invoicing', 0, '', '', $limit, 0, 0, 1);
print ''.$langs->trans("ToCreateAPredefinedInvoice", $langs->transnoentitiesnoconv("ChangeIntoRepeatableInvoice")).' ';
diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php
index d1df1d6ea24..17f70cab375 100644
--- a/htdocs/compta/facture/list.php
+++ b/htdocs/compta/facture/list.php
@@ -208,7 +208,7 @@ $arrayfields = array(
'f.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000),
);
-if ($conf->global->INVOICE_USE_SITUATION && $conf->global->INVOICE_USE_SITUATION_RETAINED_WARRANTY)
+if ($conf->global->INVOICE_USE_SITUATION && $conf->global->INVOICE_USE_RETAINED_WARRANTY)
{
$arrayfields['f.retained_warranty'] = array('label'=>$langs->trans("RetainedWarranty"), 'checked'=>0, 'position'=>86);
}
@@ -688,11 +688,10 @@ if ($resql)
print ' ';
print ' ';
print ' ';
- print ' ';
- print ' ';
+ print ' ';
print ' ';
- print_barre_liste($langs->trans('BillsCustomers').' '.($socid ? ' '.$soc->name : ''), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'invoicing', 0, $newcardbutton, '', $limit);
+ print_barre_liste($langs->trans('BillsCustomers').' '.($socid ? ' '.$soc->name : ''), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'invoicing', 0, $newcardbutton, '', $limit, 0, 0, 1);
$topicmail = "SendBillRef";
$modelmail = "facture_send";
@@ -1138,7 +1137,7 @@ if ($resql)
$facturestatic->note_public = $obj->note_public;
$facturestatic->note_private = $obj->note_private;
- if ($conf->global->INVOICE_USE_SITUATION && $conf->global->INVOICE_USE_SITUATION_RETAINED_WARRANTY)
+ if ($conf->global->INVOICE_USE_SITUATION && $conf->global->INVOICE_USE_RETAINED_WARRANTY)
{
$facturestatic->retained_warranty = $obj->retained_warranty;
$facturestatic->retained_warranty_date_limit = $obj->retained_warranty_date_limit;
diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php
index 4c7e0714caa..6aa05f1cd7e 100644
--- a/htdocs/compta/index.php
+++ b/htdocs/compta/index.php
@@ -546,8 +546,8 @@ if (!empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture->
-// Last donations
-if (!empty($conf->don->enabled) && $user->rights->societe->lire)
+// Latest donations
+if (!empty($conf->don->enabled) && $user->rights->don->lire)
{
include_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php';
@@ -745,7 +745,7 @@ if (!empty($conf->facture->enabled) && !empty($conf->commande->enabled) && $user
print '';
print '
';
print "";
- print ''.$langs->trans("OrdersDeliveredToBill").' '.$num.' ';
+ print ''.$langs->trans("OrdersDeliveredToBill").' '.$num.' ';
if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''.$langs->trans("AmountHT").' ';
print ''.$langs->trans("AmountTTC").' ';
print ''.$langs->trans("ToBill").' ';
diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php
index b4da848ea5a..4a7e387987c 100644
--- a/htdocs/compta/paiement.php
+++ b/htdocs/compta/paiement.php
@@ -357,11 +357,11 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
}
// Invoice with Paypal transaction
- // TODO add hook possibility (regis)
- if (!empty($conf->paypalplus->enabled) && $conf->global->PAYPAL_ENABLE_TRANSACTION_MANAGEMENT && !empty($facture->ref_int))
+ // TODO add hook here
+ if (!empty($conf->paypalplus->enabled) && $conf->global->PAYPAL_ENABLE_TRANSACTION_MANAGEMENT && !empty($facture->ref_ext))
{
if (!empty($conf->global->PAYPAL_BANK_ACCOUNT)) $accountid = $conf->global->PAYPAL_BANK_ACCOUNT;
- $paymentnum = $facture->ref_int;
+ $paymentnum = $facture->ref_ext;
}
// Add realtime total information
diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php
index a300b888578..87bdaa9641d 100644
--- a/htdocs/compta/paiement/list.php
+++ b/htdocs/compta/paiement/list.php
@@ -215,10 +215,9 @@ if ($resql)
print ' ';
print ' ';
print ' ';
- print ' ';
- print ' ';
+ print ' ';
- print_barre_liste($langs->trans("ReceivedCustomersPayments"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'invoicing', 0, '', '', $limit);
+ print_barre_liste($langs->trans("ReceivedCustomersPayments"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'invoicing', 0, '', '', $limit, 0, 0, 1);
print '';
print '
'."\n";
diff --git a/htdocs/compta/prelevement/factures.php b/htdocs/compta/prelevement/factures.php
index 3297042407f..ec004717946 100644
--- a/htdocs/compta/prelevement/factures.php
+++ b/htdocs/compta/prelevement/factures.php
@@ -193,7 +193,7 @@ if ($result)
print ' ';
print ' ';
print ' ';
- print ' ';
+ print ' ';
$massactionbutton = '';
diff --git a/htdocs/compta/prelevement/line.php b/htdocs/compta/prelevement/line.php
index 19ba5892474..6eef29d1e3e 100644
--- a/htdocs/compta/prelevement/line.php
+++ b/htdocs/compta/prelevement/line.php
@@ -43,9 +43,22 @@ $action = GETPOST('action', 'alpha');
$id = GETPOST('id', 'int');
$socid = GETPOST('socid', 'int');
-$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
+$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortorder = GETPOST('sortorder', 'alpha');
$sortfield = GETPOST('sortfield', 'alpha');
+$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
+if ($page == -1 || $page == null) { $page = 0; }
+$offset = $limit * $page;
+$pageprev = $page - 1;
+$pagenext = $page + 1;
+
+if ($sortorder == "") $sortorder = "DESC";
+if ($sortfield == "") $sortfield = "pl.fk_soc";
+
+
+/*
+ * Actions
+ */
if ($action == 'confirm_rejet')
{
@@ -246,17 +259,6 @@ if ($id)
print "";
-
-
- if ($page == -1 || $page == null) { $page = 0; }
-
- $offset = $conf->liste_limit * $page;
- $pageprev = $page - 1;
- $pagenext = $page + 1;
-
- if ($sortorder == "") $sortorder = "DESC";
- if ($sortfield == "") $sortfield = "pl.fk_soc";
-
/*
* List of invoices
*/
diff --git a/htdocs/compta/prelevement/rejets.php b/htdocs/compta/prelevement/rejets.php
index 1bc2a1844e2..602c57b5ad4 100644
--- a/htdocs/compta/prelevement/rejets.php
+++ b/htdocs/compta/prelevement/rejets.php
@@ -39,20 +39,19 @@ if ($user->socid) $socid = $user->socid;
$result = restrictedArea($user, 'prelevement', '', '', 'bons');
// Get supervariables
-$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
+$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortorder = GETPOST('sortorder', 'alpha');
$sortfield = GETPOST('sortfield', 'alpha');
-
+$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
+$offset = $limit * $page;
+$pageprev = $page - 1;
+$pagenext = $page + 1;
/*
* View
*/
llxHeader('', $langs->trans("WithdrawsRefused"));
-$offset = $conf->liste_limit * $page;
-$pageprev = $page - 1;
-$pagenext = $page + 1;
-
if ($sortorder == "") $sortorder = "DESC";
if ($sortfield == "") $sortfield = "p.datec";
diff --git a/htdocs/compta/sociales/document.php b/htdocs/compta/sociales/document.php
index a64c0432be9..3c73c8e6614 100644
--- a/htdocs/compta/sociales/document.php
+++ b/htdocs/compta/sociales/document.php
@@ -52,13 +52,14 @@ $result = restrictedArea($user, 'tax', $id, 'chargesociales', 'charges');
// Get parameters
+$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1) {
$page = 0;
}
-$offset = $conf->liste_limit * $page;
+$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (!$sortorder) $sortorder = "ASC";
diff --git a/htdocs/compta/sociales/list.php b/htdocs/compta/sociales/list.php
index ca58830a7bb..ef39d559ca0 100644
--- a/htdocs/compta/sociales/list.php
+++ b/htdocs/compta/sociales/list.php
@@ -191,19 +191,16 @@ if ($resql)
print ' ';
print ' ';
print ' ';
- print ' ';
- print ' ';
+ print ' ';
+ $center = '';
if ($year)
{
$center = ($year ? "".img_previous()." ".$langs->trans("Year")." $year ".img_next()." " : "");
- print_barre_liste($langs->trans("SocialContributions"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $totalnboflines, 'invoicing', 0, $newcardbutton, '', $limit);
- }
- else
- {
- print_barre_liste($langs->trans("SocialContributions"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'invoicing', 0, $newcardbutton, '', $limit);
}
+ print_barre_liste($langs->trans("SocialContributions"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $totalnboflines, 'invoicing', 0, $newcardbutton, '', $limit, 0, 0, 1);
+
if (empty($mysoc->country_id) && empty($mysoc->country_code))
{
print '';
diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php
index beb5b8bfc4f..658c9353a00 100644
--- a/htdocs/compta/tva/card.php
+++ b/htdocs/compta/tva/card.php
@@ -209,7 +209,7 @@ if ($id)
}
}
-// Formulaire saisie tva
+// Form to enter VAT
if ($action == 'create')
{
print load_fiche_titre($langs->trans("VAT").' - '.$langs->trans("New"));
@@ -262,7 +262,7 @@ if ($action == 'create')
print '';
print '
'.$form->textwithpicto($langs->trans("PeriodEndDate"), $langs->trans("LastDayTaxIsRelatedTo")).' ';
- print $form->selectDate($datev, "datev", '', '', '', 'add', 1, 1);
+ print $form->selectDate((GETPOST("datevmonth", 'int') ? $datev : -1), "datev", '', '', '', 'add', 1, 1);
print ' ';
// Label
diff --git a/htdocs/compta/tva/document.php b/htdocs/compta/tva/document.php
index 037e6baa5c3..fabaf1ee705 100644
--- a/htdocs/compta/tva/document.php
+++ b/htdocs/compta/tva/document.php
@@ -53,14 +53,14 @@ $result = restrictedArea($user, 'tax', '', 'vat', 'charges');
// Get parameters
+$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1) {
$page = 0;
}
-
-$offset = $conf->liste_limit * $page;
+$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (!$sortorder) $sortorder = "ASC";
diff --git a/htdocs/compta/tva/list.php b/htdocs/compta/tva/list.php
index 35c5dc2c052..003a7eabcad 100644
--- a/htdocs/compta/tva/list.php
+++ b/htdocs/compta/tva/list.php
@@ -1,6 +1,6 @@
- * Copyright (C) 2004-2018 Laurent Destailleur
+ * Copyright (C) 2004-2020 Laurent Destailleur
* Copyright (C) 2005-2009 Regis Houssin
* Copyright (C) 2011-2019 Alexandre Spangaro
*
@@ -160,9 +160,8 @@ if ($result)
print ' ';
print ' ';
print ' ';
- print ' ';
- print_barre_liste($langs->trans("VATPayments"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'title_accountancy', 0, $newcardbutton, '', $limit);
+ print_barre_liste($langs->trans("VATPayments"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'title_accountancy', 0, $newcardbutton, '', $limit, 0, 0, 1);
print '';
print '
'."\n";
diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php
index 9cad793ba3d..7f52195297b 100644
--- a/htdocs/contact/class/contact.class.php
+++ b/htdocs/contact/class/contact.class.php
@@ -1295,7 +1295,7 @@ class Contact extends CommonObject
$label .= '
';
}
- $label .= ''.$langs->trans("ShowContact").' ';
+ $label .= ''.$langs->trans("Contact").' ';
$label .= ''.$langs->trans("Name").': '.$this->getFullName($langs);
//if ($this->civility_id) $label.= '' . $langs->trans("Civility") . ': '.$this->civility_id; // TODO Translate cibilty_id code
if (!empty($this->poste)) $label .= ''.$langs->trans("Poste").': '.$this->poste;
diff --git a/htdocs/contact/document.php b/htdocs/contact/document.php
index 28d8ac42f6b..e21ee3e492b 100644
--- a/htdocs/contact/document.php
+++ b/htdocs/contact/document.php
@@ -55,11 +55,12 @@ if ($user->socid) $socid = $user->socid;
$result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'rowid', $objcanvas); // If we create a contact with no company (shared contacts), no check on write permission
// Get parameters
+$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
-$offset = $conf->liste_limit * $page;
+$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
diff --git a/htdocs/contact/vcard.php b/htdocs/contact/vcard.php
index de064d6bccf..297cadac0be 100644
--- a/htdocs/contact/vcard.php
+++ b/htdocs/contact/vcard.php
@@ -79,7 +79,7 @@ if ($company->id)
if (!$contact->phone_pro) $v->setPhoneNumber($company->phone, "TYPE=WORK;VOICE");
if (!$contact->fax) $v->setPhoneNumber($company->fax, "TYPE=WORK;FAX");
if (!$contact->zip) $v->setAddress("", "", $company->address, $company->town, "", $company->zip, $company->country, "TYPE=WORK;POSTAL");
- if ($company->email != $contact->email) $v->setEmail($company->email, 'TYPE=PREF,INTERNET');
+ if (empty($contact->email)) $v->setEmail($company->email, 'TYPE=PREF,INTERNET');
// Si contact lie a un tiers non de type "particulier"
if ($contact->typent_code != 'TE_PRIVATE') $v->setOrg($company->name);
}
diff --git a/htdocs/contrat/document.php b/htdocs/contrat/document.php
index c104d210617..330db63e30c 100644
--- a/htdocs/contrat/document.php
+++ b/htdocs/contrat/document.php
@@ -55,11 +55,12 @@ if ($user->socid > 0)
$result = restrictedArea($user, 'contrat', $id);
// Get parameters
+$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
-$offset = $conf->liste_limit * $page;
+$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (!$sortorder) $sortorder = "ASC";
diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php
index 7563013edf0..380ab05f01a 100644
--- a/htdocs/contrat/list.php
+++ b/htdocs/contrat/list.php
@@ -382,10 +382,9 @@ print ' ';
print ' ';
print ' ';
-print ' ';
print ' ';
-print_barre_liste($langs->trans("ListOfContracts"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $totalnboflines, 'commercial', 0, $newcardbutton, '', $limit);
+print_barre_liste($langs->trans("ListOfContracts"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $totalnboflines, 'commercial', 0, $newcardbutton, '', $limit, 0, 0, 1);
$topicmail = "SendContractRef";
$modelmail = "contract";
diff --git a/htdocs/core/actions_addupdatedelete.inc.php b/htdocs/core/actions_addupdatedelete.inc.php
index 077c577ff26..66ed09413ef 100644
--- a/htdocs/core/actions_addupdatedelete.inc.php
+++ b/htdocs/core/actions_addupdatedelete.inc.php
@@ -75,6 +75,8 @@ if ($action == 'add' && !empty($permissiontoadd))
$value = 60 * 60 * GETPOST($key.'hour', 'int') + 60 * GETPOST($key.'min', 'int');
} elseif (preg_match('/^(integer|price|real|double)/', $object->fields[$key]['type'])) {
$value = price2num(GETPOST($key, 'none')); // To fix decimal separator according to lang setup
+ } elseif ($object->fields[$key]['type'] == 'boolean') {
+ $value = (GETPOST($key) == 'on' ? 1 : 0);
} else {
$value = GETPOST($key, 'alphanohtml');
}
@@ -156,6 +158,8 @@ if ($action == 'update' && !empty($permissiontoadd))
}
} elseif (preg_match('/^(integer|price|real|double)/', $object->fields[$key]['type'])) {
$value = price2num(GETPOST($key, 'none')); // To fix decimal separator according to lang setup
+ } elseif ($object->fields[$key]['type'] == 'boolean') {
+ $value = (GETPOST($key) == 'on' ? 1 : 0);
} else {
$value = GETPOST($key, 'alpha');
}
diff --git a/htdocs/core/actions_linkedfiles.inc.php b/htdocs/core/actions_linkedfiles.inc.php
index 7090b71c773..2542cf23268 100644
--- a/htdocs/core/actions_linkedfiles.inc.php
+++ b/htdocs/core/actions_linkedfiles.inc.php
@@ -52,15 +52,16 @@ if (GETPOST('sendit', 'alpha') && !empty($conf->global->MAIN_UPLOAD_DOC))
{
// Define if we have to generate thumbs or not
$generatethumbs = 1;
- if (GETPOST('section_dir')) $generatethumbs = 0;
+ if (GETPOST('section_dir', 'alpha')) $generatethumbs = 0;
+ $allowoverwrite = (GETPOST('overwritefile', 'int') ? 1 : 0);
if (!empty($upload_dirold) && !empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO))
{
- $result = dol_add_file_process($upload_dirold, 0, 1, 'userfile', GETPOST('savingdocmask', 'alpha'), null, '', $generatethumbs);
+ $result = dol_add_file_process($upload_dirold, $allowoverwrite, 1, 'userfile', GETPOST('savingdocmask', 'alpha'), null, '', $generatethumbs);
}
elseif (!empty($upload_dir))
{
- $result = dol_add_file_process($upload_dir, 0, 1, 'userfile', GETPOST('savingdocmask', 'alpha'), null, '', $generatethumbs);
+ $result = dol_add_file_process($upload_dir, $allowoverwrite, 1, 'userfile', GETPOST('savingdocmask', 'alpha'), null, '', $generatethumbs);
}
}
}
@@ -145,12 +146,13 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes')
if (is_object($object) && $object->id > 0) {
if ($backtopage) {
- header('Location: '.$backtopage);
+ header('Location: '.$backtopage);
exit;
}
else
{
- header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.(GETPOST('section_dir', 'alpha') ? '§ion_dir='.urlencode(GETPOST('section_dir', 'alpha')) : '').(!empty($withproject) ? '&withproject=1' : ''));
+ $tmpurl = $_SERVER["PHP_SELF"].'?id='.$object->id.(GETPOST('section_dir', 'alpha') ? '§ion_dir='.urlencode(GETPOST('section_dir', 'alpha')) : '').(!empty($withproject) ? '&withproject=1' : '');
+ header('Location: '.$tmpurl);
exit;
}
}
diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php
index b8cbce5e335..e8cfa803573 100644
--- a/htdocs/core/actions_massactions.inc.php
+++ b/htdocs/core/actions_massactions.inc.php
@@ -859,7 +859,7 @@ if ($massaction == 'confirm_createbills') // Create bills from orders
if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit);
if ($sall) $param .= '&sall='.urlencode($sall);
if ($socid > 0) $param .= '&socid='.urlencode($socid);
- if ($viewstatut != '') $param .= '&viewstatut='.urlencode($viewstatut);
+ if ($search_status != '') $param .= '&search_status='.urlencode($search_status);
if ($search_orderday) $param .= '&search_orderday='.urlencode($search_orderday);
if ($search_ordermonth) $param .= '&search_ordermonth='.urlencode($search_ordermonth);
if ($search_orderyear) $param .= '&search_orderyear='.urlencode($search_orderyear);
diff --git a/htdocs/core/ajax/ajaxdirpreview.php b/htdocs/core/ajax/ajaxdirpreview.php
index a9a7df300c3..bb6a8de30d4 100644
--- a/htdocs/core/ajax/ajaxdirpreview.php
+++ b/htdocs/core/ajax/ajaxdirpreview.php
@@ -46,11 +46,12 @@ if (!isset($mode) || $mode != 'noajax') // For ajax call
$urlsource = GETPOST("urlsource", 'alpha');
$search_doc_ref = GETPOST('search_doc_ref', 'alpha');
+ $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
- $offset = $conf->liste_limit * $page;
+ $offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (!$sortorder) $sortorder = "ASC";
@@ -356,10 +357,12 @@ if ($useajax || $action == 'delete')
require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
$useglobalvars = 1;
$form = new Form($db);
- $formquestion['urlfile'] = array('type'=>'hidden', 'value'=>$urlfile, 'name'=>'urlfile'); // We must always put field, even if empty because it is fille by javascript later
- $formquestion['section'] = array('type'=>'hidden', 'value'=>$section, 'name'=>'section'); // We must always put field, even if empty because it is fille by javascript later
- $formquestion['section_id'] = array('type'=>'hidden', 'value'=>$section_id, 'name'=>'section_id'); // We must always put field, even if empty because it is fille by javascript later
- $formquestion['section_dir'] = array('type'=>'hidden', 'value'=>$section_dir, 'name'=>'section_dir'); // We must always put field, even if empty because it is fille by javascript later
+ $formquestion['urlfile'] = array('type'=>'hidden', 'value'=>$urlfile, 'name'=>'urlfile'); // We must always put field, even if empty because it is filled by javascript later
+ $formquestion['section'] = array('type'=>'hidden', 'value'=>$section, 'name'=>'section'); // We must always put field, even if empty because it is filled by javascript later
+ $formquestion['section_id'] = array('type'=>'hidden', 'value'=>$section_id, 'name'=>'section_id'); // We must always put field, even if empty because it is filled by javascript later
+ $formquestion['section_dir'] = array('type'=>'hidden', 'value'=>$section_dir, 'name'=>'section_dir'); // We must always put field, even if empty because it is filled by javascript later
+ $formquestion['sortfield'] = array('type'=>'hidden', 'value'=>$sortfield, 'name'=>'sortfield'); // We must always put field, even if empty because it is filled by javascript later
+ $formquestion['sortorder'] = array('type'=>'hidden', 'value'=>$sortorder, 'name'=>'sortorder'); // We must always put field, even if empty because it is filled by javascript later
if (!empty($action) && $action == 'file_manager') $formquestion['file_manager'] = array('type'=>'hidden', 'value'=>1, 'name'=>'file_manager');
if (!empty($websitekey)) $formquestion['website'] = array('type'=>'hidden', 'value'=>$websitekey, 'name'=>'website');
if (!empty($pageid) && $pageid > 0) $formquestion['pageid'] = array('type'=>'hidden', 'value'=>$pageid, 'name'=>'pageid');
diff --git a/htdocs/core/ajax/objectonoff.php b/htdocs/core/ajax/objectonoff.php
index 1f0f6c4fcc8..dd39bce6d4e 100644
--- a/htdocs/core/ajax/objectonoff.php
+++ b/htdocs/core/ajax/objectonoff.php
@@ -39,9 +39,13 @@ $element = GETPOST('element', 'alpha');
$object = new GenericObject($db);
// Security check
-if (!empty($user->socid))
+if (!empty($user->socid)) {
$socid = $user->socid;
+}
+if (empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) {
+ accessforbidden('Calling this file is allowed only when MAIN_DIRECT_STATUS_UPDATE is set');
+}
/*
@@ -52,20 +56,24 @@ top_httphead();
print ''."\n";
-if ($element == 'societe' && in_array($field, array('status')))
-{
- $result = restrictedArea($user, 'societe', $id);
+if (in_array($field, array('status'))) {
+ $result = restrictedArea($user, $element, $id);
}
-elseif ($element == 'product' && in_array($field, array('tosell', 'tobuy', 'tobatch')))
-{
+elseif ($element == 'product' && in_array($field, array('tosell', 'tobuy', 'tobatch'))) { // Special case for products
$result = restrictedArea($user, 'produit|service', $id, 'product&product', '', '', 'rowid');
}
-else
-{
+else {
accessforbidden("Bad value for combination of parameters element/field.", 0, 0, 1);
exit;
}
// Registering new values
-if (($action == 'set') && !empty($id))
- $object->setValueFrom($field, $value, $element, $id);
+if (($action == 'set') && !empty($id)) {
+ $triggerkey = strtoupper($element).'_UPDATE';
+ // Special case
+ if ($triggerkey == 'SOCIETE_UPDATE') {
+ $triggerkey = 'COMPANY_UPDATE';
+ }
+
+ $object->setValueFrom($field, $value, $element, $id, $user, $triggerkey);
+}
diff --git a/htdocs/core/boxes/box_activity.php b/htdocs/core/boxes/box_activity.php
index 65051b3c05b..8fc7b8766e4 100644
--- a/htdocs/core/boxes/box_activity.php
+++ b/htdocs/core/boxes/box_activity.php
@@ -154,7 +154,7 @@ class box_activity extends ModeleBoxes
{
$this->info_box_contents[$line][0] = array(
'td' => 'class="left" width="16"',
- 'url' => DOL_URL_ROOT."/comm/propal/list.php?mainmenu=commercial&leftmenu=propals&viewstatut=".$data[$j]->fk_statut,
+ 'url' => DOL_URL_ROOT."/comm/propal/list.php?mainmenu=commercial&leftmenu=propals&search_status=".$data[$j]->fk_statut,
'tooltip' => $langs->trans("Proposals")." ".$propalstatic->LibStatut($data[$j]->fk_statut, 0),
'logo' => 'object_propal'
);
@@ -168,7 +168,7 @@ class box_activity extends ModeleBoxes
'td' => 'class="right"',
'text' => $data[$j]->nb,
'tooltip' => $langs->trans("Proposals")." ".$propalstatic->LibStatut($data[$j]->fk_statut, 0),
- 'url' => DOL_URL_ROOT."/comm/propal/list.php?mainmenu=commercial&leftmenu=propals&viewstatut=".$data[$j]->fk_statut,
+ 'url' => DOL_URL_ROOT."/comm/propal/list.php?mainmenu=commercial&leftmenu=propals&search_status=".$data[$j]->fk_statut,
);
$totalnb += $data[$j]->nb;
@@ -236,7 +236,7 @@ class box_activity extends ModeleBoxes
while ($j < count($data)) {
$this->info_box_contents[$line][0] = array(
'td' => 'class="left" width="16"',
- 'url' => DOL_URL_ROOT."/commande/list.php?mainmenu=commercial&leftmenu=orders&viewstatut=".$data[$j]->fk_statut,
+ 'url' => DOL_URL_ROOT."/commande/list.php?mainmenu=commercial&leftmenu=orders&search_status=".$data[$j]->fk_statut,
'tooltip' => $langs->trans("Orders")." ".$commandestatic->LibStatut($data[$j]->fk_statut, 0, 0),
'logo' => 'object_order',
);
@@ -250,7 +250,7 @@ class box_activity extends ModeleBoxes
'td' => 'class="right"',
'text' => $data[$j]->nb,
'tooltip' => $langs->trans("Orders")." ".$commandestatic->LibStatut($data[$j]->fk_statut, 0, 0),
- 'url' => DOL_URL_ROOT."/commande/list.php?mainmenu=commercial&leftmenu=orders&viewstatut=".$data[$j]->fk_statut,
+ 'url' => DOL_URL_ROOT."/commande/list.php?mainmenu=commercial&leftmenu=orders&search_status=".$data[$j]->fk_statut,
);
$totalnb += $data[$j]->nb;
diff --git a/htdocs/core/boxes/box_birthdays.php b/htdocs/core/boxes/box_birthdays.php
index 7c8c110db88..17dd29057b3 100644
--- a/htdocs/core/boxes/box_birthdays.php
+++ b/htdocs/core/boxes/box_birthdays.php
@@ -89,7 +89,7 @@ class box_birthdays extends ModeleBoxes
$sql = "SELECT u.rowid, u.firstname, u.lastname, u.birth";
$sql .= " FROM ".MAIN_DB_PREFIX."user as u";
$sql .= " WHERE u.entity IN (".getEntity('user').")";
- $sql .= dolSqlDateFilter('u.birth', 0, $tmparray['mon'], $tmparray['year']);
+ $sql .= dolSqlDateFilter('u.birth', 0, $tmparray['mon'], 0);
$sql .= " ORDER BY u.birth ASC";
$sql .= $this->db->plimit($max, 0);
diff --git a/htdocs/core/boxes/box_birthdays_members.php b/htdocs/core/boxes/box_birthdays_members.php
index 96fc97f2e37..010bf8e7f21 100644
--- a/htdocs/core/boxes/box_birthdays_members.php
+++ b/htdocs/core/boxes/box_birthdays_members.php
@@ -90,7 +90,7 @@ class box_birthdays_members extends ModeleBoxes
$sql .= " FROM ".MAIN_DB_PREFIX."adherent as u";
$sql .= " WHERE u.entity IN (".getEntity('adherent').")";
$sql .= " AND u.statut = 1";
- $sql .= dolSqlDateFilter('u.birth', 0, $tmparray['mon'], $tmparray['year']);
+ $sql .= dolSqlDateFilter('u.birth', 0, $tmparray['mon'], 0);
$sql .= " ORDER BY u.birth ASC";
$sql .= $this->db->plimit($max, 0);
diff --git a/htdocs/core/class/ccountry.class.php b/htdocs/core/class/ccountry.class.php
index 18f2936e3ff..a70a2f9cafc 100644
--- a/htdocs/core/class/ccountry.class.php
+++ b/htdocs/core/class/ccountry.class.php
@@ -157,7 +157,6 @@ class Ccountry // extends CommonObject
*/
public function fetch($id, $code = '', $code_iso = '')
{
- global $langs;
$sql = "SELECT";
$sql .= " t.rowid,";
$sql .= " t.code,";
diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php
index 1be4d4eec89..a5cb9bf7d35 100644
--- a/htdocs/core/class/commondocgenerator.class.php
+++ b/htdocs/core/class/commondocgenerator.class.php
@@ -6,6 +6,7 @@
* Copyright (C) 2015 Marcos García
* Copyright (C) 2016 Charlie Benke
* Copyright (C) 2018 Frédéric France
+ * Copyright (C) 2020 Josep Lluís Amador
*
* 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
@@ -386,6 +387,12 @@ abstract class CommonDocGenerator
$sumcreditnote = $object->getSumCreditNotesUsed();
$already_payed_all = $sumpayed + $sumdeposit + $sumcreditnote;
$remain_to_pay = $sumpayed - $sumdeposit - $sumcreditnote;
+
+ if ($object->fk_account > 0) {
+ require_once DOL_DOCUMENT_ROOT .'/compta/bank/class/account.class.php';
+ $bank_account = new Account($this->db);
+ $bank_account->fetch($object->fk_account);
+ }
}
$date = ($object->element == 'contrat' ? $object->date_contrat : $object->date);
@@ -414,6 +421,9 @@ abstract class CommonDocGenerator
$array_key.'_payment_term_code'=>$object->cond_reglement_code,
$array_key.'_payment_term'=>($outputlangs->transnoentitiesnoconv('PaymentCondition'.$object->cond_reglement_code) != 'PaymentCondition'.$object->cond_reglement_code ? $outputlangs->transnoentitiesnoconv('PaymentCondition'.$object->cond_reglement_code) : ($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement)),
+ $array_key.'_bank_iban'=>$bank_account->iban,
+ $array_key.'_bank_bic'=>$bank_account->bic,
+
$array_key.'_total_ht_locale'=>price($object->total_ht, 0, $outputlangs),
$array_key.'_total_vat_locale'=>(!empty($object->total_vat) ?price($object->total_vat, 0, $outputlangs) : price($object->total_tva, 0, $outputlangs)),
$array_key.'_total_localtax1_locale'=>price($object->total_localtax1, 0, $outputlangs),
@@ -1456,6 +1466,7 @@ abstract class CommonDocGenerator
// save curent cell padding
$curentCellPaddinds = $pdf->getCellPaddings();
+ // Add space for lines (more if we need to show a second alternative language)
global $outputlangsbis;
if (is_object($outputlangsbis)) {
// set cell padding with column title definition
@@ -1470,8 +1481,8 @@ abstract class CommonDocGenerator
$textWidth = $colDef['width'];
$pdf->MultiCell($textWidth, 2, $colDef['title']['label'], '', $colDef['title']['align']);
-
- if (is_object($outputlangsbis)) {
+ // Add variant of translation if $outputlangsbis is an object
+ if (is_object($outputlangsbis) && trim($colDef['title']['label'])) {
$pdf->setCellPaddings($colDef['title']['padding'][3], 0, $colDef['title']['padding'][1], $colDef['title']['padding'][2]);
$pdf->SetXY($colDef['xStartPos'], $pdf->GetY());
$textbis = $outputlangsbis->transnoentities($colDef['title']['textkey']);
@@ -1485,6 +1496,7 @@ abstract class CommonDocGenerator
}
}
}
+
return $this->tabTitleHeight;
}
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index b091caa548a..7bbf7b6475c 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -575,7 +575,7 @@ abstract class CommonObject
{
$return = '';
$return .= '
';
- $return .= '
';
+ $return .= '';
$return .= ' '; // Can be image
$return .= ' ';
$return .= '';
@@ -7883,6 +7883,7 @@ abstract class CommonObject
public function createCommon(User $user, $notrigger = false)
{
global $langs;
+ dol_syslog(get_class($this)."::createCommon create", LOG_DEBUG);
$error = 0;
@@ -8121,6 +8122,7 @@ abstract class CommonObject
public function updateCommon(User $user, $notrigger = false)
{
global $conf, $langs;
+ dol_syslog(get_class($this)."::updateCommon update", LOG_DEBUG);
$error = 0;
@@ -8210,6 +8212,8 @@ abstract class CommonObject
*/
public function deleteCommon(User $user, $notrigger = false, $forcechilddeletion = 0)
{
+ dol_syslog(get_class($this)."::deleteCommon delete", LOG_DEBUG);
+
$error = 0;
$this->db->begin();
@@ -8269,15 +8273,8 @@ abstract class CommonObject
if (!$error && !empty($this->isextrafieldmanaged))
{
- $sql = "DELETE FROM ".MAIN_DB_PREFIX.$this->table_element."_extrafields";
- $sql .= " WHERE fk_object=".$this->id;
-
- $resql = $this->db->query($sql);
- if (!$resql)
- {
- $this->errors[] = $this->db->lasterror();
- $error++;
- }
+ $result = $this->deleteExtraFields();
+ if ($result < 0) { $error++; }
}
if (!$error)
diff --git a/htdocs/core/class/doleditor.class.php b/htdocs/core/class/doleditor.class.php
index de5ef1f2e9f..d4ee7ccaced 100644
--- a/htdocs/core/class/doleditor.class.php
+++ b/htdocs/core/class/doleditor.class.php
@@ -96,7 +96,7 @@ class DolEditor
$this->cols = (preg_match('/%/', $cols) ? $cols : max(40, $cols)); // If $cols is a percent, we keep it, otherwise, we take max
$this->height = $height;
$this->width = $width;
- }
+ }
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
diff --git a/htdocs/core/class/events.class.php b/htdocs/core/class/events.class.php
index c32fe1d77f2..9c2e5b145dd 100644
--- a/htdocs/core/class/events.class.php
+++ b/htdocs/core/class/events.class.php
@@ -100,9 +100,9 @@ class Events // extends CommonObject
array('id'=>'USER_NEW_PASSWORD', 'test'=>1),
array('id'=>'USER_ENABLEDISABLE', 'test'=>1),
array('id'=>'USER_DELETE', 'test'=>1),
- array('id'=>'GROUP_CREATE', 'test'=>1),
- array('id'=>'GROUP_MODIFY', 'test'=>1),
- array('id'=>'GROUP_DELETE', 'test'=>1),
+ array('id'=>'USERGROUP_CREATE', 'test'=>1),
+ array('id'=>'USERGROUP_MODIFY', 'test'=>1),
+ array('id'=>'USERGROUP_DELETE', 'test'=>1),
);
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 20f36998174..63500b156a8 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -52,19 +52,19 @@
class Form
{
/**
- * @var DoliDB Database handler.
- */
- public $db;
+ * @var DoliDB Database handler.
+ */
+ public $db;
/**
* @var string Error code (or message)
*/
public $error = '';
- /**
- * @var string[] Array of error strings
- */
- public $errors = array();
+ /**
+ * @var string[] Array of error strings
+ */
+ public $errors = array();
public $num;
@@ -103,8 +103,8 @@ class Form
* @param string $help Tooltip help
* @return string HTML edit field
*/
- public function editfieldkey($text, $htmlname, $preselected, $object, $perm, $typeofdata = 'string', $moreparam = '', $fieldrequired = 0, $notabletag = 0, $paramid = 'id', $help = '')
- {
+ public function editfieldkey($text, $htmlname, $preselected, $object, $perm, $typeofdata = 'string', $moreparam = '', $fieldrequired = 0, $notabletag = 0, $paramid = 'id', $help = '')
+ {
global $conf, $langs;
$ret = '';
@@ -157,7 +157,7 @@ class Form
}
return $ret;
- }
+ }
/**
* Output value of a field for an editable field
@@ -177,7 +177,7 @@ class Form
* @param string $paramid Key of parameter for id ('id', 'socid')
* @return string HTML edit field
*/
- public function editfieldval($text, $htmlname, $value, $object, $perm, $typeofdata = 'string', $editvalue = '', $extObject = null, $custommsg = null, $moreparam = '', $notabletag = 0, $formatfunc = '', $paramid = 'id')
+ public function editfieldval($text, $htmlname, $value, $object, $perm, $typeofdata = 'string', $editvalue = '', $extObject = null, $custommsg = null, $moreparam = '', $notabletag = 0, $formatfunc = '', $paramid = 'id')
{
global $conf, $langs, $db;
@@ -243,7 +243,7 @@ class Form
elseif (preg_match('/^select;/', $typeofdata))
{
$arraydata = explode(',', preg_replace('/^select;/', '', $typeofdata));
- $arraylist = array();
+ $arraylist = array();
foreach ($arraydata as $val)
{
$tmp = explode(':', $val);
@@ -254,7 +254,7 @@ class Form
}
elseif (preg_match('/^ckeditor/', $typeofdata))
{
- $tmp = explode(':', $typeofdata); // Example: ckeditor:dolibarr_zzz:width:height:savemethod:toolbarstartexpanded:rows:cols:uselocalbrowser
+ $tmp = explode(':', $typeofdata); // Example: ckeditor:dolibarr_zzz:width:height:savemethod:toolbarstartexpanded:rows:cols:uselocalbrowser
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor($htmlname, ($editvalue ? $editvalue : $value), ($tmp[2] ? $tmp[2] : ''), ($tmp[3] ? $tmp[3] : '100'), ($tmp[1] ? $tmp[1] : 'dolibarr_notes'), 'In', ($tmp[5] ? $tmp[5] : 0), (isset($tmp[8]) ? ($tmp[8] ?true:false) : true), true, ($tmp[6] ? $tmp[6] : '20'), ($tmp[7] ? $tmp[7] : '100'));
$ret .= $doleditor->Create(1);
@@ -263,12 +263,12 @@ class Form
if (empty($notabletag)) $ret .= '
';
//else $ret.='
';
- $ret .= ' ';
- if (preg_match('/ckeditor|textarea/', $typeofdata) && empty($notabletag)) $ret .= ' '."\n";
- $ret .= ' ';
- if (empty($notabletag)) $ret .= ' ';
+ $ret .= '
';
+ if (preg_match('/ckeditor|textarea/', $typeofdata) && empty($notabletag)) $ret .= '
'."\n";
+ $ret .= '
';
+ if (empty($notabletag)) $ret .= '';
- if (empty($notabletag)) $ret .= '
'."\n";
+ if (empty($notabletag)) $ret .= '
'."\n";
$ret .= ''."\n";
}
else
@@ -282,7 +282,7 @@ class Form
elseif (preg_match('/^select;/', $typeofdata))
{
$arraydata = explode(',', preg_replace('/^select;/', '', $typeofdata));
- $arraylist = array();
+ $arraylist = array();
foreach ($arraydata as $val)
{
$tmp = explode(':', $val);
@@ -348,6 +348,7 @@ class Form
return ''; // No extralang field to show
}
+ $result .= ''."\n";
$result .= '
';
$s = img_picto($langs->trans("ShowOtherLanguages"), 'language', '', false, 0, 0, '', 'fa-15 editfieldlang');
$result .= $s;
@@ -492,8 +493,8 @@ class Form
{
if (!empty($custommsg['success']))
$out .= '
'."\n";
- if (!empty($custommsg['error']))
- $out .= '
'."\n";
+ if (!empty($custommsg['error']))
+ $out .= '
'."\n";
}
else
$out .= '
'."\n";
@@ -532,7 +533,7 @@ class Form
* @see textwithpicto() Use thisfunction if you can.
* TODO Move this as static as soon as everybody use textwithpicto or @Form::textwithtooltip
*/
- public function textwithtooltip($text, $htmltext, $tooltipon = 1, $direction = 0, $img = '', $extracss = '', $notabs = 3, $incbefore = '', $noencodehtmltext = 0, $tooltiptrigger = '', $forcenowrap = 0)
+ public function textwithtooltip($text, $htmltext, $tooltipon = 1, $direction = 0, $img = '', $extracss = '', $notabs = 3, $incbefore = '', $noencodehtmltext = 0, $tooltiptrigger = '', $forcenowrap = 0)
{
if ($incbefore) $text = $incbefore.$text;
if (!$htmltext) return $text;
@@ -613,7 +614,7 @@ class Form
* @param int $forcenowrap Force no wrap between text and picto (works with notabs=2 only)
* @return string HTML code of text, picto, tooltip
*/
- public function textwithpicto($text, $htmltext, $direction = 1, $type = 'help', $extracss = '', $noencodehtmltext = 0, $notabs = 3, $tooltiptrigger = '', $forcenowrap = 0)
+ public function textwithpicto($text, $htmltext, $direction = 1, $type = 'help', $extracss = '', $noencodehtmltext = 0, $notabs = 3, $tooltiptrigger = '', $forcenowrap = 0)
{
global $conf, $langs;
@@ -643,7 +644,7 @@ class Form
// If info or help with smartphone, show only text (tooltip on click does not works with dialog on smaprtphone)
//if (! empty($conf->dol_no_mouse_hover) && ! empty($tooltiptrigger))
//{
- //if ($type == 'info' || $type == 'help') return '
'.$text.'' ';
+ //if ($type == 'info' || $type == 'help') return '
'.$text.'' ';
//}
$img = '';
@@ -666,7 +667,7 @@ class Form
* @param int $alwaysvisible 1=select button always visible
* @return string|void Select list
*/
- public function selectMassAction($selected, $arrayofaction, $alwaysvisible = 0)
+ public function selectMassAction($selected, $arrayofaction, $alwaysvisible = 0)
{
global $conf, $langs, $hookmanager;
@@ -760,7 +761,7 @@ class Form
return $ret;
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return combo list of activated countries, into language of user
*
@@ -776,9 +777,9 @@ class Form
* @param array $exclude_country_code Array of country code (iso2) to exclude
* @return string HTML string with select
*/
- public function select_country($selected = '', $htmlname = 'country_id', $htmloption = '', $maxlength = 0, $morecss = 'minwidth300', $usecodeaskey = '', $showempty = 1, $disablefavorites = 0, $addspecialentries = 0, $exclude_country_code = array())
+ public function select_country($selected = '', $htmlname = 'country_id', $htmloption = '', $maxlength = 0, $morecss = 'minwidth300', $usecodeaskey = '', $showempty = 1, $disablefavorites = 0, $addspecialentries = 0, $exclude_country_code = array())
{
- // phpcs:enable
+ // phpcs:enable
global $conf, $langs, $mysoc;
$langs->load("dict");
@@ -878,7 +879,7 @@ class Form
return $out;
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return select list of incoterms
*
@@ -891,9 +892,9 @@ class Form
* @param array $events Event options to run on change. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled')))
* @return string HTML string with select and input
*/
- public function select_incoterms($selected = '', $location_incoterms = '', $page = '', $htmlname = 'incoterm_id', $htmloption = '', $forcecombo = 1, $events = array())
+ public function select_incoterms($selected = '', $location_incoterms = '', $page = '', $htmlname = 'incoterm_id', $htmloption = '', $forcecombo = 1, $events = array())
{
- // phpcs:enable
+ // phpcs:enable
global $conf, $langs;
$langs->load("dict");
@@ -972,7 +973,7 @@ class Form
return $out;
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return list of types of lines (product or service)
* Example: 0=product, 1=service, 9=other (for external module)
@@ -984,14 +985,14 @@ class Form
* @param integer $forceall 1=Force to show products and services in combo list, whatever are activated modules, 0=No force, 2=Force to show only Products, 3=Force to show only services, -1=Force none (and set hidden field to 'service')
* @return void
*/
- public function select_type_of_lines($selected = '', $htmlname = 'type', $showempty = 0, $hidetext = 0, $forceall = 0)
+ public function select_type_of_lines($selected = '', $htmlname = 'type', $showempty = 0, $hidetext = 0, $forceall = 0)
{
- // phpcs:enable
+ // phpcs:enable
global $db, $langs, $user, $conf;
// If product & services are enabled or both disabled.
if ($forceall == 1 || (empty($forceall) && !empty($conf->product->enabled) && !empty($conf->service->enabled))
- || (empty($forceall) && empty($conf->product->enabled) && empty($conf->service->enabled)))
+ || (empty($forceall) && empty($conf->product->enabled) && empty($conf->service->enabled)))
{
if (empty($hidetext)) print $langs->trans("Type").': ';
print '
';
@@ -1029,15 +1030,15 @@ class Form
}
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Load into cache cache_types_fees, array of types of fees
*
* @return int Nb of lines loaded, <0 if KO
*/
- public function load_cache_types_fees()
+ public function load_cache_types_fees()
{
- // phpcs:enable
+ // phpcs:enable
global $langs;
$num = count($this->cache_types_fees);
@@ -1078,7 +1079,7 @@ class Form
}
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return list of types of notes
*
@@ -1087,9 +1088,9 @@ class Form
* @param int $showempty Add an empty field
* @return void
*/
- public function select_type_fees($selected = '', $htmlname = 'type', $showempty = 0)
+ public function select_type_fees($selected = '', $htmlname = 'type', $showempty = 0)
{
- // phpcs:enable
+ // phpcs:enable
global $user, $langs;
dol_syslog(__METHOD__." selected=".$selected.", htmlname=".$htmlname, LOG_DEBUG);
@@ -1118,7 +1119,7 @@ class Form
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return HTML code to select a company.
*
@@ -1131,13 +1132,13 @@ class Form
* @return string Return select box for thirdparty.
* @deprecated 3.8 Use select_company instead. For exemple $form->select_thirdparty(GETPOST('socid'),'socid','',0) => $form->select_company(GETPOST('socid'),'socid','',1,0,0,array(),0)
*/
- public function select_thirdparty($selected = '', $htmlname = 'socid', $filter = '', $limit = 20, $ajaxoptions = array(), $forcecombo = 0)
+ public function select_thirdparty($selected = '', $htmlname = 'socid', $filter = '', $limit = 20, $ajaxoptions = array(), $forcecombo = 0)
{
- // phpcs:enable
- return $this->select_thirdparty_list($selected, $htmlname, $filter, 1, 0, $forcecombo, array(), '', 0, $limit);
+ // phpcs:enable
+ return $this->select_thirdparty_list($selected, $htmlname, $filter, 1, 0, $forcecombo, array(), '', 0, $limit);
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Output html form to select a third party
*
@@ -1157,9 +1158,9 @@ class Form
* @param bool $multiple add [] in the name of element and add 'multiple' attribut (not working with ajax_autocompleter)
* @return string HTML string with select box for thirdparty.
*/
- public function select_company($selected = '', $htmlname = 'socid', $filter = '', $showempty = '', $showtype = 0, $forcecombo = 0, $events = array(), $limit = 0, $morecss = 'minwidth100', $moreparam = '', $selected_input_value = '', $hidelabel = 1, $ajaxoptions = array(), $multiple = false)
+ public function select_company($selected = '', $htmlname = 'socid', $filter = '', $showempty = '', $showtype = 0, $forcecombo = 0, $events = array(), $limit = 0, $morecss = 'minwidth100', $moreparam = '', $selected_input_value = '', $hidelabel = 1, $ajaxoptions = array(), $multiple = false)
{
- // phpcs:enable
+ // phpcs:enable
global $conf, $user, $langs;
$out = '';
@@ -1201,7 +1202,7 @@ class Form
return $out;
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Output html form to select a third party.
* Note, you must use the select_company to get the component to select a third party. This function must only be called by select_company.
@@ -1221,9 +1222,9 @@ class Form
* @param bool $multiple add [] in the name of element and add 'multiple' attribut
* @return string HTML string with
*/
- public function select_thirdparty_list($selected = '', $htmlname = 'socid', $filter = '', $showempty = '', $showtype = 0, $forcecombo = 0, $events = array(), $filterkey = '', $outputmode = 0, $limit = 0, $morecss = 'minwidth100', $moreparam = '', $multiple = false)
+ public function select_thirdparty_list($selected = '', $htmlname = 'socid', $filter = '', $showempty = '', $showtype = 0, $forcecombo = 0, $events = array(), $filterkey = '', $outputmode = 0, $limit = 0, $morecss = 'minwidth100', $moreparam = '', $multiple = false)
{
- // phpcs:enable
+ // phpcs:enable
global $conf, $user, $langs;
$out = '';
@@ -1245,7 +1246,7 @@ class Form
if ($conf->global->COMPANY_SHOW_ADDRESS_SELECTLIST) {
$sql .= ", s.address, s.zip, s.town";
- $sql .= ", dictp.code as country_code";
+ $sql .= ", dictp.code as country_code";
}
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
@@ -1288,7 +1289,7 @@ class Form
$resql = $this->db->query($sql);
if ($resql)
{
- if (!$forcecombo)
+ if (!$forcecombo)
{
include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php';
$out .= ajax_combobox($htmlname, $events, $conf->global->COMPANY_USE_SEARCH_TO_SELECT);
@@ -1383,7 +1384,7 @@ class Form
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return HTML combo list of absolute discounts
*
@@ -1394,9 +1395,9 @@ class Form
* @param int $maxvalue Max value for lines that can be selected
* @return int Return number of qualifed lines in list
*/
- public function select_remises($selected, $htmlname, $filter, $socid, $maxvalue = 0)
+ public function select_remises($selected, $htmlname, $filter, $socid, $maxvalue = 0)
{
- // phpcs:enable
+ // phpcs:enable
global $langs, $conf;
// On recherche les remises
@@ -1460,7 +1461,7 @@ class Form
}
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return list of all contacts (for a third party or all)
*
@@ -1481,12 +1482,12 @@ class Form
* @return int <0 if KO, Nb of contact in list if OK
* @deprected You can use selectcontacts directly (warning order of param was changed)
*/
- public function select_contacts($socid, $selected = '', $htmlname = 'contactid', $showempty = 0, $exclude = '', $limitto = '', $showfunction = 0, $moreclass = '', $showsoc = 0, $forcecombo = 0, $events = array(), $options_only = false, $moreparam = '', $htmlid = '')
- {
- // phpcs:enable
+ public function select_contacts($socid, $selected = '', $htmlname = 'contactid', $showempty = 0, $exclude = '', $limitto = '', $showfunction = 0, $moreclass = '', $showsoc = 0, $forcecombo = 0, $events = array(), $options_only = false, $moreparam = '', $htmlid = '')
+ {
+ // phpcs:enable
print $this->selectcontacts($socid, $selected, $htmlname, $showempty, $exclude, $limitto, $showfunction, $moreclass, $options_only, $showsoc, $forcecombo, $events, $moreparam, $htmlid);
return $this->num;
- }
+ }
/**
* Return HTML code of the SELECT of list of all contacts (for a third party or all).
@@ -1511,8 +1512,8 @@ class Form
* @param bool $multiple add [] in the name of element and add 'multiple' attribut
* @return int <0 if KO, Nb of contact in list if OK
*/
- public function selectcontacts($socid, $selected = '', $htmlname = 'contactid', $showempty = 0, $exclude = '', $limitto = '', $showfunction = 0, $moreclass = '', $options_only = false, $showsoc = 0, $forcecombo = 0, $events = array(), $moreparam = '', $htmlid = '', $multiple = false)
- {
+ public function selectcontacts($socid, $selected = '', $htmlname = 'contactid', $showempty = 0, $exclude = '', $limitto = '', $showfunction = 0, $moreclass = '', $options_only = false, $showsoc = 0, $forcecombo = 0, $events = array(), $moreparam = '', $htmlid = '', $multiple = false)
+ {
global $conf, $langs, $hookmanager, $action;
$langs->load('companies');
@@ -1570,42 +1571,42 @@ class Form
$contactstatic->lastname = $obj->lastname;
$contactstatic->firstname = $obj->firstname;
if ($obj->statut == 1) {
- if ($htmlname != 'none')
- {
- $disabled = 0;
- if (is_array($exclude) && count($exclude) && in_array($obj->rowid, $exclude)) $disabled = 1;
- if (is_array($limitto) && count($limitto) && !in_array($obj->rowid, $limitto)) $disabled = 1;
- if (!empty($selected) && in_array($obj->rowid, $selected))
- {
- $out .= 'getFullName($langs);
- if ($showfunction && $obj->poste) $out .= ' ('.$obj->poste.')';
- if (($showsoc > 0) && $obj->company) $out .= ' - ('.$obj->company.')';
- $out .= ' ';
- }
- else
- {
- $out .= 'getFullName($langs);
- if ($showfunction && $obj->poste) $out .= ' ('.$obj->poste.')';
- if (($showsoc > 0) && $obj->company) $out .= ' - ('.$obj->company.')';
- $out .= ' ';
- }
- }
- else
- {
- if (in_array($obj->rowid, $selected))
- {
- $out .= $contactstatic->getFullName($langs);
- if ($showfunction && $obj->poste) $out .= ' ('.$obj->poste.')';
- if (($showsoc > 0) && $obj->company) $out .= ' - ('.$obj->company.')';
- }
- }
- }
+ if ($htmlname != 'none')
+ {
+ $disabled = 0;
+ if (is_array($exclude) && count($exclude) && in_array($obj->rowid, $exclude)) $disabled = 1;
+ if (is_array($limitto) && count($limitto) && !in_array($obj->rowid, $limitto)) $disabled = 1;
+ if (!empty($selected) && in_array($obj->rowid, $selected))
+ {
+ $out .= 'getFullName($langs);
+ if ($showfunction && $obj->poste) $out .= ' ('.$obj->poste.')';
+ if (($showsoc > 0) && $obj->company) $out .= ' - ('.$obj->company.')';
+ $out .= ' ';
+ }
+ else
+ {
+ $out .= 'getFullName($langs);
+ if ($showfunction && $obj->poste) $out .= ' ('.$obj->poste.')';
+ if (($showsoc > 0) && $obj->company) $out .= ' - ('.$obj->company.')';
+ $out .= ' ';
+ }
+ }
+ else
+ {
+ if (in_array($obj->rowid, $selected))
+ {
+ $out .= $contactstatic->getFullName($langs);
+ if ($showfunction && $obj->poste) $out .= ' ('.$obj->poste.')';
+ if (($showsoc > 0) && $obj->company) $out .= ' - ('.$obj->company.')';
+ }
+ }
+ }
$i++;
}
}
@@ -1642,7 +1643,7 @@ class Form
}
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return select list of users
*
@@ -1658,13 +1659,13 @@ class Form
* @deprecated Use select_dolusers instead
* @see select_dolusers()
*/
- public function select_users($selected = '', $htmlname = 'userid', $show_empty = 0, $exclude = null, $disabled = 0, $include = '', $enableonly = '', $force_entity = '0')
+ public function select_users($selected = '', $htmlname = 'userid', $show_empty = 0, $exclude = null, $disabled = 0, $include = '', $enableonly = '', $force_entity = '0')
{
- // phpcs:enable
+ // phpcs:enable
print $this->select_dolusers($selected, $htmlname, $show_empty, $exclude, $disabled, $include, $enableonly, $force_entity);
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return select list of users
*
@@ -1688,9 +1689,9 @@ class Form
* @return string HTML select string
* @see select_dolgroups()
*/
- public function select_dolusers($selected = '', $htmlname = 'userid', $show_empty = 0, $exclude = null, $disabled = 0, $include = '', $enableonly = '', $force_entity = '0', $maxlength = 0, $showstatus = 0, $morefilter = '', $show_every = 0, $enableonlytext = '', $morecss = '', $noactive = 0, $outputmode = 0, $multiple = false)
+ public function select_dolusers($selected = '', $htmlname = 'userid', $show_empty = 0, $exclude = null, $disabled = 0, $include = '', $enableonly = '', $force_entity = '0', $maxlength = 0, $showstatus = 0, $morefilter = '', $show_every = 0, $enableonlytext = '', $morecss = '', $noactive = 0, $outputmode = 0, $multiple = false)
{
- // phpcs:enable
+ // phpcs:enable
global $conf, $user, $langs, $hookmanager;
// If no preselected user defined, we take current user
@@ -1773,7 +1774,7 @@ class Form
$i = 0;
if ($num)
{
- // Enhance with select2
+ // Enhance with select2
include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php';
$out .= ajax_combobox($htmlname);
@@ -1847,7 +1848,7 @@ class Form
{
$out .= ($moreinfo ? ' - ' : ' (').($obj->label ? $obj->label : $langs->trans("EntityNameNotDefined"));
$moreinfo++;
- }
+ }
}
$out .= ($moreinfo ? ')' : '');
if ($disableline && $disableline != '1')
@@ -1877,7 +1878,7 @@ class Form
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return select list of users. Selected users are stored into session.
* List of users are provided into $_SESSION['assignedtouser'].
@@ -1900,9 +1901,9 @@ class Form
* @return string HTML select string
* @see select_dolgroups()
*/
- public function select_dolusers_forevent($action = '', $htmlname = 'userid', $show_empty = 0, $exclude = null, $disabled = 0, $include = '', $enableonly = '', $force_entity = '0', $maxlength = 0, $showstatus = 0, $morefilter = '', $showproperties = 0, $listofuserid = array(), $listofcontactid = array(), $listofotherid = array())
+ public function select_dolusers_forevent($action = '', $htmlname = 'userid', $show_empty = 0, $exclude = null, $disabled = 0, $include = '', $enableonly = '', $force_entity = '0', $maxlength = 0, $showstatus = 0, $morefilter = '', $showproperties = 0, $listofuserid = array(), $listofcontactid = array(), $listofotherid = array())
{
- // phpcs:enable
+ // phpcs:enable
global $conf, $user, $langs;
$userstatic = new User($this->db);
@@ -1967,7 +1968,7 @@ class Form
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return list of products for customer in Ajax if Ajax activated or go to select_produits_list
*
@@ -1993,9 +1994,9 @@ class Form
* @param array $selected_combinations Selected combinations. Format: array([attrid] => attrval, [...])
* @return void
*/
- public function select_produits($selected = '', $htmlname = 'productid', $filtertype = '', $limit = 20, $price_level = 0, $status = 1, $finished = 2, $selected_input_value = '', $hidelabel = 0, $ajaxoptions = array(), $socid = 0, $showempty = '1', $forcecombo = 0, $morecss = '', $hidepriceinlabel = 0, $warehouseStatus = '', $selected_combinations = array())
+ public function select_produits($selected = '', $htmlname = 'productid', $filtertype = '', $limit = 20, $price_level = 0, $status = 1, $finished = 2, $selected_input_value = '', $hidelabel = 0, $ajaxoptions = array(), $socid = 0, $showempty = '1', $forcecombo = 0, $morecss = '', $hidepriceinlabel = 0, $warehouseStatus = '', $selected_combinations = array())
{
- // phpcs:enable
+ // phpcs:enable
global $langs, $conf;
// check parameters
@@ -2354,6 +2355,8 @@ class Form
{
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_parser.class.php';
+ require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php';
+
$num = $this->db->num_rows($result);
$events = null;
@@ -2882,6 +2885,7 @@ class Form
if ($result)
{
require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_parser.class.php';
+ require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php';
$num = $this->db->num_rows($result);
@@ -4383,7 +4387,7 @@ class Form
buttons: {
"'.dol_escape_js($langs->transnoentities("Yes")).'": function() {
var options = "&token='.urlencode(newToken()).'";
- var inputok = '.json_encode($inputok).';
+ var inputok = '.json_encode($inputok).'; /* List of fields into form */
var pageyes = "'.dol_escape_js(!empty($pageyes) ? $pageyes : '').'";
if (inputok.length>0) {
$.each(inputok, function(i, inputname) {
@@ -4402,7 +4406,7 @@ class Form
},
"'.dol_escape_js($langs->transnoentities("No")).'": function() {
var options = "&token='.urlencode(newToken()).'";
- var inputko = '.json_encode($inputko).';
+ var inputko = '.json_encode($inputko).'; /* List of fields into form */
var pageno="'.dol_escape_js(!empty($pageno) ? $pageno : '').'";
if (inputko.length>0) {
$.each(inputko, function(i, inputname) {
@@ -6120,7 +6124,7 @@ class Form
else
{
// For backward compatibility
- $objecttmp->fields['ref']=array('type'=>'varchar(30)', 'label'=>'Ref', 'showoncombobox'=>1);
+ $objecttmp->fields['ref'] = array('type'=>'varchar(30)', 'label'=>'Ref', 'showoncombobox'=>1);
}
if (empty($fieldstoshow))
@@ -7405,9 +7409,14 @@ class Form
$htmltext = '';
// If there is extra languages
foreach ($arrayoflangcode as $extralangcode) {
- $s = picto_from_langcode($extralangcode, 'class="pictoforlang paddingright"');
- $htmltext .= $s.$object->array_languages['name'][$extralangcode];
+ $htmltext .= picto_from_langcode($extralangcode, 'class="pictoforlang paddingright"');
+ if ($object->array_languages['name'][$extralangcode]) {
+ $htmltext .= $object->array_languages['name'][$extralangcode];
+ } else {
+ $htmltext .= ''.$langs->trans("SwitchInEditModeToAddTranslation").' ';
+ }
}
+ $ret .= ''."\n";
$ret .= $this->textwithpicto('', $htmltext, -1, 'language', 'opacitymedium paddingleft');
}
}
diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php
index 3c744f4c4bd..b19a75135aa 100644
--- a/htdocs/core/class/html.formactions.class.php
+++ b/htdocs/core/class/html.formactions.class.php
@@ -203,7 +203,7 @@ class FormActions
if ($typeelement == 'project') $projectid = $object->id;
$newcardbutton = '';
- if (!empty($conf->agenda->enabled))
+ if (!empty($conf->agenda->enabled) && ! empty($user->rights->agenda->myactions->create))
{
$newcardbutton .= dolGetButtonTitle($langs->trans("AddEvent"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.dol_print_date(dol_now(), 'dayhourlog').'&origin='.$typeelement.'&originid='.$object->id.($object->socid > 0 ? '&socid='.$object->socid : ($socid > 0 ? '&socid='.$socid : '')).($projectid > 0 ? '&projectid='.$projectid : '').'&backtopage='.urlencode($urlbacktopage));
}
diff --git a/htdocs/core/class/html.formadmin.class.php b/htdocs/core/class/html.formadmin.class.php
index 43006150928..16e9a70ab56 100644
--- a/htdocs/core/class/html.formadmin.class.php
+++ b/htdocs/core/class/html.formadmin.class.php
@@ -58,11 +58,11 @@ class FormAdmin
* @param int $showcode 1=Add language code into label at begining, 2=Add language code into label at end
* @param int $forcecombo Force to use combo box (so no ajax beautify effect)
* @param int $multiselect Make the combo a multiselect
- * @param array $onlykeys Show only the following keys (opposite of $filter)
+ * @param array $onlykeys Show only the following keys (opposite of $filter). Example array('fr', 'es', ...)
* @param int $mainlangonly 1=Show only main languages ('fr_FR' no' fr_BE', 'es_ES' not 'es_MX', ...)
* @return string Return HTML select string with list of languages
*/
- public function select_language($selected = '', $htmlname = 'lang_id', $showauto = 0, $filter = null, $showempty = '', $showwarning = 0, $disabled = 0, $morecss = '', $showcode = 0, $forcecombo = 0, $multiselect = 0, $onlykeys = array(), $mainlangonly = 0)
+ public function select_language($selected = '', $htmlname = 'lang_id', $showauto = 0, $filter = null, $showempty = '', $showwarning = 0, $disabled = 0, $morecss = '', $showcode = 0, $forcecombo = 0, $multiselect = 0, $onlykeys = null, $mainlangonly = 0)
{
// phpcs:enable
global $conf, $langs;
diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index 8b1469dd446..d4e6620c0da 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -76,7 +76,7 @@ class FormFile
* @param integer $linkfiles 1=Also add form to link files, 0=Do not show form to link files
* @param string $htmlname Name and id of HTML form ('formuserfile' by default, 'formuserfileecm' when used to upload a file in ECM)
* @param string $accept Specifies the types of files accepted (This is not a security check but an user interface facility. eg '.pdf,image/*' or '.png,.jpg' or 'video/*')
- * @param string $sectiondir If upload must be done inside a particular directory (is sectiondir defined, sectionid must not be)
+ * @param string $sectiondir If upload must be done inside a particular directory (if sectiondir defined, sectionid must not be)
* @param int $usewithoutform 0=Default, 1=Disable and style to use in existing area
* @return int <0 if KO, >0 if OK
*/
@@ -108,9 +108,7 @@ class FormFile
return 1;
}
- $maxlength = $size;
-
- $out = "\n\n\n";
+ $out = "\n\n".''."\n";
if (empty($title)) $title = $langs->trans("AttachANewFile");
if ($title != 'none') $out .= load_fiche_titre($title, null, null);
@@ -174,6 +172,10 @@ class FormFile
$out .= (!empty($accept) ? ' accept="'.$accept.'"' : ' accept=""');
$out .= '>';
$out .= ' ';
+ if ($sectionid) { // Show overwrite if exists for ECM module only
+ $langs->load('link');
+ $out .= ''.$langs->trans("OverwriteIfExists").' ';
+ }
$out .= ' global->MAIN_UPLOAD_DOC) || empty($perm) ? ' disabled' : '');
$out .= '>';
@@ -220,11 +222,11 @@ class FormFile
if (empty($sectionid)) $out .= ' ';
}
- $out .= "\n\n";
+ $out .= "\n
\n";
if ($linkfiles)
{
- $out .= "\n\n";
+ $out .= "\n".''."\n";
$langs->load('link');
$title = $langs->trans("LinkANewFile");
$out .= load_fiche_titre($title, null, null);
@@ -260,7 +262,7 @@ class FormFile
$out .= ' ';
}
- $out .= "\n\n";
+ $out .= "\n
\n";
}
$parameters = array('socid'=>(isset($GLOBALS['socid']) ? $GLOBALS['socid'] : ''), 'id'=>(isset($GLOBALS['id']) ? $GLOBALS['id'] : ''), 'url'=>$url, 'perm'=>$perm);
@@ -731,7 +733,9 @@ class FormFile
$arraykeys = array_keys($modellist);
$modelselected = $arraykeys[0];
}
- $out .= $form->selectarray('model', $modellist, $modelselected, $showempty, 0, 0, '', 0, 0, 0, '', 'minwidth100');
+ $morecss = 'maxwidth200';
+ if ($conf->browser->layout == 'phone') $morecss = 'maxwidth100';
+ $out .= $form->selectarray('model', $modellist, $modelselected, $showempty, 0, 0, '', 0, 0, 0, '', $morecss);
if ($conf->use_javascript_ajax)
{
$out .= ajax_combobox('model');
@@ -869,7 +873,7 @@ class FormFile
if ($printer)
{
//$out.= '';
- $out .= ''.img_picto($langs->trans("PrintFile", $relativepath), 'printer.png').' ';
}
@@ -990,7 +994,7 @@ class FormFile
{
$out = '
'.img_picto('', 'listlight', '', 0, 0, 0, '', 'valignmiddle').'
- ';
+ ';
$tmpout = '';
// Loop on each file found
@@ -1174,7 +1178,7 @@ class FormFile
}
// Show list of existing files
- if ((empty($useinecm) || $useinecm == 6) && $title != 'none') print load_fiche_titre($title ? $title : $langs->trans("AttachedFiles"));
+ if ((empty($useinecm) || $useinecm == 6) && $title != 'none') print load_fiche_titre($title ? $title : $langs->trans("AttachedFiles"), '', 'file-upload', 0, '', 'table-list-of-attached-files');
if (empty($url)) $url = $_SERVER["PHP_SELF"];
print ''."\n";
@@ -1297,7 +1301,7 @@ class FormFile
{
$fileinfo = pathinfo($file['name']);
print '';
- if (image_format_supported($file['name']) > 0)
+ if (image_format_supported($file['name']) >= 0)
{
if ($useinecm == 5 || $useinecm == 6)
{
@@ -1790,7 +1794,7 @@ class FormFile
print ''."\n";
// Show list of associated links
- print load_fiche_titre($langs->trans("LinkedFiles"));
+ print load_fiche_titre($langs->trans("LinkedFiles"), '', 'external-link-square-alt', 0, '', 'table-list-of-links');
print '';
print ' ';
diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php
index 8b4d1dee6ef..b6c7017e408 100644
--- a/htdocs/core/class/html.formprojet.class.php
+++ b/htdocs/core/class/html.formprojet.class.php
@@ -30,9 +30,9 @@
class FormProjets
{
/**
- * @var DoliDB Database handler.
- */
- public $db;
+ * @var DoliDB Database handler.
+ */
+ public $db;
/**
* @var string Error code (or message)
@@ -50,7 +50,7 @@ class FormProjets
$this->db = $db;
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Output a combo list with projects qualified for a third party / user
*
@@ -71,9 +71,9 @@ class FormProjets
* @param int $htmlid Html id to use instead of htmlname
* @return string Return html content
*/
- public function select_projects($socid = -1, $selected = '', $htmlname = 'projectid', $maxlength = 16, $option_only = 0, $show_empty = 1, $discard_closed = 0, $forcefocus = 0, $disabled = 0, $mode = 0, $filterkey = '', $nooutput = 0, $forceaddid = 0, $morecss = '', $htmlid = '')
- {
- // phpcs:enable
+ public function select_projects($socid = -1, $selected = '', $htmlname = 'projectid', $maxlength = 16, $option_only = 0, $show_empty = 1, $discard_closed = 0, $forcefocus = 0, $disabled = 0, $mode = 0, $filterkey = '', $nooutput = 0, $forceaddid = 0, $morecss = '', $htmlid = '')
+ {
+ // phpcs:enable
global $langs, $conf, $form;
$out = '';
@@ -90,13 +90,13 @@ class FormProjets
$selected_input_value = $project->ref;
}
$urloption = 'socid='.$socid.'&htmlname='.$htmlname.'&discardclosed='.$discard_closed;
- $out .= ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/projet/ajax/projects.php', $urloption, $conf->global->PROJECT_USE_SEARCH_TO_SELECT, 0, array(
- // 'update' => array(
- // 'projectid' => 'id'
- // )
- ));
+ $out .= ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/projet/ajax/projects.php', $urloption, $conf->global->PROJECT_USE_SEARCH_TO_SELECT, 0, array(
+ // 'update' => array(
+ // 'projectid' => 'id'
+ // )
+ ));
- $out .= ' ';
+ $out .= ' ';
}
else
{
@@ -113,13 +113,13 @@ class FormProjets
if (empty($nooutput))
{
- print $out;
- return '';
+ print $out;
+ return '';
}
else return $out;
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Returns an array with projects qualified for a third party
*
@@ -130,8 +130,8 @@ class FormProjets
* @param int $option_only Return only html options lines without the select tag
* @param int $show_empty Add an empty line
* @param int $discard_closed Discard closed projects (0=Keep,1=hide completely,2=Disable)
- * @param int $forcefocus Force focus on field (works with javascript only)
- * @param int $disabled Disabled
+ * @param int $forcefocus Force focus on field (works with javascript only)
+ * @param int $disabled Disabled
* @param int $mode 0 for HTML mode and 1 for array return (to be used by json_encode for example)
* @param string $filterkey Key to filter
* @param int $nooutput No print output. Return it only.
@@ -140,9 +140,9 @@ class FormProjets
* @param string $morecss More CSS
* @return int Nb of project if OK, <0 if KO
*/
- public function select_projects_list($socid = -1, $selected = '', $htmlname = 'projectid', $maxlength = 24, $option_only = 0, $show_empty = 1, $discard_closed = 0, $forcefocus = 0, $disabled = 0, $mode = 0, $filterkey = '', $nooutput = 0, $forceaddid = 0, $htmlid = '', $morecss = 'maxwidth500')
- {
- // phpcs:enable
+ public function select_projects_list($socid = -1, $selected = '', $htmlname = 'projectid', $maxlength = 24, $option_only = 0, $show_empty = 1, $discard_closed = 0, $forcefocus = 0, $disabled = 0, $mode = 0, $filterkey = '', $nooutput = 0, $forceaddid = 0, $htmlid = '', $morecss = 'maxwidth500')
+ {
+ // phpcs:enable
global $user, $conf, $langs;
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
@@ -170,11 +170,11 @@ class FormProjets
if ($socid == 0) $sql .= " AND (p.fk_soc=0 OR p.fk_soc IS NULL)";
if ($socid > 0)
{
- if (empty($conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY)) $sql .= " AND (p.fk_soc=".$socid." OR p.fk_soc IS NULL)";
- elseif ($conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY != 'all') // PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY is 'all' or a list of ids separated by coma.
- {
- $sql .= " AND (p.fk_soc IN (".$socid.", ".$conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY.") OR p.fk_soc IS NULL)";
- }
+ if (empty($conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY)) $sql .= " AND (p.fk_soc=".$socid." OR p.fk_soc IS NULL)";
+ elseif ($conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY != 'all') // PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY is 'all' or a list of ids separated by coma.
+ {
+ $sql .= " AND (p.fk_soc IN (".$socid.", ".$conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY.") OR p.fk_soc IS NULL)";
+ }
}
if (!empty($filterkey)) $sql .= natural_search(array('p.title', 'p.ref'), $filterkey);
$sql .= " ORDER BY p.ref ASC";
@@ -186,9 +186,9 @@ class FormProjets
if (!empty($conf->use_javascript_ajax))
{
include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php';
- $comboenhancement = ajax_combobox($htmlid, array(), 0, $forcefocus);
- $out .= $comboenhancement;
- $morecss .= ' minwidth100';
+ $comboenhancement = ajax_combobox($htmlid, array(), 0, $forcefocus);
+ $out .= $comboenhancement;
+ $morecss .= ' minwidth100';
}
if (empty($option_only)) {
@@ -223,8 +223,8 @@ class FormProjets
$labeltoshow .= ', '.dol_trunc($obj->title, $maxlength);
if ($obj->name)
{
- $labeltoshow .= ' - '.$obj->name;
- if ($obj->name_alias) $labeltoshow .= ' ('.$obj->name_alias.')';
+ $labeltoshow .= ' - '.$obj->name;
+ if ($obj->name_alias) $labeltoshow .= ' ('.$obj->name_alias.')';
}
$disabled = 0;
@@ -287,8 +287,8 @@ class FormProjets
if (empty($option_only)) $out .= '';
if (empty($nooutput))
{
- print $out;
- return '';
+ print $out;
+ return '';
}
else return $out;
} else {
@@ -312,15 +312,15 @@ class FormProjets
* @param int $option_only Return only html options lines without the select tag
* @param string $show_empty Add an empty line ('1' or string to show for empty line)
* @param int $discard_closed Discard closed projects (0=Keep,1=hide completely,2=Disable)
- * @param int $forcefocus Force focus on field (works with javascript only)
- * @param int $disabled Disabled
+ * @param int $forcefocus Force focus on field (works with javascript only)
+ * @param int $disabled Disabled
* @param string $morecss More css added to the select component
* @param string $projectsListId ''=Automatic filter on project allowed. List of id=Filter on project ids.
* @param string $showproject 'all' = Show project info, ''=Hide project info
* @param User $usertofilter User object to use for filtering
- * @return int Nbr of project if OK, <0 if KO
+ * @return int Nbr of tasks if OK, <0 if KO
*/
- public function selectTasks($socid = -1, $selected = '', $htmlname = 'taskid', $maxlength = 24, $option_only = 0, $show_empty = '1', $discard_closed = 0, $forcefocus = 0, $disabled = 0, $morecss = 'maxwidth500', $projectsListId = '', $showproject = 'all', $usertofilter = null)
+ public function selectTasks($socid = -1, $selected = '', $htmlname = 'taskid', $maxlength = 24, $option_only = 0, $show_empty = '1', $discard_closed = 0, $forcefocus = 0, $disabled = 0, $morecss = 'maxwidth500', $projectsListId = '', $showproject = 'all', $usertofilter = null)
{
global $user, $conf, $langs;
@@ -365,9 +365,9 @@ class FormProjets
if (!empty($conf->use_javascript_ajax))
{
include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php';
- $comboenhancement = ajax_combobox($htmlname, '', 0, $forcefocus);
- $out .= $comboenhancement;
- $morecss = 'minwidth200imp maxwidth500';
+ $comboenhancement = ajax_combobox($htmlname, '', 0, $forcefocus);
+ $out .= $comboenhancement;
+ $morecss = 'minwidth200imp maxwidth500';
}
if (empty($option_only)) {
@@ -481,7 +481,7 @@ class FormProjets
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Build a HTML select list of element of same thirdparty to suggest to link them to project
*
@@ -494,7 +494,7 @@ class FormProjets
*/
public function select_element($table_element, $socid = 0, $morecss = '', $limitonstatus = -2, $projectkey = "fk_projet")
{
- // phpcs:enable
+ // phpcs:enable
global $conf, $langs;
if ($table_element == 'projet_task') return ''; // Special cas of element we never link to a project (already always done)
@@ -518,7 +518,7 @@ class FormProjets
break;
case "commande_fourn":
case "commande_fournisseur":
- $sql = "SELECT t.rowid, t.ref, t.ref_supplier";
+ $sql = "SELECT t.rowid, t.ref, t.ref_supplier";
break;
case "facture_rec":
$sql = "SELECT t.rowid, t.titre as ref";
@@ -535,10 +535,10 @@ class FormProjets
break;*/
return '';
case "commande":
- case "contrat":
+ case "contrat":
case "fichinter":
- $sql = "SELECT t.rowid, t.ref";
- break;
+ $sql = "SELECT t.rowid, t.ref";
+ break;
case 'stock_mouvement':
$sql = 'SELECT t.rowid, t.label as ref';
$projectkey = 'fk_origin';
@@ -560,8 +560,8 @@ class FormProjets
$sql .= " WHERE ".$projectkey." is null";
if (!empty($socid) && $linkedtothirdparty)
{
- if (is_numeric($socid)) $sql .= " AND t.fk_soc=".$socid;
- else $sql .= " AND t.fk_soc IN (".$socid.")";
+ if (is_numeric($socid)) $sql .= " AND t.fk_soc=".$socid;
+ else $sql .= " AND t.fk_soc IN (".$socid.")";
}
if (!in_array($table_element, array('expensereport_det', 'stock_mouvement'))) $sql .= ' AND t.entity IN ('.getEntity('project').')';
if ($linkedtothirdparty) $sql .= " AND s.rowid = t.fk_soc";
@@ -640,15 +640,15 @@ class FormProjets
{
$sellist = '';
if ($showempty) {
- // Without  , strange move of screen when switching value
- $sellist .= ' ';
- }
+ // Without  , strange move of screen when switching value
+ $sellist .= ' ';
+ }
if ($showallnone) {
- $sellist .= '-- '.$langs->trans("OnlyOpportunitiesShort").' -- ';
- $sellist .= '-- '.$langs->trans("OpenedOpportunitiesShort").' -- ';
- $sellist .= '-- '.$langs->trans("NotOpenedOpportunitiesShort").' -- ';
- $sellist .= '-- '.$langs->trans("NotAnOpportunityShort").' -- ';
- }
+ $sellist .= '-- '.$langs->trans("OnlyOpportunitiesShort").' -- ';
+ $sellist .= '-- '.$langs->trans("OpenedOpportunitiesShort").' -- ';
+ $sellist .= '-- '.$langs->trans("NotOpenedOpportunitiesShort").' -- ';
+ $sellist .= '-- '.$langs->trans("NotAnOpportunityShort").' -- ';
+ }
while ($i < $num)
{
$obj = $this->db->fetch_object($resql);
diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php
index b688d408284..35e5d00bab8 100644
--- a/htdocs/core/class/html.formticket.class.php
+++ b/htdocs/core/class/html.formticket.class.php
@@ -27,255 +27,254 @@ require_once DOL_DOCUMENT_ROOT."/core/class/html.formmail.class.php";
require_once DOL_DOCUMENT_ROOT."/core/class/html.formprojet.class.php";
if (!class_exists('FormCompany')) {
- include DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
+ include DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
}
/**
* Classe permettant la generation du formulaire d'un nouveau ticket.
*
* @package Ticket
-
* \remarks Utilisation: $formticket = new FormTicket($db)
* \remarks $formticket->proprietes=1 ou chaine ou tableau de valeurs
* \remarks $formticket->show_form() affiche le formulaire
*/
class FormTicket
{
- /**
- * @var DoliDB Database handler.
- */
- public $db;
+ /**
+ * @var DoliDB Database handler.
+ */
+ public $db;
- public $track_id;
+ public $track_id;
- /**
- * @var int ID
- */
- public $fk_user_create;
+ /**
+ * @var int ID
+ */
+ public $fk_user_create;
- public $message;
- public $topic_title;
+ public $message;
+ public $topic_title;
- public $action;
+ public $action;
- public $withtopic;
- public $withemail;
- /**
- *
- * @var int $withsubstit Show substitution array
- */
- public $withsubstit;
+ public $withtopic;
+ public $withemail;
+ /**
+ *
+ * @var int $withsubstit Show substitution array
+ */
+ public $withsubstit;
- public $withfile;
- public $withfilereadonly;
+ public $withfile;
+ public $withfilereadonly;
- public $ispublic; // To show information or not into public form
+ public $ispublic; // To show information or not into public form
- public $withtitletopic;
- public $withcompany; // affiche liste déroulante company
- public $withfromsocid;
- public $withfromcontactid;
- public $withnotifytiersatcreate;
- public $withusercreate; // Show name of creating user in form
- public $withcreatereadonly;
+ public $withtitletopic;
+ public $withcompany; // affiche liste déroulante company
+ public $withfromsocid;
+ public $withfromcontactid;
+ public $withnotifytiersatcreate;
+ public $withusercreate; // Show name of creating user in form
+ public $withcreatereadonly;
- public $withref; // Show ref field
+ public $withref; // Show ref field
- public $withcancel;
+ public $withcancel;
- /**
- *
- * @var array $substit Substitutions
- */
- public $substit = array();
- public $param = array();
+ /**
+ *
+ * @var array $substit Substitutions
+ */
+ public $substit = array();
+ public $param = array();
- /**
+ /**
* @var string Error code (or message)
*/
public $error;
- /**
- * Constructor
- *
- * @param DoliDB $db Database handler
- */
- public function __construct($db)
- {
- $this->db = $db;
+ /**
+ * Constructor
+ *
+ * @param DoliDB $db Database handler
+ */
+ public function __construct($db)
+ {
+ $this->db = $db;
- $this->action = 'add';
+ $this->action = 'add';
- $this->withcompany = 1;
- $this->withfromsocid = 0;
- $this->withfromcontactid = 0;
- //$this->withthreadid=0;
- //$this->withtitletopic='';
- $this->withnotifytiersatcreate = 0;
- $this->withusercreate = 1;
- $this->withcreatereadonly = 1;
- $this->withemail = 0;
- $this->withref = 0;
- $this->withextrafields = 0; // Show extrafields or not
- //$this->withtopicreadonly=0;
- }
+ $this->withcompany = 1;
+ $this->withfromsocid = 0;
+ $this->withfromcontactid = 0;
+ //$this->withthreadid=0;
+ //$this->withtitletopic='';
+ $this->withnotifytiersatcreate = 0;
+ $this->withusercreate = 1;
+ $this->withcreatereadonly = 1;
+ $this->withemail = 0;
+ $this->withref = 0;
+ $this->withextrafields = 0; // Show extrafields or not
+ //$this->withtopicreadonly=0;
+ }
- /**
- * Show the form to input ticket
- *
- * @param int $withdolfichehead With dol_fiche_head
- * @param string $mode Mode ('create' or 'edit')
- * @return void
- */
- public function showForm($withdolfichehead = 0, $mode = 'edit')
- {
- global $conf, $langs, $user, $hookmanager;
+ /**
+ * Show the form to input ticket
+ *
+ * @param int $withdolfichehead With dol_fiche_head
+ * @param string $mode Mode ('create' or 'edit')
+ * @return void
+ */
+ public function showForm($withdolfichehead = 0, $mode = 'edit')
+ {
+ global $conf, $langs, $user, $hookmanager;
- // Load translation files required by the page
- $langs->loadLangs(array('other', 'mails', 'ticket'));
+ // Load translation files required by the page
+ $langs->loadLangs(array('other', 'mails', 'ticket'));
- $form = new Form($this->db);
- $formcompany = new FormCompany($this->db);
- $ticketstatic = new Ticket($this->db);
+ $form = new Form($this->db);
+ $formcompany = new FormCompany($this->db);
+ $ticketstatic = new Ticket($this->db);
- $soc = new Societe($this->db);
- if (!empty($this->withfromsocid) && $this->withfromsocid > 0) {
- $soc->fetch($this->withfromsocid);
- }
+ $soc = new Societe($this->db);
+ if (!empty($this->withfromsocid) && $this->withfromsocid > 0) {
+ $soc->fetch($this->withfromsocid);
+ }
- $ticketstat = new Ticket($this->db);
+ $ticketstat = new Ticket($this->db);
- $extrafields = new ExtraFields($this->db);
- $extrafields->fetch_name_optionals_label($ticketstat->table_element);
+ $extrafields = new ExtraFields($this->db);
+ $extrafields->fetch_name_optionals_label($ticketstat->table_element);
- print "\n\n";
+ print "\n\n";
- if ($withdolfichehead) dol_fiche_head(null, 'card', '', 0, '');
+ if ($withdolfichehead) dol_fiche_head(null, 'card', '', 0, '');
- print '';
- print ' ';
- print ' ';
- foreach ($this->param as $key => $value) {
- print ' ';
- }
- print ' ';
+ print ' ';
+ print ' ';
+ print ' ';
+ foreach ($this->param as $key => $value) {
+ print ' ';
+ }
+ print ' ';
- print '';
+ print '';
- if ($this->withref) {
- // Ref
- $defaultref = $ticketstat->getDefaultRef();
- print ''.$langs->trans("Ref").' ';
- }
+ if ($this->withref) {
+ // Ref
+ $defaultref = $ticketstat->getDefaultRef();
+ print ''.$langs->trans("Ref").' ';
+ }
- // TITLE
- if ($this->withemail) {
- print ''.$langs->trans("Email").' ';
- print ' ';
- print ' ';
- }
+ // TITLE
+ if ($this->withemail) {
+ print ''.$langs->trans("Email").' ';
+ print ' ';
+ print ' ';
+ }
- // Si origin du ticket
- if (isset($this->param['origin']) && $this->param['originid'] > 0) {
- // Parse element/subelement (ex: project_task)
- $element = $subelement = $this->param['origin'];
- if (preg_match('/^([^_]+)_([^_]+)/i', $this->param['origin'], $regs)) {
- $element = $regs[1];
- $subelement = $regs[2];
- }
+ // Si origin du ticket
+ if (isset($this->param['origin']) && $this->param['originid'] > 0) {
+ // Parse element/subelement (ex: project_task)
+ $element = $subelement = $this->param['origin'];
+ if (preg_match('/^([^_]+)_([^_]+)/i', $this->param['origin'], $regs)) {
+ $element = $regs[1];
+ $subelement = $regs[2];
+ }
- dol_include_once('/'.$element.'/class/'.$subelement.'.class.php');
- $classname = ucfirst($subelement);
- $objectsrc = new $classname($this->db);
- $objectsrc->fetch(GETPOST('originid', 'int'));
+ dol_include_once('/'.$element.'/class/'.$subelement.'.class.php');
+ $classname = ucfirst($subelement);
+ $objectsrc = new $classname($this->db);
+ $objectsrc->fetch(GETPOST('originid', 'int'));
- if (empty($objectsrc->lines) && method_exists($objectsrc, 'fetch_lines')) {
- $objectsrc->fetch_lines();
- }
+ if (empty($objectsrc->lines) && method_exists($objectsrc, 'fetch_lines')) {
+ $objectsrc->fetch_lines();
+ }
- $objectsrc->fetch_thirdparty();
- $newclassname = $classname;
- print ''.$langs->trans($newclassname).' '.$objectsrc->getNomUrl(1).' ';
- }
+ $objectsrc->fetch_thirdparty();
+ $newclassname = $classname;
+ print ''.$langs->trans($newclassname).' '.$objectsrc->getNomUrl(1).' ';
+ }
- // Type
- print ''.$langs->trans("TicketTypeRequest").' ';
- $this->selectTypesTickets((GETPOST('type_code', 'alpha') ? GETPOST('type_code', 'alpha') : $this->type_code), 'type_code', '', '2', 0, 0, 0, 'minwidth150');
- print ' ';
+ // Type
+ print ''.$langs->trans("TicketTypeRequest").' ';
+ $this->selectTypesTickets((GETPOST('type_code', 'alpha') ? GETPOST('type_code', 'alpha') : $this->type_code), 'type_code', '', '2', 0, 0, 0, 'minwidth150');
+ print ' ';
- // Severity
- print ''.$langs->trans("TicketSeverity").' ';
- $this->selectSeveritiesTickets((GETPOST('severity_code') ? GETPOST('severity_code') : $this->severity_code), 'severity_code', '', '2');
- print ' ';
+ // Severity
+ print ''.$langs->trans("TicketSeverity").' ';
+ $this->selectSeveritiesTickets((GETPOST('severity_code') ? GETPOST('severity_code') : $this->severity_code), 'severity_code', '', '2');
+ print ' ';
- // Group
- print ''.$langs->trans("TicketGroup").' ';
- $this->selectGroupTickets((GETPOST('category_code') ? GETPOST('category_code') : $this->category_code), 'category_code', '', '2');
- print ' ';
+ // Group
+ print ''.$langs->trans("TicketGroup").' ';
+ $this->selectGroupTickets((GETPOST('category_code') ? GETPOST('category_code') : $this->category_code), 'category_code', '', '2');
+ print ' ';
- // Subject
- if ($this->withtitletopic) {
- print ''.$langs->trans("Subject").' ';
+ // Subject
+ if ($this->withtitletopic) {
+ print ' '.$langs->trans("Subject").' ';
- // Réponse à un ticket : affichage du titre du thread en readonly
- if ($this->withtopicreadonly) {
- print $langs->trans('SubjectAnswerToTicket').' '.$this->topic_title;
- print ' ';
- } else {
- if ($this->withthreadid > 0) {
- $subject = $langs->trans('SubjectAnswerToTicket').' '.$this->withthreadid.' : '.$this->topic_title.'';
- }
- print ' ';
- print '';
- }
- }
+ // Réponse à un ticket : affichage du titre du thread en readonly
+ if ($this->withtopicreadonly) {
+ print $langs->trans('SubjectAnswerToTicket').' '.$this->topic_title;
+ print '';
+ } else {
+ if ($this->withthreadid > 0) {
+ $subject = $langs->trans('SubjectAnswerToTicket').' '.$this->withthreadid.' : '.$this->topic_title.'';
+ }
+ print ' ';
+ print '';
+ }
+ }
- // MESSAGE
- $msg = GETPOSTISSET('message') ? GETPOST('message', 'none') : '';
- print ''.$langs->trans("Message").' ';
+ // MESSAGE
+ $msg = GETPOSTISSET('message') ? GETPOST('message', 'none') : '';
+ print ' '.$langs->trans("Message").' ';
- // If public form, display more information
- $toolbarname = 'dolibarr_notes';
- if ($this->ispublic)
- {
- $toolbarname = 'dolibarr_details';
- print ''.($conf->global->TICKET_PUBLIC_TEXT_HELP_MESSAGE ? $conf->global->TICKET_PUBLIC_TEXT_HELP_MESSAGE : $langs->trans('TicketPublicPleaseBeAccuratelyDescribe')).'
';
- }
- include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
- $uselocalbrowser = true;
- $doleditor = new DolEditor('message', $msg, '100%', 230, $toolbarname, 'In', true, $uselocalbrowser, $conf->global->FCKEDITOR_ENABLE_TICKET, ROWS_8, '90%');
- $doleditor->Create();
- print ' ';
+ // If public form, display more information
+ $toolbarname = 'dolibarr_notes';
+ if ($this->ispublic)
+ {
+ $toolbarname = 'dolibarr_details';
+ print ''.($conf->global->TICKET_PUBLIC_TEXT_HELP_MESSAGE ? $conf->global->TICKET_PUBLIC_TEXT_HELP_MESSAGE : $langs->trans('TicketPublicPleaseBeAccuratelyDescribe')).'
';
+ }
+ include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
+ $uselocalbrowser = true;
+ $doleditor = new DolEditor('message', $msg, '100%', 230, $toolbarname, 'In', true, $uselocalbrowser, $conf->global->FCKEDITOR_ENABLE_TICKET, ROWS_8, '90%');
+ $doleditor->Create();
+ print '';
- // FK_USER_CREATE
- if ($this->withusercreate > 0 && $this->fk_user_create) {
- print ''.$langs->trans("CreatedBy").' ';
- $langs->load("users");
- $fuser = new User($this->db);
+ // FK_USER_CREATE
+ if ($this->withusercreate > 0 && $this->fk_user_create) {
+ print ' '.$langs->trans("CreatedBy").' ';
+ $langs->load("users");
+ $fuser = new User($this->db);
- if ($this->withcreatereadonly) {
- if ($res = $fuser->fetch($this->fk_user_create)) {
- print $fuser->getNomUrl(1);
- }
- }
- print ' ';
- print " \n";
- }
+ if ($this->withcreatereadonly) {
+ if ($res = $fuser->fetch($this->fk_user_create)) {
+ print $fuser->getNomUrl(1);
+ }
+ }
+ print ' ';
+ print "\n";
+ }
- // Customer or supplier
- if ($this->withcompany) {
- // altairis: force company and contact id for external user
- if (empty($user->socid)) {
- // Company
- print ''.$langs->trans("ThirdParty").' ';
- $events = array();
- $events[] = array('method' => 'getContacts', 'url' => dol_buildpath('/core/ajax/contacts.php', 1), 'htmlname' => 'contactid', 'params' => array('add-customer-contact' => 'disabled'));
- print $form->select_company($this->withfromsocid, 'socid', '', 1, 1, '', $events, 0, 'minwidth200');
- print ' ';
- if (!empty($conf->use_javascript_ajax) && !empty($conf->global->COMPANY_USE_SEARCH_TO_SELECT)) {
- $htmlname = 'socid';
- print '';
- }
+ }
- // Contact and type
- print ''.$langs->trans("Contact").' ';
- // If no socid, set to -1 to avoid full contacts list
- $selectedCompany = ($this->withfromsocid > 0) ? $this->withfromsocid : -1;
- $nbofcontacts = $form->select_contacts($selectedCompany, $this->withfromcontactid, 'contactid', 3, '', '', 0, 'minwidth200');
- print ' ';
- $formcompany->selectTypeContact($ticketstatic, '', 'type', 'external', '', 0, 'maginleftonly');
- print ' ';
- } else {
- print ' ';
- print ' ';
- print ' ';
- }
+ // Contact and type
+ print ''.$langs->trans("Contact").' ';
+ // If no socid, set to -1 to avoid full contacts list
+ $selectedCompany = ($this->withfromsocid > 0) ? $this->withfromsocid : -1;
+ $nbofcontacts = $form->select_contacts($selectedCompany, $this->withfromcontactid, 'contactid', 3, '', '', 0, 'minwidth200');
+ print ' ';
+ $formcompany->selectTypeContact($ticketstatic, '', 'type', 'external', '', 0, 'maginleftonly');
+ print ' ';
+ } else {
+ print ' ';
+ print ' ';
+ print ' ';
+ }
- // Notify thirdparty at creation
- if (empty($this->ispublic))
- {
- print ''.$langs->trans("TicketNotifyTiersAtCreation").' ';
- print ' withnotifytiersatcreate ? ' checked="checked"' : '').'>';
- print ' ';
- }
- }
+ // Notify thirdparty at creation
+ if (empty($this->ispublic))
+ {
+ print ''.$langs->trans("TicketNotifyTiersAtCreation").' ';
+ print ' withnotifytiersatcreate ? ' checked="checked"' : '').'>';
+ print ' ';
+ }
+ }
- if (!empty($conf->projet->enabled) && !$this->ispublic)
- {
- $formproject = new FormProjets($this->db);
- print ''.$langs->trans("Project").' ';
- print $formproject->select_projects(-1, GETPOST('projectid', 'int'), 'projectid', 0, 0, 1, 1);
- print ' ';
- }
+ if (!empty($conf->projet->enabled) && !$this->ispublic)
+ {
+ $formproject = new FormProjets($this->db);
+ print ''.$langs->trans("Project").' ';
+ print $formproject->select_projects(-1, GETPOST('projectid', 'int'), 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 0, 0, 'maxwidth500');
+ print ' ';
+ }
- // Attached files
- if (!empty($this->withfile)) {
- // Define list of attached files
- $listofpaths = array();
- $listofnames = array();
- $listofmimes = array();
- if (!empty($_SESSION["listofpaths"])) {
- $listofpaths = explode(';', $_SESSION["listofpaths"]);
- }
+ // Attached files
+ if (!empty($this->withfile)) {
+ // Define list of attached files
+ $listofpaths = array();
+ $listofnames = array();
+ $listofmimes = array();
+ if (!empty($_SESSION["listofpaths"])) {
+ $listofpaths = explode(';', $_SESSION["listofpaths"]);
+ }
- if (!empty($_SESSION["listofnames"])) {
- $listofnames = explode(';', $_SESSION["listofnames"]);
- }
+ if (!empty($_SESSION["listofnames"])) {
+ $listofnames = explode(';', $_SESSION["listofnames"]);
+ }
- if (!empty($_SESSION["listofmimes"])) {
- $listofmimes = explode(';', $_SESSION["listofmimes"]);
- }
+ if (!empty($_SESSION["listofmimes"])) {
+ $listofmimes = explode(';', $_SESSION["listofmimes"]);
+ }
- $out = '';
- $out .= ''.$langs->trans("MailFile").' ';
- $out .= '';
- // TODO Trick to have param removedfile containing nb of image to delete. But this does not works without javascript
- $out .= ' '."\n";
- $out .= ''."\n";
- if (count($listofpaths)) {
- foreach ($listofpaths as $key => $val) {
- $out .= '';
- $out .= img_mime($listofnames[$key]).' '.$listofnames[$key];
- if (!$this->withfilereadonly) {
- $out .= ' ';
- }
- $out .= '
';
- }
- } else {
- $out .= $langs->trans("NoAttachedFiles").' ';
- }
- if ($this->withfile == 2) { // Can add other files
- $out .= ' ';
- $out .= ' ';
- $out .= ' ';
- }
- $out .= " \n";
+ $out = '';
+ $out .= ''.$langs->trans("MailFile").' ';
+ $out .= '';
+ // TODO Trick to have param removedfile containing nb of image to delete. But this does not works without javascript
+ $out .= ' '."\n";
+ $out .= ''."\n";
+ if (count($listofpaths)) {
+ foreach ($listofpaths as $key => $val) {
+ $out .= '';
+ $out .= img_mime($listofnames[$key]).' '.$listofnames[$key];
+ if (!$this->withfilereadonly) {
+ $out .= ' ';
+ }
+ $out .= '
';
+ }
+ } else {
+ $out .= $langs->trans("NoAttachedFiles").' ';
+ }
+ if ($this->withfile == 2) { // Can add other files
+ $out .= ' ';
+ $out .= ' ';
+ $out .= ' ';
+ }
+ $out .= " \n";
- print $out;
- }
+ print $out;
+ }
- // Other attributes
- $parameters = array();
- $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $ticketstat, $this->action); // Note that $action and $object may have been modified by hook
- if (empty($reshook))
- {
- print $ticketstat->showOptionals($extrafields, 'create');
- }
+ // Other attributes
+ $parameters = array();
+ $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $ticketstat, $this->action); // Note that $action and $object may have been modified by hook
+ if (empty($reshook))
+ {
+ print $ticketstat->showOptionals($extrafields, 'create');
+ }
- print '
';
+ print '
';
- if ($withdolfichehead) dol_fiche_end();
+ if ($withdolfichehead) dol_fiche_end();
print '';
- print ' ';
- if ($this->withcancel) {
- print " ";
- print " trans("Cancel")."\">";
- }
+ print ' ';
+ if ($this->withcancel) {
+ print " ";
+ print " trans("Cancel")."\">";
+ }
print '
';
- print " \n";
- print "\n";
- }
-
- /**
- * Return html list of tickets type
- *
- * @param string $selected Id du type pre-selectionne
- * @param string $htmlname Nom de la zone select
- * @param string $filtertype To filter on field type in llx_c_ticket_type (array('code'=>xx,'label'=>zz))
- * @param int $format 0=id+libelle, 1=code+code, 2=code+libelle, 3=id+code
- * @param int $empty 1=peut etre vide, 0 sinon
- * @param int $noadmininfo 0=Add admin info, 1=Disable admin info
- * @param int $maxlength Max length of label
- * @param string $morecss More CSS
- * @return void
- */
- public function selectTypesTickets($selected = '', $htmlname = 'tickettype', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss = '')
- {
- global $langs, $user;
-
- $ticketstat = new Ticket($this->db);
-
- dol_syslog(get_class($this)."::select_types_tickets ".$selected.", ".$htmlname.", ".$filtertype.", ".$format, LOG_DEBUG);
-
- $filterarray = array();
-
- if ($filtertype != '' && $filtertype != '-1') {
- $filterarray = explode(',', $filtertype);
- }
-
- $ticketstat->loadCacheTypesTickets();
-
- print '';
- if ($empty) {
- print ' ';
- }
-
- if (is_array($ticketstat->cache_types_tickets) && count($ticketstat->cache_types_tickets)) {
- foreach ($ticketstat->cache_types_tickets as $id => $arraytypes) {
- // On passe si on a demande de filtrer sur des modes de paiments particuliers
- if (count($filterarray) && !in_array($arraytypes['type'], $filterarray)) {
- continue;
- }
-
- // We discard empty line if showempty is on because an empty line has already been output.
- if ($empty && empty($arraytypes['code'])) {
- continue;
- }
-
- if ($format == 0) {
- print '';
- $value = ' ';
- if ($format == 0) {
- $value = ($maxlength ? dol_trunc($arraytypes['label'], $maxlength) : $arraytypes['label']);
- } elseif ($format == 1) {
- $value = $arraytypes['code'];
- } elseif ($format == 2) {
- $value = ($maxlength ? dol_trunc($arraytypes['label'], $maxlength) : $arraytypes['label']);
- } elseif ($format == 3) {
- $value = $arraytypes['code'];
- }
-
- print $value;
- print ' ';
- }
- }
- print ' ';
- if ($user->admin && !$noadmininfo) {
- print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
- }
-
- print ajax_combobox('select'.$htmlname);
- }
-
- /**
- * Return html list of ticket anaytic codes
- *
- * @param string $selected Id categorie pre-selectionnée
- * @param string $htmlname Nom de la zone select
- * @param string $filtertype To filter on field type in llx_c_ticket_category (array('code'=>xx,'label'=>zz))
- * @param int $format 0=id+libelle, 1=code+code, 2=code+libelle, 3=id+code
- * @param int $empty 1=peut etre vide, 0 sinon
- * @param int $noadmininfo 0=Add admin info, 1=Disable admin info
- * @param int $maxlength Max length of label
- * @param string $morecss More CSS
- * @return void
- */
- public function selectGroupTickets($selected = '', $htmlname = 'ticketcategory', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss = '')
- {
- global $langs, $user;
-
- $ticketstat = new Ticket($this->db);
-
- dol_syslog(get_class($this)."::selectCategoryTickets ".$selected.", ".$htmlname.", ".$filtertype.", ".$format, LOG_DEBUG);
-
- $filterarray = array();
-
- if ($filtertype != '' && $filtertype != '-1') {
- $filterarray = explode(',', $filtertype);
- }
-
- $ticketstat->loadCacheCategoriesTickets();
-
- print '';
- if ($empty) {
- print ' ';
- }
-
- if (is_array($ticketstat->cache_category_tickets) && count($ticketstat->cache_category_tickets)) {
- foreach ($ticketstat->cache_category_tickets as $id => $arraycategories) {
- // On passe si on a demande de filtrer sur des modes de paiments particuliers
- if (count($filterarray) && !in_array($arraycategories['type'], $filterarray)) {
- continue;
- }
-
- // We discard empty line if showempty is on because an empty line has already been output.
- if ($empty && empty($arraycategories['code'])) {
- continue;
- }
-
- if ($format == 0) {
- print '';
-
- if ($format == 0) {
- $value = ($maxlength ? dol_trunc($arraycategories['label'], $maxlength) : $arraycategories['label']);
- }
-
- if ($format == 1) {
- $value = $arraycategories['code'];
- }
-
- if ($format == 2) {
- $value = ($maxlength ? dol_trunc($arraycategories['label'], $maxlength) : $arraycategories['label']);
- }
-
- if ($format == 3) {
- $value = $arraycategories['code'];
- }
-
- print $value ? $value : ' ';
- print ' ';
- }
- }
- print ' ';
- if ($user->admin && !$noadmininfo) {
- print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
- }
-
- print ajax_combobox('select'.$htmlname);
- }
-
- /**
- * Return html list of ticket severitys
- *
- * @param string $selected Id severity pre-selectionnée
- * @param string $htmlname Nom de la zone select
- * @param string $filtertype To filter on field type in llx_c_ticket_severity (array('code'=>xx,'label'=>zz))
- * @param int $format 0=id+libelle, 1=code+code, 2=code+libelle, 3=id+code
- * @param int $empty 1=peut etre vide, 0 sinon
- * @param int $noadmininfo 0=Add admin info, 1=Disable admin info
- * @param int $maxlength Max length of label
- * @param string $morecss More CSS
- * @return void
- */
- public function selectSeveritiesTickets($selected = '', $htmlname = 'ticketseverity', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss = '')
- {
- global $langs, $user;
-
- $ticketstat = new Ticket($this->db);
-
- dol_syslog(get_class($this)."::selectSeveritiesTickets ".$selected.", ".$htmlname.", ".$filtertype.", ".$format, LOG_DEBUG);
-
- $filterarray = array();
-
- if ($filtertype != '' && $filtertype != '-1') {
- $filterarray = explode(',', $filtertype);
- }
-
- $ticketstat->loadCacheSeveritiesTickets();
-
- print '';
- if ($empty) {
- print ' ';
- }
-
- if (is_array($ticketstat->cache_severity_tickets) && count($ticketstat->cache_severity_tickets)) {
- foreach ($ticketstat->cache_severity_tickets as $id => $arrayseverities) {
- // On passe si on a demande de filtrer sur des modes de paiments particuliers
- if (count($filterarray) && !in_array($arrayseverities['type'], $filterarray)) {
- continue;
- }
-
- // We discard empty line if showempty is on because an empty line has already been output.
- if ($empty && empty($arrayseverities['code'])) {
- continue;
- }
-
- if ($format == 0) {
- print '';
- if ($format == 0) {
- $value = ($maxlength ? dol_trunc($arrayseverities['label'], $maxlength) : $arrayseverities['label']);
- }
-
- if ($format == 1) {
- $value = $arrayseverities['code'];
- }
-
- if ($format == 2) {
- $value = ($maxlength ? dol_trunc($arrayseverities['label'], $maxlength) : $arrayseverities['label']);
- }
-
- if ($format == 3) {
- $value = $arrayseverities['code'];
- }
-
- print $value ? $value : ' ';
- print ' ';
- }
- }
- print ' ';
- if ($user->admin && !$noadmininfo) {
- print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
- }
-
- print ajax_combobox('select'.$htmlname);
- }
-
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
- /**
- * Clear list of attached files in send mail form (also stored in session)
- *
- * @return void
- */
- public function clear_attached_files()
- {
- // phpcs:enable
- global $conf, $user;
- require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
-
- // Set tmp user directory
- $vardir = $conf->user->dir_output."/".$user->id;
- $upload_dir = $vardir.'/temp/'; // TODO Add $keytoavoidconflict in upload_dir path
- if (is_dir($upload_dir)) dol_delete_dir_recursive($upload_dir);
-
- $keytoavoidconflict = empty($this->trackid) ? '' : '-'.$this->trackid; // this->trackid must be defined
- unset($_SESSION["listofpaths".$keytoavoidconflict]);
- unset($_SESSION["listofnames".$keytoavoidconflict]);
- unset($_SESSION["listofmimes".$keytoavoidconflict]);
- }
-
- /**
- * Show the form to add message on ticket
- *
- * @param string $width Width of form
- * @return void
- */
- public function showMessageForm($width = '40%')
- {
- global $conf, $langs, $user, $hookmanager, $form, $mysoc;
-
- $formmail = new FormMail($this->db);
- $addfileaction = 'addfile';
-
- if (!is_object($form)) $form = new Form($this->db);
-
- // Load translation files required by the page
- $langs->loadLangs(array('other', 'mails'));
-
- // Clear temp files. Must be done at beginning, before call of triggers
- if (GETPOST('mode', 'alpha') == 'init' || (GETPOST('modelmailselected', 'alpha') && GETPOST('modelmailselected', 'alpha') != '-1'))
- {
- $this->clear_attached_files();
- }
-
- // Define output language
- $outputlangs = $langs;
- $newlang = '';
- if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $this->param['langsmodels'];
- if (!empty($newlang))
- {
- $outputlangs = new Translate("", $conf);
- $outputlangs->setDefaultLang($newlang);
- $outputlangs->load('other');
- }
-
- // Get message template for $this->param["models"] into c_email_templates
- $arraydefaultmessage = -1;
- if ($this->param['models'] != 'none')
- {
- $model_id = 0;
- if (array_key_exists('models_id', $this->param))
- {
- $model_id = $this->param["models_id"];
- }
-
- $arraydefaultmessage = $formmail->getEMailTemplate($this->db, $this->param["models"], $user, $outputlangs, $model_id); // If $model_id is empty, preselect the first one
- }
-
- // Define list of attached files
- $listofpaths = array();
- $listofnames = array();
- $listofmimes = array();
- $keytoavoidconflict = empty($this->trackid) ? '' : '-'.$this->trackid; // this->trackid must be defined
-
- if (GETPOST('mode', 'alpha') == 'init' || (GETPOST('modelmailselected', 'alpha') && GETPOST('modelmailselected', 'alpha') != '-1'))
- {
- if (!empty($arraydefaultmessage->joinfiles) && is_array($this->param['fileinit']))
- {
- foreach ($this->param['fileinit'] as $file)
- {
- $this->add_attached_files($file, basename($file), dol_mimetype($file));
- }
- }
- }
-
- if (!empty($_SESSION["listofpaths".$keytoavoidconflict])) $listofpaths = explode(';', $_SESSION["listofpaths".$keytoavoidconflict]);
- if (!empty($_SESSION["listofnames".$keytoavoidconflict])) $listofnames = explode(';', $_SESSION["listofnames".$keytoavoidconflict]);
- if (!empty($_SESSION["listofmimes".$keytoavoidconflict])) $listofmimes = explode(';', $_SESSION["listofmimes".$keytoavoidconflict]);
-
- // Define output language
- $outputlangs = $langs;
- $newlang = '';
- if ($conf->global->MAIN_MULTILANGS && empty($newlang)) {
- $newlang = $this->param['langsmodels'];
- }
- if (!empty($newlang)) {
- $outputlangs = new Translate("", $conf);
- $outputlangs->setDefaultLang($newlang);
- $outputlangs->load('other');
- }
-
- print "\n\n";
-
- $send_email = GETPOST('send_email', 'int') ? GETPOST('send_email', 'int') : 0;
-
- // Example 1 : Adding jquery code
- print '';
- print '';
- print ' ';
- print ' ';
- print ' ';
- foreach ($this->param as $key => $value) {
- print ' ';
- }
+ print ' ';
+ print ' ';
+ print ' ';
+ print ' ';
+ foreach ($this->param as $key => $value) {
+ print ' ';
+ }
- // Get message template
- $model_id = 0;
- if (array_key_exists('models_id', $this->param)) {
- $model_id = $this->param["models_id"];
- $arraydefaultmessage = $formmail->getEMailTemplate($this->db, $this->param["models"], $user, $outputlangs, $model_id);
- }
+ // Get message template
+ $model_id = 0;
+ if (array_key_exists('models_id', $this->param)) {
+ $model_id = $this->param["models_id"];
+ $arraydefaultmessage = $formmail->getEMailTemplate($this->db, $this->param["models"], $user, $outputlangs, $model_id);
+ }
- $result = $formmail->fetchAllEMailTemplate($this->param["models"], $user, $outputlangs);
- if ($result < 0) {
- setEventMessages($this->error, $this->errors, 'errors');
- }
- $modelmail_array = array();
- foreach ($formmail->lines_model as $line) {
- $modelmail_array[$line->id] = $line->label;
- }
+ $result = $formmail->fetchAllEMailTemplate($this->param["models"], $user, $outputlangs);
+ if ($result < 0) {
+ setEventMessages($this->error, $this->errors, 'errors');
+ }
+ $modelmail_array = array();
+ foreach ($formmail->lines_model as $line) {
+ $modelmail_array[$line->id] = $line->label;
+ }
- print '';
+ print '';
- // External users can't send message email
- if ($user->rights->ticket->write && !$user->socid)
- {
- print '';
- $checkbox_selected = (GETPOST('send_email') == "1" ? ' checked' : '');
- print ' ';
- print ''.$langs->trans('SendMessageByEmail').' ';
- print ' ';
+ // External users can't send message email
+ if ($user->rights->ticket->write && !$user->socid)
+ {
+ print '';
+ $checkbox_selected = (GETPOST('send_email') == "1" ? ' checked' : '');
+ print ' ';
+ print ''.$langs->trans('SendMessageByEmail').' ';
+ print ' ';
- // Zone to select its email template
- if (count($modelmail_array) > 0) {
- print ''."\n";
- print $langs->trans('SelectMailModel').': '.$formmail->selectarray('modelmailselected', $modelmail_array, $this->param['models_id'], 1);
- if ($user->admin) {
- print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
- }
- print ' ';
- print ' ';
- print ' ';
- print '
';
- }
+ // Zone to select its email template
+ if (count($modelmail_array) > 0) {
+ print ''."\n";
+ print $langs->trans('SelectMailModel').': '.$formmail->selectarray('modelmailselected', $modelmail_array, $this->param['models_id'], 1);
+ if ($user->admin) {
+ print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
+ }
+ print ' ';
+ print ' ';
+ print ' ';
+ print '
';
+ }
- // Private message (not visible by customer/external user)
- if (!$user->socid) {
- print '';
- $checkbox_selected = (GETPOST('private_message', 'alpha') == "1" ? ' checked' : '');
- print ' ';
- print ''.$langs->trans('MarkMessageAsPrivate').' ';
- print ' ';
- print $form->textwithpicto('', $langs->trans("TicketMessagePrivateHelp"), 1, 'help');
- print ' ';
- }
+ // Private message (not visible by customer/external user)
+ if (!$user->socid) {
+ print '';
+ $checkbox_selected = (GETPOST('private_message', 'alpha') == "1" ? ' checked' : '');
+ print ' ';
+ print ''.$langs->trans('MarkMessageAsPrivate').' ';
+ print ' ';
+ print $form->textwithpicto('', $langs->trans("TicketMessagePrivateHelp"), 1, 'help');
+ print ' ';
+ }
- print ''.$langs->trans('Subject').' ';
- $label_title = empty($conf->global->MAIN_APPLICATION_TITLE) ? $mysoc->name : $conf->global->MAIN_APPLICATION_TITLE;
- print ' ref.'] '.$langs->trans('TicketNewMessage').'" />';
- print ' ';
+ print ''.$langs->trans('Subject').' ';
+ $label_title = empty($conf->global->MAIN_APPLICATION_TITLE) ? $mysoc->name : $conf->global->MAIN_APPLICATION_TITLE;
+ print ' ref.'] '.$langs->trans('TicketNewMessage').'" />';
+ print ' ';
- // Destinataires
- print ''.$langs->trans('MailRecipients').' ';
- $ticketstat = new Ticket($this->db);
- $res = $ticketstat->fetch('', '', $this->track_id);
- if ($res) {
- // Retrieve email of all contacts (internal and external)
- $contacts = $ticketstat->getInfosTicketInternalContact();
- $contacts = array_merge($contacts, $ticketstat->getInfosTicketExternalContact());
+ // Destinataires
+ print ' '.$langs->trans('MailRecipients').' ';
+ $ticketstat = new Ticket($this->db);
+ $res = $ticketstat->fetch('', '', $this->track_id);
+ if ($res) {
+ // Retrieve email of all contacts (internal and external)
+ $contacts = $ticketstat->getInfosTicketInternalContact();
+ $contacts = array_merge($contacts, $ticketstat->getInfosTicketExternalContact());
- // Build array to display recipient list
- if (is_array($contacts) && count($contacts) > 0) {
- foreach ($contacts as $key => $info_sendto) {
- if ($info_sendto['email'] != '') {
- $sendto[] = dol_escape_htmltag(trim($info_sendto['firstname']." ".$info_sendto['lastname'])." <".$info_sendto['email'].">").' ('.dol_escape_htmltag($info_sendto['libelle']).") ";
- }
- }
- }
+ // Build array to display recipient list
+ if (is_array($contacts) && count($contacts) > 0) {
+ foreach ($contacts as $key => $info_sendto) {
+ if ($info_sendto['email'] != '') {
+ $sendto[] = dol_escape_htmltag(trim($info_sendto['firstname']." ".$info_sendto['lastname'])." <".$info_sendto['email'].">").' ('.dol_escape_htmltag($info_sendto['libelle']).") ";
+ }
+ }
+ }
- if ($ticketstat->origin_email && !in_array($this->dao->origin_email, $sendto)) {
- $sendto[] = dol_escape_htmltag($ticketstat->origin_email).' ('.$langs->trans("TicketEmailOriginIssuer").") ";
- }
+ if ($ticketstat->origin_email && !in_array($this->dao->origin_email, $sendto)) {
+ $sendto[] = dol_escape_htmltag($ticketstat->origin_email).' ('.$langs->trans("TicketEmailOriginIssuer").") ";
+ }
- if ($ticketstat->fk_soc > 0) {
- $ticketstat->socid = $ticketstat->fk_soc;
- $ticketstat->fetch_thirdparty();
+ if ($ticketstat->fk_soc > 0) {
+ $ticketstat->socid = $ticketstat->fk_soc;
+ $ticketstat->fetch_thirdparty();
- if (is_array($ticketstat->thirdparty->email) && !in_array($ticketstat->thirdparty->email, $sendto)) {
- $sendto[] = $ticketstat->thirdparty->email.' ('.$langs->trans('Customer').') ';
- }
- }
+ if (is_array($ticketstat->thirdparty->email) && !in_array($ticketstat->thirdparty->email, $sendto)) {
+ $sendto[] = $ticketstat->thirdparty->email.' ('.$langs->trans('Customer').') ';
+ }
+ }
- if ($conf->global->TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS) {
- $sendto[] = $conf->global->TICKET_NOTIFICATION_EMAIL_TO.' (generic email) ';
- }
+ if ($conf->global->TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS) {
+ $sendto[] = $conf->global->TICKET_NOTIFICATION_EMAIL_TO.' (generic email) ';
+ }
- // Print recipient list
- if (is_array($sendto) && count($sendto) > 0) {
- print implode(', ', $sendto);
- } else {
- print ''.$langs->trans('WarningNoEMailsAdded').' '.$langs->trans('TicketGoIntoContactTab').'
';
- }
- }
- print ' ';
- }
+ // Print recipient list
+ if (is_array($sendto) && count($sendto) > 0) {
+ print implode(', ', $sendto);
+ } else {
+ print ''.$langs->trans('WarningNoEMailsAdded').' '.$langs->trans('TicketGoIntoContactTab').'
';
+ }
+ }
+ print '';
+ }
- // Intro
- // External users can't send message email
- if ($user->rights->ticket->write && !$user->socid) {
- $mail_intro = GETPOST('mail_intro') ? GETPOST('mail_intro') : $conf->global->TICKET_MESSAGE_MAIL_INTRO;
- print ''.$langs->trans("TicketMessageMailIntro").' ';
+ // Intro
+ // External users can't send message email
+ if ($user->rights->ticket->write && !$user->socid) {
+ $mail_intro = GETPOST('mail_intro') ? GETPOST('mail_intro') : $conf->global->TICKET_MESSAGE_MAIL_INTRO;
+ print ''.$langs->trans("TicketMessageMailIntro").' ';
- print '';
- include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
- $uselocalbrowser = true;
+ print ' ';
+ include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
+ $uselocalbrowser = true;
- $doleditor = new DolEditor('mail_intro', $mail_intro, '100%', 90, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_2, 70);
+ $doleditor = new DolEditor('mail_intro', $mail_intro, '100%', 90, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_2, 70);
- $doleditor->Create();
- print ' ';
- print $form->textwithpicto('', $langs->trans("TicketMessageMailIntroHelp"), 1, 'help');
- print ' ';
- }
+ $doleditor->Create();
+ print '';
+ print $form->textwithpicto('', $langs->trans("TicketMessageMailIntroHelp"), 1, 'help');
+ print ' ';
+ }
- // MESSAGE
- $defaultmessage = "";
- if (is_array($arraydefaultmessage) && count($arraydefaultmessage) > 0 && $arraydefaultmessage->content) {
- $defaultmessage = $arraydefaultmessage->content;
- }
- $defaultmessage = str_replace('\n', "\n", $defaultmessage);
+ // MESSAGE
+ $defaultmessage = "";
+ if (is_array($arraydefaultmessage) && count($arraydefaultmessage) > 0 && $arraydefaultmessage->content) {
+ $defaultmessage = $arraydefaultmessage->content;
+ }
+ $defaultmessage = str_replace('\n', "\n", $defaultmessage);
- // Deal with format differences between message and signature (text / HTML)
- if (dol_textishtml($defaultmessage) && !dol_textishtml($this->substit['__SIGNATURE__'])) {
- $this->substit['__SIGNATURE__'] = dol_nl2br($this->substit['__SIGNATURE__']);
- } elseif (!dol_textishtml($defaultmessage) && dol_textishtml($this->substit['__SIGNATURE__'])) {
- $defaultmessage = dol_nl2br($defaultmessage);
- }
- if (isset($_POST["message"]) && !$_POST['modelselected']) {
- $defaultmessage = GETPOST('message');
- } else {
- $defaultmessage = make_substitutions($defaultmessage, $this->substit);
- // Clean first \n and br (to avoid empty line when CONTACTCIVNAME is empty)
- $defaultmessage = preg_replace("/^( )+/", "", $defaultmessage);
- $defaultmessage = preg_replace("/^\n+/", "", $defaultmessage);
- }
+ // Deal with format differences between message and signature (text / HTML)
+ if (dol_textishtml($defaultmessage) && !dol_textishtml($this->substit['__SIGNATURE__'])) {
+ $this->substit['__SIGNATURE__'] = dol_nl2br($this->substit['__SIGNATURE__']);
+ } elseif (!dol_textishtml($defaultmessage) && dol_textishtml($this->substit['__SIGNATURE__'])) {
+ $defaultmessage = dol_nl2br($defaultmessage);
+ }
+ if (isset($_POST["message"]) && !$_POST['modelselected']) {
+ $defaultmessage = GETPOST('message');
+ } else {
+ $defaultmessage = make_substitutions($defaultmessage, $this->substit);
+ // Clean first \n and br (to avoid empty line when CONTACTCIVNAME is empty)
+ $defaultmessage = preg_replace("/^( )+/", "", $defaultmessage);
+ $defaultmessage = preg_replace("/^\n+/", "", $defaultmessage);
+ }
- print ''.$langs->trans("Message").' ';
- //$toolbarname = 'dolibarr_details';
- $toolbarname = 'dolibarr_notes';
- include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
- $doleditor = new DolEditor('message', $defaultmessage, '100%', 200, $toolbarname, '', false, true, $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_5, 70);
- $doleditor->Create();
- print ' ';
- if ($user->rights->ticket->write && !$user->socid) {
- print $form->textwithpicto('', $langs->trans("TicketMessageHelp"), 1, 'help');
- }
+ print ' '.$langs->trans("Message").' ';
+ //$toolbarname = 'dolibarr_details';
+ $toolbarname = 'dolibarr_notes';
+ include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
+ $doleditor = new DolEditor('message', $defaultmessage, '100%', 200, $toolbarname, '', false, true, $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_5, 70);
+ $doleditor->Create();
+ print ' ';
+ if ($user->rights->ticket->write && !$user->socid) {
+ print $form->textwithpicto('', $langs->trans("TicketMessageHelp"), 1, 'help');
+ }
- print ' ';
+ print '';
- // Signature
- // External users can't send message email
- if ($user->rights->ticket->write && !$user->socid) {
- $mail_signature = GETPOST('mail_signature') ? GETPOST('mail_signature') : $conf->global->TICKET_MESSAGE_MAIL_SIGNATURE;
- print ''.$langs->trans("TicketMessageMailSignature").' ';
+ // Signature
+ // External users can't send message email
+ if ($user->rights->ticket->write && !$user->socid) {
+ $mail_signature = GETPOST('mail_signature') ? GETPOST('mail_signature') : $conf->global->TICKET_MESSAGE_MAIL_SIGNATURE;
+ print ''.$langs->trans("TicketMessageMailSignature").' ';
- print '';
- include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
- $doleditor = new DolEditor('mail_signature', $mail_signature, '100%', 150, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_2, 70);
- $doleditor->Create();
- print ' ';
- print $form->textwithpicto('', $langs->trans("TicketMessageMailSignatureHelp"), 1, 'help');
- print ' ';
- }
+ print '';
+ include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
+ $doleditor = new DolEditor('mail_signature', $mail_signature, '100%', 150, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_2, 70);
+ $doleditor->Create();
+ print ' ';
+ print $form->textwithpicto('', $langs->trans("TicketMessageMailSignatureHelp"), 1, 'help');
+ print ' ';
+ }
- // Attached files
- if (!empty($this->withfile)) {
- $out = '';
- $out .= ''.$langs->trans("MailFile").' ';
- $out .= '';
- // TODO Trick to have param removedfile containing nb of image to delete. But this does not works without javascript
- $out .= ' '."\n";
- $out .= ''."\n";
- if (count($listofpaths)) {
- foreach ($listofpaths as $key => $val) {
- $out .= '';
- $out .= img_mime($listofnames[$key]).' '.$listofnames[$key];
- if (!$this->withfilereadonly) {
- $out .= ' ';
- }
- $out .= '
';
- }
- } else {
- $out .= $langs->trans("NoAttachedFiles").' ';
- }
- if ($this->withfile == 2) { // Can add other files
- $out .= ' ';
- $out .= ' ';
- $out .= ' ';
- }
- $out .= " \n";
+ // Attached files
+ if (!empty($this->withfile)) {
+ $out = '';
+ $out .= ''.$langs->trans("MailFile").' ';
+ $out .= '';
+ // TODO Trick to have param removedfile containing nb of image to delete. But this does not works without javascript
+ $out .= ' '."\n";
+ $out .= ''."\n";
+ if (count($listofpaths)) {
+ foreach ($listofpaths as $key => $val) {
+ $out .= '';
+ $out .= img_mime($listofnames[$key]).' '.$listofnames[$key];
+ if (!$this->withfilereadonly) {
+ $out .= ' ';
+ }
+ $out .= '
';
+ }
+ } else {
+ $out .= $langs->trans("NoAttachedFiles").' ';
+ }
+ if ($this->withfile == 2) { // Can add other files
+ $out .= ' ';
+ $out .= ' ';
+ $out .= ' ';
+ }
+ $out .= " \n";
- print $out;
- }
+ print $out;
+ }
- print '
';
+ print '
';
- print ' ';
- print ' ';
- if ($this->withcancel) {
- print " ";
- print " trans("Cancel")."\">";
- }
- print " \n";
+ print ' ';
+ print ' ';
+ if ($this->withcancel) {
+ print " ";
+ print " trans("Cancel")."\">";
+ }
+ print " \n";
- print " \n";
- print "\n";
- }
+ print " \n";
+ print "\n";
+ }
}
diff --git a/htdocs/core/class/rssparser.class.php b/htdocs/core/class/rssparser.class.php
index c492eff97e8..dd02bf365c1 100644
--- a/htdocs/core/class/rssparser.class.php
+++ b/htdocs/core/class/rssparser.class.php
@@ -26,714 +26,792 @@
*/
class RssParser
{
- /**
- * @var DoliDB Database handler.
- */
- public $db;
+ /**
+ * @var DoliDB Database handler.
+ */
+ public $db;
- /**
- * @var string Error code (or message)
- */
- public $error = '';
+ /**
+ * @var string Error code (or message)
+ */
+ public $error = '';
- private $_format = '';
- private $_urlRSS;
- private $_language;
- private $_generator;
- private $_copyright;
- private $_lastbuilddate;
- private $_imageurl;
- private $_link;
- private $_title;
- private $_description;
- private $_lastfetchdate; // Last successful fetch
- private $_rssarray = array();
+ private $_format = '';
+ private $_urlRSS;
+ private $_language;
+ private $_generator;
+ private $_copyright;
+ private $_lastbuilddate;
+ private $_imageurl;
+ private $_link;
+ private $_title;
+ private $_description;
+ private $_lastfetchdate; // Last successful fetch
+ private $_rssarray = array();
- // For parsing with xmlparser
- public $stack = array(); // parser stack
- private $_CONTENT_CONSTRUCTS = array('content', 'summary', 'info', 'title', 'tagline', 'copyright');
+ // For parsing with xmlparser
+ public $stack = array(); // parser stack
+ private $_CONTENT_CONSTRUCTS = array('content', 'summary', 'info', 'title', 'tagline', 'copyright');
- /**
- * Constructor
- *
- * @param DoliDB $db Database handler
- */
- public function __construct($db)
- {
- $this->db = $db;
- }
+ /**
+ * Constructor
+ *
+ * @param DoliDB $db Database handler
+ */
+ public function __construct($db)
+ {
+ $this->db = $db;
+ }
- /**
- * getFormat
- *
- * @return string
- */
- public function getFormat()
- {
- return $this->_format;
- }
+ /**
+ * getFormat
+ *
+ * @return string
+ */
+ public function getFormat()
+ {
+ return $this->_format;
+ }
- /**
- * getUrlRss
- *
- * @return string
- */
- public function getUrlRss()
- {
- return $this->_urlRSS;
- }
- /**
- * getLanguage
- *
- * @return string
- */
- public function getLanguage()
- {
- return $this->_language;
- }
- /**
- * getGenerator
- *
- * @return string
- */
- public function getGenerator()
- {
- return $this->_generator;
- }
- /**
- * getCopyright
- *
- * @return string
- */
- public function getCopyright()
- {
- return $this->_copyright;
- }
- /**
- * getLastBuildDate
- *
- * @return string
- */
- public function getLastBuildDate()
- {
- return $this->_lastbuilddate;
- }
- /**
- * getImageUrl
- *
- * @return string
- */
- public function getImageUrl()
- {
- return $this->_imageurl;
- }
- /**
- * getLink
- *
- * @return string
- */
- public function getLink()
- {
- return $this->_link;
- }
- /**
- * getTitle
- *
- * @return string
- */
- public function getTitle()
- {
- return $this->_title;
- }
- /**
- * getDescription
- *
- * @return string
- */
- public function getDescription()
- {
- return $this->_description;
- }
- /**
- * getLastFetchDate
- *
- * @return string
- */
- public function getLastFetchDate()
- {
- return $this->_lastfetchdate;
- }
- /**
- * getItems
- *
- * @return string
- */
- public function getItems()
- {
- return $this->_rssarray;
- }
+ /**
+ * getUrlRss
+ *
+ * @return string
+ */
+ public function getUrlRss()
+ {
+ return $this->_urlRSS;
+ }
+ /**
+ * getLanguage
+ *
+ * @return string
+ */
+ public function getLanguage()
+ {
+ return $this->_language;
+ }
+ /**
+ * getGenerator
+ *
+ * @return string
+ */
+ public function getGenerator()
+ {
+ return $this->_generator;
+ }
+ /**
+ * getCopyright
+ *
+ * @return string
+ */
+ public function getCopyright()
+ {
+ return $this->_copyright;
+ }
+ /**
+ * getLastBuildDate
+ *
+ * @return string
+ */
+ public function getLastBuildDate()
+ {
+ return $this->_lastbuilddate;
+ }
+ /**
+ * getImageUrl
+ *
+ * @return string
+ */
+ public function getImageUrl()
+ {
+ return $this->_imageurl;
+ }
+ /**
+ * getLink
+ *
+ * @return string
+ */
+ public function getLink()
+ {
+ return $this->_link;
+ }
+ /**
+ * getTitle
+ *
+ * @return string
+ */
+ public function getTitle()
+ {
+ return $this->_title;
+ }
+ /**
+ * getDescription
+ *
+ * @return string
+ */
+ public function getDescription()
+ {
+ return $this->_description;
+ }
+ /**
+ * getLastFetchDate
+ *
+ * @return string
+ */
+ public function getLastFetchDate()
+ {
+ return $this->_lastfetchdate;
+ }
+ /**
+ * getItems
+ *
+ * @return string
+ */
+ public function getItems()
+ {
+ return $this->_rssarray;
+ }
- /**
- * Parse rss URL
- *
- * @param string $urlRSS Url to parse
- * @param int $maxNb Max nb of records to get (0 for no limit)
- * @param int $cachedelay 0=No cache, nb of seconds we accept cache files (cachedir must also be defined)
- * @param string $cachedir Directory where to save cache file
- * @return int <0 if KO, >0 if OK
- */
- public function parser($urlRSS, $maxNb = 0, $cachedelay = 60, $cachedir = '')
- {
- global $conf;
+ /**
+ * Parse rss URL
+ *
+ * @param string $urlRSS Url to parse
+ * @param int $maxNb Max nb of records to get (0 for no limit)
+ * @param int $cachedelay 0=No cache, nb of seconds we accept cache files (cachedir must also be defined)
+ * @param string $cachedir Directory where to save cache file
+ * @return int <0 if KO, >0 if OK
+ */
+ public function parser($urlRSS, $maxNb = 0, $cachedelay = 60, $cachedir = '')
+ {
+ global $conf;
- include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
+ include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
- $rss = '';
- $str = ''; // This will contain content of feed
+ $rss = '';
+ $str = ''; // This will contain content of feed
- // Check parameters
- if (!dol_is_url($urlRSS))
- {
- $this->error = "ErrorBadUrl";
- return -1;
- }
+ // Check parameters
+ if (!dol_is_url($urlRSS))
+ {
+ $this->error = "ErrorBadUrl";
+ return -1;
+ }
- $this->_urlRSS = $urlRSS;
- $newpathofdestfile = $cachedir.'/'.dol_hash($this->_urlRSS, 3); // Force md5 hash (does not contains special chars)
- $newmask = '0644';
+ $this->_urlRSS = $urlRSS;
+ $newpathofdestfile = $cachedir.'/'.dol_hash($this->_urlRSS, 3); // Force md5 hash (does not contains special chars)
+ $newmask = '0644';
- //dol_syslog("RssPArser::parser parse url=".$urlRSS." => cache file=".$newpathofdestfile);
- $nowgmt = dol_now();
+ //dol_syslog("RssPArser::parser parse url=".$urlRSS." => cache file=".$newpathofdestfile);
+ $nowgmt = dol_now();
- // Search into cache
- $foundintocache = 0;
- if ($cachedelay > 0 && $cachedir)
- {
- $filedate = dol_filemtime($newpathofdestfile);
- if ($filedate >= ($nowgmt - $cachedelay))
- {
- //dol_syslog("RssParser::parser cache file ".$newpathofdestfile." is not older than now - cachedelay (".$nowgmt." - ".$cachedelay.") so we use it.");
- $foundintocache = 1;
+ // Search into cache
+ $foundintocache = 0;
+ if ($cachedelay > 0 && $cachedir)
+ {
+ $filedate = dol_filemtime($newpathofdestfile);
+ if ($filedate >= ($nowgmt - $cachedelay))
+ {
+ //dol_syslog("RssParser::parser cache file ".$newpathofdestfile." is not older than now - cachedelay (".$nowgmt." - ".$cachedelay.") so we use it.");
+ $foundintocache = 1;
- $this->_lastfetchdate = $filedate;
- }
- else
- {
- dol_syslog(get_class($this)."::parser cache file ".$newpathofdestfile." is not found or older than now - cachedelay (".$nowgmt." - ".$cachedelay.") so we can't use it.");
- }
- }
+ $this->_lastfetchdate = $filedate;
+ }
+ else
+ {
+ dol_syslog(get_class($this)."::parser cache file ".$newpathofdestfile." is not found or older than now - cachedelay (".$nowgmt." - ".$cachedelay.") so we can't use it.");
+ }
+ }
- // Load file into $str
- if ($foundintocache) // Cache file found and is not too old
- {
- $str = file_get_contents($newpathofdestfile);
- }
- else
- {
- try {
- ini_set("user_agent", "Dolibarr ERP-CRM RSS reader");
- ini_set("max_execution_time", $conf->global->MAIN_USE_RESPONSE_TIMEOUT);
- ini_set("default_socket_timeout", $conf->global->MAIN_USE_RESPONSE_TIMEOUT);
+ // Load file into $str
+ if ($foundintocache) // Cache file found and is not too old
+ {
+ $str = file_get_contents($newpathofdestfile);
+ }
+ else
+ {
+ try {
+ ini_set("user_agent", "Dolibarr ERP-CRM RSS reader");
+ ini_set("max_execution_time", $conf->global->MAIN_USE_RESPONSE_TIMEOUT);
+ ini_set("default_socket_timeout", $conf->global->MAIN_USE_RESPONSE_TIMEOUT);
- $opts = array('http'=>array('method'=>"GET"));
- if (!empty($conf->global->MAIN_USE_CONNECT_TIMEOUT)) $opts['http']['timeout'] = $conf->global->MAIN_USE_CONNECT_TIMEOUT;
- if (!empty($conf->global->MAIN_PROXY_USE)) $opts['http']['proxy'] = 'tcp://'.$conf->global->MAIN_PROXY_HOST.':'.$conf->global->MAIN_PROXY_PORT;
- //var_dump($opts);exit;
- $context = stream_context_create($opts);
+ $opts = array('http'=>array('method'=>"GET"));
+ if (!empty($conf->global->MAIN_USE_CONNECT_TIMEOUT)) $opts['http']['timeout'] = $conf->global->MAIN_USE_CONNECT_TIMEOUT;
+ if (!empty($conf->global->MAIN_PROXY_USE)) $opts['http']['proxy'] = 'tcp://'.$conf->global->MAIN_PROXY_HOST.':'.$conf->global->MAIN_PROXY_PORT;
+ //var_dump($opts);exit;
+ $context = stream_context_create($opts);
- $str = file_get_contents($this->_urlRSS, false, $context);
- }
- catch (Exception $e) {
- print 'Error retrieving URL '.$this->_urlRSS.' - '.$e->getMessage();
- }
- }
+ $str = file_get_contents($this->_urlRSS, false, $context);
+ }
+ catch (Exception $e) {
+ print 'Error retrieving URL '.$this->_urlRSS.' - '.$e->getMessage();
+ }
+ }
- if ($str !== false)
- {
- // Convert $str into xml
- if (!empty($conf->global->EXTERNALRSS_USE_SIMPLEXML))
- {
- //print 'xx'.LIBXML_NOCDATA;
- libxml_use_internal_errors(false);
- $rss = simplexml_load_string($str, "SimpleXMLElement", LIBXML_NOCDATA);
- }
- else
- {
- $xmlparser = xml_parser_create('');
- if (!is_resource($xmlparser)) {
- $this->error = "ErrorFailedToCreateParser"; return -1;
- }
+ if ($str !== false)
+ {
+ // Convert $str into xml
+ if (!empty($conf->global->EXTERNALRSS_USE_SIMPLEXML))
+ {
+ //print 'xx'.LIBXML_NOCDATA;
+ libxml_use_internal_errors(false);
+ $rss = simplexml_load_string($str, "SimpleXMLElement", LIBXML_NOCDATA);
+ }
+ else
+ {
+ $xmlparser = xml_parser_create('');
+ if (!is_resource($xmlparser)) {
+ $this->error = "ErrorFailedToCreateParser"; return -1;
+ }
- xml_set_object($xmlparser, $this);
- xml_set_element_handler($xmlparser, 'feed_start_element', 'feed_end_element');
- xml_set_character_data_handler($xmlparser, 'feed_cdata');
- $status = xml_parse($xmlparser, $str);
- xml_parser_free($xmlparser);
- $rss = $this;
- //var_dump($rss->_format);exit;
- }
- }
+ xml_set_object($xmlparser, $this);
+ xml_set_element_handler($xmlparser, 'feed_start_element', 'feed_end_element');
+ xml_set_character_data_handler($xmlparser, 'feed_cdata');
+ $status = xml_parse($xmlparser, $str);
+ xml_parser_free($xmlparser);
+ $rss = $this;
+ //var_dump($rss->_format);exit;
+ }
+ }
- // If $rss loaded
- if ($rss)
- {
- // Save file into cache
- if (empty($foundintocache) && $cachedir)
- {
- dol_syslog(get_class($this)."::parser cache file ".$newpathofdestfile." is saved onto disk.");
- if (!dol_is_dir($cachedir)) dol_mkdir($cachedir);
- $fp = fopen($newpathofdestfile, 'w');
- if ($fp)
- {
- fwrite($fp, $str);
- fclose($fp);
- if (!empty($conf->global->MAIN_UMASK)) $newmask = $conf->global->MAIN_UMASK;
- @chmod($newpathofdestfile, octdec($newmask));
+ // If $rss loaded
+ if ($rss)
+ {
+ // Save file into cache
+ if (empty($foundintocache) && $cachedir)
+ {
+ dol_syslog(get_class($this)."::parser cache file ".$newpathofdestfile." is saved onto disk.");
+ if (!dol_is_dir($cachedir)) dol_mkdir($cachedir);
+ $fp = fopen($newpathofdestfile, 'w');
+ if ($fp)
+ {
+ fwrite($fp, $str);
+ fclose($fp);
+ if (!empty($conf->global->MAIN_UMASK)) $newmask = $conf->global->MAIN_UMASK;
+ @chmod($newpathofdestfile, octdec($newmask));
- $this->_lastfetchdate = $nowgmt;
- }
- else
- {
- print 'Error, failed to open file '.$newpathofdestfile.' for write';
- }
- }
+ $this->_lastfetchdate = $nowgmt;
+ }
+ else
+ {
+ print 'Error, failed to open file '.$newpathofdestfile.' for write';
+ }
+ }
- unset($str); // Free memory
+ unset($str); // Free memory
- if (empty($rss->_format)) // If format not detected automatically
- {
- $rss->_format = 'rss';
- if (empty($rss->channel)) $rss->_format = 'atom';
- }
+ if (empty($rss->_format)) // If format not detected automatically
+ {
+ $rss->_format = 'rss';
+ if (empty($rss->channel)) $rss->_format = 'atom';
+ }
- $items = array();
+ $items = array();
- // Save description entries
- if ($rss->_format == 'rss')
- {
- //var_dump($rss);
- if (!empty($conf->global->EXTERNALRSS_USE_SIMPLEXML))
- {
- if (!empty($rss->channel->language)) $this->_language = (string) $rss->channel->language;
- if (!empty($rss->channel->generator)) $this->_generator = (string) $rss->channel->generator;
- if (!empty($rss->channel->copyright)) $this->_copyright = (string) $rss->channel->copyright;
- if (!empty($rss->channel->lastbuilddate)) $this->_lastbuilddate = (string) $rss->channel->lastbuilddate;
- if (!empty($rss->channel->image->url[0])) $this->_imageurl = (string) $rss->channel->image->url[0];
- if (!empty($rss->channel->link)) $this->_link = (string) $rss->channel->link;
- if (!empty($rss->channel->title)) $this->_title = (string) $rss->channel->title;
- if (!empty($rss->channel->description)) $this->_description = (string) $rss->channel->description;
- }
- else
- {
- //var_dump($rss->channel);
- if (!empty($rss->channel['language'])) $this->_language = (string) $rss->channel['language'];
- if (!empty($rss->channel['generator'])) $this->_generator = (string) $rss->channel['generator'];
- if (!empty($rss->channel['copyright'])) $this->_copyright = (string) $rss->channel['copyright'];
- if (!empty($rss->channel['lastbuilddate'])) $this->_lastbuilddate = (string) $rss->channel['lastbuilddate'];
- if (!empty($rss->image['url'])) $this->_imageurl = (string) $rss->image['url'];
- if (!empty($rss->channel['link'])) $this->_link = (string) $rss->channel['link'];
- if (!empty($rss->channel['title'])) $this->_title = (string) $rss->channel['title'];
- if (!empty($rss->channel['description'])) $this->_description = (string) $rss->channel['description'];
- }
+ // Save description entries
+ if ($rss->_format == 'rss')
+ {
+ //var_dump($rss);
+ if (!empty($conf->global->EXTERNALRSS_USE_SIMPLEXML))
+ {
+ if (!empty($rss->channel->language)) $this->_language = (string) $rss->channel->language;
+ if (!empty($rss->channel->generator)) $this->_generator = (string) $rss->channel->generator;
+ if (!empty($rss->channel->copyright)) $this->_copyright = (string) $rss->channel->copyright;
+ if (!empty($rss->channel->lastbuilddate)) $this->_lastbuilddate = (string) $rss->channel->lastbuilddate;
+ if (!empty($rss->channel->image->url[0])) $this->_imageurl = (string) $rss->channel->image->url[0];
+ if (!empty($rss->channel->link)) $this->_link = (string) $rss->channel->link;
+ if (!empty($rss->channel->title)) $this->_title = (string) $rss->channel->title;
+ if (!empty($rss->channel->description)) $this->_description = (string) $rss->channel->description;
+ }
+ else
+ {
+ //var_dump($rss->channel);
+ if (!empty($rss->channel['language'])) $this->_language = (string) $rss->channel['language'];
+ if (!empty($rss->channel['generator'])) $this->_generator = (string) $rss->channel['generator'];
+ if (!empty($rss->channel['copyright'])) $this->_copyright = (string) $rss->channel['copyright'];
+ if (!empty($rss->channel['lastbuilddate'])) $this->_lastbuilddate = (string) $rss->channel['lastbuilddate'];
+ if (!empty($rss->image['url'])) $this->_imageurl = (string) $rss->image['url'];
+ if (!empty($rss->channel['link'])) $this->_link = (string) $rss->channel['link'];
+ if (!empty($rss->channel['title'])) $this->_title = (string) $rss->channel['title'];
+ if (!empty($rss->channel['description'])) $this->_description = (string) $rss->channel['description'];
+ }
- if (!empty($conf->global->EXTERNALRSS_USE_SIMPLEXML)) $items = $rss->channel->item; // With simplexml
- else $items = $rss->items; // With xmlparse
- //var_dump($items);exit;
- }
- elseif ($rss->_format == 'atom')
- {
- //var_dump($rss);
- if (!empty($conf->global->EXTERNALRSS_USE_SIMPLEXML))
- {
- if (!empty($rss->generator)) $this->_generator = (string) $rss->generator;
- if (!empty($rss->lastbuilddate)) $this->_lastbuilddate = (string) $rss->modified;
- if (!empty($rss->link->href)) $this->_link = (string) $rss->link->href;
- if (!empty($rss->title)) $this->_title = (string) $rss->title;
- if (!empty($rss->description)) $this->_description = (string) $rss->description;
- }
- else
- {
- //if (!empty($rss->channel['rss_language'])) $this->_language = (string) $rss->channel['rss_language'];
- if (!empty($rss->channel['generator'])) $this->_generator = (string) $rss->channel['generator'];
- //if (!empty($rss->channel['rss_copyright'])) $this->_copyright = (string) $rss->channel['rss_copyright'];
- if (!empty($rss->channel['modified'])) $this->_lastbuilddate = (string) $rss->channel['modified'];
- //if (!empty($rss->image['rss_url'])) $this->_imageurl = (string) $rss->image['rss_url'];
- if (!empty($rss->channel['link'])) $this->_link = (string) $rss->channel['link'];
- if (!empty($rss->channel['title'])) $this->_title = (string) $rss->channel['title'];
- //if (!empty($rss->channel['rss_description'])) $this->_description = (string) $rss->channel['rss_description'];
- }
- if (!empty($conf->global->EXTERNALRSS_USE_SIMPLEXML)) {
- $tmprss = xml2php($rss); $items = $tmprss['entry'];
- } // With simplexml
- else $items = $rss->items; // With xmlparse
- //var_dump($items);exit;
- }
+ if (!empty($conf->global->EXTERNALRSS_USE_SIMPLEXML)) $items = $rss->channel->item; // With simplexml
+ else $items = $rss->items; // With xmlparse
+ //var_dump($items);exit;
+ }
+ elseif ($rss->_format == 'atom')
+ {
+ //var_dump($rss);
+ if (!empty($conf->global->EXTERNALRSS_USE_SIMPLEXML))
+ {
+ if (!empty($rss->generator)) $this->_generator = (string) $rss->generator;
+ if (!empty($rss->lastbuilddate)) $this->_lastbuilddate = (string) $rss->modified;
+ if (!empty($rss->link->href)) $this->_link = (string) $rss->link->href;
+ if (!empty($rss->title)) $this->_title = (string) $rss->title;
+ if (!empty($rss->description)) $this->_description = (string) $rss->description;
+ }
+ else
+ {
+ //if (!empty($rss->channel['rss_language'])) $this->_language = (string) $rss->channel['rss_language'];
+ if (!empty($rss->channel['generator'])) $this->_generator = (string) $rss->channel['generator'];
+ //if (!empty($rss->channel['rss_copyright'])) $this->_copyright = (string) $rss->channel['rss_copyright'];
+ if (!empty($rss->channel['modified'])) $this->_lastbuilddate = (string) $rss->channel['modified'];
+ //if (!empty($rss->image['rss_url'])) $this->_imageurl = (string) $rss->image['rss_url'];
+ if (!empty($rss->channel['link'])) $this->_link = (string) $rss->channel['link'];
+ if (!empty($rss->channel['title'])) $this->_title = (string) $rss->channel['title'];
+ //if (!empty($rss->channel['rss_description'])) $this->_description = (string) $rss->channel['rss_description'];
- $i = 0;
+ $this->_imageurl = $this->getAtomImageUrl($rss->channel);
+ }
+ if (!empty($conf->global->EXTERNALRSS_USE_SIMPLEXML)) {
+ $tmprss = xml2php($rss); $items = $tmprss['entry'];
+ } // With simplexml
+ else $items = $rss->items; // With xmlparse
+ //var_dump($items);exit;
+ }
- // Loop on each record
- if (is_array($items))
- {
- foreach ($items as $item)
- {
- //var_dump($item);exit;
- if ($rss->_format == 'rss')
- {
- if (!empty($conf->global->EXTERNALRSS_USE_SIMPLEXML))
- {
- $itemLink = (string) $item->link;
- $itemTitle = (string) $item->title;
- $itemDescription = (string) $item->description;
- $itemPubDate = (string) $item->pubDate;
- $itemId = '';
- $itemAuthor = '';
- }
- else
- {
- $itemLink = (string) $item['link'];
- $itemTitle = (string) $item['title'];
- $itemDescription = (string) $item['description'];
- $itemPubDate = (string) $item['pubdate'];
- $itemId = (string) $item['guid'];
- $itemAuthor = (string) $item['author'];
- }
+ $i = 0;
- // Loop on each category
- $itemCategory = array();
- if (is_array($item->category))
- {
- foreach ($item->category as $cat)
- {
- $itemCategory[] = (string) $cat;
- }
- }
- }
- elseif ($rss->_format == 'atom')
- {
- if (!empty($conf->global->EXTERNALRSS_USE_SIMPLEXML))
- {
- $itemLink = (isset($item['link']['href']) ? (string) $item['link']['href'] : '');
- $itemTitle = (string) $item['title'];
- $itemDescription = (string) $item['summary'];
- $itemPubDate = (string) $item['created'];
- $itemId = (string) $item['id'];
- $itemAuthor = (string) ($item['author'] ? $item['author'] : $item['author_name']);
- }
- else
- {
- $itemLink = (isset($item['link']['href']) ? (string) $item['link']['href'] : '');
- $itemTitle = (string) $item['title'];
- $itemDescription = (string) $item['summary'];
- $itemPubDate = (string) $item['created'];
- $itemId = (string) $item['id'];
- $itemAuthor = (string) ($item['author'] ? $item['author'] : $item['author_name']);
- }
- }
- else print 'ErrorBadFeedFormat';
+ // Loop on each record
+ if (is_array($items))
+ {
+ foreach ($items as $item)
+ {
+ //var_dump($item);exit;
+ if ($rss->_format == 'rss')
+ {
+ if (!empty($conf->global->EXTERNALRSS_USE_SIMPLEXML))
+ {
+ $itemLink = (string) $item->link;
+ $itemTitle = (string) $item->title;
+ $itemDescription = (string) $item->description;
+ $itemPubDate = (string) $item->pubDate;
+ $itemId = '';
+ $itemAuthor = '';
+ }
+ else
+ {
+ $itemLink = (string) $item['link'];
+ $itemTitle = (string) $item['title'];
+ $itemDescription = (string) $item['description'];
+ $itemPubDate = (string) $item['pubdate'];
+ $itemId = (string) $item['guid'];
+ $itemAuthor = (string) $item['author'];
+ }
- // Add record to result array
- $this->_rssarray[$i] = array(
- 'link'=>$itemLink,
- 'title'=>$itemTitle,
- 'description'=>$itemDescription,
- 'pubDate'=>$itemPubDate,
- 'category'=>$itemCategory,
- 'id'=>$itemId,
- 'author'=>$itemAuthor);
- //var_dump($this->_rssarray);
+ // Loop on each category
+ $itemCategory = array();
+ if (is_array($item->category))
+ {
+ foreach ($item->category as $cat)
+ {
+ $itemCategory[] = (string) $cat;
+ }
+ }
+ }
+ elseif ($rss->_format == 'atom')
+ {
+ if (!empty($conf->global->EXTERNALRSS_USE_SIMPLEXML))
+ {
+ $itemLink = (isset($item['link']) ? (string) $item['link'] : '');
+ $itemTitle = (string) $item['title'];
+ $itemDescription = $this->getAtomItemDescription($item);
+ $itemPubDate = (string) $item['created'];
+ $itemId = (string) $item['id'];
+ $itemAuthor = (string) ($item['author'] ? $item['author'] : $item['author_name']);
+ }
+ else
+ {
+ $itemLink = (isset($item['link']) ? (string) $item['link'] : '');
+ $itemTitle = (string) $item['title'];
+ $itemDescription = $this->getAtomItemDescription($item);
+ $itemPubDate = (string) $item['created'];
+ $itemId = (string) $item['id'];
+ $itemAuthor = (string) ($item['author'] ? $item['author'] : $item['author_name']);
+ }
+ }
+ else print 'ErrorBadFeedFormat';
- $i++;
+ // Add record to result array
+ $this->_rssarray[$i] = array(
+ 'link'=>$itemLink,
+ 'title'=>$itemTitle,
+ 'description'=>$itemDescription,
+ 'pubDate'=>$itemPubDate,
+ 'category'=>$itemCategory,
+ 'id'=>$itemId,
+ 'author'=>$itemAuthor);
+ //var_dump($this->_rssarray);
- if ($i > $maxNb) break; // We get all records we want
- }
- }
+ $i++;
- return 1;
- }
- else
- {
- $this->error = 'ErrorFailedToLoadRSSFile';
- return -1;
- }
- }
+ if ($i > $maxNb) break; // We get all records we want
+ }
+ }
+
+ return 1;
+ }
+ else
+ {
+ $this->error = 'ErrorFailedToLoadRSSFile';
+ return -1;
+ }
+ }
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
- /**
- * Triggered when opened tag is found
- *
- * @param string $p Start
- * @param string $element Tag
- * @param array $attrs Attributes of tags
- * @return void
- */
- public function feed_start_element($p, $element, &$attrs)
- {
- // phpcs:enable
- $el = $element = strtolower($element);
- $attrs = array_change_key_case($attrs, CASE_LOWER);
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
+ /**
+ * Triggered when opened tag is found
+ *
+ * @param string $p Start
+ * @param string $element Tag
+ * @param array $attrs Attributes of tags
+ * @return void
+ */
+ public function feed_start_element($p, $element, &$attrs)
+ {
+ // phpcs:enable
+ $el = $element = strtolower($element);
+ $attrs = array_change_key_case($attrs, CASE_LOWER);
- // check for a namespace, and split if found
- $ns = false;
- if (strpos($element, ':'))
- {
- list($ns, $el) = explode(':', $element, 2);
- }
- if ($ns and $ns != 'rdf')
- {
- $this->current_namespace = $ns;
- }
+ // check for a namespace, and split if found
+ $ns = false;
+ if (strpos($element, ':'))
+ {
+ list($ns, $el) = explode(':', $element, 2);
+ }
+ if ($ns and $ns != 'rdf')
+ {
+ $this->current_namespace = $ns;
+ }
- // if feed type isn't set, then this is first element of feed identify feed from root element
- if (empty($this->_format))
- {
- if ($el == 'rdf') {
- $this->_format = 'rss';
- $this->feed_version = '1.0';
- }
- elseif ($el == 'rss') {
- $this->_format = 'rss';
- $this->feed_version = $attrs['version'];
- }
- elseif ($el == 'feed') {
- $this->_format = 'atom';
- $this->feed_version = $attrs['version'];
- $this->inchannel = true;
- }
- return;
- }
+ // if feed type isn't set, then this is first element of feed identify feed from root element
+ if (empty($this->_format))
+ {
+ if ($el == 'rdf') {
+ $this->_format = 'rss';
+ $this->feed_version = '1.0';
+ }
+ elseif ($el == 'rss') {
+ $this->_format = 'rss';
+ $this->feed_version = $attrs['version'];
+ }
+ elseif ($el == 'feed') {
+ $this->_format = 'atom';
+ $this->feed_version = $attrs['version'];
+ $this->inchannel = true;
+ }
+ return;
+ }
- if ($el == 'channel')
- {
- $this->inchannel = true;
- }
- elseif ($el == 'item' or $el == 'entry')
- {
- $this->initem = true;
- if (isset($attrs['rdf:about'])) {
- $this->current_item['about'] = $attrs['rdf:about'];
- }
- }
+ if ($el == 'channel')
+ {
+ $this->inchannel = true;
+ }
+ elseif ($el == 'item' or $el == 'entry')
+ {
+ $this->initem = true;
+ if (isset($attrs['rdf:about'])) {
+ $this->current_item['about'] = $attrs['rdf:about'];
+ }
+ }
- // if we're in the default namespace of an RSS feed,
- // record textinput or image fields
- elseif (
- $this->_format == 'rss' and
- $this->current_namespace == '' and
- $el == 'textinput' )
- {
- $this->intextinput = true;
- }
+ // if we're in the default namespace of an RSS feed,
+ // record textinput or image fields
+ elseif (
+ $this->_format == 'rss' and
+ $this->current_namespace == '' and
+ $el == 'textinput' )
+ {
+ $this->intextinput = true;
+ }
- elseif (
- $this->_format == 'rss' and
- $this->current_namespace == '' and
- $el == 'image' )
- {
- $this->inimage = true;
- }
+ elseif (
+ $this->_format == 'rss' and
+ $this->current_namespace == '' and
+ $el == 'image' )
+ {
+ $this->inimage = true;
+ }
- // handle atom content constructs
- elseif ($this->_format == 'atom' and in_array($el, $this->_CONTENT_CONSTRUCTS))
- {
- // avoid clashing w/ RSS mod_content
- if ($el == 'content') {
- $el = 'atom_content';
- }
+ // handle atom content constructs
+ elseif ($this->_format == 'atom' and in_array($el, $this->_CONTENT_CONSTRUCTS))
+ {
+ // avoid clashing w/ RSS mod_content
+ if ($el == 'content') {
+ $el = 'atom_content';
+ }
- $this->incontent = $el;
- }
+ $this->incontent = $el;
+ }
- // if inside an Atom content construct (e.g. content or summary) field treat tags as text
- elseif ($this->_format == 'atom' and $this->incontent)
- {
- // if tags are inlined, then flatten
- $attrs_str = join(' ', array_map('map_attrs', array_keys($attrs), array_values($attrs)));
+ // if inside an Atom content construct (e.g. content or summary) field treat tags as text
+ elseif ($this->_format == 'atom' and $this->incontent)
+ {
+ // if tags are inlined, then flatten
+ $attrs_str = join(' ', array_map('map_attrs', array_keys($attrs), array_values($attrs)));
- $this->append_content("<$element $attrs_str>");
+ $this->append_content("<$element $attrs_str>");
- array_unshift($this->stack, $el);
- }
+ array_unshift($this->stack, $el);
+ }
- // Atom support many links per containging element.
- // Magpie treats link elements of type rel='alternate'
- // as being equivalent to RSS's simple link element.
- //
- elseif ($this->_format == 'atom' and $el == 'link')
- {
- if (isset($attrs['rel']) && $attrs['rel'] == 'alternate')
- {
- $link_el = 'link';
- }
- else {
- $link_el = 'link_'.$attrs['rel'];
- }
+ // Atom support many links per containging element.
+ // Magpie treats link elements of type rel='alternate'
+ // as being equivalent to RSS's simple link element.
+ //
+ elseif ($this->_format == 'atom' and $el == 'link')
+ {
+ if (isset($attrs['rel']) && $attrs['rel'] == 'alternate')
+ {
+ $link_el = 'link';
+ }
+ elseif (!isset($attrs['rel']))
+ {
+ $link_el = 'link';
+ }
+ else
+ {
+ $link_el = 'link_'.$attrs['rel'];
+ }
- $this->append($link_el, $attrs['href']);
- }
- // set stack[0] to current element
- else {
- array_unshift($this->stack, $el);
- }
- }
+ $this->append($link_el, $attrs['href']);
+ }
+ // set stack[0] to current element
+ else {
+ array_unshift($this->stack, $el);
+ }
+ }
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
- /**
- * Triggered when CDATA is found
- *
- * @param string $p P
- * @param string $text Tag
- * @return void
- */
- public function feed_cdata($p, $text)
- {
- // phpcs:enable
- if ($this->_format == 'atom' and $this->incontent)
- {
- $this->append_content($text);
- }
- else
- {
- $current_el = join('_', array_reverse($this->stack));
- $this->append($current_el, $text);
- }
- }
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
+ /**
+ * Triggered when CDATA is found
+ *
+ * @param string $p P
+ * @param string $text Tag
+ * @return void
+ */
+ public function feed_cdata($p, $text)
+ {
+ // phpcs:enable
+ if ($this->_format == 'atom' and $this->incontent)
+ {
+ $this->append_content($text);
+ }
+ else
+ {
+ $current_el = join('_', array_reverse($this->stack));
+ $this->append($current_el, $text);
+ }
+ }
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
- /**
- * Triggered when closed tag is found
- *
- * @param string $p P
- * @param string $el Tag
- * @return void
- */
- public function feed_end_element($p, $el)
- {
- // phpcs:enable
- $el = strtolower($el);
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
+ /**
+ * Triggered when closed tag is found
+ *
+ * @param string $p P
+ * @param string $el Tag
+ * @return void
+ */
+ public function feed_end_element($p, $el)
+ {
+ // phpcs:enable
+ $el = strtolower($el);
- if ($el == 'item' or $el == 'entry')
- {
- $this->items[] = $this->current_item;
- $this->current_item = array();
- $this->initem = false;
- }
- elseif ($this->_format == 'rss' and $this->current_namespace == '' and $el == 'textinput')
- {
- $this->intextinput = false;
- }
- elseif ($this->_format == 'rss' and $this->current_namespace == '' and $el == 'image')
- {
- $this->inimage = false;
- }
- elseif ($this->_format == 'atom' and in_array($el, $this->_CONTENT_CONSTRUCTS))
- {
- $this->incontent = false;
- }
- elseif ($el == 'channel' or $el == 'feed')
- {
- $this->inchannel = false;
- }
- elseif ($this->_format == 'atom' and $this->incontent) {
- // balance tags properly
- // note: i don't think this is actually neccessary
- if ($this->stack[0] == $el)
- {
- $this->append_content("$el>");
- }
- else {
- $this->append_content("<$el />");
- }
+ if ($el == 'item' or $el == 'entry')
+ {
+ $this->items[] = $this->current_item;
+ $this->current_item = array();
+ $this->initem = false;
+ }
+ elseif ($this->_format == 'rss' and $this->current_namespace == '' and $el == 'textinput')
+ {
+ $this->intextinput = false;
+ }
+ elseif ($this->_format == 'rss' and $this->current_namespace == '' and $el == 'image')
+ {
+ $this->inimage = false;
+ }
+ elseif ($this->_format == 'atom' and in_array($el, $this->_CONTENT_CONSTRUCTS))
+ {
+ $this->incontent = false;
+ }
+ elseif ($el == 'channel' or $el == 'feed')
+ {
+ $this->inchannel = false;
+ }
+ elseif ($this->_format == 'atom' and $this->incontent) {
+ // balance tags properly
+ // note: i don't think this is actually neccessary
+ if ($this->stack[0] == $el)
+ {
+ $this->append_content("$el>");
+ }
+ else {
+ $this->append_content("<$el />");
+ }
- array_shift($this->stack);
- }
- else {
- array_shift($this->stack);
- }
+ array_shift($this->stack);
+ }
+ else {
+ array_shift($this->stack);
+ }
- $this->current_namespace = false;
- }
+ $this->current_namespace = false;
+ }
- /**
- * To concat 2 string with no warning if an operand is not defined
- *
- * @param string $str1 Str1
- * @param string $str2 Str2
- * @return string String cancatenated
- */
- public function concat(&$str1, $str2 = "")
- {
- if (!isset($str1)) {
- $str1 = "";
- }
- $str1 .= $str2;
- }
+ /**
+ * To concat 2 string with no warning if an operand is not defined
+ *
+ * @param string $str1 Str1
+ * @param string $str2 Str2
+ * @return string String cancatenated
+ */
+ public function concat(&$str1, $str2 = "")
+ {
+ if (!isset($str1)) {
+ $str1 = "";
+ }
+ $str1 .= $str2;
+ }
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
- /**
- * Enter description here ...
- *
- * @param string $text Text
- * @return void
- */
- public function append_content($text)
- {
- // phpcs:enable
- if ($this->initem) {
- $this->concat($this->current_item[$this->incontent], $text);
- }
- elseif ($this->inchannel) {
- $this->concat($this->channel[$this->incontent], $text);
- }
- }
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
+ /**
+ * Enter description here ...
+ *
+ * @param string $text Text
+ * @return void
+ */
+ public function append_content($text)
+ {
+ // phpcs:enable
+ if ($this->initem) {
+ $this->concat($this->current_item[$this->incontent], $text);
+ }
+ elseif ($this->inchannel) {
+ $this->concat($this->channel[$this->incontent], $text);
+ }
+ }
- /**
- * smart append - field and namespace aware
- *
- * @param string $el El
- * @param string $text Text
- * @return void
- */
- public function append($el, $text)
- {
- if (!$el) {
- return;
- }
- if ($this->current_namespace)
- {
- if ($this->initem) {
- $this->concat($this->current_item[$this->current_namespace][$el], $text);
- }
- elseif ($this->inchannel) {
- $this->concat($this->channel[$this->current_namespace][$el], $text);
- }
- elseif ($this->intextinput) {
- $this->concat($this->textinput[$this->current_namespace][$el], $text);
- }
- elseif ($this->inimage) {
- $this->concat($this->image[$this->current_namespace][$el], $text);
- }
- }
- else {
- if ($this->initem) {
- $this->concat($this->current_item[$el], $text);
- }
- elseif ($this->intextinput) {
- $this->concat($this->textinput[$el], $text);
- }
- elseif ($this->inimage) {
- $this->concat($this->image[$el], $text);
- }
- elseif ($this->inchannel) {
- $this->concat($this->channel[$el], $text);
- }
- }
- }
+ /**
+ * smart append - field and namespace aware
+ *
+ * @param string $el El
+ * @param string $text Text
+ * @return void
+ */
+ public function append($el, $text)
+ {
+ if (!$el) {
+ return;
+ }
+ if ($this->current_namespace)
+ {
+ if ($this->initem) {
+ $this->concat($this->current_item[$this->current_namespace][$el], $text);
+ }
+ elseif ($this->inchannel) {
+ $this->concat($this->channel[$this->current_namespace][$el], $text);
+ }
+ elseif ($this->intextinput) {
+ $this->concat($this->textinput[$this->current_namespace][$el], $text);
+ }
+ elseif ($this->inimage) {
+ $this->concat($this->image[$this->current_namespace][$el], $text);
+ }
+ }
+ else {
+ if ($this->initem) {
+ $this->concat($this->current_item[$el], $text);
+ }
+ elseif ($this->intextinput) {
+ $this->concat($this->textinput[$el], $text);
+ }
+ elseif ($this->inimage) {
+ $this->concat($this->image[$el], $text);
+ }
+ elseif ($this->inchannel) {
+ $this->concat($this->channel[$el], $text);
+ }
+ }
+ }
+
+ /**
+ * Return a description/summary for one item from a ATOM feed
+ *
+ * @param array $item A parsed item of a ATOM feed
+ * @param int $maxlength (optional) The maximum length for the description
+ * @return string A summary description
+ */
+ private function getAtomItemDescription(array $item, $maxlength = 500)
+ {
+ $result = "";
+
+ if (isset($item['summary']))
+ {
+ $result = $item['summary'];
+ }
+ elseif (isset($item['atom_content']))
+ {
+ $result = $item['atom_content'];
+ }
+
+ // remove all HTML elements that can possible break the maximum size of a tooltip,
+ // like headings, image, video etc. and allow only simple style elements
+ $result = strip_tags($result, "
");
+
+ $result = str_replace("\n", "", $result);
+
+ if (strlen($result) > $maxlength)
+ {
+ $result = substr($result, 0, $maxlength);
+ $result .= "...";
+ }
+
+ return $result;
+ }
+
+ /**
+ * Return a URL to a image of the given ATOM feed
+ *
+ * @param array $feed The ATOM feed that possible contain a link to a logo or icon
+ * @return string A URL to a image from a ATOM feed when found, otherwise a empty string
+ */
+ private function getAtomImageUrl(array $feed)
+ {
+ if (isset($feed['icon']))
+ {
+ return $feed['logo'];
+ }
+
+ if (isset($feed['icon']))
+ {
+ return $feed['logo'];
+ }
+
+ if (isset($feed['webfeeds:logo']))
+ {
+ return $feed['webfeeds:logo'];
+ }
+
+ if (isset($feed['webfeeds:icon']))
+ {
+ return $feed['webfeeds:icon'];
+ }
+
+ if (isset($feed['webfeeds:wordmark']))
+ {
+ return $feed['webfeeds:wordmark'];
+ }
+
+ return "";
+ }
}
@@ -745,48 +823,48 @@ class RssParser
*/
function xml2php($xml)
{
- $fils = 0;
- $tab = false;
- $array = array();
- foreach ($xml->children() as $key => $value)
- {
- $child = xml2php($value);
+ $fils = 0;
+ $tab = false;
+ $array = array();
+ foreach ($xml->children() as $key => $value)
+ {
+ $child = xml2php($value);
- //To deal with the attributes
- foreach ($value->attributes() as $ak=>$av)
- {
- $child[$ak] = (string) $av;
- }
+ //To deal with the attributes
+ foreach ($value->attributes() as $ak=>$av)
+ {
+ $child[$ak] = (string) $av;
+ }
- //Let see if the new child is not in the array
- if ($tab === false && in_array($key, array_keys($array)))
- {
- //If this element is already in the array we will create an indexed array
- $tmp = $array[$key];
- $array[$key] = null;
- $array[$key][] = $tmp;
- $array[$key][] = $child;
- $tab = true;
- }
- elseif ($tab === true)
- {
- //Add an element in an existing array
- $array[$key][] = $child;
- }
- else
- {
- //Add a simple element
- $array[$key] = $child;
- }
+ //Let see if the new child is not in the array
+ if ($tab === false && in_array($key, array_keys($array)))
+ {
+ //If this element is already in the array we will create an indexed array
+ $tmp = $array[$key];
+ $array[$key] = null;
+ $array[$key][] = $tmp;
+ $array[$key][] = $child;
+ $tab = true;
+ }
+ elseif ($tab === true)
+ {
+ //Add an element in an existing array
+ $array[$key][] = $child;
+ }
+ else
+ {
+ //Add a simple element
+ $array[$key] = $child;
+ }
- $fils++;
- }
+ $fils++;
+ }
- if ($fils == 0)
- {
- return (string) $xml;
- }
+ if ($fils == 0)
+ {
+ return (string) $xml;
+ }
- return $array;
+ return $array;
}
diff --git a/htdocs/core/class/smtps.class.php b/htdocs/core/class/smtps.class.php
index 2031d23eece..ba3c8199fca 100644
--- a/htdocs/core/class/smtps.class.php
+++ b/htdocs/core/class/smtps.class.php
@@ -1379,9 +1379,10 @@ class SMTPs
$strContentAltText = '';
if ($strType == 'html')
{
- // Similar code to forge a text from html is also in CMailFile.class.php
- $strContentAltText = preg_replace("/ ]*>/", " ", $strContent);
- $strContentAltText = html_entity_decode(strip_tags($strContentAltText));
+ // Similar code to forge a text from html is also in CMailFile.class.php
+ $strContentAltText = preg_replace('/.*<\/style><\/head>/', '', $strContent);
+ $strContentAltText = preg_replace("/ ]*>/", " ", $strContentAltText);
+ $strContentAltText = html_entity_decode(strip_tags($strContentAltText));
$strContentAltText = trim(wordwrap($strContentAltText, 75, "\r\n"));
}
diff --git a/htdocs/core/customreports.php b/htdocs/core/customreports.php
index aa93acd4a75..8375e5f6770 100644
--- a/htdocs/core/customreports.php
+++ b/htdocs/core/customreports.php
@@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*
- * This tool can be included into a list page with
+ * Note: This tool can be included into a list page with :
* define('USE_CUSTOME_REPORT_AS_INCLUDE', 1);
* include DOL_DOCUMENT_ROOT.'/core/customreports.php';
*/
@@ -214,6 +214,7 @@ if ($action == 'viewgraph') {
}
// Get all possible values of fields when a 'group by' is set, and save this into $arrayofvaluesforgroupby
+// $arrayofvaluesforgroupby will be used to forge lael of each grouped series
if (is_array($search_groupby) && count($search_groupby)) {
foreach ($search_groupby as $gkey => $gval) {
$gvalwithoutprefix = preg_replace('/^[a-z]+\./', '', $gval);
@@ -260,11 +261,30 @@ if (is_array($search_groupby) && count($search_groupby)) {
$keytouse = (string) $obj->val;
$valuetranslated = $obj->val;
}
+
+ $regs = array();
if (!empty($object->fields[$gvalwithoutprefix]['arrayofkeyval'])) {
$valuetranslated = $object->fields[$gvalwithoutprefix]['arrayofkeyval'][$obj->val];
if (is_null($valuetranslated)) $valuetranslated = $langs->transnoentitiesnoconv("UndefinedKey");
$valuetranslated = $langs->trans($valuetranslated);
}
+ elseif (preg_match('/integer:([^:]+):([^:]+)$/', $object->fields[$gvalwithoutprefix]['type'], $regs)) {
+ $classname = $regs[1];
+ $classpath = $regs[2];
+ dol_include_once($classpath);
+ if (class_exists($classname)) {
+ $tmpobject = new $classname($db);
+ $tmpobject->fetch($obj->val);
+ foreach($tmpobject->fields as $fieldkey => $field) {
+ if ($field['showoncombobox']) {
+ $valuetranslated = $tmpobject->$fieldkey;
+ //if ($valuetranslated == '-') $valuetranslated = $langs->transnoentitiesnoconv("Unknown")
+ break;
+ }
+ }
+ //$valuetranslated = $tmpobject->ref.'eee';
+ }
+ }
$arrayofvaluesforgroupby['g_'.$gkey][$keytouse] = $valuetranslated;
}
@@ -313,7 +333,7 @@ foreach ($arrayoftype as $key => $val) {
}
}
print $form->selectarray('objecttype', $newarrayoftype, $objecttype, 0, 0, 0, '', 1, 0, 0, '', 'minwidth200', 1);
-if (empty($conf->use_javascript_ajax)) print ' ';
+if (empty($conf->use_javascript_ajax)) print ' ';
else {
print '