From cc5727bc7b8c5b80d5603a44c6b160fcf2d4cc24 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Mon, 15 Apr 2019 09:15:42 +0200 Subject: [PATCH 001/127] Move to Warning an alert on hook when method return a string than a int --- htdocs/core/class/hookmanager.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/hookmanager.class.php b/htdocs/core/class/hookmanager.class.php index f23aa1da5a3..8752f01b95d 100644 --- a/htdocs/core/class/hookmanager.class.php +++ b/htdocs/core/class/hookmanager.class.php @@ -275,7 +275,7 @@ class HookManager // TODO dead code to remove (do not enable this, but fix hook instead): result must not be a string but an int. you must use $actionclassinstance->resprints to return a string if (! is_array($resaction) && ! is_numeric($resaction)) { - dol_syslog('Error: Bug into hook '.$method.' of module class '.get_class($actionclassinstance).'. Method must not return a string but an int (0=OK, 1=Replace, -1=KO) and set string into ->resprints', LOG_ERR); + dol_syslog('Warning: Bug into hook '.$method.' of module class '.get_class($actionclassinstance).'. Method must not return a string but an int (0=OK, 1=Replace, -1=KO) and set string into ->resprints', LOG_WARNING); if (empty($actionclassinstance->resprints)) { $this->resPrint.=$resaction; $resaction=0; } } } From 660a1cea1d8ddca131114ec2c7c975ec2bb66db2 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Wed, 17 Apr 2019 07:26:39 +0200 Subject: [PATCH 002/127] NEW Accounting - Add rights on export, delete operations in ledger --- htdocs/accountancy/bookkeeping/list.php | 61 +++++++++++++-------- htdocs/core/modules/modAccounting.class.php | 39 ++++++++++--- htdocs/langs/en_US/admin.lang | 9 +++ 3 files changed, 79 insertions(+), 30 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index 207ea3464d8..53603e08b39 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -1,7 +1,7 @@ * Copyright (C) 2013-2016 Florian Henry - * Copyright (C) 2013-2018 Alexandre Spangaro + * Copyright (C) 2013-2019 Alexandre Spangaro * Copyright (C) 2016-2017 Laurent Destailleur * Copyright (C) 2018 Frédéric France * @@ -100,7 +100,7 @@ $formaccounting = new FormAccounting($db); $formother = new FormOther($db); $form = new Form($db); -if (! in_array($action, array('export_file', 'delmouv', 'delmouvconfirm')) && ! isset($_POST['begin']) && ! isset($_GET['begin']) && ! isset($_POST['formfilteraction']) && GETPOST('page', 'int') == '' && ! GETPOST('noreset', 'int')) +if (! in_array($action, array('export_file', 'delmouv', 'delmouvconfirm')) && ! isset($_POST['begin']) && ! isset($_GET['begin']) && ! isset($_POST['formfilteraction']) && GETPOST('page', 'int') == '' && ! GETPOST('noreset', 'int') && $user->rights->accounting->mouvements->export) { if (empty($search_date_start) && empty($search_date_end) && ! GETPOSTISSET('restore_lastsearch_values')) { @@ -283,7 +283,7 @@ if (! empty($search_lettering_code)) { } -if ($action == 'delbookkeeping') { +if ($action == 'delbookkeeping' && $user->rights->accounting->mouvements->supprimer) { $import_key = GETPOST('importkey', 'alpha'); @@ -296,7 +296,7 @@ if ($action == 'delbookkeeping') { exit(); } } -if ($action == 'delbookkeepingyearconfirm') { +if ($action == 'delbookkeepingyearconfirm' && $user->rights->accounting->mouvements->supprimer_tous) { $delyear = GETPOST('delyear', 'int'); if ($delyear==-1) { @@ -327,7 +327,7 @@ if ($action == 'delbookkeepingyearconfirm') { exit; } } -if ($action == 'delmouvconfirm') { +if ($action == 'delmouvconfirm' && $user->rights->accounting->mouvements->supprimer) { $mvt_num = GETPOST('mvt_num', 'int'); @@ -347,7 +347,7 @@ if ($action == 'delmouvconfirm') { } // Export into a file with format defined into setup (FEC, CSV, ...) -if ($action == 'export_file') { +if ($action == 'export_file' && $user->rights->accounting->mouvements->export) { $result = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter); @@ -442,18 +442,30 @@ print ''; print ''; print ''; -$listofformat=AccountancyExport::getType(); -$button = ''; -if (count($filter)) $button.= $langs->trans("ExportFilteredList"); -else $button.= $langs->trans("ExportList"); -//$button.=' ('.$listofformat[$conf->global->ACCOUNTING_EXPORT_MODELCSV].')'; -$button.= ''; - +if ($user->rights->accounting->mouvements->export) { + $listofformat=AccountancyExport::getType(); + $button = ''; + if (count($filter)) $button.= $langs->trans("ExportFilteredList"); + else $button.= $langs->trans("ExportList"); + $button.= ''; +} else { + $button = ''; + if (count($filter)) $button.= $langs->trans("ExportFilteredList"); + else $button.= $langs->trans("ExportList"); + $button.= ''; +} $groupby = ' ' . $langs->trans("GroupByAccountAccounting") . ''; -$newcardbutton = ''.$langs->trans("NewAccountingMvt").''; -$newcardbutton.= ''; -$newcardbutton.= ''; + +if ($user->rights->accounting->mouvements->creer) { + $newcardbutton = ''.$langs->trans("NewAccountingMvt").''; + $newcardbutton.= ''; + $newcardbutton.= ''; +} else { + $newcardbutton = '' . $langs->trans("NewAccountingMvt") . ''; + $newcardbutton.= ''; + $newcardbutton.= ''; +} print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $button, $result, $nbtotalofrecords, 'title_accountancy', 0, $groupby.$newcardbutton, '', $limit); @@ -731,8 +743,12 @@ if ($num > 0) // Action column print ''; - print '' . img_edit() . ' '; - print '' . img_delete() . ''; + if ($user->rights->accounting->mouvements->creer) { + print '' . img_edit() . ''; + } + if ($user->rights->accounting->mouvements->supprimer) { + print ' ' . img_delete() . ''; + } print ''; if (! $i) $totalarray['nbfield']++; @@ -766,10 +782,11 @@ print ""; print ''; // TODO Replace this with mass delete action -print '
' . "\n"; -print '' . $langs->trans("DeleteMvt") . ''; -print '
'; - +if ($user->rights->accounting->mouvements->supprimer_tous) { + print '
' . "\n"; + print '' . $langs->trans("DeleteMvt") . ''; + print '
'; +} print ''; diff --git a/htdocs/core/modules/modAccounting.class.php b/htdocs/core/modules/modAccounting.class.php index 8250549b9e1..c91c59169ba 100644 --- a/htdocs/core/modules/modAccounting.class.php +++ b/htdocs/core/modules/modAccounting.class.php @@ -170,14 +170,6 @@ class modAccounting extends DolibarrModules $this->rights = array(); // Permission array used by this module $r = 0; - $this->rights[$r][0] = 50440; - $this->rights[$r][1] = 'Manage chart of accounts, setup of accountancy'; - $this->rights[$r][2] = 'r'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'chartofaccount'; - $this->rights[$r][5] = ''; - $r++; - $this->rights[$r][0] = 50401; $this->rights[$r][1] = 'Bind products and invoices with accounting accounts'; $this->rights[$r][2] = 'r'; @@ -212,6 +204,30 @@ class modAccounting extends DolibarrModules $this->rights[$r][5] = 'creer'; $r++; + $this->rights[$r][0] = 50414; + $this->rights[$r][1] = 'Delete operations in Ledger'; + $this->rights[$r][2] = 'd'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'mouvements'; + $this->rights[$r][5] = 'supprimer'; + $r++; + + $this->rights[$r][0] = 50415; + $this->rights[$r][1] = 'Delete all operations by year and journal in Ledger'; + $this->rights[$r][2] = 'd'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'mouvements'; + $this->rights[$r][5] = 'supprimer_tous'; + $r++; + + $this->rights[$r][0] = 50418; + $this->rights[$r][1] = 'Export operations of the Ledger'; + $this->rights[$r][2] = 'r'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'mouvements'; + $this->rights[$r][5] = 'export'; + $r++; + $this->rights[$r][0] = 50420; $this->rights[$r][1] = 'Report and export reports (turnover, balance, journals, ledger)'; $this->rights[$r][2] = 'r'; @@ -228,6 +244,13 @@ class modAccounting extends DolibarrModules $this->rights[$r][5] = ''; $r++; + $this->rights[$r][0] = 50440; + $this->rights[$r][1] = 'Manage chart of accounts, setup of accountancy'; + $this->rights[$r][2] = 'r'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'chartofaccount'; + $this->rights[$r][5] = ''; + $r++; // Menus //------- diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 23f10739424..6c54cb643fe 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -882,6 +882,15 @@ Permission2802=Use FTP client in write mode (delete or upload files) Permission50101=Use Point of Sale Permission50201=Read transactions Permission50202=Import transactions +Permission50401=Bind products and invoices with accounting accounts +Permission50411=Read operations in ledger +Permission50412=Write/Edit operations in ledger +Permission50414=Delete operations in ledger +Permission50415=Delete all operations by year and journal in ledger +Permission50418=Export operations of the ledger +Permission50420=Report and export reports (turnover, balance, journals, ledger) +Permission50430=Define and close a fiscal year +Permission50440=Manage chart of accounts, setup of accountancy Permission54001=Print Permission55001=Read polls Permission55002=Create/modify polls From 3091288ed79c6287ab31edd0ad78293e0c8cd7fa Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Wed, 17 Apr 2019 07:27:38 +0200 Subject: [PATCH 003/127] Revert "Move to Warning an alert on hook when method return a string than a int" This reverts commit cc5727bc7b8c5b80d5603a44c6b160fcf2d4cc24. --- htdocs/core/class/hookmanager.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/hookmanager.class.php b/htdocs/core/class/hookmanager.class.php index 8752f01b95d..f23aa1da5a3 100644 --- a/htdocs/core/class/hookmanager.class.php +++ b/htdocs/core/class/hookmanager.class.php @@ -275,7 +275,7 @@ class HookManager // TODO dead code to remove (do not enable this, but fix hook instead): result must not be a string but an int. you must use $actionclassinstance->resprints to return a string if (! is_array($resaction) && ! is_numeric($resaction)) { - dol_syslog('Warning: Bug into hook '.$method.' of module class '.get_class($actionclassinstance).'. Method must not return a string but an int (0=OK, 1=Replace, -1=KO) and set string into ->resprints', LOG_WARNING); + dol_syslog('Error: Bug into hook '.$method.' of module class '.get_class($actionclassinstance).'. Method must not return a string but an int (0=OK, 1=Replace, -1=KO) and set string into ->resprints', LOG_ERR); if (empty($actionclassinstance->resprints)) { $this->resPrint.=$resaction; $resaction=0; } } } From 01ea4c28cff6efe403c310ad5718fb03f70965c7 Mon Sep 17 00:00:00 2001 From: Joa Date: Fri, 3 May 2019 11:02:37 +0200 Subject: [PATCH 004/127] adding hooks loading for form customization to card.php of adherents module --- htdocs/adherents/card.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index 5d57208eb0e..850537356ee 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -1059,6 +1059,13 @@ else // Other attributes include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; + //Hooks here + $reshook=$hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + //print $hookmanager->resPrint; //it double prints? + if (empty($reshook)) + { + print $object->showOptionals($extrafields, 'edit'); + } print ''; print "\n"; @@ -1357,9 +1364,15 @@ else // Other attributes include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; - + //Hooks here + $reshook=$hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + //print $hookmanager->resPrint; //it double prints? + if (empty($reshook)) + { + print $object->showOptionals($extrafields, 'edit'); + } + print ''; - dol_fiche_end(); print '
'; From 87e83a79670cd5e2503f88c676b6e4b1137fa11a Mon Sep 17 00:00:00 2001 From: Lionel VESSILLER Date: Fri, 3 May 2019 16:14:44 +0200 Subject: [PATCH 005/127] New add extrafield separator collapse with theses specific values - empty for a simple separator - 1 to extend by default all extrafields after the separator position - 2 to collapse by default all extrafields after the separator position --- htdocs/core/class/commonobject.class.php | 17 ++++++++- htdocs/core/class/extrafields.class.php | 36 ++++++++++++++++++- htdocs/core/tpl/admin_extrafields_add.tpl.php | 2 +- .../core/tpl/admin_extrafields_edit.tpl.php | 4 +-- htdocs/core/tpl/extrafields_view.tpl.php | 18 ++++++++-- 5 files changed, 70 insertions(+), 7 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index fae9ab49cc8..7a4b2e58e0a 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -6404,6 +6404,7 @@ abstract class CommonObject $out .= ' '; $out .= "\n"; + $extrafields_collapse_num = ''; $e = 0; foreach($extrafields->attributes[$this->table_element]['label'] as $key=>$label) { @@ -6463,6 +6464,20 @@ abstract class CommonObject if ($extrafields->attributes[$this->table_element]['type'][$key] == 'separate') { + $extrafields_collapse_num = ''; + $extrafield_param = $extrafields->attributes[$this->table_element]['param'][$key]; + if (!empty($extrafield_param) && is_array($extrafield_param)) { + $extrafield_param_list = array_keys($extrafield_param['options']); + + if (count($extrafield_param_list)>0) { + $extrafield_collapse_display_value = intval($extrafield_param_list[0]); + + if ($extrafield_collapse_display_value==1 || $extrafield_collapse_display_value==2) { + $extrafields_collapse_num = $extrafields->attributes[$this->table_element]['pos'][$key]; + } + } + } + $out .= $extrafields->showSeparator($key, $this); } else @@ -6482,7 +6497,7 @@ abstract class CommonObject $html_id = !empty($this->id) ? 'extrarow-'.$this->element.'_'.$key.'_'.$this->id : ''; - $out .= ''; + $out .= ''; if (! empty($conf->global->MAIN_EXTRAFIELDS_USE_TWO_COLUMS) && ($e % 2) == 0) { diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index caea57280b9..86019cc807b 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1951,9 +1951,43 @@ class ExtraFields { global $langs; - $out = ''; + $out = ''; $out.= $langs->trans($this->attributes[$object->table_element]['label'][$key]); $out.= ''; + + $extrafield_param = $this->attributes[$object->table_element]['param'][$key]; + if (!empty($extrafield_param) && is_array($extrafield_param)) { + $extrafield_param_list = array_keys($extrafield_param['options']); + + if (count($extrafield_param_list) > 0) { + $extrafield_collapse_display_value = intval($extrafield_param_list[0]); + if ($extrafield_collapse_display_value == 1 || $extrafield_collapse_display_value == 2) { + $collapse_display = ($extrafield_collapse_display_value == 2 ? false : true); + $extrafields_collapse_num = $this->attributes[$object->table_element]['pos'][$key]; + + $out .= ''; + } + } + } + return $out; } diff --git a/htdocs/core/tpl/admin_extrafields_add.tpl.php b/htdocs/core/tpl/admin_extrafields_add.tpl.php index 45c620db456..04720004492 100644 --- a/htdocs/core/tpl/admin_extrafields_add.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_add.tpl.php @@ -107,7 +107,7 @@ $langs->load("modulebuilder"); else if (type == 'link') { size.val('').prop('disabled', true); unique.removeAttr('disabled'); jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").show();jQuery("#helppassword").hide();} else if (type == 'separate') { langfile.val('').prop('disabled',true);size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); required.val('').prop('disabled', true); - jQuery("#value_choice").hide();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide(); + jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();jQuery("#helppassword").hide(); } else { // type = string size.val('').prop('disabled', true); diff --git a/htdocs/core/tpl/admin_extrafields_edit.tpl.php b/htdocs/core/tpl/admin_extrafields_edit.tpl.php index 1ba83bc393f..7ed41af9281 100644 --- a/htdocs/core/tpl/admin_extrafields_edit.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_edit.tpl.php @@ -103,7 +103,7 @@ $langs->load("modulebuilder"); else if (type == 'checkbox') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();jQuery("#helppassword").hide();} else if (type == 'chkbxlst') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").show();jQuery("#helplink").hide();jQuery("#helppassword").hide();} else if (type == 'link') { size.val('').prop('disabled', true); unique.removeAttr('disabled'); jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").show();jQuery("#helppassword").hide();} - else if (type == 'separate') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); required.val('').prop('disabled', true); default_value.val('').prop('disabled', true); jQuery("#value_choice").hide();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();jQuery("#helppassword").hide();} + else if (type == 'separate') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); required.val('').prop('disabled', true); default_value.val('').prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();jQuery("#helppassword").hide();} else { // type = string size.val('').prop('disabled', true); unique.removeAttr('disabled'); @@ -173,7 +173,7 @@ if((($type == 'select') || ($type == 'checkbox') || ($type == 'radio')) && is_ar } } } -elseif (($type== 'sellist') || ($type == 'chkbxlst') || ($type == 'link') || ($type == 'password')) +elseif (($type== 'sellist') || ($type == 'chkbxlst') || ($type == 'link') || ($type == 'password') || ($type == 'separate')) { $paramlist=array_keys($param['options']); $param_chain = $paramlist[0]; diff --git a/htdocs/core/tpl/extrafields_view.tpl.php b/htdocs/core/tpl/extrafields_view.tpl.php index db0d6a4897d..00a617a3e6c 100644 --- a/htdocs/core/tpl/extrafields_view.tpl.php +++ b/htdocs/core/tpl/extrafields_view.tpl.php @@ -48,8 +48,8 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e //var_dump($extrafields->attributes[$object->table_element]); if (empty($reshook) && is_array($extrafields->attributes[$object->table_element]['label'])) - { + $extrafields_collapse_num = ''; foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $label) { // Discard if extrafield is a hidden field on form @@ -86,11 +86,25 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element] } if ($extrafields->attributes[$object->table_element]['type'][$key] == 'separate') { + $extrafields_collapse_num = ''; + $extrafield_param = $extrafields->attributes[$object->table_element]['param'][$key]; + if (!empty($extrafield_param) && is_array($extrafield_param)) { + $extrafield_param_list = array_keys($extrafield_param['options']); + + if (count($extrafield_param_list)>0) { + $extrafield_collapse_display_value = intval($extrafield_param_list[0]); + + if ($extrafield_collapse_display_value==1 || $extrafield_collapse_display_value==2) { + $extrafields_collapse_num = $extrafields->attributes[$object->table_element]['pos'][$key]; + } + } + } + print $extrafields->showSeparator($key, $object); } else { - print ''; + print ''; print ''; print ''; print ''; From 9c69c8acc7db9fc27f1dcce206c2e9b2a3691814 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn?= Date: Sat, 4 May 2019 12:08:28 +0200 Subject: [PATCH 006/127] trying to pass travis check --- htdocs/adherents/card.php | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index 850537356ee..17ccdb0c546 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -1060,17 +1060,16 @@ else // Other attributes include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; //Hooks here - $reshook=$hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - //print $hookmanager->resPrint; //it double prints? - if (empty($reshook)) - { + $reshook=$hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + //print $hookmanager->resPrint; //it double prints? + if (empty($reshook)) + { print $object->showOptionals($extrafields, 'edit'); - } - - print ''; + } + + print ''; print "
\n"; - - dol_fiche_end(); + dol_fiche_end(); print '
'; print ''; @@ -1365,12 +1364,12 @@ else // Other attributes include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; //Hooks here - $reshook=$hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - //print $hookmanager->resPrint; //it double prints? - if (empty($reshook)) - { + $reshook=$hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + //print $hookmanager->resPrint; //it double prints? + if (empty($reshook)) + { print $object->showOptionals($extrafields, 'edit'); - } + } print ''; dol_fiche_end(); From 2aafef4017b0927b947ba0fd5a26559e8bc6e12c Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Mon, 6 May 2019 10:27:13 +0200 Subject: [PATCH 007/127] NEW add multicurrency rate at currency list API --- htdocs/api/class/api_setup.class.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/htdocs/api/class/api_setup.class.php b/htdocs/api/class/api_setup.class.php index 783ec6540e3..8d5d6d581f9 100644 --- a/htdocs/api/class/api_setup.class.php +++ b/htdocs/api/class/api_setup.class.php @@ -448,6 +448,7 @@ class Setup extends DolibarrApi /** * Get the list of currencies. * + * @param int $multicurrency Multicurrency rates (0: no multicurrency, 1: last rate) {@min 0} {@max 1} * @param string $sortfield Sort field * @param string $sortorder Sort order * @param int $limit Number of items per page @@ -460,13 +461,22 @@ class Setup extends DolibarrApi * * @throws RestException */ - public function getListOfCurrencies($sortfield = "code_iso", $sortorder = 'ASC', $limit = 100, $page = 0, $active = 1, $sqlfilters = '') + public function getListOfCurrencies($multicurrency = 0, $sortfield = "code_iso", $sortorder = 'ASC', $limit = 100, $page = 0, $active = 1, $sqlfilters = '') { $list = array(); - //TODO link with multicurrency module $sql = "SELECT t.code_iso, t.label, t.unicode"; + if (!empty($multicurrency)) $sql.= " , cr.date_sync, cr.rate "; $sql.= " FROM ".MAIN_DB_PREFIX."c_currencies as t"; + if (!empty($multicurrency)) { + $sql.= " JOIN ".MAIN_DB_PREFIX."multicurrency as m ON m.code=t.code_iso"; + $sql.= " JOIN ".MAIN_DB_PREFIX."multicurrency_rate as cr ON (m.rowid = cr.fk_multicurrency)"; + } $sql.= " WHERE t.active = ".$active; + if (!empty($multicurrency)) { + $sql.= " AND m.entity IN (".getEntity('multicurrency').")"; + $sql.= " AND cr.date_sync = (SELECT MAX(cr2.date_sync) FROM ".MAIN_DB_PREFIX."multicurrency_rate AS cr2 WHERE cr2.fk_multicurrency = m.rowid)"; + } + // Add sql filters if ($sqlfilters) { From 650fbb2bbf7c8af2a193cb3736e7bff1a9d61d73 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Mon, 6 May 2019 10:55:11 +0200 Subject: [PATCH 008/127] Update api_setup.class.php --- htdocs/api/class/api_setup.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/api/class/api_setup.class.php b/htdocs/api/class/api_setup.class.php index 8d5d6d581f9..386c04cdd9f 100644 --- a/htdocs/api/class/api_setup.class.php +++ b/htdocs/api/class/api_setup.class.php @@ -475,7 +475,7 @@ class Setup extends DolibarrApi if (!empty($multicurrency)) { $sql.= " AND m.entity IN (".getEntity('multicurrency').")"; $sql.= " AND cr.date_sync = (SELECT MAX(cr2.date_sync) FROM ".MAIN_DB_PREFIX."multicurrency_rate AS cr2 WHERE cr2.fk_multicurrency = m.rowid)"; - } + } // Add sql filters if ($sqlfilters) From 80ed080800954f31b35eae42b43bff6ea09dacc6 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Mon, 6 May 2019 11:31:41 +0200 Subject: [PATCH 009/127] Update api_setup.class.php --- htdocs/api/class/api_setup.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/api/class/api_setup.class.php b/htdocs/api/class/api_setup.class.php index 386c04cdd9f..227921889e6 100644 --- a/htdocs/api/class/api_setup.class.php +++ b/htdocs/api/class/api_setup.class.php @@ -448,7 +448,7 @@ class Setup extends DolibarrApi /** * Get the list of currencies. * - * @param int $multicurrency Multicurrency rates (0: no multicurrency, 1: last rate) {@min 0} {@max 1} + * @param int $multicurrency Multicurrency rates (0: no multicurrency, 1: last rate, 2: all rates) {@min 0} {@max 2} * @param string $sortfield Sort field * @param string $sortorder Sort order * @param int $limit Number of items per page @@ -474,7 +474,7 @@ class Setup extends DolibarrApi $sql.= " WHERE t.active = ".$active; if (!empty($multicurrency)) { $sql.= " AND m.entity IN (".getEntity('multicurrency').")"; - $sql.= " AND cr.date_sync = (SELECT MAX(cr2.date_sync) FROM ".MAIN_DB_PREFIX."multicurrency_rate AS cr2 WHERE cr2.fk_multicurrency = m.rowid)"; + if (!empty($multicurrency) && $multicurrecny != 2) $sql.= " AND cr.date_sync = (SELECT MAX(cr2.date_sync) FROM ".MAIN_DB_PREFIX."multicurrency_rate AS cr2 WHERE cr2.fk_multicurrency = m.rowid)"; } // Add sql filters From 96cc4f7774a9aef072c79644ec401d172373b902 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Mon, 6 May 2019 12:37:55 +0200 Subject: [PATCH 010/127] Update api_setup.class.php --- htdocs/api/class/api_setup.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/api/class/api_setup.class.php b/htdocs/api/class/api_setup.class.php index 227921889e6..e72f178cd68 100644 --- a/htdocs/api/class/api_setup.class.php +++ b/htdocs/api/class/api_setup.class.php @@ -474,7 +474,7 @@ class Setup extends DolibarrApi $sql.= " WHERE t.active = ".$active; if (!empty($multicurrency)) { $sql.= " AND m.entity IN (".getEntity('multicurrency').")"; - if (!empty($multicurrency) && $multicurrecny != 2) $sql.= " AND cr.date_sync = (SELECT MAX(cr2.date_sync) FROM ".MAIN_DB_PREFIX."multicurrency_rate AS cr2 WHERE cr2.fk_multicurrency = m.rowid)"; + if (!empty($multicurrency) && $multicurrency != 2) $sql.= " AND cr.date_sync = (SELECT MAX(cr2.date_sync) FROM ".MAIN_DB_PREFIX."multicurrency_rate AS cr2 WHERE cr2.fk_multicurrency = m.rowid)"; } // Add sql filters From c4fdec9481c3469dcae8f0622abc127ab09eda58 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 8 May 2019 02:05:03 +0200 Subject: [PATCH 011/127] Update api_setup.class.php --- htdocs/api/class/api_setup.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/api/class/api_setup.class.php b/htdocs/api/class/api_setup.class.php index e72f178cd68..57aac1b3bb0 100644 --- a/htdocs/api/class/api_setup.class.php +++ b/htdocs/api/class/api_setup.class.php @@ -448,7 +448,7 @@ class Setup extends DolibarrApi /** * Get the list of currencies. * - * @param int $multicurrency Multicurrency rates (0: no multicurrency, 1: last rate, 2: all rates) {@min 0} {@max 2} + * @param int $multicurrency Multicurrency rates (0: no multicurrency, 1: last rate, 2: all rates) {@min 0} {@max 2} * @param string $sortfield Sort field * @param string $sortorder Sort order * @param int $limit Number of items per page From 1079535894f73cedb822d4fea049efe4e571b50e Mon Sep 17 00:00:00 2001 From: Abbes Bahfir Date: Wed, 19 Jun 2019 17:49:31 +0100 Subject: [PATCH 012/127] Fix:modulebuilder output folder --- htdocs/modulebuilder/template/myobject_document.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/modulebuilder/template/myobject_document.php b/htdocs/modulebuilder/template/myobject_document.php index 0f4df0012f4..12da4769cf7 100644 --- a/htdocs/modulebuilder/template/myobject_document.php +++ b/htdocs/modulebuilder/template/myobject_document.php @@ -81,8 +81,8 @@ $extralabels = $extrafields->fetch_name_optionals_label('myobject'); // Load object include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals -//if ($id > 0 || ! empty($ref)) $upload_dir = $conf->mymodule->multidir_output[$object->entity?$object->entity:1] . "/myobject/" . dol_sanitizeFileName($object->id); -if ($id > 0 || ! empty($ref)) $upload_dir = $conf->mymodule->multidir_output[$object->entity?$object->entity:1] . "/myobject/" . dol_sanitizeFileName($object->ref); +//if ($id > 0 || ! empty($ref)) $upload_dir = $conf->sellyoursaas->multidir_output[$object->entity] . "/myobject/" . dol_sanitizeFileName($object->id); +if ($id > 0 || ! empty($ref)) $upload_dir = $conf->mymodule->multidir_output[$conf->entity] . "/myobject/" . dol_sanitizeFileName($object->ref); /* From 7c29fb614c34119ed919b3eb5fa86ba53eb4665f Mon Sep 17 00:00:00 2001 From: John Botella Date: Thu, 20 Jun 2019 09:21:35 +0200 Subject: [PATCH 013/127] Fix replacement and vars names --- htdocs/core/actions_massactions.inc.php | 77 ++++++++++++++++++------- 1 file changed, 55 insertions(+), 22 deletions(-) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 00ffe03c7ed..c40bd73eff5 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -93,7 +93,7 @@ if (! $error && $massaction == 'confirm_presend') } // Check mandatory parameters - if (empty($user->email)) + if (GETPOST('fromtype','alpha') === 'user' && empty($user->email)) { $error++; setEventMessages($langs->trans("NoSenderEmailDefined"), null, 'warnings'); @@ -208,7 +208,7 @@ if (! $error && $massaction == 'confirm_presend') $resaction.='
'.$langs->trans('ErrorOnlyProposalNotDraftCanBeSentInMassAction',$objectobj->ref).'

'; continue; // Payment done or started or canceled } - if ($objectclass == 'Commande' && $objectoj->statut == Commande::STATUS_DRAFT) + if ($objectclass == 'Commande' && $objectobj->statut == Commande::STATUS_DRAFT) { $langs->load("errors"); $nbignored++; @@ -333,12 +333,16 @@ if (! $error && $massaction == 'confirm_presend') if ($objectclass == 'CommandeFournisseur') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_ORDER_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_ORDER_TO)); if ($objectclass == 'FactureFournisseur') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO)); - // $listofqualifiedobj is array with key = object id of qualified objects for the current thirdparty + // $listofqualifiedobj is array with key = object id and value is instance of qualified objects, for the current thirdparty (but thirdparty property is not loaded yet) $oneemailperrecipient=(GETPOST('oneemailperrecipient')=='on'?1:0); $looparray=array(); if (! $oneemailperrecipient) { $looparray = $listofqualifiedobj; + foreach ($looparray as $key => $objecttmp) + { + $looparray[$key]->thirdparty = $thirdparty; + } } else { @@ -347,8 +351,9 @@ if (! $error && $massaction == 'confirm_presend') $looparray[0]=$objectforloop; } //var_dump($looparray);exit; - - foreach ($looparray as $objecttmp) // $objecttmp is a real object or an empty if we choose to send one email per thirdparty instead of per record + dol_syslog("We have set an array of ".count($looparray)." emails to send. oneemailperrecipient=".$oneemailperrecipient); + //var_dump($oneemailperrecipient); var_dump($listofqualifiedobj); var_dump($listofqualifiedref); + foreach ($looparray as $objectid => $objecttmp) // $objecttmp is a real object or an empty object if we choose to send one email per thirdparty instead of one per object { // Make substitution in email content $substitutionarray=getCommonSubstitutionArray($langs, 0, null, $objecttmp); @@ -358,10 +363,18 @@ if (! $error && $massaction == 'confirm_presend') $substitutionarray['__CHECK_READ__'] = ''; $parameters=array('mode'=>'formemail'); + + if ( ! empty( $listofobjectthirdparties ) ) { + $parameters['listofobjectthirdparties'] = $listofobjectthirdparties; + } + if ( ! empty( $listofobjectref ) ) { + $parameters['listofobjectref'] = $listofobjectref; + } + complete_substitutions_array($substitutionarray, $langs, $objecttmp, $parameters); - $subject=make_substitutions($subject, $substitutionarray); - $message=make_substitutions($message, $substitutionarray); + $subjectreplaced=make_substitutions($subject, $substitutionarray); + $messagereplaced=make_substitutions($message, $substitutionarray); $filepath = $attachedfiles['paths']; $filename = $attachedfiles['names']; @@ -370,8 +383,8 @@ if (! $error && $massaction == 'confirm_presend') //var_dump($filepath); // Send mail (substitutionarray must be done just before this) - require_once(DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'); - $mailfile = new CMailFile($subject,$sendto,$from,$message,$filepath,$mimetype,$filename,$sendtocc,$sendtobcc,$deliveryreceipt,-1); + require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; + $mailfile = new CMailFile($subjectreplaced, $sendto, $from, $messagereplaced, $filepath, $mimetype, $filename, $sendtocc, $sendtobcc, $deliveryreceipt, -1); if ($mailfile->error) { $resaction.='
'.$mailfile->error.'
'; @@ -386,8 +399,12 @@ if (! $error && $massaction == 'confirm_presend') $error=0; // Insert logs into agenda - foreach($listofqualifiedobj as $objid => $objectobj) + foreach($listofqualifiedobj as $objid2 => $objectobj2) { + if ((! $oneemailperrecipient) && $objid2 != $objectid) continue; // We discard this pass to avoid duplicate with other pass in looparray at higher level + + dol_syslog("Try to insert email event into agenda for objid=".$objid2." => objectobj=".get_class($objectobj2)); + /*if ($objectclass == 'Propale') $actiontypecode='AC_PROP'; if ($objectclass == 'Commande') $actiontypecode='AC_COM'; if ($objectclass == 'Facture') $actiontypecode='AC_FAC'; @@ -399,18 +416,18 @@ if (! $error && $massaction == 'confirm_presend') if ($message) { if ($sendtocc) $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc); - $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject); + $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subjectreplaced); $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":"); - $actionmsg = dol_concatdesc($actionmsg, $message); + $actionmsg = dol_concatdesc($actionmsg, $messagereplaced); } $actionmsg2=''; // Initialisation donnees - $objectobj->sendtoid = 0; - $objectobj->actionmsg = $actionmsg; // Long text - $objectobj->actionmsg2 = $actionmsg2; // Short text - $objectobj->fk_element = $objid; - $objectobj->elementtype = $objectobj->element; + $objectobj2->sendtoid = 0; + $objectobj2->actionmsg = $actionmsg; // Long text + $objectobj2->actionmsg2 = $actionmsg2; // Short text + $objectobj2->fk_element = $objid2; + $objectobj2->elementtype = $objectobj2->element; $triggername = strtoupper(get_class($objectobj)) .'_SENTBYMAIL'; if ($triggername == 'SOCIETE_SENTBYMAIL') $triggername = 'COMPANY_SENTBYEMAIL'; @@ -425,9 +442,9 @@ if (! $error && $massaction == 'confirm_presend') if (! empty($triggername)) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); + include_once DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"; $interface=new Interfaces($db); - $result=$interface->run_triggers($triggername, $objectobj, $user, $langs, $conf); + $result=$interface->run_triggers($triggername, $objectobj2, $user, $langs, $conf); if ($result < 0) { $error++; $errors=$interface->errors; } // Fin appel triggers @@ -437,9 +454,9 @@ if (! $error && $massaction == 'confirm_presend') dol_syslog("Error in trigger ".$triggername.' '.$db->lasterror(), LOG_ERR); } } - - $nbsent++; } + + $nbsent++; // Nb of email sent (may be lower than number of record selected if we group thirdparties) } else { @@ -504,6 +521,8 @@ if ($massaction == 'confirm_createbills') $objecttmp = new Facture($db); if (!empty($createbills_onebythird) && !empty($TFactThird[$cmd->socid])) $objecttmp = $TFactThird[$cmd->socid]; // If option "one bill per third" is set, we use already created order. else { + // Load extrafields of order + $cmd->fetch_optionals(); $objecttmp->socid = $cmd->socid; $objecttmp->type = Facture::TYPE_STANDARD; @@ -521,6 +540,8 @@ if ($massaction == 'confirm_createbills') $objecttmp->origin = 'commande'; $objecttmp->origin_id = $id_order; + $objecttmp->array_options = $cmd->array_options; // Copy extrafields + $res = $objecttmp->create($user); if($res > 0) $nb_bills_created++; @@ -560,6 +581,12 @@ if ($massaction == 'confirm_createbills') for ($i=0;$i<$num;$i++) { $desc=($lines[$i]->desc?$lines[$i]->desc:$lines[$i]->libelle); + // If we build one invoice for several order, we must put the invoice of order on the line + if (! empty($createbills_onebythird)) + { + $desc=dol_concatdesc($desc, $langs->trans("Order").' '.$cmd->ref.' - '.dol_print_date($cmd->date, 'day', $langs)); + } + if ($lines[$i]->subprice < 0) { // Negative line, we create a discount line @@ -670,6 +697,7 @@ if ($massaction == 'confirm_createbills') if (! $error && $validate_invoices) { $massaction = $action = 'builddoc'; + foreach($TAllFact as &$objecttmp) { $result = $objecttmp->validate($user); @@ -687,7 +715,12 @@ if ($massaction == 'confirm_createbills') $donotredirect = 1; $upload_dir = $conf->facture->dir_output; $permissioncreate=$user->rights->facture->creer; + + // Call action to build doc + $savobject = $object; + $object = $objecttmp; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; + $object = $savobject; } $massaction = $action = 'confirm_createbills'; @@ -696,7 +729,7 @@ if ($massaction == 'confirm_createbills') if (! $error) { $db->commit(); - setEventMessage($langs->trans('BillCreated', $nb_bills_created)); + setEventMessages($langs->trans('BillCreated', $nb_bills_created), null, 'mesgs'); // Make a redirect to avoid to bill twice if we make a refresh or back $param=''; From 252bd6d9ba7122447790e6d48c83e4dd64474762 Mon Sep 17 00:00:00 2001 From: John Botella Date: Thu, 20 Jun 2019 09:48:08 +0200 Subject: [PATCH 014/127] FIX condition --- htdocs/core/tpl/massactions_pre.tpl.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/core/tpl/massactions_pre.tpl.php b/htdocs/core/tpl/massactions_pre.tpl.php index 48989b2daec..0a273072e29 100644 --- a/htdocs/core/tpl/massactions_pre.tpl.php +++ b/htdocs/core/tpl/massactions_pre.tpl.php @@ -36,11 +36,12 @@ if ($massaction == 'presend') { $langs->load("mails"); + $listofselectedid = array(); + $listofselectedthirdparties = array(); + $listofselectedref = array(); + if (! GETPOST('cancel', 'alpha')) { - $listofselectedid = array(); - $listofselectedthirdparties = array(); - $listofselectedref = array(); foreach ($arrayofselected as $toselectid) { $result = $objecttmp->fetch($toselectid); @@ -106,7 +107,7 @@ if ($massaction == 'presend') $formmail->withtoreadonly = 1; } - $formmail->withoptiononeemailperrecipient = empty($liste)?0:((GETPOST('oneemailperrecipient')=='on')?1:-1); + $formmail->withoptiononeemailperrecipient = (count($listofselectedref) == 1 || empty($liste))? 0 : ((GETPOST('oneemailperrecipient')=='on')?1:-1); $formmail->withto = empty($liste)?(GETPOST('sendto','alpha')?GETPOST('sendto','alpha'):array()):$liste; $formmail->withtofree = empty($liste)?1:0; $formmail->withtocc = 1; From 9305403bea79f07eef481067718110e03172dab5 Mon Sep 17 00:00:00 2001 From: John Botella Date: Thu, 20 Jun 2019 10:32:32 +0200 Subject: [PATCH 015/127] Fix duplicate pdf in mass sendmail --- htdocs/core/actions_massactions.inc.php | 40 ++++++++++++++++++++----- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index c40bd73eff5..1d3d4b2adea 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -69,6 +69,8 @@ if (! $error && $massaction == 'confirm_presend') $listofobjectid=array(); $listofobjectthirdparties=array(); $listofobjectref=array(); + $attachedfilesThirdpartyObj=array(); + $oneemailperrecipient=(GETPOST('oneemailperrecipient')=='on'?1:0); if (! $error) { @@ -193,7 +195,6 @@ if (! $error && $massaction == 'confirm_presend') $sendtocc=implode(',',$tmparray); //var_dump($listofobjectref);exit; - $attachedfiles=array('paths'=>array(), 'names'=>array(), 'mimes'=>array()); $listofqualifiedobj=array(); $listofqualifiedref=array(); $thirdpartywithoutemail=array(); @@ -263,12 +264,12 @@ if (! $error && $massaction == 'confirm_presend') if (dol_is_file($file)) { - // Create form object - $attachedfiles=array( - 'paths'=>array_merge($attachedfiles['paths'],array($file)), - 'names'=>array_merge($attachedfiles['names'],array($filename)), - 'mimes'=>array_merge($attachedfiles['mimes'],array($mime)) - ); + // Create form object + $attachedfilesThirdpartyObj[$thirdpartyid][$objectid]=array( + 'paths'=>array($file), + 'names'=>array($filename), + 'mimes'=>array($mime) + ); } else { @@ -334,7 +335,7 @@ if (! $error && $massaction == 'confirm_presend') if ($objectclass == 'FactureFournisseur') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO)); // $listofqualifiedobj is array with key = object id and value is instance of qualified objects, for the current thirdparty (but thirdparty property is not loaded yet) - $oneemailperrecipient=(GETPOST('oneemailperrecipient')=='on'?1:0); + $looparray=array(); if (! $oneemailperrecipient) { @@ -376,10 +377,33 @@ if (! $error && $massaction == 'confirm_presend') $subjectreplaced=make_substitutions($subject, $substitutionarray); $messagereplaced=make_substitutions($message, $substitutionarray); + $attachedfiles=array('paths'=>array(), 'names'=>array(), 'mimes'=>array()); + if($oneemailperrecipient) + { + if(is_array($attachedfilesThirdpartyObj[$thirdparty->id]) && count($attachedfilesThirdpartyObj[$thirdparty->id])) + { + foreach ($attachedfilesThirdpartyObj[$thirdparty->id] as $keyObjId => $objAttachedFiles){ + // Create form object + $attachedfiles=array( + 'paths'=>array_merge($attachedfiles['paths'], $objAttachedFiles['paths']), + 'names'=>array_merge($attachedfiles['names'], $objAttachedFiles['names']), + 'mimes'=>array_merge($attachedfiles['mimes'], $objAttachedFiles['mimes']) + ); + } + } + } + elseif(!empty($attachedfilesThirdpartyObj[$thirdparty->id][$objectid])){ + // Create form object + $attachedfiles=$attachedfilesThirdpartyObj[$thirdparty->id][$objectid]; + } + $filepath = $attachedfiles['paths']; $filename = $attachedfiles['names']; $mimetype = $attachedfiles['mimes']; + + + //var_dump($filepath); // Send mail (substitutionarray must be done just before this) From 6a68c8cd996318c4d5997de97035157bddfbd87e Mon Sep 17 00:00:00 2001 From: John Botella Date: Thu, 20 Jun 2019 11:09:37 +0200 Subject: [PATCH 016/127] Fix display option email per participient --- htdocs/core/actions_massactions.inc.php | 3 +++ htdocs/core/tpl/massactions_pre.tpl.php | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 1d3d4b2adea..300c06216f7 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -377,9 +377,11 @@ if (! $error && $massaction == 'confirm_presend') $subjectreplaced=make_substitutions($subject, $substitutionarray); $messagereplaced=make_substitutions($message, $substitutionarray); + $attachedfiles=array('paths'=>array(), 'names'=>array(), 'mimes'=>array()); if($oneemailperrecipient) { + // if "one email per recipient" isn't check we must collate $attachedfiles by thirdparty if(is_array($attachedfilesThirdpartyObj[$thirdparty->id]) && count($attachedfilesThirdpartyObj[$thirdparty->id])) { foreach ($attachedfilesThirdpartyObj[$thirdparty->id] as $keyObjId => $objAttachedFiles){ @@ -394,6 +396,7 @@ if (! $error && $massaction == 'confirm_presend') } elseif(!empty($attachedfilesThirdpartyObj[$thirdparty->id][$objectid])){ // Create form object + // if "one email per recipient" isn't check we must separate $attachedfiles by object $attachedfiles=$attachedfilesThirdpartyObj[$thirdparty->id][$objectid]; } diff --git a/htdocs/core/tpl/massactions_pre.tpl.php b/htdocs/core/tpl/massactions_pre.tpl.php index 0a273072e29..e525bd739a3 100644 --- a/htdocs/core/tpl/massactions_pre.tpl.php +++ b/htdocs/core/tpl/massactions_pre.tpl.php @@ -107,7 +107,8 @@ if ($massaction == 'presend') $formmail->withtoreadonly = 1; } - $formmail->withoptiononeemailperrecipient = (count($listofselectedref) == 1 || empty($liste))? 0 : ((GETPOST('oneemailperrecipient')=='on')?1:-1); + $formmail->withoptiononeemailperrecipient = ((count($listofselectedref) == 1 && count(reset($listofselectedref)) == 1) || empty($liste)) ? 0 : ((GETPOST('oneemailperrecipient')=='on')?1:-1); + $formmail->withto = empty($liste)?(GETPOST('sendto','alpha')?GETPOST('sendto','alpha'):array()):$liste; $formmail->withtofree = empty($liste)?1:0; $formmail->withtocc = 1; @@ -126,6 +127,7 @@ if ($massaction == 'presend') // Make substitution in email content $substitutionarray = getCommonSubstitutionArray($langs, 0, null, $object); + $substitutionarray['__EMAIL__'] = $sendto; $substitutionarray['__CHECK_READ__'] = (is_object($object) && is_object($object->thirdparty)) ? '' : ''; $substitutionarray['__PERSONALIZED__'] = ''; // deprecated From b21006614c874e9a59c7f25d2a711a0795474a11 Mon Sep 17 00:00:00 2001 From: John Botella Date: Thu, 20 Jun 2019 12:00:44 +0200 Subject: [PATCH 017/127] Fix substitutions null --- htdocs/core/class/html.formmail.class.php | 1 - htdocs/core/lib/functions.lib.php | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 9b9bb32865e..38987b36185 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -908,7 +908,6 @@ class FormMail extends Form $defaultmessage=preg_replace("/^(
)+/","",$defaultmessage); $defaultmessage=preg_replace("/^\n+/","",$defaultmessage); } - $out.= ''; $out.= ''.$langs->trans("MailText").''; $out.= ''; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 7a70608f303..05024437a63 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -5733,6 +5733,8 @@ function make_substitutions($text, $substitutionarray, $outputlangs=null) // Make substitition for array $substitutionarray foreach ($substitutionarray as $key => $value) { + if (! isset($value)) continue; // If value is null, it same than not having substitution key at all into array, we do not replace. + if ($key == '__SIGNATURE__' && (! empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN))) $value=''; // Protection if ($key == '__USER_SIGNATURE__' && (! empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN))) $value=''; // Protection From 0865bdb60f77460b969b730f9bd175bfd90a660b Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Thu, 20 Jun 2019 12:16:48 +0200 Subject: [PATCH 018/127] fix depending extrafeilds list --- htdocs/core/class/commonobject.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 78729519775..006c80428f7 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -6446,7 +6446,7 @@ abstract class CommonObject jQuery(document).ready(function() { function showOptions(child_list, parent_list) { - var val = $("select[name=\"options_"+parent_list+"\"]").val(); + var val = $("select[name=\""+parent_list+"\"]").val(); var parentVal = parent_list + ":" + val; if(val > 0) { $("select[name=\""+child_list+"\"] option[parent]").hide(); From 476df203a7dd06329a4c7b386a91702aca6ae3da Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Thu, 20 Jun 2019 13:59:08 +0200 Subject: [PATCH 019/127] Add global task declared progression --- htdocs/projet/tasks/list.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php index b97710ba7b6..a6b8c583da2 100644 --- a/htdocs/projet/tasks/list.php +++ b/htdocs/projet/tasks/list.php @@ -773,7 +773,7 @@ while ($i < min($num, $limit)) } print ''; if (! $i) $totalarray['nbfield']++; - if (! $i) $totalarray['totalprogress_calculated']=$totalarray['nbfield']; + if (! $i) $totalarray['totalprogress_calculatedfield']=$totalarray['nbfield']; } // Declared progress if (! empty($arrayfields['t.progress']['checked'])) @@ -785,6 +785,8 @@ while ($i < min($num, $limit)) } print ''; if (! $i) $totalarray['nbfield']++; + if (! $i) $totalarray['totalprogress_declaredfield']=$totalarray['nbfield']; + $totalarray['totaldurationdeclared'] += $obj->planned_workload * $obj->progress / 100; } // Time not billed if (! empty($arrayfields['t.tobill']['checked'])) @@ -883,6 +885,7 @@ if (isset($totalarray['totaldurationeffectivefield']) || isset($totalarray['tota elseif ($totalarray['totalplannedworkloadfield'] == $i) print ''.convertSecondToTime($totalarray['totalplannedworkload'], $plannedworkloadoutputformat).''; elseif ($totalarray['totaldurationeffectivefield'] == $i) print ''.convertSecondToTime($totalarray['totaldurationeffective'], $timespentoutputformat).''; elseif ($totalarray['totalprogress_calculatedfield'] == $i) print ''.($totalarray['totalplannedworkload'] > 0 ? round(100 * $totalarray['totaldurationeffective'] / $totalarray['totalplannedworkload'], 2).' %' : '').''; + elseif ($totalarray['totalprogress_declaredfield'] == $i) print ''.($totalarray['totalplannedworkload'] > 0 ? round(100 * $totalarray['totaldurationdeclared'] / $totalarray['totalplannedworkload'], 2).' %' : '').''; elseif ($totalarray['totaltobillfield'] == $i) print ''.convertSecondToTime($totalarray['totaltobill'], $plannedworkloadoutputformat).''; elseif ($totalarray['totalbilledfield'] == $i) print ''.convertSecondToTime($totalarray['totalbilled'], $plannedworkloadoutputformat).''; else print ''; From b0229d1b9a2dd187bec0456bdc24d8b53a793a7d Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Thu, 20 Jun 2019 14:07:44 +0200 Subject: [PATCH 020/127] Global task declared progression on project task tab --- htdocs/core/lib/project.lib.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index efcfeca61dd..77ac518c384 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -371,12 +371,13 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t $numlines=count($lines); // We declare counter as global because we want to edit them into recursive call - global $total_projectlinesa_spent,$total_projectlinesa_planned,$total_projectlinesa_spent_if_planned,$total_projectlinesa_tobill,$total_projectlinesa_billed; + global $total_projectlinesa_spent,$total_projectlinesa_planned,$total_projectlinesa_spent_if_planned,$total_projectlinesa_declared_if_planned,$total_projectlinesa_tobill,$total_projectlinesa_billed; if ($level == 0) { $total_projectlinesa_spent=0; $total_projectlinesa_planned=0; $total_projectlinesa_spent_if_planned=0; + $total_projectlinesa_declared_if_planned=0; $total_projectlinesa_tobill=0; $total_projectlinesa_billed=0; } @@ -624,6 +625,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t $total_projectlinesa_spent += $lines[$i]->duration; $total_projectlinesa_planned += $lines[$i]->planned_workload; if ($lines[$i]->planned_workload) $total_projectlinesa_spent_if_planned += $lines[$i]->duration; + if ($lines[$i]->planned_workload) $total_projectlinesa_declared_if_planned += $lines[$i]->planned_workload * $lines[$i]->progress / 100; } } else @@ -652,7 +654,9 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t print ''; if ($total_projectlinesa_planned) print round(100 * $total_projectlinesa_spent / $total_projectlinesa_planned, 2).' %'; print ''; - print ''; + print ''; + if ($total_projectlinesa_planned) print round(100 * $total_projectlinesa_declared_if_planned / $total_projectlinesa_planned, 2).' %'; + print ''; if ($showbilltime) { print ''; From e5298d066625c4af59b8ccbcdf5401391563fbb5 Mon Sep 17 00:00:00 2001 From: John Botella Date: Fri, 21 Jun 2019 11:20:04 +0200 Subject: [PATCH 021/127] Fix send mail ancor --- htdocs/user/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 8d3843fdfcf..9a39518dfb4 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -1725,7 +1725,7 @@ else if (! empty($object->email)) { $langs->load("mails"); - print ''; + print ''; } else { From 200b66d11f8b349fa78f939543b1743872b3cdec Mon Sep 17 00:00:00 2001 From: John Botella Date: Fri, 21 Jun 2019 14:52:12 +0200 Subject: [PATCH 022/127] Remove a backported fix because failling at init test --- htdocs/core/lib/functions.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 05024437a63..d62882d9ef6 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -5733,7 +5733,7 @@ function make_substitutions($text, $substitutionarray, $outputlangs=null) // Make substitition for array $substitutionarray foreach ($substitutionarray as $key => $value) { - if (! isset($value)) continue; // If value is null, it same than not having substitution key at all into array, we do not replace. + //if (! isset($value)) continue; // If value is null, it same than not having substitution key at all into array, we do not replace. if ($key == '__SIGNATURE__' && (! empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN))) $value=''; // Protection if ($key == '__USER_SIGNATURE__' && (! empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN))) $value=''; // Protection From ec7ebe9f39bf21b855e1a9c19c34535cb76cfaa6 Mon Sep 17 00:00:00 2001 From: John Botella Date: Fri, 21 Jun 2019 15:32:38 +0200 Subject: [PATCH 023/127] redo backported fix and update adherent substitution methode --- htdocs/adherents/class/adherent.class.php | 30 +++++++++++------------ htdocs/core/lib/functions.lib.php | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index b4cedc98118..d009f12fdc8 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -216,22 +216,22 @@ class Adherent extends CommonObject '__ID__'=>$this->id, '__MEMBER_ID__'=>$this->id, '__CIVILITY__'=>$this->getCivilityLabel(), - '__FIRSTNAME__'=>$msgishtml?dol_htmlentitiesbr($this->firstname):$this->firstname, - '__LASTNAME__'=>$msgishtml?dol_htmlentitiesbr($this->lastname):$this->lastname, + '__FIRSTNAME__'=>$msgishtml?dol_htmlentitiesbr($this->firstname):($this->firstname?$this->firstname:''), + '__LASTNAME__'=>$msgishtml?dol_htmlentitiesbr($this->lastname):($this->lastname?$this->lastname:''), '__FULLNAME__'=>$msgishtml?dol_htmlentitiesbr($this->getFullName($langs)):$this->getFullName($langs), - '__COMPANY__'=>$msgishtml?dol_htmlentitiesbr($this->societe):$this->societe, - '__ADDRESS__'=>$msgishtml?dol_htmlentitiesbr($this->address):$this->address, - '__ZIP__'=>$msgishtml?dol_htmlentitiesbr($this->zip):$this->zip, - '__TOWN__'=>$msgishtml?dol_htmlentitiesbr($this->town):$this->town, - '__COUNTRY__'=>$msgishtml?dol_htmlentitiesbr($this->country):$this->country, - '__EMAIL__'=>$msgishtml?dol_htmlentitiesbr($this->email):$this->email, - '__BIRTH__'=>$msgishtml?dol_htmlentitiesbr($birthday):$birthday, - '__PHOTO__'=>$msgishtml?dol_htmlentitiesbr($this->photo):$this->photo, - '__LOGIN__'=>$msgishtml?dol_htmlentitiesbr($this->login):$this->login, - '__PASSWORD__'=>$msgishtml?dol_htmlentitiesbr($this->pass):$this->pass, - '__PHONE__'=>$msgishtml?dol_htmlentitiesbr($this->phone):$this->phone, - '__PHONEPRO__'=>$msgishtml?dol_htmlentitiesbr($this->phone_perso):$this->phone_perso, - '__PHONEMOBILE__'=>$msgishtml?dol_htmlentitiesbr($this->phone_mobile):$this->phone_mobile, + '__COMPANY__'=>$msgishtml?dol_htmlentitiesbr($this->societe):($this->societe?$this->societe:''), + '__ADDRESS__'=>$msgishtml?dol_htmlentitiesbr($this->address):($this->address?$this->address:''), + '__ZIP__'=>$msgishtml?dol_htmlentitiesbr($this->zip):($this->zip?$this->zip:''), + '__TOWN__'=>$msgishtml?dol_htmlentitiesbr($this->town):($this->town?$this->town:''), + '__COUNTRY__'=>$msgishtml?dol_htmlentitiesbr($this->country):($this->country?$this->country:''), + '__EMAIL__'=>$msgishtml?dol_htmlentitiesbr($this->email):($this->email?$this->email:''), + '__BIRTH__'=>$msgishtml?dol_htmlentitiesbr($birthday):($birthday?$birthday:''), + '__PHOTO__'=>$msgishtml?dol_htmlentitiesbr($this->photo):($this->photo?$this->photo:''), + '__LOGIN__'=>$msgishtml?dol_htmlentitiesbr($this->login):($this->login?$this->login:''), + '__PASSWORD__'=>$msgishtml?dol_htmlentitiesbr($this->pass):($this->pass?$this->pass:''), + '__PHONE__'=>$msgishtml?dol_htmlentitiesbr($this->phone):($this->phone?$this->phone:''), + '__PHONEPRO__'=>$msgishtml?dol_htmlentitiesbr($this->phone_perso):($this->phone_perso?$this->phone_perso:''), + '__PHONEMOBILE__'=>$msgishtml?dol_htmlentitiesbr($this->phone_mobile):($this->phone_mobile?$this->phone_mobile:'') ); complete_substitutions_array($substitutionarray, $langs, $this); diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index d62882d9ef6..05024437a63 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -5733,7 +5733,7 @@ function make_substitutions($text, $substitutionarray, $outputlangs=null) // Make substitition for array $substitutionarray foreach ($substitutionarray as $key => $value) { - //if (! isset($value)) continue; // If value is null, it same than not having substitution key at all into array, we do not replace. + if (! isset($value)) continue; // If value is null, it same than not having substitution key at all into array, we do not replace. if ($key == '__SIGNATURE__' && (! empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN))) $value=''; // Protection if ($key == '__USER_SIGNATURE__' && (! empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN))) $value=''; // Protection From a9222c602f2b4b0a29a4deb0e47fe5ef73696255 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 22 Jun 2019 12:04:26 +0200 Subject: [PATCH 024/127] translation --- htdocs/core/modules/bom/mod_bom_advanced.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/bom/mod_bom_advanced.php b/htdocs/core/modules/bom/mod_bom_advanced.php index ba5c437f0a0..aa8eef7aa59 100644 --- a/htdocs/core/modules/bom/mod_bom_advanced.php +++ b/htdocs/core/modules/bom/mod_bom_advanced.php @@ -23,7 +23,7 @@ /** * \file htdocs/core/modules/bom/mod_bom_advanced.php * \ingroup bom - * \brief Fichier contenant la classe du modele de numerotation de reference de bom advanced + * \brief File containing class for numbering model of bom advanced */ require_once DOL_DOCUMENT_ROOT .'/core/modules/bom/modules_bom.php'; @@ -52,7 +52,7 @@ class mod_bom_advanced extends ModeleNumRefboms /** - * Renvoi la description du modele de numerotation + * Returns the description of the numbering model * * @return string Texte descripif */ From 053b129f52909b0bb586666afc0bd4f8207a52a9 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 22 Jun 2019 12:06:01 +0200 Subject: [PATCH 025/127] translation --- htdocs/core/modules/cheque/mod_chequereceipt_thyme.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php b/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php index 7ff3bc6f6cc..545222c8b03 100644 --- a/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php +++ b/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php @@ -46,7 +46,7 @@ class mod_chequereceipt_thyme extends ModeleNumRefChequeReceipts /** - * Renvoi la description du modele de numerotation + * Returns the description of the numbering model * * @return string Texte descripif */ From 592591ff69de3cfcf6b10b3981053ccdcf1d0b72 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 22 Jun 2019 12:06:37 +0200 Subject: [PATCH 026/127] translation --- htdocs/core/modules/commande/mod_commande_saphir.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/commande/mod_commande_saphir.php b/htdocs/core/modules/commande/mod_commande_saphir.php index 8c96c237a0f..892a279cbe8 100644 --- a/htdocs/core/modules/commande/mod_commande_saphir.php +++ b/htdocs/core/modules/commande/mod_commande_saphir.php @@ -52,7 +52,7 @@ class mod_commande_saphir extends ModeleNumRefCommandes /** - * Renvoi la description du modele de numerotation + * Returns the description of the numbering model * * @return string Texte descripif */ From 3cc97ec351e4b6c806e8e9051bf0763dbb3c3bf1 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 22 Jun 2019 12:07:02 +0200 Subject: [PATCH 027/127] translation --- htdocs/core/modules/expensereport/mod_expensereport_sand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/expensereport/mod_expensereport_sand.php b/htdocs/core/modules/expensereport/mod_expensereport_sand.php index c0a5aa0a031..5217e2dc1c3 100644 --- a/htdocs/core/modules/expensereport/mod_expensereport_sand.php +++ b/htdocs/core/modules/expensereport/mod_expensereport_sand.php @@ -55,7 +55,7 @@ class mod_expensereport_sand extends ModeleNumRefExpenseReport /** - * Renvoi la description du modele de numerotation + * Returns the description of the numbering model * * @return string Texte descripif */ From d75f4eb1c86386504bf565fe08b980ee36af8f04 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 22 Jun 2019 12:07:46 +0200 Subject: [PATCH 028/127] translation --- htdocs/core/modules/facture/mod_facture_mars.php | 2 +- htdocs/core/modules/facture/mod_facture_mercure.php | 2 +- htdocs/core/modules/facture/mod_facture_terre.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/modules/facture/mod_facture_mars.php b/htdocs/core/modules/facture/mod_facture_mars.php index 752a80669c5..4c9d249d6c8 100644 --- a/htdocs/core/modules/facture/mod_facture_mars.php +++ b/htdocs/core/modules/facture/mod_facture_mars.php @@ -62,7 +62,7 @@ class mod_facture_mars extends ModeleNumRefFactures } /** - * Renvoi la description du modele de numerotation + * Returns the description of the numbering model * * @return string Texte descripif */ diff --git a/htdocs/core/modules/facture/mod_facture_mercure.php b/htdocs/core/modules/facture/mod_facture_mercure.php index 8c921d982bf..992a90b9731 100644 --- a/htdocs/core/modules/facture/mod_facture_mercure.php +++ b/htdocs/core/modules/facture/mod_facture_mercure.php @@ -46,7 +46,7 @@ class mod_facture_mercure extends ModeleNumRefFactures /** - * Renvoi la description du modele de numerotation + * Returns the description of the numbering model * * @return string Texte descripif */ diff --git a/htdocs/core/modules/facture/mod_facture_terre.php b/htdocs/core/modules/facture/mod_facture_terre.php index a4cc1762766..db9a3e2e046 100644 --- a/htdocs/core/modules/facture/mod_facture_terre.php +++ b/htdocs/core/modules/facture/mod_facture_terre.php @@ -72,7 +72,7 @@ class mod_facture_terre extends ModeleNumRefFactures } /** - * Renvoi la description du modele de numerotation + * Returns the description of the numbering model * * @return string Texte descripif */ From 4d4b5abb7e09c972492fe363ad05e007fc50b946 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 22 Jun 2019 12:08:08 +0200 Subject: [PATCH 029/127] translation --- htdocs/core/modules/fichinter/mod_arctic.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/fichinter/mod_arctic.php b/htdocs/core/modules/fichinter/mod_arctic.php index 1902ffc70af..1d33cb7fc83 100644 --- a/htdocs/core/modules/fichinter/mod_arctic.php +++ b/htdocs/core/modules/fichinter/mod_arctic.php @@ -57,7 +57,7 @@ class mod_arctic extends ModeleNumRefFicheinter /** - * Renvoi la description du modele de numerotation + * Returns the description of the numbering model * * @return string Texte descripif */ From a8d50228dbe136088ac352047a63dda85fe63178 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 22 Jun 2019 12:08:36 +0200 Subject: [PATCH 030/127] translation --- htdocs/core/modules/livraison/mod_livraison_jade.php | 2 +- htdocs/core/modules/livraison/mod_livraison_saphir.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/livraison/mod_livraison_jade.php b/htdocs/core/modules/livraison/mod_livraison_jade.php index 531ff26a354..5cae280f245 100644 --- a/htdocs/core/modules/livraison/mod_livraison_jade.php +++ b/htdocs/core/modules/livraison/mod_livraison_jade.php @@ -61,7 +61,7 @@ class mod_livraison_jade extends ModeleNumRefDeliveryOrder /** - * Renvoi la description du modele de numerotation + * Returns the description of the numbering model * * @return string Texte descripif */ diff --git a/htdocs/core/modules/livraison/mod_livraison_saphir.php b/htdocs/core/modules/livraison/mod_livraison_saphir.php index f05900600c2..23af66b1913 100644 --- a/htdocs/core/modules/livraison/mod_livraison_saphir.php +++ b/htdocs/core/modules/livraison/mod_livraison_saphir.php @@ -56,7 +56,7 @@ class mod_livraison_saphir extends ModeleNumRefDeliveryOrder /** - * Renvoi la description du modele de numerotation + * Returns the description of the numbering model * * @return string Texte descripif */ From 5379d4085f04e8b09ff455a1bb190dc01fc9d5cd Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 22 Jun 2019 12:08:57 +0200 Subject: [PATCH 031/127] translation --- htdocs/core/modules/payment/mod_payment_ant.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/payment/mod_payment_ant.php b/htdocs/core/modules/payment/mod_payment_ant.php index 21ad0d91b9e..a9cde1b86cb 100644 --- a/htdocs/core/modules/payment/mod_payment_ant.php +++ b/htdocs/core/modules/payment/mod_payment_ant.php @@ -55,7 +55,7 @@ class mod_payment_ant extends ModeleNumRefPayments /** - * Renvoi la description du modele de numerotation + * Returns the description of the numbering model * * @return string Texte descripif */ From 26af2d8fe35d2eacb43eba6e5e2ac0b7c1e47ddf Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 22 Jun 2019 12:09:28 +0200 Subject: [PATCH 032/127] translation --- htdocs/core/modules/project/mod_project_universal.php | 2 +- htdocs/core/modules/project/task/mod_task_universal.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/project/mod_project_universal.php b/htdocs/core/modules/project/mod_project_universal.php index d9287109d6e..70394f92129 100644 --- a/htdocs/core/modules/project/mod_project_universal.php +++ b/htdocs/core/modules/project/mod_project_universal.php @@ -55,7 +55,7 @@ class mod_project_universal extends ModeleNumRefProjects /** - * Renvoi la description du modele de numerotation + * Returns the description of the numbering model * * @return string Texte descripif */ diff --git a/htdocs/core/modules/project/task/mod_task_universal.php b/htdocs/core/modules/project/task/mod_task_universal.php index f08067541e8..760caaa366e 100644 --- a/htdocs/core/modules/project/task/mod_task_universal.php +++ b/htdocs/core/modules/project/task/mod_task_universal.php @@ -55,7 +55,7 @@ class mod_task_universal extends ModeleNumRefTask /** - * Renvoi la description du modele de numerotation + * Returns the description of the numbering model * * @return string Texte descripif */ From 2d3b0b8f9ed9ffd67fc7b0daa04fe06f7aac9dd7 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 22 Jun 2019 12:09:50 +0200 Subject: [PATCH 033/127] translation --- .../supplier_order/mod_commande_fournisseur_orchidee.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php index 6154ba5e1d9..c816953a298 100644 --- a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php +++ b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php @@ -57,7 +57,7 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders /** - * Renvoi la description du modele de numerotation + * Returns the description of the numbering model * * @return string Texte descripif */ From 8de36dc7c16995602caa21d6e50b6180c9b22c42 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 22 Jun 2019 12:10:09 +0200 Subject: [PATCH 034/127] translation --- .../modules/supplier_payment/mod_supplier_payment_brodator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php b/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php index e2407877a7b..d06a2ccfcf3 100644 --- a/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php +++ b/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php @@ -55,7 +55,7 @@ class mod_supplier_payment_brodator extends ModeleNumRefSupplierPayments /** - * Renvoi la description du modele de numerotation + * Returns the description of the numbering model * * @return string Texte descripif */ From 9d698c257cae577a8dd853ffab06b836e2fad07b Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 22 Jun 2019 12:10:32 +0200 Subject: [PATCH 035/127] translation --- htdocs/core/modules/ticket/mod_ticket_universal.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/ticket/mod_ticket_universal.php b/htdocs/core/modules/ticket/mod_ticket_universal.php index 361ecdd0c9d..007e0b318cd 100644 --- a/htdocs/core/modules/ticket/mod_ticket_universal.php +++ b/htdocs/core/modules/ticket/mod_ticket_universal.php @@ -53,7 +53,7 @@ class mod_ticket_universal extends ModeleNumRefTicket public $name='Universal'; /** - * Renvoi la description du modele de numerotation + * Returns the description of the numbering model * * @return string Texte descripif */ From e877f108ac6f0ca858fc674e61033cd43eb229d5 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 22 Jun 2019 12:18:56 +0200 Subject: [PATCH 036/127] translation --- htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index 1abc6c95e20..53cdd50b644 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -27,7 +27,7 @@ /** * \file htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php * \ingroup commande - * \brief Fichier de la classe permettant de generer les commandes au modele Eratosthène + * \brief File of the class allowing to generate the orders to the Eratosthene model */ require_once DOL_DOCUMENT_ROOT.'/core/modules/commande/modules_commande.php'; @@ -38,7 +38,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; /** - * Classe to generate PDF orders with template Eratosthene + * Class to generate PDF orders with template Eratosthene */ class pdf_eratosthene extends ModelePDFCommandes { From fc379616b485b34da533de8867992421d55a66ef Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sun, 23 Jun 2019 15:26:13 +0200 Subject: [PATCH 037/127] all http addresses should be https now --- build/debian/copyright | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/build/debian/copyright b/build/debian/copyright index 72e531d7007..a5832aa7754 100644 --- a/build/debian/copyright +++ b/build/debian/copyright @@ -52,7 +52,7 @@ License: GPL-3+ details. . You should have received a copy of the GNU General Public License - along with this program. If not, see . + along with this program. If not, see . . On Debian systems, the full text of the GNU General Public License version 3 can be found in the file @@ -98,7 +98,7 @@ License: GPL-2+ 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 . + along with this program. If not, see . . On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL-2 file. @@ -192,7 +192,7 @@ License: GPL-2+ details. . You should have received a copy of the GNU General Public License - along with this program. If not, see . + along with this program. If not, see . . On Debian systems, the full text of the GNU General Public License version 2 can be found in the file @@ -212,7 +212,7 @@ License: LGPL-2.1+ Lesser General Public License for more details. . You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + along with this program. If not, see . . On Debian systems, the full text of the GNU Lesser General Public License version 2.1 can be found in the file @@ -236,7 +236,7 @@ License: GPL-2+ or MIT details. . You should have received a copy of the GNU General Public License - along with this program. If not, see . + along with this program. If not, see . . On Debian systems, the full text of the GNU General Public License version 2 can be found in the file @@ -291,7 +291,7 @@ License: GPL-2+ details. . You should have received a copy of the GNU General Public License - along with this program. If not, see . + along with this program. If not, see . . On Debian systems, the full text of the GNU General Public License version 2 can be found in the file @@ -311,7 +311,7 @@ License: LGPL-2.1+ Lesser General Public License for more details. . You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + along with this program. If not, see . . On Debian systems, the full text of the GNU Lesser General Public License version 2.1 can be found in the file @@ -358,7 +358,7 @@ License: LGPL-2.1+ Lesser General Public License for more details. . You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + along with this program. If not, see . . On Debian systems, the full text of the GNU Lesser General Public License version 2.1 can be found in the file @@ -378,7 +378,7 @@ License: LGPL-3.0+ See the GNU Lesser General Public License for more details. . You should have received a copy of the GNU Lesser General Public License - along with TCPDF. If not, see . + along with TCPDF. If not, see . . On Debian systems, the complete text of the GNU Lesser General Public License version 3 can be found in "/usr/share/common-licenses/LGPL-3". From f12a9c27dac8843858244a232f90bec9239df496 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sun, 23 Jun 2019 15:27:11 +0200 Subject: [PATCH 038/127] all http addresses should be https now --- build/generate_filelist_xml.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/generate_filelist_xml.php b/build/generate_filelist_xml.php index 88b194f362b..4b1d4b55c65 100755 --- a/build/generate_filelist_xml.php +++ b/build/generate_filelist_xml.php @@ -13,7 +13,7 @@ * 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 . + * along with this program. If not, see . */ /** From 2348d499a208496bcf3e6a24217fbc743b464d92 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sun, 23 Jun 2019 15:30:35 +0200 Subject: [PATCH 039/127] all http addresses should be https now --- dev/examples/code/create_invoice.php | 2 +- dev/examples/code/create_order.php | 2 +- dev/examples/code/create_product.php | 2 +- dev/examples/code/create_user.php | 2 +- dev/examples/code/get_contracts.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dev/examples/code/create_invoice.php b/dev/examples/code/create_invoice.php index 792341f5c79..dbbe9d84c1c 100755 --- a/dev/examples/code/create_invoice.php +++ b/dev/examples/code/create_invoice.php @@ -13,7 +13,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/dev/examples/code/create_order.php b/dev/examples/code/create_order.php index fa3fa573223..30265d5462e 100755 --- a/dev/examples/code/create_order.php +++ b/dev/examples/code/create_order.php @@ -13,7 +13,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/dev/examples/code/create_product.php b/dev/examples/code/create_product.php index 7ca09246980..234658388df 100755 --- a/dev/examples/code/create_product.php +++ b/dev/examples/code/create_product.php @@ -13,7 +13,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/dev/examples/code/create_user.php b/dev/examples/code/create_user.php index 2fed1a51972..96d369085d2 100755 --- a/dev/examples/code/create_user.php +++ b/dev/examples/code/create_user.php @@ -13,7 +13,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/dev/examples/code/get_contracts.php b/dev/examples/code/get_contracts.php index eafc0dfeed5..aec246e9480 100755 --- a/dev/examples/code/get_contracts.php +++ b/dev/examples/code/get_contracts.php @@ -13,7 +13,7 @@ * 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 . + * along with this program. If not, see . */ /** From 8dd7e1519334369fef99e7c1718a407a8c2ef558 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sun, 23 Jun 2019 15:32:29 +0200 Subject: [PATCH 040/127] all http addresses should be https now --- dev/initdata/generate-invoice.php | 2 +- dev/initdata/generate-order.php | 2 +- dev/initdata/generate-product.php | 2 +- dev/initdata/generate-proposal.php | 2 +- dev/initdata/generate-thirdparty.php | 2 +- dev/initdata/import-products.php | 2 +- dev/initdata/import-thirdparties.php | 2 +- dev/initdata/import-users.php | 2 +- dev/initdata/purge-data.php | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dev/initdata/generate-invoice.php b/dev/initdata/generate-invoice.php index 0f04a4d236f..bfdda2896a1 100755 --- a/dev/initdata/generate-invoice.php +++ b/dev/initdata/generate-invoice.php @@ -13,7 +13,7 @@ * 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 . + * along with this program. If not, see . * * ATTENTION DE PAS EXECUTER CE SCRIPT SUR UNE INSTALLATION DE PRODUCTION */ diff --git a/dev/initdata/generate-order.php b/dev/initdata/generate-order.php index f07905f1edd..b66d3a3abc9 100755 --- a/dev/initdata/generate-order.php +++ b/dev/initdata/generate-order.php @@ -14,7 +14,7 @@ * 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 . + * along with this program. If not, see . * * ATTENTION DE PAS EXECUTER CE SCRIPT SUR UNE INSTALLATION DE PRODUCTION */ diff --git a/dev/initdata/generate-product.php b/dev/initdata/generate-product.php index 9e1b15331d4..e9703fbfd6e 100755 --- a/dev/initdata/generate-product.php +++ b/dev/initdata/generate-product.php @@ -14,7 +14,7 @@ * 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 . + * along with this program. If not, see . * * ATTENTION DE PAS EXECUTER CE SCRIPT SUR UNE INSTALLATION DE PRODUCTION */ diff --git a/dev/initdata/generate-proposal.php b/dev/initdata/generate-proposal.php index 4bd9c2c654b..30c9471a281 100755 --- a/dev/initdata/generate-proposal.php +++ b/dev/initdata/generate-proposal.php @@ -14,7 +14,7 @@ * 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 . + * along with this program. If not, see . * * ATTENTION DE PAS EXECUTER CE SCRIPT SUR UNE INSTALLATION DE PRODUCTION */ diff --git a/dev/initdata/generate-thirdparty.php b/dev/initdata/generate-thirdparty.php index cc2e85e544a..54e17c7f8d7 100755 --- a/dev/initdata/generate-thirdparty.php +++ b/dev/initdata/generate-thirdparty.php @@ -14,7 +14,7 @@ * 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 . + * along with this program. If not, see . * * ATTENTION DE PAS EXECUTER CE SCRIPT SUR UNE INSTALLATION DE PRODUCTION */ diff --git a/dev/initdata/import-products.php b/dev/initdata/import-products.php index fa9cfd6592b..e55f13c7c82 100755 --- a/dev/initdata/import-products.php +++ b/dev/initdata/import-products.php @@ -14,7 +14,7 @@ * 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 . + * along with this program. If not, see . * * WARNING, THIS WILL LOAD MASS DATA ON YOUR INSTANCE */ diff --git a/dev/initdata/import-thirdparties.php b/dev/initdata/import-thirdparties.php index 8826ca18544..558745e8d06 100755 --- a/dev/initdata/import-thirdparties.php +++ b/dev/initdata/import-thirdparties.php @@ -14,7 +14,7 @@ * 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 . + * along with this program. If not, see . * * WARNING, THIS WILL LOAD MASS DATA ON YOUR INSTANCE */ diff --git a/dev/initdata/import-users.php b/dev/initdata/import-users.php index 34130890f4b..64af2f9eb64 100755 --- a/dev/initdata/import-users.php +++ b/dev/initdata/import-users.php @@ -14,7 +14,7 @@ * 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 . + * along with this program. If not, see . * * WARNING, THIS WILL LOAD MASS DATA ON YOUR INSTANCE */ diff --git a/dev/initdata/purge-data.php b/dev/initdata/purge-data.php index 42d6d28eadf..62f41ce825f 100755 --- a/dev/initdata/purge-data.php +++ b/dev/initdata/purge-data.php @@ -13,7 +13,7 @@ * 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 . + * along with this program. If not, see . * * THIS SCRIPT DELETE ALL MAIN TABLE CONTENT * WARNING, DO NOT USE ON A PRODUCTION INSTANCE From eef9b2867b42f401b0871227f32af83970effa09 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sun, 23 Jun 2019 15:33:04 +0200 Subject: [PATCH 041/127] all http addresses should be https now --- dev/initdemo/sftpget_and_loaddump.php | 2 +- dev/initdemo/updatedemo.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/initdemo/sftpget_and_loaddump.php b/dev/initdemo/sftpget_and_loaddump.php index e261895b617..e5ade3aa2f6 100755 --- a/dev/initdemo/sftpget_and_loaddump.php +++ b/dev/initdemo/sftpget_and_loaddump.php @@ -13,7 +13,7 @@ * 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 . + * along with this program. If not, see . * or see http://www.gnu.org/ * * Get a distant dump file and load it into a mysql database diff --git a/dev/initdemo/updatedemo.php b/dev/initdemo/updatedemo.php index 53ae2251f35..dcaa44c43a6 100755 --- a/dev/initdemo/updatedemo.php +++ b/dev/initdemo/updatedemo.php @@ -13,7 +13,7 @@ * 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 . + * along with this program. If not, see . * or see http://www.gnu.org/ * * Get a distant dump file and load it into a mysql database From 9e905901d1297889f626b5625acecae7de1226d9 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sun, 23 Jun 2019 15:35:12 +0200 Subject: [PATCH 042/127] all http addresses should be https now --- dev/resources/licence/Links on GPL.txt | 6 +++--- dev/translation/autotranslator.class.php | 2 +- dev/translation/autotranslator.php | 2 +- dev/translation/sanity_check_en_langfiles.php | 2 +- dev/translation/strip_language_file.php | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dev/resources/licence/Links on GPL.txt b/dev/resources/licence/Links on GPL.txt index 1bb3053da2a..bb9c1597f68 100644 --- a/dev/resources/licence/Links on GPL.txt +++ b/dev/resources/licence/Links on GPL.txt @@ -1,8 +1,8 @@ * Page with licence compatibility -http://www.gnu.org/licenses/quick-guide-gplv3.fr.html +https://www.gnu.org/licenses/quick-guide-gplv3.fr.html * FAQ on GPL licence -http://www.fsf.org/licensing/licenses/gpl-faq.html +https://www.fsf.org/licensing/licenses/gpl-faq.html * Questions/Answers on Fork for using Dolibarr as a SaaS -http://stackoverflow.com/questions/539291/rebranding-a-gpld-app-as-saas +https://stackoverflow.com/questions/539291/rebranding-a-gpld-app-as-saas diff --git a/dev/translation/autotranslator.class.php b/dev/translation/autotranslator.class.php index 789bd8173c4..f9657482c86 100644 --- a/dev/translation/autotranslator.class.php +++ b/dev/translation/autotranslator.class.php @@ -12,7 +12,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/dev/translation/autotranslator.php b/dev/translation/autotranslator.php index eb0f53ead65..5e8cc13c3c8 100755 --- a/dev/translation/autotranslator.php +++ b/dev/translation/autotranslator.php @@ -13,7 +13,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/dev/translation/sanity_check_en_langfiles.php b/dev/translation/sanity_check_en_langfiles.php index 4db931f7dae..7f095a744db 100755 --- a/dev/translation/sanity_check_en_langfiles.php +++ b/dev/translation/sanity_check_en_langfiles.php @@ -15,7 +15,7 @@ * 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 . + * along with this program. If not, see . */ $sapi_type = php_sapi_name(); diff --git a/dev/translation/strip_language_file.php b/dev/translation/strip_language_file.php index d439397a512..ce28ca5de63 100755 --- a/dev/translation/strip_language_file.php +++ b/dev/translation/strip_language_file.php @@ -14,7 +14,7 @@ * 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 . + * along with this program. If not, see . * * ----- * From fea969dc637822822fcbd489758bdb368f7ba655 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sun, 23 Jun 2019 15:39:25 +0200 Subject: [PATCH 043/127] all http addresses should be https now --- htdocs/accountancy/admin/account.php | 2 +- htdocs/accountancy/admin/accountmodel.php | 4 ++-- htdocs/accountancy/admin/card.php | 2 +- htdocs/accountancy/admin/categories.php | 2 +- htdocs/accountancy/admin/categories_list.php | 2 +- htdocs/accountancy/admin/closure.php | 2 +- htdocs/accountancy/admin/defaultaccounts.php | 2 +- htdocs/accountancy/admin/export.php | 2 +- htdocs/accountancy/admin/fiscalyear.php | 2 +- htdocs/accountancy/admin/fiscalyear_card.php | 2 +- htdocs/accountancy/admin/fiscalyear_info.php | 2 +- htdocs/accountancy/admin/index.php | 2 +- htdocs/accountancy/admin/journals_list.php | 2 +- htdocs/accountancy/admin/productaccount.php | 2 +- 14 files changed, 15 insertions(+), 15 deletions(-) diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index b3ddbc43feb..b4bf5cc7f2c 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -14,7 +14,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php index 102d268e218..02442865b7b 100644 --- a/htdocs/accountancy/admin/accountmodel.php +++ b/htdocs/accountancy/admin/accountmodel.php @@ -4,7 +4,7 @@ * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2010-2016 Juanjo Menent - * Copyright (C) 2011-2018 Philippe Grand + * Copyright (C) 2011-2019 Philippe Grand * Copyright (C) 2011 Remy Younes * Copyright (C) 2012-2015 Marcos García * Copyright (C) 2012 Christophe Battarel @@ -23,7 +23,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/admin/card.php b/htdocs/accountancy/admin/card.php index a6c3969e64a..c49ed42741b 100644 --- a/htdocs/accountancy/admin/card.php +++ b/htdocs/accountancy/admin/card.php @@ -14,7 +14,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/admin/categories.php b/htdocs/accountancy/admin/categories.php index 17fa65d4f5e..a7fe40acefc 100644 --- a/htdocs/accountancy/admin/categories.php +++ b/htdocs/accountancy/admin/categories.php @@ -13,7 +13,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/admin/categories_list.php b/htdocs/accountancy/admin/categories_list.php index e7cdc800aee..28c771c19b9 100644 --- a/htdocs/accountancy/admin/categories_list.php +++ b/htdocs/accountancy/admin/categories_list.php @@ -13,7 +13,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/admin/closure.php b/htdocs/accountancy/admin/closure.php index 479dd410f33..55ed84d4ad0 100644 --- a/htdocs/accountancy/admin/closure.php +++ b/htdocs/accountancy/admin/closure.php @@ -12,7 +12,7 @@ * 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 . + * along with this program. If not, see . * */ diff --git a/htdocs/accountancy/admin/defaultaccounts.php b/htdocs/accountancy/admin/defaultaccounts.php index 079e3585341..13d3a267956 100644 --- a/htdocs/accountancy/admin/defaultaccounts.php +++ b/htdocs/accountancy/admin/defaultaccounts.php @@ -18,7 +18,7 @@ * 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 . + * along with this program. If not, see . * */ diff --git a/htdocs/accountancy/admin/export.php b/htdocs/accountancy/admin/export.php index 81dc83b2ae5..dc4146aae8e 100644 --- a/htdocs/accountancy/admin/export.php +++ b/htdocs/accountancy/admin/export.php @@ -18,7 +18,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/admin/fiscalyear.php b/htdocs/accountancy/admin/fiscalyear.php index fff0118c224..5cc03376808 100644 --- a/htdocs/accountancy/admin/fiscalyear.php +++ b/htdocs/accountancy/admin/fiscalyear.php @@ -12,7 +12,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/admin/fiscalyear_card.php b/htdocs/accountancy/admin/fiscalyear_card.php index 5dc6010d465..f12aaba054b 100644 --- a/htdocs/accountancy/admin/fiscalyear_card.php +++ b/htdocs/accountancy/admin/fiscalyear_card.php @@ -13,7 +13,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/admin/fiscalyear_info.php b/htdocs/accountancy/admin/fiscalyear_info.php index dfec49949a3..cfe6c20bd7b 100644 --- a/htdocs/accountancy/admin/fiscalyear_info.php +++ b/htdocs/accountancy/admin/fiscalyear_info.php @@ -12,7 +12,7 @@ * 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, seehttp://www.gnu.org/licenses/>. + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php index b842c8115da..859a7bbf279 100644 --- a/htdocs/accountancy/admin/index.php +++ b/htdocs/accountancy/admin/index.php @@ -19,7 +19,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/admin/journals_list.php b/htdocs/accountancy/admin/journals_list.php index cac81bfbcae..a8b2a6d0bbf 100644 --- a/htdocs/accountancy/admin/journals_list.php +++ b/htdocs/accountancy/admin/journals_list.php @@ -12,7 +12,7 @@ * 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 . + * along with this program. If not, see . * */ diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php index 562dfd1505b..c494bda55cb 100644 --- a/htdocs/accountancy/admin/productaccount.php +++ b/htdocs/accountancy/admin/productaccount.php @@ -16,7 +16,7 @@ * 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 . + * along with this program. If not, see . */ /** From d0a14d5aa7b29fd2db8039c19d14c3632647f883 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sun, 23 Jun 2019 15:41:10 +0200 Subject: [PATCH 044/127] all http addresses should be https now --- htdocs/accountancy/bookkeeping/balance.php | 2 +- htdocs/accountancy/bookkeeping/balancebymonth.php | 2 +- htdocs/accountancy/bookkeeping/card.php | 2 +- htdocs/accountancy/bookkeeping/list.php | 2 +- htdocs/accountancy/bookkeeping/listbyaccount.php | 2 +- .../accountancy/bookkeeping/thirdparty_lettering_customer.php | 2 +- .../accountancy/bookkeeping/thirdparty_lettering_supplier.php | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index 44a12b76f36..ef966a00455 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -15,7 +15,7 @@ * 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 . + * along with this program. If not, see . * */ diff --git a/htdocs/accountancy/bookkeeping/balancebymonth.php b/htdocs/accountancy/bookkeeping/balancebymonth.php index b9568228a36..a537983ed92 100644 --- a/htdocs/accountancy/bookkeeping/balancebymonth.php +++ b/htdocs/accountancy/bookkeeping/balancebymonth.php @@ -15,7 +15,7 @@ * 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 . + * along with this program. If not, see . * */ diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index b0adb2e2ad1..d91069ce93e 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -16,7 +16,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index 4fc30bb0c30..ff7cccca341 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -16,7 +16,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php index bacfdcb714a..d3dc9b4a190 100644 --- a/htdocs/accountancy/bookkeeping/listbyaccount.php +++ b/htdocs/accountancy/bookkeeping/listbyaccount.php @@ -16,7 +16,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php b/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php index 81754d121b9..b7a19101758 100644 --- a/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php +++ b/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php @@ -17,7 +17,7 @@ * 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 . + * along with this program. If not, see . * */ diff --git a/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php b/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php index 87bd79bb64d..eaa741e1722 100644 --- a/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php +++ b/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php @@ -17,7 +17,7 @@ * 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 . + * along with this program. If not, see . */ /** From 4d3107c57b35b0efef6123ae6721e53ff2b947f3 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sun, 23 Jun 2019 15:43:32 +0200 Subject: [PATCH 045/127] all http addresses should be https now --- htdocs/accountancy/class/accountancycategory.class.php | 2 +- htdocs/accountancy/class/accountancyexport.class.php | 2 +- htdocs/accountancy/class/accountancysystem.class.php | 2 +- htdocs/accountancy/class/accountingaccount.class.php | 2 +- htdocs/accountancy/class/accountingjournal.class.php | 2 +- htdocs/accountancy/class/bookkeeping.class.php | 2 +- htdocs/accountancy/class/lettering.class.php | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/accountancy/class/accountancycategory.class.php b/htdocs/accountancy/class/accountancycategory.class.php index f11ff3957f7..d68c9fa54a7 100644 --- a/htdocs/accountancy/class/accountancycategory.class.php +++ b/htdocs/accountancy/class/accountancycategory.class.php @@ -14,7 +14,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php index 3169d3737d9..06bb3e5c930 100644 --- a/htdocs/accountancy/class/accountancyexport.class.php +++ b/htdocs/accountancy/class/accountancyexport.class.php @@ -22,7 +22,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/class/accountancysystem.class.php b/htdocs/accountancy/class/accountancysystem.class.php index 580ecda0b50..67f4f3b31a4 100644 --- a/htdocs/accountancy/class/accountancysystem.class.php +++ b/htdocs/accountancy/class/accountancysystem.class.php @@ -14,7 +14,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index bc25e33484d..f9c2e3391ba 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -17,7 +17,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/class/accountingjournal.class.php b/htdocs/accountancy/class/accountingjournal.class.php index e8caaab8a89..8d6f037dc96 100644 --- a/htdocs/accountancy/class/accountingjournal.class.php +++ b/htdocs/accountancy/class/accountingjournal.class.php @@ -12,7 +12,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 27aee939594..d207fbccc74 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -15,7 +15,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/class/lettering.class.php b/htdocs/accountancy/class/lettering.class.php index 2a89c6c1c96..e20b49dbd25 100644 --- a/htdocs/accountancy/class/lettering.class.php +++ b/htdocs/accountancy/class/lettering.class.php @@ -15,7 +15,7 @@ * 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 . + * along with this program. If not, see . */ /** From 43fc0466e5a2d96e996f98835317dac03ab5397e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 23 Jun 2019 20:05:15 +0200 Subject: [PATCH 046/127] Fix position of modules --- htdocs/core/modules/modApi.class.php | 1 + htdocs/core/modules/modWebServices.class.php | 1 + htdocs/core/modules/modWebServicesClient.class.php | 1 + htdocs/webservices/README.md | 4 +++- 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/htdocs/core/modules/modApi.class.php b/htdocs/core/modules/modApi.class.php index b860bf5b9bc..11de955fdbe 100644 --- a/htdocs/core/modules/modApi.class.php +++ b/htdocs/core/modules/modApi.class.php @@ -53,6 +53,7 @@ class modApi extends DolibarrModules // Family can be 'crm','financial','hr','projects','products','ecm','technic','other' // It is used to group modules in module setup page $this->family = "interface"; + $this->module_position = '24'; // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) $this->name = preg_replace('/^mod/i', '', get_class($this)); // Module description, used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module) diff --git a/htdocs/core/modules/modWebServices.class.php b/htdocs/core/modules/modWebServices.class.php index 2aa98e80679..f031d3cc5ec 100644 --- a/htdocs/core/modules/modWebServices.class.php +++ b/htdocs/core/modules/modWebServices.class.php @@ -41,6 +41,7 @@ class modWebServices extends DolibarrModules $this->numero = 2600; $this->family = "interface"; + $this->module_position = '25'; // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) $this->name = preg_replace('/^mod/i', '', get_class($this)); $this->description = "Enable the Dolibarr web services server"; diff --git a/htdocs/core/modules/modWebServicesClient.class.php b/htdocs/core/modules/modWebServicesClient.class.php index 33c7bae997a..8f2ba109bd7 100644 --- a/htdocs/core/modules/modWebServicesClient.class.php +++ b/htdocs/core/modules/modWebServicesClient.class.php @@ -41,6 +41,7 @@ class modWebServicesClient extends DolibarrModules $this->numero = 2660; $this->family = "interface"; + $this->module_position = '26'; // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) $this->name = preg_replace('/^mod/i', '', get_class($this)); $this->description = "Enable the web service client to call external supplier web services"; diff --git a/htdocs/webservices/README.md b/htdocs/webservices/README.md index 915fa2b0b84..bb26c480c1e 100644 --- a/htdocs/webservices/README.md +++ b/htdocs/webservices/README.md @@ -3,11 +3,13 @@ API SOAP howto This directory contains files to make Dolibarr a server of SOAP Web Services. +WARNING: It is highly recommended to use the REST APIs instead of SOAP APIs: You will find more API, faster and easier to use in the the module REST API than into this module. + Explore the api --------------- -* To see all Webservices provided by Dolibarr, just call following Url: +* To see all Webservices provided by Dolibarr, just call the following Url: http://mydomain.com/mydolibarr/webservices/admin/index.php From 40b09f1cf7b633477cc5a9fc8215868e59ffd3e4 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Mon, 24 Jun 2019 09:35:41 +0200 Subject: [PATCH 047/127] all http addresses should be https now --- htdocs/accountancy/customer/card.php | 2 +- htdocs/accountancy/customer/index.php | 2 +- htdocs/accountancy/customer/lines.php | 2 +- htdocs/accountancy/customer/list.php | 2 +- htdocs/accountancy/expensereport/card.php | 2 +- htdocs/accountancy/expensereport/index.php | 2 +- htdocs/accountancy/expensereport/lines.php | 2 +- htdocs/accountancy/expensereport/list.php | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/accountancy/customer/card.php b/htdocs/accountancy/customer/card.php index eb66b235d0b..52057485a30 100644 --- a/htdocs/accountancy/customer/card.php +++ b/htdocs/accountancy/customer/card.php @@ -14,7 +14,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/customer/index.php b/htdocs/accountancy/customer/index.php index f063f832f54..68649aa264d 100644 --- a/htdocs/accountancy/customer/index.php +++ b/htdocs/accountancy/customer/index.php @@ -16,7 +16,7 @@ * 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 . + * along with this program. If not, see . * */ diff --git a/htdocs/accountancy/customer/lines.php b/htdocs/accountancy/customer/lines.php index ea174638a2a..dafbfc2b773 100644 --- a/htdocs/accountancy/customer/lines.php +++ b/htdocs/accountancy/customer/lines.php @@ -16,7 +16,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php index 192585ccedd..d843f8f992c 100644 --- a/htdocs/accountancy/customer/list.php +++ b/htdocs/accountancy/customer/list.php @@ -17,7 +17,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/expensereport/card.php b/htdocs/accountancy/expensereport/card.php index 1052a1d485d..2331111f620 100644 --- a/htdocs/accountancy/expensereport/card.php +++ b/htdocs/accountancy/expensereport/card.php @@ -18,7 +18,7 @@ * 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 . + * along with this program. If not, see . * */ /** diff --git a/htdocs/accountancy/expensereport/index.php b/htdocs/accountancy/expensereport/index.php index 4fe2ee3120b..d3fc63d3bf8 100644 --- a/htdocs/accountancy/expensereport/index.php +++ b/htdocs/accountancy/expensereport/index.php @@ -15,7 +15,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/expensereport/lines.php b/htdocs/accountancy/expensereport/lines.php index d15ef52ad39..284809f596d 100644 --- a/htdocs/accountancy/expensereport/lines.php +++ b/htdocs/accountancy/expensereport/lines.php @@ -16,7 +16,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/expensereport/list.php b/htdocs/accountancy/expensereport/list.php index 60b24638775..70d033a28ea 100644 --- a/htdocs/accountancy/expensereport/list.php +++ b/htdocs/accountancy/expensereport/list.php @@ -17,7 +17,7 @@ * 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 . + * along with this program. If not, see . */ /** From b731edef16bb6af4f4dca7283500462bfbd261f9 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Mon, 24 Jun 2019 09:37:05 +0200 Subject: [PATCH 048/127] all http addresses should be https now --- htdocs/accountancy/journal/bankjournal.php | 6 +++--- htdocs/accountancy/journal/expensereportsjournal.php | 2 +- htdocs/accountancy/journal/purchasesjournal.php | 2 +- htdocs/accountancy/journal/sellsjournal.php | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index cfe49764c74..4486ac11ef2 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -8,8 +8,8 @@ * Copyright (C) 2013-2014 Florian Henry * Copyright (C) 2013-2014 Olivier Geffroy * Copyright (C) 2017-2018 Frédéric France - * Copyright (C) 2018 Ferran Marcet - * Copyright (C) 2018 Eric Seigne + * Copyright (C) 2018 Ferran Marcet + * Copyright (C) 2018 Eric Seigne * * 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 @@ -22,7 +22,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/journal/expensereportsjournal.php b/htdocs/accountancy/journal/expensereportsjournal.php index c06506c0895..ba4960e29a6 100644 --- a/htdocs/accountancy/journal/expensereportsjournal.php +++ b/htdocs/accountancy/journal/expensereportsjournal.php @@ -20,7 +20,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index 8ff70219c68..336333fe54d 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -20,7 +20,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index b69f485a558..ac824aa25c9 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -21,7 +21,7 @@ * 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 . + * along with this program. If not, see . */ /** From 2e86344d9a1ed17ce92102eb8aac3e9bf5d453a0 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Mon, 24 Jun 2019 09:38:26 +0200 Subject: [PATCH 049/127] all http addresses should be https now --- htdocs/accountancy/index.php | 2 +- htdocs/accountancy/supplier/card.php | 2 +- htdocs/accountancy/supplier/index.php | 2 +- htdocs/accountancy/supplier/lines.php | 2 +- htdocs/accountancy/supplier/list.php | 2 +- htdocs/accountancy/tpl/export_journal.tpl.php | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/accountancy/index.php b/htdocs/accountancy/index.php index 922f1285b3c..ac86cd3f30a 100644 --- a/htdocs/accountancy/index.php +++ b/htdocs/accountancy/index.php @@ -13,7 +13,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/supplier/card.php b/htdocs/accountancy/supplier/card.php index 97f7d618ce8..7e9d7fbbd7c 100644 --- a/htdocs/accountancy/supplier/card.php +++ b/htdocs/accountancy/supplier/card.php @@ -18,7 +18,7 @@ * 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 . + * along with this program. If not, see . * */ /** diff --git a/htdocs/accountancy/supplier/index.php b/htdocs/accountancy/supplier/index.php index bc632118da7..88a599d1fc5 100644 --- a/htdocs/accountancy/supplier/index.php +++ b/htdocs/accountancy/supplier/index.php @@ -15,7 +15,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/supplier/lines.php b/htdocs/accountancy/supplier/lines.php index a67386f6fbd..48259939270 100644 --- a/htdocs/accountancy/supplier/lines.php +++ b/htdocs/accountancy/supplier/lines.php @@ -16,7 +16,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index b3a426bbf5e..621d0121faf 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -17,7 +17,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/tpl/export_journal.tpl.php b/htdocs/accountancy/tpl/export_journal.tpl.php index 97f0da548ca..5c9f7ad48ed 100644 --- a/htdocs/accountancy/tpl/export_journal.tpl.php +++ b/htdocs/accountancy/tpl/export_journal.tpl.php @@ -13,7 +13,7 @@ * 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 . + * along with this program. If not, see . */ // Protection to avoid direct call of template From 72c8316eb0879673260634930a102f22fd30336e Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Mon, 24 Jun 2019 09:39:58 +0200 Subject: [PATCH 050/127] all http addresses should be https now --- htdocs/adherents/admin/adherent.php | 2 +- htdocs/adherents/admin/adherent_emails.php | 2 +- htdocs/adherents/admin/adherent_extrafields.php | 2 +- htdocs/adherents/admin/adherent_type_extrafields.php | 2 +- htdocs/adherents/admin/website.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/adherents/admin/adherent.php b/htdocs/adherents/admin/adherent.php index af2a8841643..47f7d9c3357 100644 --- a/htdocs/adherents/admin/adherent.php +++ b/htdocs/adherents/admin/adherent.php @@ -20,7 +20,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/adherents/admin/adherent_emails.php b/htdocs/adherents/admin/adherent_emails.php index 3f901539380..0a8ea298bce 100644 --- a/htdocs/adherents/admin/adherent_emails.php +++ b/htdocs/adherents/admin/adherent_emails.php @@ -20,7 +20,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/adherents/admin/adherent_extrafields.php b/htdocs/adherents/admin/adherent_extrafields.php index e8e112d42b6..6f2b899dc5c 100644 --- a/htdocs/adherents/admin/adherent_extrafields.php +++ b/htdocs/adherents/admin/adherent_extrafields.php @@ -15,7 +15,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/adherents/admin/adherent_type_extrafields.php b/htdocs/adherents/admin/adherent_type_extrafields.php index e9e7c601a30..35d7f327e9d 100644 --- a/htdocs/adherents/admin/adherent_type_extrafields.php +++ b/htdocs/adherents/admin/adherent_type_extrafields.php @@ -17,7 +17,7 @@ * 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 . + * along with this program. If not, see . * or see http://www.gnu.org/ */ diff --git a/htdocs/adherents/admin/website.php b/htdocs/adherents/admin/website.php index 70a37f0bf4b..1f87289ba3c 100644 --- a/htdocs/adherents/admin/website.php +++ b/htdocs/adherents/admin/website.php @@ -15,7 +15,7 @@ * 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 . + * along with this program. If not, see . */ /** From 1699413a4c08446b0d5f32fc1a2f02b5780ede47 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Jun 2019 12:59:16 +0200 Subject: [PATCH 051/127] Add log --- htdocs/core/lib/pdf.lib.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 56ca215e118..0f4fa383fbc 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -41,7 +41,9 @@ */ function pdf_getFormat(Translate $outputlangs = null) { - global $conf,$db; + global $conf, $db, $langs; + + dol_syslog("pdf_getFormat Get paper format with outputlangs->defaultlang=".(is_object($outputlangs) ? $outputlangs->defaultlang : 'null')." and langs->defaultlang=".(is_object($langs) ? $langs->defaultlang : 'null')); // Default value if setup was not done and/or entry into c_paper_format not defined $width=210; $height=297; $unit='mm'; From 1c86294f83a747f418e286e63953e33be1e5708f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Jun 2019 13:39:32 +0200 Subject: [PATCH 052/127] Enhance pdf_getFormat --- htdocs/core/lib/pdf.lib.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 0f4fa383fbc..4790ed204b8 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -36,27 +36,31 @@ /** * Return array with format properties of default PDF format * - * @param Translate $outputlangs Output lang to use to autodetect output format if setup not done + * @param Translate $outputlangs Output lang to use to autodetect output format if we need 'auto' detection + * @param string $mode 'setup' = Use setup, 'auto' = Force autodetection whatever is setup * @return array Array('width'=>w,'height'=>h,'unit'=>u); */ -function pdf_getFormat(Translate $outputlangs = null) +function pdf_getFormat(Translate $outputlangs = null, $mode = 'setup') { global $conf, $db, $langs; - dol_syslog("pdf_getFormat Get paper format with outputlangs->defaultlang=".(is_object($outputlangs) ? $outputlangs->defaultlang : 'null')." and langs->defaultlang=".(is_object($langs) ? $langs->defaultlang : 'null')); + dol_syslog("pdf_getFormat Get paper format with mode='.$mode.' MAIN_PDF_FORMAT=".(empty($conf->global->MAIN_PDF_FORMAT)?'null':$conf->global->MAIN_PDF_FORMAT)." outputlangs->defaultlang=".(is_object($outputlangs) ? $outputlangs->defaultlang : 'null')." and langs->defaultlang=".(is_object($langs) ? $langs->defaultlang : 'null')); // Default value if setup was not done and/or entry into c_paper_format not defined $width=210; $height=297; $unit='mm'; - if (empty($conf->global->MAIN_PDF_FORMAT)) + if ($mode == 'auto' || empty($conf->global->MAIN_PDF_FORMAT) || $conf->global->MAIN_PDF_FORMAT == 'auto') { include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; $pdfformat=dol_getDefaultFormat($outputlangs); } - else $pdfformat=$conf->global->MAIN_PDF_FORMAT; + else + { + $pdfformat=$conf->global->MAIN_PDF_FORMAT; + } $sql="SELECT code, label, width, height, unit FROM ".MAIN_DB_PREFIX."c_paper_format"; - $sql.=" WHERE code = '".$pdfformat."'"; + $sql.=" WHERE code = '".$db->escape($pdfformat)."'"; $resql=$db->query($sql); if ($resql) { From 76d49229cdaaf65a2298711c22e4e68ec5762c4d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Jun 2019 13:42:46 +0200 Subject: [PATCH 053/127] Fix log --- htdocs/core/lib/pdf.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 4790ed204b8..db3b8763941 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -44,7 +44,7 @@ function pdf_getFormat(Translate $outputlangs = null, $mode = 'setup') { global $conf, $db, $langs; - dol_syslog("pdf_getFormat Get paper format with mode='.$mode.' MAIN_PDF_FORMAT=".(empty($conf->global->MAIN_PDF_FORMAT)?'null':$conf->global->MAIN_PDF_FORMAT)." outputlangs->defaultlang=".(is_object($outputlangs) ? $outputlangs->defaultlang : 'null')." and langs->defaultlang=".(is_object($langs) ? $langs->defaultlang : 'null')); + dol_syslog("pdf_getFormat Get paper format with mode=".$mode." MAIN_PDF_FORMAT=".(empty($conf->global->MAIN_PDF_FORMAT)?'null':$conf->global->MAIN_PDF_FORMAT)." outputlangs->defaultlang=".(is_object($outputlangs) ? $outputlangs->defaultlang : 'null')." and langs->defaultlang=".(is_object($langs) ? $langs->defaultlang : 'null')); // Default value if setup was not done and/or entry into c_paper_format not defined $width=210; $height=297; $unit='mm'; From 7154ecb80bb799d206b2d96b501b443ced349f14 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Jun 2019 13:56:10 +0200 Subject: [PATCH 054/127] Fix reload of conf in cron script --- scripts/cron/cron_run_jobs.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/cron/cron_run_jobs.php b/scripts/cron/cron_run_jobs.php index 0f20675cbfc..1bf31ebfd4b 100755 --- a/scripts/cron/cron_run_jobs.php +++ b/scripts/cron/cron_run_jobs.php @@ -174,9 +174,9 @@ if (is_array($qualifiedjobs) && (count($qualifiedjobs) > 0)) { echo "cron_run_jobs.php cronjobid: ".$line->id." priority=".$line->priority." entity=".$line->entity." label=".$line->label; // Force reload of setup for the current entity - if ($line->entity != $conf->entity) + if ((empty($line->entity)?1:$line->entity) != $conf->entity) { - dol_syslog("cron_run_jobs.php we work on another entity so we reload user and conf", LOG_DEBUG); + dol_syslog("cron_run_jobs.php we work on another entity conf than ".$conf->entity." so we reload user and conf", LOG_DEBUG); echo " -> we change entity so we reload user and conf"; $conf->entity = (empty($line->entity)?1:$line->entity); From 1daac232b03cb5898399806c9f264bdc30d49c48 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Jun 2019 14:31:58 +0200 Subject: [PATCH 055/127] Code comment --- htdocs/compta/facture/class/facture.class.php | 2 +- htdocs/core/class/commonobject.class.php | 6 ++++-- htdocs/societe/class/societe.class.php | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index e5041217cb3..574d5d55dd1 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -4141,7 +4141,7 @@ class Facture extends CommonInvoice /** * Create a document onto disk according to template module. * - * @param string $modele Generator to use. Caller must set it to obj->modelpdf or GETPOST('modelpdf') for example. + * @param string $modele Generator to use. Caller must set it to obj->modelpdf or GETPOST('modelpdf','alpha') for example. * @param Translate $outputlangs objet lang a utiliser pour traduction * @param int $hidedetails Hide details of lines * @param int $hidedesc Hide description diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 9c5812069b7..e1455e759c5 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -4450,7 +4450,7 @@ abstract class CommonObject * Common function for all objects extending CommonObject for generating documents * * @param string $modelspath Relative folder where generators are placed - * @param string $modele Generator to use. Caller must set it to obj->modelpdf or GETPOST('modelpdf') for example. + * @param string $modele Generator to use. Caller must set it to obj->modelpdf or GETPOST('modelpdf','alpha') for example. * @param Translate $outputlangs Output language to use * @param int $hidedetails 1 to hide details. 0 by default * @param int $hidedesc 1 to hide product description. 0 by default @@ -4465,6 +4465,8 @@ abstract class CommonObject $srctemplatepath=''; + dol_syslog("commonGenerateDocument modele=".$modele." outputlangs->defaultlang=".(is_object($outputlangs)?$outputlangs->defaultlang:'null')); + // Increase limit for PDF build $err=error_reporting(); error_reporting(0); @@ -4505,7 +4507,7 @@ abstract class CommonObject // If generator was found if ($filefound) { - global $db; // Required to solve a conception default in commonstickergenerator.class.php making an include of code using $db + global $db; // Required to solve a conception default making an include of code using $db instead of $this->db just after. require_once $file; diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 5d410b7c72d..f27f2e315bf 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -4017,7 +4017,7 @@ class Societe extends CommonObject /** * Create a document onto disk according to template module. * - * @param string $modele Generator to use. Caller must set it to obj->modelpdf or GETPOST('modelpdf') for example. + * @param string $modele Generator to use. Caller must set it to obj->modelpdf or GETPOST('modelpdf','alpha') for example. * @param Translate $outputlangs objet lang a utiliser pour traduction * @param int $hidedetails Hide details of lines * @param int $hidedesc Hide description From a340bb616d5ea74ea4db8537625fa1bd1354feeb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Jun 2019 15:28:13 +0200 Subject: [PATCH 056/127] Update myobject_document.php --- htdocs/modulebuilder/template/myobject_document.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/modulebuilder/template/myobject_document.php b/htdocs/modulebuilder/template/myobject_document.php index 12da4769cf7..2f2e8c45a1a 100644 --- a/htdocs/modulebuilder/template/myobject_document.php +++ b/htdocs/modulebuilder/template/myobject_document.php @@ -81,8 +81,8 @@ $extralabels = $extrafields->fetch_name_optionals_label('myobject'); // Load object include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals -//if ($id > 0 || ! empty($ref)) $upload_dir = $conf->sellyoursaas->multidir_output[$object->entity] . "/myobject/" . dol_sanitizeFileName($object->id); -if ($id > 0 || ! empty($ref)) $upload_dir = $conf->mymodule->multidir_output[$conf->entity] . "/myobject/" . dol_sanitizeFileName($object->ref); +//if ($id > 0 || ! empty($ref)) $upload_dir = $conf->mymodule->multidir_output[$object->entity?$object->entity:$conf->entity] . "/myobject/" . dol_sanitizeFileName($object->id); +if ($id > 0 || ! empty($ref)) $upload_dir = $conf->mymodule->multidir_output[$object->entity?$object->entity:$conf->entity] . "/myobject/" . dol_sanitizeFileName($object->ref); /* From b98874848f0806032a0f54a3eb97ee13d906afab Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Jun 2019 16:12:54 +0200 Subject: [PATCH 057/127] Fix backport 9.0 --- htdocs/core/tpl/massactions_pre.tpl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/tpl/massactions_pre.tpl.php b/htdocs/core/tpl/massactions_pre.tpl.php index 88ec202e914..a5d7883f3e5 100644 --- a/htdocs/core/tpl/massactions_pre.tpl.php +++ b/htdocs/core/tpl/massactions_pre.tpl.php @@ -112,7 +112,7 @@ if ($massaction == 'presend') $formmail->withtoreadonly = 1; } - $formmail->withoptiononeemailperrecipient = (count($listofselectedref) == 1 || empty($liste))? 0 : ((GETPOST('oneemailperrecipient')=='on')?1:-1); + $formmail->withoptiononeemailperrecipient = ((count($listofselectedref) == 1 && count(reset($listofselectedref)) == 1) || empty($liste)) ? 0 : ((GETPOST('oneemailperrecipient')=='on')?1:-1); $formmail->withto = empty($liste)?(GETPOST('sendto','alpha')?GETPOST('sendto','alpha'):array()):$liste; $formmail->withtofree = empty($liste)?1:0; From 293b3987e8d3b02edf5c013613eca6e39fd29c92 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Jun 2019 16:28:54 +0200 Subject: [PATCH 058/127] CSS --- htdocs/theme/eldy/global.inc.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index cd448ff854e..f44d8da8a69 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -2417,6 +2417,10 @@ tr.nocellnopadd td.nobordernopadding, tr.nocellnopadd td.nocellnopadd margin: 0px 0px 0px 0px; } +table.tableforemailform tr td { + padding-top: 3px; + padding-bottom: 3px; +} table.border, table.bordernooddeven, table.dataTable, .table-border, .table-border-col, .table-key-border-col, .table-val-border-col, div.border { border-collapse: collapse !important; From bf731e3de6dfb638a17a7d3ecba988d7d811208a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Jun 2019 16:30:55 +0200 Subject: [PATCH 059/127] Fix trans --- htdocs/langs/en_US/mails.lang | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/langs/en_US/mails.lang b/htdocs/langs/en_US/mails.lang index ba334d69a22..8b92cef3103 100644 --- a/htdocs/langs/en_US/mails.lang +++ b/htdocs/langs/en_US/mails.lang @@ -78,9 +78,9 @@ GroupEmails=Group emails OneEmailPerRecipient=One email per recipient (by default, one email per record selected) WarningIfYouCheckOneRecipientPerEmail=Warning, if you check this box, it means only one email will be sent for several different record selected, so, if your message contains substitution variables that refers to data of a record, it becomes not possible to replace them. ResultOfMailSending=Result of mass Email sending -NbSelected=No. selected -NbIgnored=No. ignored -NbSent=No. sent +NbSelected=Number selected +NbIgnored=Number ignored +NbSent=Number sent SentXXXmessages=%s message(s) sent. ConfirmUnvalidateEmailing=Are you sure you want to change email %s to draft status? MailingModuleDescContactsWithThirdpartyFilter=Contact with customer filters From 70f19b3a3d5e1408f95a4d2e9bcb264541fd3f2c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Jun 2019 16:31:56 +0200 Subject: [PATCH 060/127] Fix counter of record --- htdocs/core/actions_massactions.inc.php | 32 ++++++++++++------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index fbc96ab4c77..03cf1eae755 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -80,7 +80,7 @@ if (! $error && $massaction == 'confirm_presend') $objecttmp=new $objectclass($db); if ($objecttmp->element == 'expensereport') $thirdparty=new User($db); if ($objecttmp->element == 'holiday') $thirdparty=new User($db); - + foreach($toselect as $toselectid) { $objecttmp=new $objectclass($db); // we must create new instance because instance is saved into $listofobjectref array for future use @@ -88,13 +88,13 @@ if (! $error && $massaction == 'confirm_presend') if ($result > 0) { $listofobjectid[$toselectid]=$toselectid; - + $thirdpartyid=($objecttmp->fk_soc?$objecttmp->fk_soc:$objecttmp->socid); if ($objecttmp->element == 'societe') $thirdpartyid=$objecttmp->id; if ($objecttmp->element == 'expensereport') $thirdpartyid=$objecttmp->fk_user_author; if ($objecttmp->element == 'holiday') $thirdpartyid=$objecttmp->fk_user; if (empty($thirdpartyid)) $thirdpartyid=0; - + $listofobjectthirdparties[$thirdpartyid]=$thirdpartyid; $listofobjectref[$thirdpartyid][$toselectid]=$objecttmp; } @@ -358,7 +358,7 @@ if (! $error && $massaction == 'confirm_presend') if ($objectclass == 'CommandeFournisseur') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_ORDER_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_ORDER_TO)); if ($objectclass == 'FactureFournisseur') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO)); if ($objectclass == 'Project') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_PROJECT_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_PROJECT_TO)); - + // $listofqualifiedobj is array with key = object id and value is instance of qualified objects, for the current thirdparty (but thirdparty property is not loaded yet) // $looparray will be an array with number of email to send for the current thirdparty (so 1 or n if n object for same thirdparty) $looparray=array(); @@ -445,13 +445,13 @@ if (! $error && $massaction == 'confirm_presend') if (get_class($objecttmp)=='Supplier_Proposal') $trackid='spr'; if (get_class($objecttmp)=='CommandeFournisseur') $trackid='sor'; if (get_class($objecttmp)=='FactureFournisseur') $trackid='sin'; - + $trackid.=$objecttmp->id; } //var_dump($filepath); //var_dump($trackid);exit; //var_dump($subjectreplaced); - + // Send mail (substitutionarray must be done just before this) require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; $mailfile = new CMailFile($subjectreplaced, $sendto, $from, $messagereplaced, $filepath, $mimetype, $filename, $sendtocc, $sendtobcc, $deliveryreceipt, -1, '', '', $trackid); @@ -508,7 +508,7 @@ if (! $error && $massaction == 'confirm_presend') if ($triggername == 'COMMANDEFOURNISSEUR_SENTBYMAIL') $triggername = 'ORDER_SUPPLIER_SENTBYMAIL'; if ($triggername == 'FACTUREFOURNISSEUR_SENTBYMAIL') $triggername = 'BILL_SUPPLIER_SENTBYMAIL'; if ($triggername == 'SUPPLIERPROPOSAL_SENTBYMAIL') $triggername = 'PROPOSAL_SUPPLIER_SENTBYMAIL'; - + if (! empty($triggername)) { // Appel des triggers @@ -524,9 +524,9 @@ if (! $error && $massaction == 'confirm_presend') dol_syslog("Error in trigger ".$triggername.' '.$db->lasterror(), LOG_ERR); } } - } - $nbsent++; // Nb of email sent (may be lower than number of record selected if we group thirdparties) + $nbsent++; // Nb of object sent + } } else { @@ -601,7 +601,7 @@ if ($massaction == 'confirm_createbills') $objecttmp->fk_project = $cmd->fk_project; $objecttmp->multicurrency_code = $cmd->multicurrency_code; if (empty($createbills_onebythird)) $objecttmp->ref_client = $cmd->ref_client; - + $datefacture = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); if (empty($datefacture)) { @@ -1245,7 +1245,7 @@ if (! $error && ($massaction == 'delete' || ($action == 'delete' && $confirm == if (! $error && $massaction == 'generate_doc' && $permtoread) { $db->begin(); - + $objecttmp=new $objectclass($db); $nbok = 0; foreach($toselect as $toselectid) @@ -1255,7 +1255,7 @@ if (! $error && $massaction == 'generate_doc' && $permtoread) { $outputlangs = $langs; $newlang=''; - + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id','aZ09')) $newlang=GETPOST('lang_id','aZ09'); if ($conf->global->MAIN_MULTILANGS && empty($newlang) && isset($objecttmp->thirdparty->default_lang)) $newlang=$objecttmp->thirdparty->default_lang; // for proposal, order, invoice, ... if ($conf->global->MAIN_MULTILANGS && empty($newlang) && isset($objecttmp->default_lang)) $newlang=$objecttmp->default_lang; // for thirdparty @@ -1264,15 +1264,15 @@ if (! $error && $massaction == 'generate_doc' && $permtoread) $outputlangs = new Translate("",$conf); $outputlangs->setDefaultLang($newlang); } - + // To be sure vars is defined if (empty($hidedetails)) $hidedetails=0; if (empty($hidedesc)) $hidedesc=0; if (empty($hideref)) $hideref=0; if (empty($moreparams)) $moreparams=null; - + $result= $objecttmp->generateDocument($objecttmp->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams); - + if ($result <= 0) { setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); @@ -1288,7 +1288,7 @@ if (! $error && $massaction == 'generate_doc' && $permtoread) break; } } - + if (! $error) { if ($nbok > 1) setEventMessages($langs->trans("RecordsGenerated", $nbok), null, 'mesgs'); From ae1ad809942736c90b71ca426d5c02bd967271c5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Jun 2019 16:32:42 +0200 Subject: [PATCH 061/127] Fix count --- htdocs/core/actions_massactions.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 416bdeaace0..2f5f03ee5a8 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -493,9 +493,9 @@ if (! $error && $massaction == 'confirm_presend') dol_syslog("Error in trigger ".$triggername.' '.$db->lasterror(), LOG_ERR); } } - } - $nbsent++; // Nb of email sent (may be lower than number of record selected if we group thirdparties) + $nbsent++; // Nb of record sent + } } else { From 35c3eb0d7e319a256df6cd7484c9927c2e2efdae Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Jun 2019 17:59:00 +0200 Subject: [PATCH 062/127] Fix conflict in a translation key --- htdocs/adherents/card.php | 8 ++++---- htdocs/adherents/document.php | 2 +- htdocs/adherents/note.php | 2 +- htdocs/adherents/subscription.php | 2 +- htdocs/adherents/type.php | 20 ++++++++++---------- htdocs/langs/en_US/members.lang | 2 +- htdocs/langs/en_US/products.lang | 2 +- 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index 3aed4bc11d5..e4a1fc01355 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -502,7 +502,7 @@ if (empty($reshook)) // Check parameters if (empty($morphy) || $morphy == "-1") { $error++; - setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Nature")), null, 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("MemberNature")), null, 'errors'); } // Tests if the login already exists if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) @@ -941,7 +941,7 @@ else // Morphy $morphys["phy"] = $langs->trans("Physical"); $morphys["mor"] = $langs->trans("Moral"); - print ''.$langs->trans("Nature")."\n"; + print ''.$langs->trans("MemberNature")."\n"; print $form->selectarray("morphy", $morphys, GETPOST('morphy', 'alpha')?GETPOST('morphy', 'alpha'):$object->morphy, 1); print "\n"; @@ -1182,7 +1182,7 @@ else // Morphy $morphys["phy"] = $langs->trans("Physical"); $morphys["mor"] = $langs->trans("Morale"); - print ''.$langs->trans("Nature").''; + print ''.$langs->trans("MemberNature").''; print $form->selectarray("morphy", $morphys, (GETPOSTISSET("morphy")?GETPOST("morphy", 'alpha'):$object->morphy)); print ""; @@ -1613,7 +1613,7 @@ else print ''.$langs->trans("Type").''.$adht->getNomUrl(1)."\n"; // Morphy - print ''.$langs->trans("Nature").''.$object->getmorphylib().''; + print ''.$langs->trans("MemberNature").''.$object->getmorphylib().''; print ''; // Gender diff --git a/htdocs/adherents/document.php b/htdocs/adherents/document.php index 2de98e1b96a..72a1bd0d569 100644 --- a/htdocs/adherents/document.php +++ b/htdocs/adherents/document.php @@ -127,7 +127,7 @@ if ($id > 0) print ''.$langs->trans("Type").''.$membert->getNomUrl(1)."\n"; // Morphy - print ''.$langs->trans("Nature").''.$object->getmorphylib().''; + print ''.$langs->trans("MemberNature").''.$object->getmorphylib().''; /*print ''; print $form->showphoto('memberphoto',$object); print '';*/ diff --git a/htdocs/adherents/note.php b/htdocs/adherents/note.php index b3e18f543be..ce2918cb86a 100644 --- a/htdocs/adherents/note.php +++ b/htdocs/adherents/note.php @@ -92,7 +92,7 @@ if ($id) print ''.$langs->trans("Type").''.$adht->getNomUrl(1)."\n"; // Morphy - print ''.$langs->trans("Nature").''.$object->getmorphylib().''; + print ''.$langs->trans("MemberNature").''.$object->getmorphylib().''; /*print ''; print $form->showphoto('memberphoto',$member); print '';*/ diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index b28a8b31f2c..eeeb821c223 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -490,7 +490,7 @@ if ($rowid > 0) print ''.$langs->trans("Type").''.$adht->getNomUrl(1)."\n"; // Morphy - print ''.$langs->trans("Nature").''.$object->getmorphylib().''; + print ''.$langs->trans("MemberNature").''.$object->getmorphylib().''; print ''; // Company diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index 650a466140c..19790159c22 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -258,7 +258,7 @@ if (! $rowid && $action != 'create' && $action != 'edit') print ''; print ''.$langs->trans("Ref").''; print ''.$langs->trans("Label").''; - print ''.$langs->trans("Nature").''; + print ''.$langs->trans("MemberNature").''; print ''.$langs->trans("SubscriptionRequired").''; print ''.$langs->trans("VoteAllowed").''; print ''.$langs->trans("Status").''; @@ -338,12 +338,12 @@ if ($action == 'create') print ''.$langs->trans("Status").''; print $form->selectarray('statut', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')), 1); print ''; - + // Morphy - $morphys[""] = $langs->trans("Physical & Morale"); + $morphys[""] = $langs->trans("MorPhy"); $morphys["phy"] = $langs->trans("Physical"); $morphys["mor"] = $langs->trans("Morale"); - print ''.$langs->trans("Nature").''; + print ''.$langs->trans("MemberNature").''; print $form->selectarray("morphy", $morphys, isset($_POST["morphy"])?$_POST["morphy"]:$object->morphy); print ""; @@ -427,9 +427,9 @@ if ($rowid > 0) print img_picto($langs->trans('TypeStatusInactive'), 'statut5').' '.$langs->trans("ActivityCeased"); } print ''; - + // Morphy - print ''.$langs->trans("Nature").''.$object->getmorphylib($object->morphy).''; + print ''.$langs->trans("MemberNature").''.$object->getmorphylib($object->morphy).''; print ''; print ''.$langs->trans("SubscriptionRequired").''; @@ -630,7 +630,7 @@ if ($rowid > 0) print ''; print_liste_field_titre("NameSlashCompany", $_SERVER["PHP_SELF"], "d.lastname", $param, "", "", $sortfield, $sortorder); print_liste_field_titre("Login", $_SERVER["PHP_SELF"], "d.login", $param, "", "", $sortfield, $sortorder); - print_liste_field_titre("Nature", $_SERVER["PHP_SELF"], "d.morphy", $param, "", "", $sortfield, $sortorder); + print_liste_field_titre("MemberNature", $_SERVER["PHP_SELF"], "d.morphy", $param, "", "", $sortfield, $sortorder); print_liste_field_titre("EMail", $_SERVER["PHP_SELF"], "d.email", $param, "", "", $sortfield, $sortorder); print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "d.statut,d.datefin", $param, "", "", $sortfield, $sortorder); print_liste_field_titre("EndSubscription", $_SERVER["PHP_SELF"], "d.datefin", $param, "", 'align="center"', $sortfield, $sortorder); @@ -771,12 +771,12 @@ if ($rowid > 0) print ''.$langs->trans("Status").''; print $form->selectarray('statut', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')), $object->statut); print ''; - + // Morphy - $morphys[""] = $langs->trans("Physical & Morale"); + $morphys[""] = $langs->trans("MorPhy"); $morphys["phy"] = $langs->trans("Physical"); $morphys["mor"] = $langs->trans("Morale"); - print ''.$langs->trans("Nature").''; + print ''.$langs->trans("MemberNature").''; print $form->selectarray("morphy", $morphys, isset($_POST["morphy"])?$_POST["morphy"]:$object->morphy); print ""; diff --git a/htdocs/langs/en_US/members.lang b/htdocs/langs/en_US/members.lang index 8b33117cc66..acae5aa73fb 100644 --- a/htdocs/langs/en_US/members.lang +++ b/htdocs/langs/en_US/members.lang @@ -171,7 +171,7 @@ MembersStatisticsDesc=Choose statistics you want to read... MenuMembersStats=Statistics LastMemberDate=Latest member date LatestSubscriptionDate=Latest subscription date -Nature=Nature +MemberNature=Nature of member Public=Information are public NewMemberbyWeb=New member added. Awaiting approval NewMemberForm=New member form diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang index 5f07a7f2eb0..46555a84528 100644 --- a/htdocs/langs/en_US/products.lang +++ b/htdocs/langs/en_US/products.lang @@ -159,7 +159,7 @@ SuppliersPrices=Vendor prices SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) CustomCode=Customs / Commodity / HS code CountryOrigin=Origin country -Nature=Product Type (material/finished) +Nature=Nature of produt (material/finished) ShortLabel=Short label Unit=Unit p=u. From 57140b79dc927fa5f6eb8d539cbda9e569d8cdce Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Jun 2019 18:30:07 +0200 Subject: [PATCH 063/127] Restore official text of licence --- htdocs/accountancy/admin/account.php | 2 +- htdocs/accountancy/admin/accountmodel.php | 2 +- htdocs/accountancy/admin/card.php | 2 +- htdocs/accountancy/admin/categories.php | 2 +- htdocs/accountancy/admin/categories_list.php | 2 +- htdocs/accountancy/admin/closure.php | 2 +- htdocs/accountancy/admin/defaultaccounts.php | 2 +- htdocs/accountancy/admin/export.php | 2 +- htdocs/accountancy/admin/fiscalyear.php | 2 +- htdocs/accountancy/admin/fiscalyear_card.php | 2 +- htdocs/accountancy/admin/fiscalyear_info.php | 2 +- htdocs/accountancy/admin/index.php | 2 +- htdocs/accountancy/admin/journals_list.php | 2 +- htdocs/accountancy/admin/productaccount.php | 2 +- htdocs/accountancy/bookkeeping/balance.php | 2 +- htdocs/accountancy/bookkeeping/balancebymonth.php | 2 +- htdocs/accountancy/bookkeeping/card.php | 2 +- htdocs/accountancy/bookkeeping/list.php | 2 +- htdocs/accountancy/bookkeeping/listbyaccount.php | 2 +- .../accountancy/bookkeeping/thirdparty_lettering_customer.php | 2 +- .../accountancy/bookkeeping/thirdparty_lettering_supplier.php | 2 +- htdocs/accountancy/class/accountancycategory.class.php | 2 +- htdocs/accountancy/class/accountancyexport.class.php | 2 +- htdocs/accountancy/class/accountancysystem.class.php | 2 +- htdocs/accountancy/class/accountingaccount.class.php | 2 +- htdocs/accountancy/class/accountingjournal.class.php | 2 +- htdocs/accountancy/class/bookkeeping.class.php | 2 +- htdocs/accountancy/class/lettering.class.php | 2 +- htdocs/accountancy/customer/card.php | 2 +- htdocs/accountancy/customer/index.php | 2 +- htdocs/accountancy/customer/lines.php | 2 +- htdocs/accountancy/customer/list.php | 2 +- htdocs/accountancy/expensereport/card.php | 2 +- htdocs/accountancy/expensereport/index.php | 2 +- htdocs/accountancy/expensereport/lines.php | 2 +- htdocs/accountancy/expensereport/list.php | 2 +- htdocs/accountancy/index.php | 2 +- htdocs/accountancy/journal/bankjournal.php | 2 +- htdocs/accountancy/journal/expensereportsjournal.php | 2 +- htdocs/accountancy/journal/purchasesjournal.php | 2 +- htdocs/accountancy/journal/sellsjournal.php | 2 +- htdocs/accountancy/supplier/card.php | 2 +- htdocs/accountancy/supplier/index.php | 2 +- htdocs/accountancy/supplier/lines.php | 2 +- htdocs/accountancy/supplier/list.php | 2 +- htdocs/accountancy/tpl/export_journal.tpl.php | 2 +- htdocs/adherents/admin/adherent.php | 2 +- htdocs/adherents/admin/adherent_emails.php | 2 +- htdocs/adherents/admin/adherent_extrafields.php | 2 +- htdocs/adherents/admin/adherent_type_extrafields.php | 2 +- htdocs/adherents/admin/website.php | 2 +- 51 files changed, 51 insertions(+), 51 deletions(-) diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index b4bf5cc7f2c..b3ddbc43feb 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -14,7 +14,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php index 02442865b7b..527cb13fcfd 100644 --- a/htdocs/accountancy/admin/accountmodel.php +++ b/htdocs/accountancy/admin/accountmodel.php @@ -23,7 +23,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/admin/card.php b/htdocs/accountancy/admin/card.php index c49ed42741b..a6c3969e64a 100644 --- a/htdocs/accountancy/admin/card.php +++ b/htdocs/accountancy/admin/card.php @@ -14,7 +14,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/admin/categories.php b/htdocs/accountancy/admin/categories.php index a7fe40acefc..17fa65d4f5e 100644 --- a/htdocs/accountancy/admin/categories.php +++ b/htdocs/accountancy/admin/categories.php @@ -13,7 +13,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/admin/categories_list.php b/htdocs/accountancy/admin/categories_list.php index 28c771c19b9..e7cdc800aee 100644 --- a/htdocs/accountancy/admin/categories_list.php +++ b/htdocs/accountancy/admin/categories_list.php @@ -13,7 +13,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/admin/closure.php b/htdocs/accountancy/admin/closure.php index 55ed84d4ad0..479dd410f33 100644 --- a/htdocs/accountancy/admin/closure.php +++ b/htdocs/accountancy/admin/closure.php @@ -12,7 +12,7 @@ * 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 . + * along with this program. If not, see . * */ diff --git a/htdocs/accountancy/admin/defaultaccounts.php b/htdocs/accountancy/admin/defaultaccounts.php index 13d3a267956..079e3585341 100644 --- a/htdocs/accountancy/admin/defaultaccounts.php +++ b/htdocs/accountancy/admin/defaultaccounts.php @@ -18,7 +18,7 @@ * 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 . + * along with this program. If not, see . * */ diff --git a/htdocs/accountancy/admin/export.php b/htdocs/accountancy/admin/export.php index dc4146aae8e..81dc83b2ae5 100644 --- a/htdocs/accountancy/admin/export.php +++ b/htdocs/accountancy/admin/export.php @@ -18,7 +18,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/admin/fiscalyear.php b/htdocs/accountancy/admin/fiscalyear.php index 5cc03376808..fff0118c224 100644 --- a/htdocs/accountancy/admin/fiscalyear.php +++ b/htdocs/accountancy/admin/fiscalyear.php @@ -12,7 +12,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/admin/fiscalyear_card.php b/htdocs/accountancy/admin/fiscalyear_card.php index f12aaba054b..5dc6010d465 100644 --- a/htdocs/accountancy/admin/fiscalyear_card.php +++ b/htdocs/accountancy/admin/fiscalyear_card.php @@ -13,7 +13,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/admin/fiscalyear_info.php b/htdocs/accountancy/admin/fiscalyear_info.php index cfe6c20bd7b..8a5213f5ab8 100644 --- a/htdocs/accountancy/admin/fiscalyear_info.php +++ b/htdocs/accountancy/admin/fiscalyear_info.php @@ -12,7 +12,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php index 859a7bbf279..b842c8115da 100644 --- a/htdocs/accountancy/admin/index.php +++ b/htdocs/accountancy/admin/index.php @@ -19,7 +19,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/admin/journals_list.php b/htdocs/accountancy/admin/journals_list.php index a8b2a6d0bbf..cac81bfbcae 100644 --- a/htdocs/accountancy/admin/journals_list.php +++ b/htdocs/accountancy/admin/journals_list.php @@ -12,7 +12,7 @@ * 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 . + * along with this program. If not, see . * */ diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php index c494bda55cb..562dfd1505b 100644 --- a/htdocs/accountancy/admin/productaccount.php +++ b/htdocs/accountancy/admin/productaccount.php @@ -16,7 +16,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index ef966a00455..44a12b76f36 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -15,7 +15,7 @@ * 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 . + * along with this program. If not, see . * */ diff --git a/htdocs/accountancy/bookkeeping/balancebymonth.php b/htdocs/accountancy/bookkeeping/balancebymonth.php index a537983ed92..b9568228a36 100644 --- a/htdocs/accountancy/bookkeeping/balancebymonth.php +++ b/htdocs/accountancy/bookkeeping/balancebymonth.php @@ -15,7 +15,7 @@ * 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 . + * along with this program. If not, see . * */ diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index d91069ce93e..b0adb2e2ad1 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -16,7 +16,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index ff7cccca341..4fc30bb0c30 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -16,7 +16,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php index d3dc9b4a190..bacfdcb714a 100644 --- a/htdocs/accountancy/bookkeeping/listbyaccount.php +++ b/htdocs/accountancy/bookkeeping/listbyaccount.php @@ -16,7 +16,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php b/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php index b7a19101758..81754d121b9 100644 --- a/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php +++ b/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php @@ -17,7 +17,7 @@ * 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 . + * along with this program. If not, see . * */ diff --git a/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php b/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php index eaa741e1722..87bd79bb64d 100644 --- a/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php +++ b/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php @@ -17,7 +17,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/class/accountancycategory.class.php b/htdocs/accountancy/class/accountancycategory.class.php index d68c9fa54a7..f11ff3957f7 100644 --- a/htdocs/accountancy/class/accountancycategory.class.php +++ b/htdocs/accountancy/class/accountancycategory.class.php @@ -14,7 +14,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php index 06bb3e5c930..3169d3737d9 100644 --- a/htdocs/accountancy/class/accountancyexport.class.php +++ b/htdocs/accountancy/class/accountancyexport.class.php @@ -22,7 +22,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/class/accountancysystem.class.php b/htdocs/accountancy/class/accountancysystem.class.php index 67f4f3b31a4..580ecda0b50 100644 --- a/htdocs/accountancy/class/accountancysystem.class.php +++ b/htdocs/accountancy/class/accountancysystem.class.php @@ -14,7 +14,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index f9c2e3391ba..bc25e33484d 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -17,7 +17,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/class/accountingjournal.class.php b/htdocs/accountancy/class/accountingjournal.class.php index 8d6f037dc96..e8caaab8a89 100644 --- a/htdocs/accountancy/class/accountingjournal.class.php +++ b/htdocs/accountancy/class/accountingjournal.class.php @@ -12,7 +12,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index d207fbccc74..27aee939594 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -15,7 +15,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/class/lettering.class.php b/htdocs/accountancy/class/lettering.class.php index e20b49dbd25..2a89c6c1c96 100644 --- a/htdocs/accountancy/class/lettering.class.php +++ b/htdocs/accountancy/class/lettering.class.php @@ -15,7 +15,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/customer/card.php b/htdocs/accountancy/customer/card.php index 52057485a30..eb66b235d0b 100644 --- a/htdocs/accountancy/customer/card.php +++ b/htdocs/accountancy/customer/card.php @@ -14,7 +14,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/customer/index.php b/htdocs/accountancy/customer/index.php index 68649aa264d..f063f832f54 100644 --- a/htdocs/accountancy/customer/index.php +++ b/htdocs/accountancy/customer/index.php @@ -16,7 +16,7 @@ * 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 . + * along with this program. If not, see . * */ diff --git a/htdocs/accountancy/customer/lines.php b/htdocs/accountancy/customer/lines.php index dafbfc2b773..ea174638a2a 100644 --- a/htdocs/accountancy/customer/lines.php +++ b/htdocs/accountancy/customer/lines.php @@ -16,7 +16,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php index d843f8f992c..192585ccedd 100644 --- a/htdocs/accountancy/customer/list.php +++ b/htdocs/accountancy/customer/list.php @@ -17,7 +17,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/expensereport/card.php b/htdocs/accountancy/expensereport/card.php index 2331111f620..1052a1d485d 100644 --- a/htdocs/accountancy/expensereport/card.php +++ b/htdocs/accountancy/expensereport/card.php @@ -18,7 +18,7 @@ * 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 . + * along with this program. If not, see . * */ /** diff --git a/htdocs/accountancy/expensereport/index.php b/htdocs/accountancy/expensereport/index.php index d3fc63d3bf8..4fe2ee3120b 100644 --- a/htdocs/accountancy/expensereport/index.php +++ b/htdocs/accountancy/expensereport/index.php @@ -15,7 +15,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/expensereport/lines.php b/htdocs/accountancy/expensereport/lines.php index 284809f596d..d15ef52ad39 100644 --- a/htdocs/accountancy/expensereport/lines.php +++ b/htdocs/accountancy/expensereport/lines.php @@ -16,7 +16,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/expensereport/list.php b/htdocs/accountancy/expensereport/list.php index 70d033a28ea..60b24638775 100644 --- a/htdocs/accountancy/expensereport/list.php +++ b/htdocs/accountancy/expensereport/list.php @@ -17,7 +17,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/index.php b/htdocs/accountancy/index.php index ac86cd3f30a..922f1285b3c 100644 --- a/htdocs/accountancy/index.php +++ b/htdocs/accountancy/index.php @@ -13,7 +13,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index 4486ac11ef2..cb8c35f0416 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -22,7 +22,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/journal/expensereportsjournal.php b/htdocs/accountancy/journal/expensereportsjournal.php index ba4960e29a6..c06506c0895 100644 --- a/htdocs/accountancy/journal/expensereportsjournal.php +++ b/htdocs/accountancy/journal/expensereportsjournal.php @@ -20,7 +20,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index 336333fe54d..8ff70219c68 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -20,7 +20,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index ac824aa25c9..b69f485a558 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -21,7 +21,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/supplier/card.php b/htdocs/accountancy/supplier/card.php index 7e9d7fbbd7c..97f7d618ce8 100644 --- a/htdocs/accountancy/supplier/card.php +++ b/htdocs/accountancy/supplier/card.php @@ -18,7 +18,7 @@ * 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 . + * along with this program. If not, see . * */ /** diff --git a/htdocs/accountancy/supplier/index.php b/htdocs/accountancy/supplier/index.php index 88a599d1fc5..bc632118da7 100644 --- a/htdocs/accountancy/supplier/index.php +++ b/htdocs/accountancy/supplier/index.php @@ -15,7 +15,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/supplier/lines.php b/htdocs/accountancy/supplier/lines.php index 48259939270..a67386f6fbd 100644 --- a/htdocs/accountancy/supplier/lines.php +++ b/htdocs/accountancy/supplier/lines.php @@ -16,7 +16,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index 621d0121faf..b3a426bbf5e 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -17,7 +17,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/tpl/export_journal.tpl.php b/htdocs/accountancy/tpl/export_journal.tpl.php index 5c9f7ad48ed..97f0da548ca 100644 --- a/htdocs/accountancy/tpl/export_journal.tpl.php +++ b/htdocs/accountancy/tpl/export_journal.tpl.php @@ -13,7 +13,7 @@ * 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 . + * along with this program. If not, see . */ // Protection to avoid direct call of template diff --git a/htdocs/adherents/admin/adherent.php b/htdocs/adherents/admin/adherent.php index 47f7d9c3357..af2a8841643 100644 --- a/htdocs/adherents/admin/adherent.php +++ b/htdocs/adherents/admin/adherent.php @@ -20,7 +20,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/adherents/admin/adherent_emails.php b/htdocs/adherents/admin/adherent_emails.php index 0a8ea298bce..3f901539380 100644 --- a/htdocs/adherents/admin/adherent_emails.php +++ b/htdocs/adherents/admin/adherent_emails.php @@ -20,7 +20,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/adherents/admin/adherent_extrafields.php b/htdocs/adherents/admin/adherent_extrafields.php index 6f2b899dc5c..e8e112d42b6 100644 --- a/htdocs/adherents/admin/adherent_extrafields.php +++ b/htdocs/adherents/admin/adherent_extrafields.php @@ -15,7 +15,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/adherents/admin/adherent_type_extrafields.php b/htdocs/adherents/admin/adherent_type_extrafields.php index 35d7f327e9d..e9e7c601a30 100644 --- a/htdocs/adherents/admin/adherent_type_extrafields.php +++ b/htdocs/adherents/admin/adherent_type_extrafields.php @@ -17,7 +17,7 @@ * 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 . + * along with this program. If not, see . * or see http://www.gnu.org/ */ diff --git a/htdocs/adherents/admin/website.php b/htdocs/adherents/admin/website.php index 1f87289ba3c..70a37f0bf4b 100644 --- a/htdocs/adherents/admin/website.php +++ b/htdocs/adherents/admin/website.php @@ -15,7 +15,7 @@ * 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 . + * along with this program. If not, see . */ /** From 28deca7100349925aefee70d897757bba5035525 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Jun 2019 18:40:31 +0200 Subject: [PATCH 064/127] FIX #11218 #11150 --- htdocs/core/class/discount.class.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/discount.class.php b/htdocs/core/class/discount.class.php index 8e66b29a3f8..479a7a48367 100644 --- a/htdocs/core/class/discount.class.php +++ b/htdocs/core/class/discount.class.php @@ -227,6 +227,14 @@ class DiscountAbsolute return -1; } + $userid = $user->id; + if (! ($userid > 0)) // For example when record is saved into an anonymous context with a not loaded object $user. + { + $tmpinvoice = new Facture($this->db); + $tmpinvoice->fetch($this->fk_facture_source); + $userid = $tmpinvoice->fk_user_author; // We use the author of invoice + } + // Insert request $sql = "INSERT INTO ".MAIN_DB_PREFIX."societe_remise_except"; $sql.= " (entity, datec, fk_soc, discount_type, fk_user, description,"; @@ -234,7 +242,7 @@ class DiscountAbsolute $sql.= " multicurrency_amount_ht, multicurrency_amount_tva, multicurrency_amount_ttc,"; $sql.= " fk_facture_source, fk_invoice_supplier_source"; $sql.= ")"; - $sql.= " VALUES (".$conf->entity.", '".$this->db->idate($this->datec!=''?$this->datec:dol_now())."', ".$this->fk_soc.", ".(empty($this->discount_type)?0:intval($this->discount_type)).", ".$user->id.", '".$this->db->escape($this->description)."',"; + $sql.= " VALUES (".$conf->entity.", '".$this->db->idate($this->datec!=''?$this->datec:dol_now())."', ".$this->fk_soc.", ".(empty($this->discount_type)?0:intval($this->discount_type)).", ".$userid.", '".$this->db->escape($this->description)."',"; $sql.= " ".$this->amount_ht.", ".$this->amount_tva.", ".$this->amount_ttc.", ".$this->tva_tx.","; $sql.= " ".$this->multicurrency_amount_ht.", ".$this->multicurrency_amount_tva.", ".$this->multicurrency_amount_ttc.", "; $sql.= " ".($this->fk_facture_source ? "'".$this->db->escape($this->fk_facture_source)."'":"null").","; From 31ffa6bc69aa8b16cce3bba4f1534e0cee8ff8df Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Jun 2019 18:43:16 +0200 Subject: [PATCH 065/127] FIX #11218 #11150 --- htdocs/core/class/discount.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/class/discount.class.php b/htdocs/core/class/discount.class.php index 479a7a48367..678cfe446a0 100644 --- a/htdocs/core/class/discount.class.php +++ b/htdocs/core/class/discount.class.php @@ -230,6 +230,7 @@ class DiscountAbsolute $userid = $user->id; if (! ($userid > 0)) // For example when record is saved into an anonymous context with a not loaded object $user. { + include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; $tmpinvoice = new Facture($this->db); $tmpinvoice->fetch($this->fk_facture_source); $userid = $tmpinvoice->fk_user_author; // We use the author of invoice From 23c8b3305c2890f659522e39cc97e5770fbdd54c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Jun 2019 19:02:59 +0200 Subject: [PATCH 066/127] Doc --- ChangeLog | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index 9b91afd128f..eefa22844fc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,19 @@ English Dolibarr ChangeLog -------------------------------------------------------------- +***** ChangeLog for 11.0.0 compared to 10.0.0 ***** +For Users: + + +For Developers: + + +WARNING: + +Following changes may create regressions for some external modules, but were necessary to make Dolibarr better: +... + + ***** ChangeLog for 10.0.0 compared to 9.0.0 ***** For Users: NEW: Module "Ticket" is available as a stable module. From c3a109d7902933c0f1382eb4fb77b1c3b64db038 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Jun 2019 19:20:27 +0200 Subject: [PATCH 067/127] Update card.php --- htdocs/adherents/card.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index 17ccdb0c546..8933d116ad0 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -1061,10 +1061,10 @@ else include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; //Hooks here $reshook=$hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - //print $hookmanager->resPrint; //it double prints? + print $hookmanager->resPrint; if (empty($reshook)) { - print $object->showOptionals($extrafields, 'edit'); + print $object->showOptionals($extrafields, 'edit'); } print ''; @@ -1365,10 +1365,10 @@ else include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; //Hooks here $reshook=$hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - //print $hookmanager->resPrint; //it double prints? + print $hookmanager->resPrint; if (empty($reshook)) { - print $object->showOptionals($extrafields, 'edit'); + print $object->showOptionals($extrafields, 'edit'); } print ''; From f66281d7e5e3bfd7a77b84648ae080e991e99b3b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Jun 2019 19:50:22 +0200 Subject: [PATCH 068/127] Update modAccounting.class.php --- htdocs/core/modules/modAccounting.class.php | 33 +++++++++++---------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/htdocs/core/modules/modAccounting.class.php b/htdocs/core/modules/modAccounting.class.php index c91c59169ba..6a29f0ed169 100644 --- a/htdocs/core/modules/modAccounting.class.php +++ b/htdocs/core/modules/modAccounting.class.php @@ -170,7 +170,23 @@ class modAccounting extends DolibarrModules $this->rights = array(); // Permission array used by this module $r = 0; - $this->rights[$r][0] = 50401; + $this->rights[$r][0] = 50440; + $this->rights[$r][1] = 'Manage chart of accounts, setup of accountancy'; + $this->rights[$r][2] = 'r'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'chartofaccount'; + $this->rights[$r][5] = ''; + $r++; + + $this->rights[$r][0] = 50430; + $this->rights[$r][1] = 'Define and close a fiscal year'; + $this->rights[$r][2] = 'r'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'fiscalyear'; + $this->rights[$r][5] = ''; + $r++; + + $this->rights[$r][0] = 50401; $this->rights[$r][1] = 'Bind products and invoices with accounting accounts'; $this->rights[$r][2] = 'r'; $this->rights[$r][3] = 0; @@ -236,21 +252,6 @@ class modAccounting extends DolibarrModules $this->rights[$r][5] = 'lire'; $r++; - $this->rights[$r][0] = 50430; - $this->rights[$r][1] = 'Define and close a fiscal year'; - $this->rights[$r][2] = 'r'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'fiscalyear'; - $this->rights[$r][5] = ''; - $r++; - - $this->rights[$r][0] = 50440; - $this->rights[$r][1] = 'Manage chart of accounts, setup of accountancy'; - $this->rights[$r][2] = 'r'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'chartofaccount'; - $this->rights[$r][5] = ''; - $r++; // Menus //------- From d49891d009a02ec65c8942040eb2bb3f643b7a8d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Jun 2019 21:03:04 +0200 Subject: [PATCH 069/127] All ->lignes were renamed into ->lines --- htdocs/api/class/api.class.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/htdocs/api/class/api.class.php b/htdocs/api/class/api.class.php index de5a1e75d0a..eb5cd3c73fb 100644 --- a/htdocs/api/class/api.class.php +++ b/htdocs/api/class/api.class.php @@ -106,8 +106,6 @@ class DolibarrApi // Remove linkedObjects. We should already have linkedObjectIds that avoid huge responses unset($object->linkedObjects); - unset($object->lignes); // we don't want lignes, we want only ->lines - unset($object->fields); unset($object->oldline); From a7bd734ece65606a657d1bcfb242909c43caad1b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Jun 2019 21:18:49 +0200 Subject: [PATCH 070/127] Rename ->produit into ->product. Still permissions to rename. --- htdocs/admin/barcode.php | 2 +- htdocs/core/class/conf.class.php | 1 + htdocs/core/lib/product.lib.php | 4 ++-- htdocs/core/modules/DolibarrModules.class.php | 2 +- htdocs/core/modules/modCategorie.class.php | 2 +- .../product/doc/doc_generic_product_odt.modules.php | 12 ++++++------ .../modules/product/doc/pdf_standard.modules.php | 6 +++--- .../stock/doc/doc_generic_stock_odt.modules.php | 10 +++++----- htdocs/fourn/commande/card.php | 2 +- htdocs/fourn/facture/card.php | 2 +- htdocs/product/admin/price_rules.php | 2 +- htdocs/product/admin/product.php | 2 +- htdocs/product/admin/product_extrafields.php | 2 +- htdocs/product/card.php | 6 +++--- htdocs/product/list.php | 10 +++++----- 15 files changed, 33 insertions(+), 32 deletions(-) diff --git a/htdocs/admin/barcode.php b/htdocs/admin/barcode.php index 993af489989..f844b135a4a 100644 --- a/htdocs/admin/barcode.php +++ b/htdocs/admin/barcode.php @@ -365,7 +365,7 @@ print '
'; // Select barcode numbering module -if ($conf->produit->enabled) +if ($conf->product->enabled) { print load_fiche_titre($langs->trans("BarCodeNumberManager")." (".$langs->trans("Product").")", '', ''); diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 62c7f0f9e24..9dbf7ccd125 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -672,6 +672,7 @@ class Conf if (isset($this->commande)) $this->order=$this->commande; if (isset($this->contrat)) $this->contract=$this->contrat; if (isset($this->categorie)) $this->category=$this->categorie; + if (isset($this->project)) $this->project=$this->projet; // Object $mc if (! defined('NOREQUIREMC') && ! empty($this->multicompany->enabled)) diff --git a/htdocs/core/lib/product.lib.php b/htdocs/core/lib/product.lib.php index 4d79d0d4db3..68a6d9082f2 100644 --- a/htdocs/core/lib/product.lib.php +++ b/htdocs/core/lib/product.lib.php @@ -127,7 +127,7 @@ function product_prepare_head($object) $h++; } } - + // Tab to link resources if (!empty($conf->resource->enabled)) { @@ -173,7 +173,7 @@ function product_prepare_head($object) if (! empty($conf->service->enabled) && ($object->type==Product::TYPE_SERVICE)) $upload_dir = $conf->service->multidir_output[$object->entity].'/'.dol_sanitizeFileName($object->ref); $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$')); if (! empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { - if (! empty($conf->product->enabled) && ($object->type==Product::TYPE_PRODUCT)) $upload_dir = $conf->produit->multidir_output[$object->entity].'/'.get_exdir($object->id, 2, 0, 0, $object, 'product').$object->id.'/photos'; + if (! empty($conf->product->enabled) && ($object->type==Product::TYPE_PRODUCT)) $upload_dir = $conf->product->multidir_output[$object->entity].'/'.get_exdir($object->id, 2, 0, 0, $object, 'product').$object->id.'/photos'; if (! empty($conf->service->enabled) && ($object->type==Product::TYPE_SERVICE)) $upload_dir = $conf->service->multidir_output[$object->entity].'/'.get_exdir($object->id, 2, 0, 0, $object, 'product').$object->id.'/photos'; $nbFiles += count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$')); } diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index 9a695788b47..4a8135800ae 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -1297,7 +1297,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it // For the moment, we manage this with hard coded exception //print "Remove box ".$file.'
'; if ($file == 'box_graph_product_distribution.php') { - if (! empty($conf->produit->enabled) || ! empty($conf->service->enabled)) { + if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) { dol_syslog("We discard disabling of module ".$file." because another module still active require it."); continue; } diff --git a/htdocs/core/modules/modCategorie.class.php b/htdocs/core/modules/modCategorie.class.php index d8f8b6915f3..092d5ac10b7 100644 --- a/htdocs/core/modules/modCategorie.class.php +++ b/htdocs/core/modules/modCategorie.class.php @@ -230,7 +230,7 @@ class modCategorie extends DolibarrModules $this->export_code[$r]='category_'.$r; $this->export_label[$r]='CatProdList'; $this->export_icon[$r]='category'; - $this->export_enabled[$r]='$conf->produit->enabled'; + $this->export_enabled[$r]='$conf->product->enabled || $conf->service->enabled'; $this->export_permission[$r]=array(array("categorie","lire"),array("produit","lire")); $this->export_fields_array[$r]=array('u.rowid'=>"CategId",'u.label'=>"Label",'u.description'=>"Description",'p.rowid'=>'ProductId','p.ref'=>'Ref'); $this->export_TypeFields_array[$r]=array('u.label'=>"Text",'u.description'=>"Text",'p.ref'=>'Text'); diff --git a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php index 49dc1b7598c..f8861380b2f 100644 --- a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php +++ b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php @@ -244,7 +244,7 @@ class doc_generic_product_odt extends ModelePDFProduct // Load translation files required by the page $outputlangs->loadLangs(array("main", "dict", "companies", "bills")); - if ($conf->produit->dir_output) + if ($conf->product->dir_output) { // If $object is id instead of object if (! is_object($object)) @@ -262,7 +262,7 @@ class doc_generic_product_odt extends ModelePDFProduct $supplierprices = $productFournisseur->list_product_fournisseur_price($object->id); $object->supplierprices = $supplierprices; - $dir = $conf->produit->dir_output; + $dir = $conf->product->dir_output; $objectref = dol_sanitizeFileName($object->ref); if (! preg_match('/specimen/i', $objectref)) $dir.= "/" . $objectref; $file = $dir . "/" . $objectref . ".odt"; @@ -302,9 +302,9 @@ class doc_generic_product_odt extends ModelePDFProduct //print "newdir=".$dir; //print "newfile=".$newfile; //print "file=".$file; - //print "conf->produit->dir_temp=".$conf->produit->dir_temp; + //print "conf->product->dir_temp=".$conf->product->dir_temp; - dol_mkdir($conf->produit->dir_temp); + dol_mkdir($conf->product->dir_temp); // If CUSTOMER contact defined on product, we use it @@ -357,10 +357,10 @@ class doc_generic_product_odt extends ModelePDFProduct // Open and load template require_once ODTPHP_PATH.'odf.php'; try { - $odfHandler = new odf( + $odfHandler = new odf( $srctemplatepath, array( - 'PATH_TO_TMP' => $conf->produit->dir_temp, + 'PATH_TO_TMP' => $conf->product->dir_temp, 'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. 'DELIMITER_LEFT' => '{', 'DELIMITER_RIGHT' => '}' diff --git a/htdocs/core/modules/product/doc/pdf_standard.modules.php b/htdocs/core/modules/product/doc/pdf_standard.modules.php index 04d566248b9..89f0f67ae53 100644 --- a/htdocs/core/modules/product/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php @@ -174,18 +174,18 @@ class pdf_standard extends ModelePDFProduct $nblignes = count($object->lines); - if ($conf->produit->dir_output) + if ($conf->product->dir_output) { // Definition of $dir and $file if ($object->specimen) { - $dir = $conf->produit->dir_output; + $dir = $conf->product->dir_output; $file = $dir . "/SPECIMEN.pdf"; } else { $objectref = dol_sanitizeFileName($object->ref); - $dir = $conf->produit->dir_output . "/" . $objectref; + $dir = $conf->product->dir_output . "/" . $objectref; $file = $dir . "/" . $objectref . ".pdf"; } diff --git a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php index 35c467c110c..ac9c0423694 100644 --- a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php +++ b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php @@ -244,7 +244,7 @@ class doc_generic_stock_odt extends ModelePDFStock // Load translation files required by the page $outputlangs->loadLangs(array("main", "dict", "companies", "bills")); - if ($conf->produit->dir_output) + if ($conf->product->dir_output) { // If $object is id instead of object if (! is_object($object)) @@ -262,7 +262,7 @@ class doc_generic_stock_odt extends ModelePDFStock $supplierprices = $stockFournisseur->list_stock_fournisseur_price($object->id); $object->supplierprices = $supplierprices; - $dir = $conf->produit->dir_output; + $dir = $conf->product->dir_output; $objectref = dol_sanitizeFileName($object->ref); if (! preg_match('/specimen/i', $objectref)) $dir.= "/" . $objectref; $file = $dir . "/" . $objectref . ".odt"; @@ -302,9 +302,9 @@ class doc_generic_stock_odt extends ModelePDFStock //print "newdir=".$dir; //print "newfile=".$newfile; //print "file=".$file; - //print "conf->produit->dir_temp=".$conf->produit->dir_temp; + //print "conf->product->dir_temp=".$conf->product->dir_temp; - dol_mkdir($conf->produit->dir_temp); + dol_mkdir($conf->product->dir_temp); // If CUSTOMER contact defined on stock, we use it @@ -360,7 +360,7 @@ class doc_generic_stock_odt extends ModelePDFStock $odfHandler = new odf( $srctemplatepath, array( - 'PATH_TO_TMP' => $conf->produit->dir_temp, + 'PATH_TO_TMP' => $conf->product->dir_temp, 'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. 'DELIMITER_LEFT' => '{', 'DELIMITER_RIGHT' => '}' diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index da2930ed667..94eeef8da38 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -43,7 +43,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; if (! empty($conf->supplier_proposal->enabled)) require_once DOL_DOCUMENT_ROOT . '/supplier_proposal/class/supplier_proposal.class.php'; -if (!empty($conf->produit->enabled)) +if (!empty($conf->product->enabled)) require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; if (!empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index c25b0afa15b..4f1340a27d8 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -41,7 +41,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; -if (!empty($conf->produit->enabled)) { +if (!empty($conf->product->enabled)) { require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; } if (!empty($conf->projet->enabled)) { diff --git a/htdocs/product/admin/price_rules.php b/htdocs/product/admin/price_rules.php index d50e474026e..5b2e931e7b6 100644 --- a/htdocs/product/admin/price_rules.php +++ b/htdocs/product/admin/price_rules.php @@ -113,7 +113,7 @@ while ($result = $db->fetch_object($query)) { $title = $langs->trans('ProductServiceSetup'); $tab = $langs->trans("ProductsAndServices"); -if (empty($conf->produit->enabled)) { +if (empty($conf->product->enabled)) { $title = $langs->trans('ServiceSetup'); $tab = $langs->trans('Services'); } elseif (empty($conf->service->enabled)) { diff --git a/htdocs/product/admin/product.php b/htdocs/product/admin/product.php index 888863e5e66..95f61d2f20a 100644 --- a/htdocs/product/admin/product.php +++ b/htdocs/product/admin/product.php @@ -272,7 +272,7 @@ $formbarcode=new FormBarCode($db); $title = $langs->trans('ProductServiceSetup'); $tab = $langs->trans("ProductsAndServices"); -if (empty($conf->produit->enabled)) +if (empty($conf->product->enabled)) { $title = $langs->trans('ServiceSetup'); $tab = $langs->trans('Services'); diff --git a/htdocs/product/admin/product_extrafields.php b/htdocs/product/admin/product_extrafields.php index a01ba46b624..e70e09a9640 100644 --- a/htdocs/product/admin/product_extrafields.php +++ b/htdocs/product/admin/product_extrafields.php @@ -61,7 +61,7 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php'; $title = $langs->trans('ProductServiceSetup'); $textobject = $langs->trans("ProductsAndServices"); -if (empty($conf->produit->enabled)) +if (empty($conf->product->enabled)) { $title = $langs->trans('ServiceSetup'); $textobject = $langs->trans('Services'); diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 847c6325b50..cdd94ae4a3c 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -148,7 +148,7 @@ if (empty($reshook)) } // Actions to build doc - $upload_dir = $conf->produit->dir_output; + $upload_dir = $conf->product->dir_output; $permissioncreate = $usercancreate; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; @@ -1601,7 +1601,7 @@ else print ''; // Type - if (! empty($conf->produit->enabled) && ! empty($conf->service->enabled)) + if (! empty($conf->product->enabled) && ! empty($conf->service->enabled)) { // TODO change for compatibility with edit in place $typeformat='select;0:'.$langs->trans("Product").',1:'.$langs->trans("Service"); @@ -2158,7 +2158,7 @@ if ($action != 'create' && $action != 'edit' && $action != 'delete') // Documents $objectref = dol_sanitizeFileName($object->ref); $relativepath = $comref . '/' . $objectref . '.pdf'; - $filedir = $conf->produit->dir_output . '/' . $objectref; + $filedir = $conf->product->dir_output . '/' . $objectref; $urlsource=$_SERVER["PHP_SELF"]."?id=".$object->id; $genallowed=$usercanread; $delallowed=$usercancreate; diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 7d766452186..1a9b5fa1f6f 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -165,13 +165,13 @@ $arrayfields=array( 'p.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1), //'pfp.ref_fourn'=>array('label'=>$langs->trans("RefSupplier"), 'checked'=>1, 'enabled'=>(! empty($conf->barcode->enabled))), 'p.label'=>array('label'=>$langs->trans("Label"), 'checked'=>1), - 'p.fk_product_type'=>array('label'=>$langs->trans("Type"), 'checked'=>0, 'enabled'=>(! empty($conf->produit->enabled) && ! empty($conf->service->enabled))), + 'p.fk_product_type'=>array('label'=>$langs->trans("Type"), 'checked'=>0, 'enabled'=>(! empty($conf->product->enabled) && ! empty($conf->service->enabled))), 'p.barcode'=>array('label'=>$langs->trans("Gencod"), 'checked'=>1, 'enabled'=>(! empty($conf->barcode->enabled))), 'p.duration'=>array('label'=>$langs->trans("Duration"), 'checked'=>($contextpage != 'productlist'), 'enabled'=>(! empty($conf->service->enabled))), - 'p.weight'=>array('label'=>$langs->trans("Weight"), 'checked'=>0, 'enabled'=>(! empty($conf->produit->enabled))), - 'p.length'=>array('label'=>$langs->trans("Length"), 'checked'=>0, 'enabled'=>(! empty($conf->produit->enabled) && ! empty($conf->global->PRODUCT_DISABLE_SIZE))), - 'p.surface'=>array('label'=>$langs->trans("Surface"), 'checked'=>0, 'enabled'=>(! empty($conf->produit->enabled) && ! empty($conf->global->PRODUCT_DISABLE_SURFACE))), - 'p.volume'=>array('label'=>$langs->trans("Volume"), 'checked'=>0, 'enabled'=>(! empty($conf->produit->enabled) && ! empty($conf->global->PRODUCT_DISABLE_VOLUME))), + 'p.weight'=>array('label'=>$langs->trans("Weight"), 'checked'=>0, 'enabled'=>(! empty($conf->product->enabled))), + 'p.length'=>array('label'=>$langs->trans("Length"), 'checked'=>0, 'enabled'=>(! empty($conf->product->enabled) && ! empty($conf->global->PRODUCT_DISABLE_SIZE))), + 'p.surface'=>array('label'=>$langs->trans("Surface"), 'checked'=>0, 'enabled'=>(! empty($conf->product->enabled) && ! empty($conf->global->PRODUCT_DISABLE_SURFACE))), + 'p.volume'=>array('label'=>$langs->trans("Volume"), 'checked'=>0, 'enabled'=>(! empty($conf->product->enabled) && ! empty($conf->global->PRODUCT_DISABLE_VOLUME))), 'p.sellprice'=>array('label'=>$langs->trans("SellingPrice"), 'checked'=>1, 'enabled'=>empty($conf->global->PRODUIT_MULTIPRICES)), 'p.minbuyprice'=>array('label'=>$langs->trans("BuyingPriceMinShort"), 'checked'=>1, 'enabled'=>(! empty($user->rights->fournisseur->lire))), 'p.numbuyprice'=>array('label'=>$langs->trans("BuyingPriceNumShort"), 'checked'=>0, 'enabled'=>(! empty($user->rights->fournisseur->lire))), From 83ec64d4732e0bb726eb49d2f0c725d8a0e495d7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Jun 2019 22:52:27 +0200 Subject: [PATCH 071/127] Add hook getnomurltooltip on contract --- htdocs/contrat/class/contrat.class.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 6396b5e5f88..cd40be49e6c 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -1920,7 +1920,7 @@ class Contrat extends CommonObject */ public function getNomUrl($withpicto = 0, $maxlength = 0, $notooltip = 0, $save_lastsearch_value = -1) { - global $conf, $langs, $user; + global $conf, $langs, $user, $hookmanager, $action; $result=''; @@ -1962,6 +1962,14 @@ class Contrat extends CommonObject } $linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose.=' class="classfortooltip"'; + + if (is_object($hookmanager)) + { + $hookmanager->initHooks(array('contractdao')); + $parameters=array('id'=>$this->id); + $reshook=$hookmanager->executeHooks('getnomurltooltip', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks + if ($reshook > 0) $linkclose = $hookmanager->resPrint; + } } $linkstart = ' Date: Mon, 24 Jun 2019 22:58:21 +0200 Subject: [PATCH 072/127] Remove dead code --- htdocs/product/class/product.class.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 02de9b4d47d..50ddded3600 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -4034,13 +4034,6 @@ class Product extends CommonObject $linkclose.= ' title="'.dol_escape_htmltag($label, 1, 1).'"'; $linkclose.= ' class="classfortooltip"'; - - /* - $hookmanager->initHooks(array('productdao')); - $parameters=array('id'=>$this->id); - $reshook=$hookmanager->executeHooks('getnomurltooltip',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks - if ($reshook > 0) $linkclose = $hookmanager->resPrint; - */ } if ($option == 'supplier' || $option == 'category') { From 43d65e807351f48d10207966682247c07fd35455 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Jun 2019 22:59:00 +0200 Subject: [PATCH 073/127] Add hook --- htdocs/contrat/class/contrat.class.php | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index cd40be49e6c..91a373743c4 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -1920,7 +1920,7 @@ class Contrat extends CommonObject */ public function getNomUrl($withpicto = 0, $maxlength = 0, $notooltip = 0, $save_lastsearch_value = -1) { - global $conf, $langs, $user, $hookmanager, $action; + global $conf, $langs, $user, $hookmanager; $result=''; @@ -1962,14 +1962,6 @@ class Contrat extends CommonObject } $linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose.=' class="classfortooltip"'; - - if (is_object($hookmanager)) - { - $hookmanager->initHooks(array('contractdao')); - $parameters=array('id'=>$this->id); - $reshook=$hookmanager->executeHooks('getnomurltooltip', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - if ($reshook > 0) $linkclose = $hookmanager->resPrint; - } } $linkstart = 'ref?$this->ref:$this->id); $result .= $linkend; + global $action; + $hookmanager->initHooks(array('contractdao')); + $parameters=array('id'=>$this->id, 'getnomurl'=>$result); + $reshook=$hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks + if ($reshook > 0) { + $result = $hookmanager->resPrint; + } else { + $result .= $hookmanager->resPrint; + } + return $result; } From d048c0f125e2c535e2dadabcd11e3ecc274ebf47 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Jun 2019 23:00:04 +0200 Subject: [PATCH 074/127] Removed dead code --- htdocs/modulebuilder/template/class/myobject.class.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index 0025c00165d..8f79741727a 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -531,13 +531,6 @@ class MyObject extends CommonObject } $linkclose.=' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose.=' class="classfortooltip'.($morecss?' '.$morecss:'').'"'; - - /* - $hookmanager->initHooks(array('myobjectdao')); - $parameters=array('id'=>$this->id); - $reshook=$hookmanager->executeHooks('getnomurltooltip',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks - if ($reshook > 0) $linkclose = $hookmanager->resPrint; - */ } else $linkclose = ($morecss?' class="'.$morecss.'"':''); From 51506724efe5539f2ecd2ad43b5b3f1aaf9d8104 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Jun 2019 23:36:52 +0200 Subject: [PATCH 075/127] FIX Do no record log in archived log for draft documents. --- ...rface_50_modBlockedlog_ActionsBlockedLog.class.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php b/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php index 03d26b931b6..a72baaeff12 100644 --- a/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php +++ b/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php @@ -76,17 +76,18 @@ class InterfaceActionsBlockedLog extends DolibarrTriggers // Event/record is qualified $qualified = 0; $amounts = 0; - if ($action==='BILL_VALIDATE' || $action==='BILL_DELETE' || $action === 'BILL_SENTBYMAIL' - || $action==='BILL_SUPPLIER_VALIDATE' || $action==='BILL_SUPPLIER_DELETE' || $action === 'BILL_SUPPLIER_SENTBYMAIL' + if ($action==='BILL_VALIDATE' || (($action==='BILL_DELETE' || $action === 'BILL_SENTBYMAIL') && $object->statut != 0) + || $action==='BILL_SUPPLIER_VALIDATE' || (($action==='BILL_SUPPLIER_DELETE' || $action === 'BILL_SUPPLIER_SENTBYMAIL') && $object->statut != 0) || $action==='MEMBER_SUBSCRIPTION_CREATE' || $action==='MEMBER_SUBSCRIPTION_MODIFY' || $action==='MEMBER_SUBSCRIPTION_DELETE' - || $action==='DON_VALIDATE' || $action==='DON_MODIFY' || $action==='DON_DELETE' + || $action==='DON_VALIDATE' || (($action==='DON_MODIFY' || $action==='DON_DELETE') && $object->statut != 0) || $action==='CASHCONTROL_VALIDATE' - || (in_array($object->element, array('facture','suplier_invoice')) && $action === 'DOC_DOWNLOAD') || (in_array($object->element, array('facture','suplier_invoice')) && $action === 'DOC_PREVIEW') + || (in_array($object->element, array('facture','supplier_invoice')) && $action === 'DOC_DOWNLOAD' && $object->statut != 0) + || (in_array($object->element, array('facture','supplier_invoice')) && $action === 'DOC_PREVIEW' && $object->statut != 0) ) { $qualified++; -if (in_array($action, array( + if (in_array($action, array( 'MEMBER_SUBSCRIPTION_CREATE','MEMBER_SUBSCRIPTION_MODIFY','MEMBER_SUBSCRIPTION_DELETE', 'DON_VALIDATE','DON_MODIFY','DON_DELETE'))) $amounts = (double) $object->amount; elseif ($action == 'CASHCONTROL_VALIDATE') From d85ec982e5a235539fc7a8de24f9f1c32e79f2c8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Jun 2019 23:39:44 +0200 Subject: [PATCH 076/127] Fix do not output log in arhived log for draft documents --- ...ace_50_modBlockedlog_ActionsBlockedLog.class.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php b/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php index b3eee673198..52e5c7b4fcd 100644 --- a/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php +++ b/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php @@ -76,12 +76,13 @@ class InterfaceActionsBlockedLog extends DolibarrTriggers // Event/record is qualified $qualified = 0; $amounts = 0; - if ($action==='BILL_VALIDATE' || $action==='BILL_DELETE' || $action === 'BILL_SENTBYMAIL' - || $action==='BILL_SUPPLIER_VALIDATE' || $action==='BILL_SUPPLIER_DELETE' || $action === 'BILL_SUPPLIER_SENTBYMAIL' - || $action==='MEMBER_SUBSCRIPTION_CREATE' || $action==='MEMBER_SUBSCRIPTION_MODIFY' || $action==='MEMBER_SUBSCRIPTION_DELETE' - || $action==='DON_VALIDATE' || $action==='DON_MODIFY' || $action==='DON_DELETE' - || $action==='CASHCONTROL_VALIDATE' - || (in_array($object->element, array('facture','suplier_invoice')) && $action === 'DOC_DOWNLOAD') || (in_array($object->element, array('facture','suplier_invoice')) && $action === 'DOC_PREVIEW') + if ($action==='BILL_VALIDATE' || (($action==='BILL_DELETE' || $action === 'BILL_SENTBYMAIL') && $object->statut != 0) + || $action==='BILL_SUPPLIER_VALIDATE' || (($action==='BILL_SUPPLIER_DELETE' || $action === 'BILL_SUPPLIER_SENTBYMAIL') && $object->statut != 0) + || $action==='MEMBER_SUBSCRIPTION_CREATE' || $action==='MEMBER_SUBSCRIPTION_MODIFY' || $action==='MEMBER_SUBSCRIPTION_DELETE' + || $action==='DON_VALIDATE' || (($action==='DON_MODIFY' || $action==='DON_DELETE') && $object->statut != 0) + || $action==='CASHCONTROL_VALIDATE' + || (in_array($object->element, array('facture','supplier_invoice')) && $action === 'DOC_DOWNLOAD' && $object->statut != 0) + || (in_array($object->element, array('facture','supplier_invoice')) && $action === 'DOC_PREVIEW' && $object->statut != 0) ) { $qualified++; From 7f127989b282b376a43f0a2bcc2229caa5dbabdb Mon Sep 17 00:00:00 2001 From: Ferran Marcet Date: Tue, 25 Jun 2019 09:55:34 +0200 Subject: [PATCH 077/127] FIX: Not showing Contract and Project columns on ficheinter list --- htdocs/fichinter/list.php | 107 ++++++++++++++++++++++++++++++++------ 1 file changed, 91 insertions(+), 16 deletions(-) diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php index d9f2097a5bf..dd56687cfdc 100644 --- a/htdocs/fichinter/list.php +++ b/htdocs/fichinter/list.php @@ -5,6 +5,7 @@ * Copyright (C) 2011-2012 Juanjo Menent * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2019 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 @@ -31,10 +32,19 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +if ($conf->projet->enabled) { + require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; +} +if ($conf->contrat->enabled) { + require_once DOL_DOCUMENT_ROOT . '/contrat/class/contrat.class.php'; +} + + $langs->load("companies"); $langs->load("bills"); $langs->load("interventions"); +$langs->load("exports"); $action=GETPOST('action','alpha'); $massaction=GETPOST('massaction','alpha'); @@ -42,12 +52,12 @@ $show_files=GETPOST('show_files','int'); $confirm=GETPOST('confirm','alpha'); $toselect = GETPOST('toselect', 'array'); -$search_ref=GETPOST('search_ref')?GETPOST('search_ref','alpha'):GETPOST('search_inter','alpha'); -$search_company=GETPOST('search_company','alpha'); -$search_desc=GETPOST('search_desc','alpha'); -$search_status=GETPOST('search_status'); +//$search_ref=GETPOST('search_ref')?GETPOST('search_ref','alpha'):GETPOST('search_inter','alpha'); +//$search_company=GETPOST('search_company','alpha'); +//$search_desc=GETPOST('search_desc','alpha'); +//$search_status=GETPOST('search_status'); $sall=trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml')); -$optioncss = GETPOST('optioncss','alpha'); +//$optioncss = GETPOST('optioncss','alpha'); $socid=GETPOST('socid','int'); // Security check @@ -81,6 +91,8 @@ $search_company=GETPOST('search_company','alpha'); $search_desc=GETPOST('search_desc','alpha'); $search_status=GETPOST('search_status'); $optioncss = GETPOST('optioncss','alpha'); +$search_project=GETPOST('search_project','alpha'); +$search_contract=GETPOST('search_contract','alpha'); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array($contextpage)); @@ -104,10 +116,10 @@ if (! empty($conf->global->FICHINTER_DISABLE_DETAILS)) unset($fieldstosearchall[ $arrayfields=array( 'f.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1), 's.nom'=>array('label'=>$langs->trans("ThirdParty"), 'checked'=>1), - 'f.fk_project'=>array('label'=>$langs->trans("Project"), 'checked'=>1), + 'f.fk_projet'=>array('label'=>$langs->trans("Project"), 'checked'=>1), 'f.fk_contrat'=>array('label'=>$langs->trans("Contract"), 'checked'=>1), 'f.description'=>array('label'=>$langs->trans("Description"), 'checked'=>1), - 'fd.description'=>array('label'=>"xx", 'checked'=>1, 'enabled'=>empty($conf->global->FICHINTER_DISABLE_DETAILS)?1:0), + 'fd.description'=>array('label'=>$langs->trans("LineDescription"), 'checked'=>1, 'enabled'=>empty($conf->global->FICHINTER_DISABLE_DETAILS)?1:0), 'fd.date'=>array('label'=>$langs->trans("Date"), 'checked'=>1, 'enabled'=>empty($conf->global->FICHINTER_DISABLE_DETAILS)?1:0), 'fd.duree'=>array('label'=>$langs->trans("Duration"), 'checked'=>1, 'enabled'=>empty($conf->global->FICHINTER_DISABLE_DETAILS)?1:0), 'f.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500), @@ -174,6 +186,12 @@ $form = new Form($db); $formfile = new FormFile($db); $objectstatic=new Fichinter($db); $companystatic=new Societe($db); +if ($conf->projet->enabled) { + $projectstatic = new Project($db); +} +if ($conf->contrat->enabled) { + $contratstatic = new Contrat($db); +} $title=$langs->trans("ListOfInterventions"); llxHeader('', $title); @@ -183,6 +201,12 @@ $sql = "SELECT"; $sql.= " f.ref, f.rowid, f.fk_statut, f.description, f.datec as date_creation, f.tms as date_update, f.note_private,"; if (empty($conf->global->FICHINTER_DISABLE_DETAILS)) $sql.= " fd.description as descriptiondetail, fd.date as dp, fd.duree,"; $sql.= " s.nom as name, s.rowid as socid, s.client"; +if (! empty($arrayfields['f.fk_projet']['checked'])){ + $sql.= " ,p.rowid as projectid, p.ref as projectref, p.title as projecttitle"; +} +if (! empty($arrayfields['f.fk_contrat']['checked'])){ + $sql.= " ,c.rowid as contractid, c.ref as contractref"; +} // Add fields from extrafields foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); // Add fields from hooks @@ -190,6 +214,12 @@ $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook $sql.=$hookmanager->resPrint; $sql.= " FROM ".MAIN_DB_PREFIX."fichinter as f"; +if (! empty($arrayfields['f.fk_projet']['checked'])){ + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON f.fk_projet = p.rowid"; +} +if (! empty($arrayfields['f.fk_contrat']['checked'])){ + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."contrat as c ON f.fk_contrat = c.rowid"; +} if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."fichinter_extrafields as ef on (f.rowid = ef.fk_object)"; if (empty($conf->global->FICHINTER_DISABLE_DETAILS)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."fichinterdet as fd ON fd.fk_fichinter = f.rowid"; if (! $user->rights->societe->client->voir && empty($socid)) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -213,6 +243,12 @@ if (! $user->rights->societe->client->voir && empty($socid)) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; if ($socid) $sql.= " AND s.rowid = " . $socid; +if ($search_project) { + $sql .= natural_search('p.ref', $search_project); +} +if ($search_contract) { + $sql .= natural_search('c.ref', $search_contract); +} if ($sall) { $sql .= natural_search(array_keys($fieldstosearchall), $sall); } @@ -258,6 +294,8 @@ if ($resql) if ($search_company) $param.="&search_company=".urlencode($search_company); if ($search_desc) $param.="&search_desc=".urlencode($search_desc); if ($search_status != '' && $search_status > -1) $param.="&search_status=".urlencode($search_status); + if ($search_project) $param.="&search_project=".urlencode($search_project); + if ($search_contract) $param.="&search_contract=".urlencode($search_contract); if ($show_files) $param.='&show_files=' .$show_files; if ($optioncss != '') $param.='&optioncss='.$optioncss; // Add $param from extra fields @@ -331,6 +369,18 @@ if ($resql) print ''; print ''; } + if (! empty($arrayfields['f.fk_projet']['checked'])) + { + print ''; + } + if (! empty($arrayfields['f.fk_contrat']['checked'])) + { + print ''; + } if (! empty($arrayfields['f.description']['checked'])) { print '\n"; print ''; - if (! empty($arrayfields['f.ref']['checked'])) print_liste_field_titre("Ref",$_SERVER["PHP_SELF"],"f.ref","",$param,'',$sortfield,$sortorder); - if (! empty($arrayfields['s.nom']['checked'])) print_liste_field_titre("ThirdParty",$_SERVER["PHP_SELF"],"s.nom","",$param,'',$sortfield,$sortorder); - if (! empty($arrayfields['f.description']['checked'])) print_liste_field_titre("Description",$_SERVER["PHP_SELF"],"f.description","",$param,'',$sortfield,$sortorder); - if (! empty($arrayfields['fd.description']['checked'])) print_liste_field_titre('',$_SERVER["PHP_SELF"],''); - if (! empty($arrayfields['fd.date']['checked'])) print_liste_field_titre("Date",$_SERVER["PHP_SELF"],"fd.date","",$param,'align="center"',$sortfield,$sortorder); - if (! empty($arrayfields['fd.duree']['checked'])) print_liste_field_titre("Duration",$_SERVER["PHP_SELF"],"fd.duree","",$param,'align="right"',$sortfield,$sortorder); + if (! empty($arrayfields['f.ref']['checked'])) print_liste_field_titre($arrayfields['f.ref']['label'],$_SERVER["PHP_SELF"],"f.ref","",$param,'',$sortfield,$sortorder); + if (! empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'],$_SERVER["PHP_SELF"],"s.nom","",$param,'',$sortfield,$sortorder); + if (! empty($arrayfields['f.fk_projet']['checked'])) print_liste_field_titre($arrayfields['f.fk_projet']['label'],$_SERVER["PHP_SELF"],"p.ref","",$param,'',$sortfield,$sortorder); + if (! empty($arrayfields['f.fk_contrat']['checked'])) print_liste_field_titre($arrayfields['f.fk_contrat']['label'],$_SERVER["PHP_SELF"],"p.ref","",$param,'',$sortfield,$sortorder); + if (! empty($arrayfields['f.description']['checked'])) print_liste_field_titre($arrayfields['f.description']['label'],$_SERVER["PHP_SELF"],"f.description","",$param,'',$sortfield,$sortorder); + if (! empty($arrayfields['fd.description']['checked'])) print_liste_field_titre($arrayfields['fd.description']['label'],$_SERVER["PHP_SELF"],''); + if (! empty($arrayfields['fd.date']['checked'])) print_liste_field_titre($arrayfields['fd.date']['label'],$_SERVER["PHP_SELF"],"fd.date","",$param,'align="center"',$sortfield,$sortorder); + if (! empty($arrayfields['fd.duree']['checked'])) print_liste_field_titre($arrayfields['fd.duree']['label'],$_SERVER["PHP_SELF"],"fd.duree","",$param,'align="right"',$sortfield,$sortorder); // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; // Hook fields $parameters=array('arrayfields'=>$arrayfields); $reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (! empty($arrayfields['f.datec']['checked'])) print_liste_field_titre("DateCreationShort",$_SERVER["PHP_SELF"],"f.datec","",$param,'align="center" class="nowrap"',$sortfield,$sortorder); - if (! empty($arrayfields['f.tms']['checked'])) print_liste_field_titre("DateModificationShort",$_SERVER["PHP_SELF"],"f.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder); - if (! empty($arrayfields['f.fk_statut']['checked'])) print_liste_field_titre("Status",$_SERVER["PHP_SELF"],"f.fk_statut","",$param,'align="right"',$sortfield,$sortorder); + if (! empty($arrayfields['f.datec']['checked'])) print_liste_field_titre($arrayfields['f.datec']['label'],$_SERVER["PHP_SELF"],"f.datec","",$param,'align="center" class="nowrap"',$sortfield,$sortorder); + if (! empty($arrayfields['f.tms']['checked'])) print_liste_field_titre($arrayfields['f.tms']['label'],$_SERVER["PHP_SELF"],"f.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder); + if (! empty($arrayfields['f.fk_statut']['checked'])) print_liste_field_titre($arrayfields['f.fk_statut']['label'],$_SERVER["PHP_SELF"],"f.fk_statut","",$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="center"',$sortfield,$sortorder,'maxwidthsearch '); print "\n"; @@ -464,6 +516,29 @@ if ($resql) print ''; if (! $i) $totalarray['nbfield']++; } + if (! empty($arrayfields['f.fk_projet']['checked'])) + { + print ''; + if (! $i) $totalarray['nbfield']++; + } + if (! empty($arrayfields['f.fk_contrat']['checked'])) + { + print ''; + if (! $i) $totalarray['nbfield']++; + } if (! empty($arrayfields['f.description']['checked'])) { print ''; From 6b8262bd8fe24ab3dec813994e8ada806732a289 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 10:12:24 +0200 Subject: [PATCH 078/127] Fix status not loaded --- htdocs/adherents/subscription/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/adherents/subscription/list.php b/htdocs/adherents/subscription/list.php index a55aadfe9cb..5caece3c3ba 100644 --- a/htdocs/adherents/subscription/list.php +++ b/htdocs/adherents/subscription/list.php @@ -142,7 +142,7 @@ $accountstatic=new Account($db); $now=dol_now(); // List of subscriptions -$sql = "SELECT d.rowid, d.login, d.firstname, d.lastname, d.societe, d.photo,"; +$sql = "SELECT d.rowid, d.login, d.firstname, d.lastname, d.societe, d.photo, d.statut,"; $sql.= " c.rowid as crowid, c.fk_type, c.subscription,"; $sql.= " c.dateadh, c.datef, c.datec as date_creation, c.tms as date_update,"; $sql.= " c.fk_bank as bank, c.note,"; From 7de0f5c0befbeb3c9288cc0a771cc2c76105b0bc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 10:22:39 +0200 Subject: [PATCH 079/127] NEW Avoid wrap between picto and text on getNomUrl --- htdocs/adherents/class/adherent.class.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 06a5aa3e598..1e940df2e26 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -2124,28 +2124,28 @@ class Adherent extends CommonObject $link.=$linkclose.'>'; $linkend=''; - //if ($withpictoimg == -1) $result.='
'; $result.=$link; + if ($withpictoimg) $result.='
'; if ($withpictoimg) { $paddafterimage=''; if (abs($withpictoimg) == 1) $paddafterimage='style="margin-right: 3px;"'; // Only picto - if ($withpictoimg > 0) $picto='
'.img_object('', 'user', $paddafterimage.' '.($notooltip?'':'class="classfortooltip"'), 0, 0, $notooltip?0:1).'
'; + if ($withpictoimg > 0) $picto=''.img_object('', 'user', $paddafterimage.' '.($notooltip?'':'class="classfortooltip"'), 0, 0, $notooltip?0:1).''; // Picto must be a photo - else $picto='
'.Form::showphoto('memberphoto', $this, 0, 0, 0, 'userphoto'.($withpictoimg==-3?'small':''), 'mini', 0, 1).'
'; + else $picto=''.Form::showphoto('memberphoto', $this, 0, 0, 0, 'userphoto'.($withpictoimg==-3?'small':''), 'mini', 0, 1).''; $result.=$picto; } if ($withpictoimg > -2 && $withpictoimg != 2) { - if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $result.='
'; + if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $result.=''; if ($mode == 'login') $result.=dol_trunc($this->login, $maxlen); elseif ($mode == 'ref') $result.=$this->id; else $result.=$this->getFullName($langs, '', ($mode == 'firstname' ? 2 : -1), $maxlen); - if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $result.='
'; + if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $result.=''; } + if ($withpictoimg) $result.='
'; $result.=$linkend; - //if ($withpictoimg == -1) $result.='
'; return $result; } From 74f61b3b9ae0b0cda7715a66faf500543dc9ef4d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 10:12:24 +0200 Subject: [PATCH 080/127] Fix status not loaded --- htdocs/adherents/subscription/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/adherents/subscription/list.php b/htdocs/adherents/subscription/list.php index a55aadfe9cb..5caece3c3ba 100644 --- a/htdocs/adherents/subscription/list.php +++ b/htdocs/adherents/subscription/list.php @@ -142,7 +142,7 @@ $accountstatic=new Account($db); $now=dol_now(); // List of subscriptions -$sql = "SELECT d.rowid, d.login, d.firstname, d.lastname, d.societe, d.photo,"; +$sql = "SELECT d.rowid, d.login, d.firstname, d.lastname, d.societe, d.photo, d.statut,"; $sql.= " c.rowid as crowid, c.fk_type, c.subscription,"; $sql.= " c.dateadh, c.datef, c.datec as date_creation, c.tms as date_update,"; $sql.= " c.fk_bank as bank, c.note,"; From 732fd8a04ba6437bfa845346ebea251e2e5cf71c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 10:28:58 +0200 Subject: [PATCH 081/127] Fix look and feel v10 --- htdocs/adherents/subscription/list.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/adherents/subscription/list.php b/htdocs/adherents/subscription/list.php index 5caece3c3ba..c93e4184325 100644 --- a/htdocs/adherents/subscription/list.php +++ b/htdocs/adherents/subscription/list.php @@ -298,33 +298,33 @@ if (! empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) if (! empty($arrayfields['d.ref']['checked'])) { print ''; + print ''; } // Type if (! empty($arrayfields['d.fk_type']['checked'])) { print ''; } if (! empty($arrayfields['d.lastname']['checked'])) { print ''; + print ''; } if (! empty($arrayfields['d.firstname']['checked'])) { print ''; + print ''; } if (! empty($arrayfields['d.login']['checked'])) { print ''; + print ''; } if (! empty($arrayfields['t.libelle']['checked'])) From ca3988ca7301dfc0a2c42180d19028f4bbd7266c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 10:58:44 +0200 Subject: [PATCH 082/127] Fix backward compatibility for type of members --- htdocs/adherents/subscription/card.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/adherents/subscription/card.php b/htdocs/adherents/subscription/card.php index 31cf3020765..1b6e5813774 100644 --- a/htdocs/adherents/subscription/card.php +++ b/htdocs/adherents/subscription/card.php @@ -313,8 +313,9 @@ if ($rowid && $action != 'edit') print ''; print ''; print '\n"; $accountstatic=new Account($db); + $adh = new Adherent($db); $adht = new AdherentType($db); while ($i < $num) { $objp = $db->fetch_object($result); + $adh->id = $objp->rowid; + $adh->type = $obj->type; + $subscriptionstatic->ref=$objp->crowid; $subscriptionstatic->id=$objp->crowid; - if ($objp->cfk_type > 0) + $typeid = ($objp->cfk_type > 0 ? $objp->cfk_type : $adh->typeid); + if ($typeid > 0) { - $adht->fetch($objp->cfk_type); + $adht->fetch($typeid); } print ''; print ''; print '\n"; print ''; diff --git a/htdocs/adherents/subscription/card.php b/htdocs/adherents/subscription/card.php index 1b6e5813774..a8478f35e88 100644 --- a/htdocs/adherents/subscription/card.php +++ b/htdocs/adherents/subscription/card.php @@ -346,7 +346,7 @@ if ($rowid && $action != 'edit') // Amount print ''; - // Amount + // Label print ''; // Bank line From e6b643e0734d5b6a4737e0b0d465f26416efcca4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 11:07:14 +0200 Subject: [PATCH 084/127] Fix syntax error --- htdocs/adherents/subscription.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index fef89da8754..6d2889d02bb 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -667,7 +667,7 @@ if ($rowid > 0) */ if ($action != 'addsubscription' && $action != 'create_thirdparty') { - $sql = "SELECT d.rowid, d.firstname, d.lastname, d.societe, d.type,"; + $sql = "SELECT d.rowid, d.firstname, d.lastname, d.societe, d.fk_adherent_type as type,"; $sql.= " c.rowid as crowid, c.subscription,"; $sql.= " c.datec, c.fk_type as cfk_type,"; $sql.= " c.dateadh as dateh,"; From 4ed2db6d21ee71ac7e47d1fef2d34c1b21e03e0a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 11:08:14 +0200 Subject: [PATCH 085/127] Fix bad id --- htdocs/adherents/subscription.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index 6d2889d02bb..d637c6ee252 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -713,12 +713,12 @@ if ($rowid > 0) $objp = $db->fetch_object($result); $adh->id = $objp->rowid; - $adh->type = $obj->type; + $adh->typeid = $obj->type; $subscriptionstatic->ref=$objp->crowid; $subscriptionstatic->id=$objp->crowid; - $typeid = ($objp->cfk_type > 0 ? $objp->cfk_type : $adh->typeid); + $typeid = ($objp->cfk_type > 0 ? $objp->cfk_type : $objp->typeid); if ($typeid > 0) { $adht->fetch($typeid); From 27be93f5355d7fc2965bd0280b19e6d6fbede2be Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 11:08:42 +0200 Subject: [PATCH 086/127] Fix bad id --- htdocs/adherents/subscription.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index d637c6ee252..ba1fd781504 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -713,7 +713,7 @@ if ($rowid > 0) $objp = $db->fetch_object($result); $adh->id = $objp->rowid; - $adh->typeid = $obj->type; + $adh->typeid = $objp->type; $subscriptionstatic->ref=$objp->crowid; $subscriptionstatic->id=$objp->crowid; From 5f17cfe4622b1b743dc5cfeede49c2d2f1209898 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 11:09:13 +0200 Subject: [PATCH 087/127] Fix bad id --- htdocs/adherents/subscription.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index ba1fd781504..ab8206c66b8 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -718,7 +718,7 @@ if ($rowid > 0) $subscriptionstatic->ref=$objp->crowid; $subscriptionstatic->id=$objp->crowid; - $typeid = ($objp->cfk_type > 0 ? $objp->cfk_type : $objp->typeid); + $typeid = ($objp->cfk_type > 0 ? $objp->cfk_type : $adh->typeid); if ($typeid > 0) { $adht->fetch($typeid); From 5031b6c06bf7c69cba1343850e5f6ac16fd4d9c0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 11:18:31 +0200 Subject: [PATCH 088/127] Fix bad id --- htdocs/adherents/subscription/list.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/htdocs/adherents/subscription/list.php b/htdocs/adherents/subscription/list.php index c93e4184325..f7790a36d00 100644 --- a/htdocs/adherents/subscription/list.php +++ b/htdocs/adherents/subscription/list.php @@ -142,7 +142,7 @@ $accountstatic=new Account($db); $now=dol_now(); // List of subscriptions -$sql = "SELECT d.rowid, d.login, d.firstname, d.lastname, d.societe, d.photo, d.statut,"; +$sql = "SELECT d.rowid, d.login, d.firstname, d.lastname, d.societe, d.photo, d.statut, d.fk_adherent_type as type,"; $sql.= " c.rowid as crowid, c.fk_type, c.subscription,"; $sql.= " c.dateadh, c.datef, c.datec as date_creation, c.tms as date_update,"; $sql.= " c.fk_bank as bank, c.note,"; @@ -225,7 +225,7 @@ $param=''; if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage); if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit); if ($statut != '') $param.="&statut=".urlencode($statut); -if ($search_type) $param.="&search_type=".urlencode($search_type); +if ($search_type) $param.="&search_type=".urlencode($search_type); if ($date_select) $param.="&date_select=".urlencode($date_select); if ($search_lastname) $param.="&search_lastname=".urlencode($search_lastname); if ($search_login) $param.="&search_login=".urlencode($search_login); @@ -457,9 +457,11 @@ while ($i < min($num, $limit)) $adherent->statut=$obj->statut; $adherent->login=$obj->login; $adherent->photo=$obj->photo; + $adherent->typeid=$obj->type; + $typeid = ($obj->fk_type > 0 ? $obj->fk_type : $adherent->typeid); $adht = new AdherentType($db); - $adht->fetch($obj->fk_type); + $adht->fetch($typeid); print ''; @@ -473,7 +475,10 @@ while ($i < min($num, $limit)) if (! empty($arrayfields['d.fk_type']['checked'])) { print ''; if (! $i) $totalarray['nbfield']++; } From b8b0ad0d27ad9bef4054b0ceabf3727d24ac41c0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 11:22:35 +0200 Subject: [PATCH 089/127] Fix migration --- htdocs/install/mysql/migration/9.0.0-10.0.0.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql index 1270b8b279a..bf08e794a65 100644 --- a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql +++ b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql @@ -96,6 +96,8 @@ ALTER TABLE llx_adherent ADD gender VARCHAR(10); ALTER TABLE llx_adherent_type ADD morphy VARCHAR(3); ALTER TABLE llx_subscription ADD fk_type integer; +UPDATE llx_subscription as s SET fk_type = (SELECT fk_adherent_type FROM llx_adherent as a where a.rowid = s.fk_adherent) where fk_type IS NULL; + -- Add url_id into unique index of bank_url ALTER TABLE llx_bank_url DROP INDEX uk_bank_url; ALTER TABLE llx_bank_url ADD UNIQUE INDEX uk_bank_url (fk_bank, url_id, type); From b6ad78fdd93584b7b7045ba8675294d57b7ffc91 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 11:25:36 +0200 Subject: [PATCH 090/127] Fix sort --- htdocs/adherents/subscription/list.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/adherents/subscription/list.php b/htdocs/adherents/subscription/list.php index f7790a36d00..e3eb9b595ee 100644 --- a/htdocs/adherents/subscription/list.php +++ b/htdocs/adherents/subscription/list.php @@ -409,23 +409,23 @@ if (! empty($arrayfields['d.login']['checked'])) } if (! empty($arrayfields['t.libelle']['checked'])) { - print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "c.note", $param, "", 'align="left"', $sortfield, $sortorder); + print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "c.note", $param, "", '', $sortfield, $sortorder); } if (! empty($arrayfields['d.bank']['checked'])) { - print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "b.fk_account", $pram, "", "", $sortfield, $sortorder); + print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "b.fk_account", $param, "", "", $sortfield, $sortorder); } if (! empty($arrayfields['c.dateadh']['checked'])) { - print_liste_field_titre("DateStart", $_SERVER["PHP_SELF"], "c.dateadh", $param, "", 'align="center"', $sortfield, $sortorder); + print_liste_field_titre("DateStart", $_SERVER["PHP_SELF"], "c.dateadh", $param, "", '', $sortfield, $sortorder, 'center nowraponall '); } if (! empty($arrayfields['c.datef']['checked'])) { - print_liste_field_titre("DateEnd", $_SERVER["PHP_SELF"], "c.datef", $param, "", 'align="center"', $sortfield, $sortorder); + print_liste_field_titre("DateEnd", $_SERVER["PHP_SELF"], "c.datef", $param, "", '', $sortfield, $sortorder, 'center nowraponall '); } if (! empty($arrayfields['d.amount']['checked'])) { - print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "c.subscription", $param, "", 'class="right"', $sortfield, $sortorder); + print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "c.subscription", $param, "", '', $sortfield, $sortorder, 'right '); } // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; From 560f145a32a0d38c348a32e7f6b0de85dfed43b9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 11:35:40 +0200 Subject: [PATCH 091/127] Fix css --- htdocs/theme/eldy/global.inc.php | 9 +++++---- htdocs/theme/md/style.css.php | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index f44d8da8a69..15b986d4bff 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -158,6 +158,7 @@ div.buttonpayment input { border-bottom: unset; font-weight: bold; text-transform: uppercase; + cursor: pointer; } input.buttonpaymentcb { background-image: url(); @@ -627,20 +628,20 @@ select.flat.selectlimit { .amountpaymentcomplete { color: #008800; font-weight: bold; - font-size: 1.4em; + font-size: 1.2em; } .amountremaintopay { color: #880000; font-weight: bold; - font-size: 1.4em; + font-size: 1.2em; } .amountremaintopayback { font-weight: bold; - font-size: 1.4em; + font-size: 1.2em; } .amountpaymentneutral { font-weight: bold; - font-size: 1.4em; + font-size: 1.2em; } .savingdocmask { margin-top: 6px; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 8020a490181..6fd50fa42b3 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -374,6 +374,7 @@ div.buttonpayment input { font-weight: bold; text-transform: uppercase; color: #333; + cursor: pointer; } input.buttonpaymentcb { background-image: url(); From 3c6d271c67b6eb1607a2b50b7d338262edea39c7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 12:42:36 +0200 Subject: [PATCH 092/127] Removed deprecated fields --- .../fourn/class/fournisseur.facture.class.php | 23 ++++++------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 4e861cd146a..2796a3ad7a0 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -2726,12 +2726,6 @@ class SupplierInvoiceLine extends CommonObjectLine */ public $ref_supplier; - /** - * @deprecated - * @see $label - */ - public $libelle; - /** * Product description * @var string @@ -2746,6 +2740,10 @@ class SupplierInvoiceLine extends CommonObjectLine */ public $pu_ht; + /** + * Unit price excluded taxes + * @var float + */ public $subprice; /** @@ -2754,15 +2752,6 @@ class SupplierInvoiceLine extends CommonObjectLine */ public $pu_ttc; - /** - * Total VAT amount - * @var float - * @deprecated Use $total_tva instead - * @see $total_tva - */ - public $tva; - - public $total_tva; /** * Id of the corresponding supplier invoice @@ -2805,6 +2794,7 @@ class SupplierInvoiceLine extends CommonObjectLine public $remise_percent; public $total_ht; public $total_ttc; + public $total_tva; public $total_localtax1; public $total_localtax2; @@ -2901,7 +2891,7 @@ class SupplierInvoiceLine extends CommonObjectLine $this->localtax2_type = $obj->localtax2_type; $this->qty = $obj->qty; $this->remise_percent = $obj->remise_percent; - $this->tva = $obj->total_tva; + $this->tva = $obj->total_tva; // deprecated $this->total_ht = $obj->total_ht; $this->total_tva = $obj->total_tva; $this->total_localtax1 = $obj->total_localtax1; @@ -3112,6 +3102,7 @@ class SupplierInvoiceLine extends CommonObjectLine if (empty($this->localtax2_tx)) $this->localtax2_tx=0; if (empty($this->localtax1_type)) $this->localtax1_type='0'; if (empty($this->localtax2_type)) $this->localtax2_type='0'; + if (empty($this->total_tva)) $this->total_tva=0; if (empty($this->total_localtax1)) $this->total_localtax1=0; if (empty($this->total_localtax2)) $this->total_localtax2=0; if (empty($this->rang)) $this->rang=0; From 8cc6c1893168d82600232be4134d0b18a9fcc85e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 12:53:23 +0200 Subject: [PATCH 093/127] Fix bad label on supplier invoice --- .../fourn/class/fournisseur.facture.class.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 2796a3ad7a0..073497a46f3 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -91,6 +91,9 @@ class FactureFournisseur extends CommonInvoice */ public $ref; + public $label; + public $libelle; // @deprecated + public $product_ref; public $ref_supplier; public $socid; @@ -112,7 +115,6 @@ class FactureFournisseur extends CommonInvoice public $paye; public $author; - public $libelle; /** * Date creation record (datec) @@ -645,7 +647,7 @@ class FactureFournisseur extends CommonInvoice $this->date = $this->db->jdate($obj->datef); $this->datep = $this->db->jdate($obj->datef); $this->tms = $this->db->jdate($obj->tms); - $this->libelle = $obj->libelle; + $this->libelle = $obj->libelle; // deprecated $this->label = $obj->libelle; $this->paye = $obj->paye; $this->amount = $obj->amount; @@ -849,7 +851,8 @@ class FactureFournisseur extends CommonInvoice if (isset($this->entity)) $this->entity=trim($this->entity); if (isset($this->type)) $this->type=trim($this->type); if (isset($this->fk_soc)) $this->fk_soc=trim($this->fk_soc); - if (isset($this->libelle)) $this->libelle=trim($this->libelle); + if (isset($this->label)) $this->label=trim($this->label); + if (isset($this->libelle)) $this->libelle=trim($this->libelle); // deprecated if (isset($this->paye)) $this->paye=trim($this->paye); if (isset($this->amount)) $this->amount=trim($this->amount); if (isset($this->remise)) $this->remise=trim($this->remise); @@ -2280,8 +2283,8 @@ class FactureFournisseur extends CommonInvoice $label .= '
' . $langs->trans('Ref') . ': ' . $this->ref; if (! empty($this->ref_supplier)) $label.= '
' . $langs->trans('RefSupplier') . ': ' . $this->ref_supplier; - if (! empty($this->libelle)) - $label.= '
' . $langs->trans('Label') . ': ' . $this->libelle; + if (! empty($this->label)) + $label.= '
' . $langs->trans('Label') . ': ' . $this->label; if (! empty($this->date)) $label .= '
' . $langs->trans('Date') . ': ' . dol_print_date($this->date, 'day'); if (! empty($this->total_ht)) @@ -2847,10 +2850,10 @@ class SupplierInvoiceLine extends CommonObjectLine */ public function fetch($rowid) { - $sql = 'SELECT f.rowid, f.ref as ref_supplier, f.description, f.date_start, f.date_end, f.pu_ht, f.pu_ttc, f.qty, f.remise_percent, f.tva_tx'; + $sql = 'SELECT f.rowid, f.ref as ref_supplier, f.libelle as label, f.description, f.date_start, f.date_end, f.pu_ht, f.pu_ttc, f.qty, f.remise_percent, f.tva_tx,'; $sql.= ', f.localtax1_type, f.localtax2_type, f.localtax1_tx, f.localtax2_tx, f.total_localtax1, f.total_localtax2 '; $sql.= ', f.total_ht, f.tva as total_tva, f.total_ttc, f.fk_facture_fourn, f.fk_product, f.product_type, f.info_bits, f.rang, f.special_code, f.fk_parent_line, f.fk_unit'; - $sql.= ', p.rowid as product_id, p.ref as product_ref, p.label as label, p.description as product_desc'; + $sql.= ', p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.description as product_desc'; $sql.= ', f.multicurrency_subprice, f.multicurrency_total_ht, f.multicurrency_total_tva, multicurrency_total_ttc'; $sql.= ' FROM '.MAIN_DB_PREFIX.'facture_fourn_det as f'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON f.fk_product = p.rowid'; @@ -2899,7 +2902,7 @@ class SupplierInvoiceLine extends CommonObjectLine $this->total_ttc = $obj->total_ttc; $this->fk_product = $obj->fk_product; $this->product_type = $obj->product_type; - $this->product_label = $obj->label; + $this->product_label = $obj->product_label; $this->info_bits = $obj->info_bits; $this->tva_npr = ($obj->info_bits & 1 == 1) ? 1 : 0; $this->fk_parent_line = $obj->fk_parent_line; From 1c924ef17ea93b7c197f7935c341d2db51f1b675 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 12:53:23 +0200 Subject: [PATCH 094/127] Fix bad label on supplier invoice --- .../fourn/class/fournisseur.facture.class.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 4e861cd146a..daba64e2e39 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -91,6 +91,9 @@ class FactureFournisseur extends CommonInvoice */ public $ref; + public $label; + public $libelle; // @deprecated + public $product_ref; public $ref_supplier; public $socid; @@ -112,7 +115,6 @@ class FactureFournisseur extends CommonInvoice public $paye; public $author; - public $libelle; /** * Date creation record (datec) @@ -645,7 +647,7 @@ class FactureFournisseur extends CommonInvoice $this->date = $this->db->jdate($obj->datef); $this->datep = $this->db->jdate($obj->datef); $this->tms = $this->db->jdate($obj->tms); - $this->libelle = $obj->libelle; + $this->libelle = $obj->libelle; // deprecated $this->label = $obj->libelle; $this->paye = $obj->paye; $this->amount = $obj->amount; @@ -849,7 +851,8 @@ class FactureFournisseur extends CommonInvoice if (isset($this->entity)) $this->entity=trim($this->entity); if (isset($this->type)) $this->type=trim($this->type); if (isset($this->fk_soc)) $this->fk_soc=trim($this->fk_soc); - if (isset($this->libelle)) $this->libelle=trim($this->libelle); + if (isset($this->label)) $this->label=trim($this->label); + if (isset($this->libelle)) $this->libelle=trim($this->libelle); // deprecated if (isset($this->paye)) $this->paye=trim($this->paye); if (isset($this->amount)) $this->amount=trim($this->amount); if (isset($this->remise)) $this->remise=trim($this->remise); @@ -2280,8 +2283,8 @@ class FactureFournisseur extends CommonInvoice $label .= '
' . $langs->trans('Ref') . ': ' . $this->ref; if (! empty($this->ref_supplier)) $label.= '
' . $langs->trans('RefSupplier') . ': ' . $this->ref_supplier; - if (! empty($this->libelle)) - $label.= '
' . $langs->trans('Label') . ': ' . $this->libelle; + if (! empty($this->label)) + $label.= '
' . $langs->trans('Label') . ': ' . $this->label; if (! empty($this->date)) $label .= '
' . $langs->trans('Date') . ': ' . dol_print_date($this->date, 'day'); if (! empty($this->total_ht)) @@ -2857,10 +2860,10 @@ class SupplierInvoiceLine extends CommonObjectLine */ public function fetch($rowid) { - $sql = 'SELECT f.rowid, f.ref as ref_supplier, f.description, f.date_start, f.date_end, f.pu_ht, f.pu_ttc, f.qty, f.remise_percent, f.tva_tx'; + $sql = 'SELECT f.rowid, f.ref as ref_supplier, f.libelle as label, f.description, f.date_start, f.date_end, f.pu_ht, f.pu_ttc, f.qty, f.remise_percent, f.tva_tx,'; $sql.= ', f.localtax1_type, f.localtax2_type, f.localtax1_tx, f.localtax2_tx, f.total_localtax1, f.total_localtax2 '; $sql.= ', f.total_ht, f.tva as total_tva, f.total_ttc, f.fk_facture_fourn, f.fk_product, f.product_type, f.info_bits, f.rang, f.special_code, f.fk_parent_line, f.fk_unit'; - $sql.= ', p.rowid as product_id, p.ref as product_ref, p.label as label, p.description as product_desc'; + $sql.= ', p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.description as product_desc'; $sql.= ', f.multicurrency_subprice, f.multicurrency_total_ht, f.multicurrency_total_tva, multicurrency_total_ttc'; $sql.= ' FROM '.MAIN_DB_PREFIX.'facture_fourn_det as f'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON f.fk_product = p.rowid'; @@ -2909,7 +2912,7 @@ class SupplierInvoiceLine extends CommonObjectLine $this->total_ttc = $obj->total_ttc; $this->fk_product = $obj->fk_product; $this->product_type = $obj->product_type; - $this->product_label = $obj->label; + $this->product_label = $obj->product_label; $this->info_bits = $obj->info_bits; $this->tva_npr = ($obj->info_bits & 1 == 1) ? 1 : 0; $this->fk_parent_line = $obj->fk_parent_line; From fa476b49949123ff4c863417206f52e74a680d87 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 13:00:02 +0200 Subject: [PATCH 095/127] Properties ->libelle_incoterms were renamed into ->label_incoterms --- htdocs/adherents/class/api_members.class.php | 2 +- htdocs/adherents/class/api_memberstypes.class.php | 2 +- htdocs/api/class/api.class.php | 2 +- htdocs/blockedlog/class/blockedlog.class.php | 2 +- htdocs/categories/class/api_categories.class.php | 2 +- htdocs/comm/action/class/api_agendaevents.class.php | 2 +- htdocs/comm/propal/card.php | 4 ++-- htdocs/comm/propal/class/propal.class.php | 4 ++-- htdocs/commande/card.php | 4 ++-- htdocs/commande/class/commande.class.php | 4 ++-- htdocs/compta/facture/card.php | 4 ++-- htdocs/compta/facture/class/facture.class.php | 4 ++-- htdocs/core/class/commonobject.class.php | 6 +++--- htdocs/expedition/card.php | 4 ++-- htdocs/expedition/class/expedition.class.php | 4 ++-- htdocs/expedition/shipment.php | 2 +- htdocs/fourn/class/fournisseur.commande.class.php | 6 +++--- htdocs/fourn/class/fournisseur.facture.class.php | 6 +++--- htdocs/fourn/commande/card.php | 4 ++-- htdocs/fourn/facture/card.php | 4 ++-- htdocs/livraison/card.php | 2 +- htdocs/livraison/class/livraison.class.php | 4 ++-- htdocs/product/stock/class/api_stockmovements.class.php | 2 +- htdocs/projet/class/api_projects.class.php | 2 +- htdocs/projet/class/api_tasks.class.php | 2 +- htdocs/reception/card.php | 4 ++-- htdocs/reception/class/reception.class.php | 4 ++-- htdocs/societe/card.php | 2 +- htdocs/societe/class/societe.class.php | 6 +++--- htdocs/ticket/class/api_tickets.class.php | 2 +- htdocs/user/class/api_users.class.php | 2 +- 31 files changed, 52 insertions(+), 52 deletions(-) diff --git a/htdocs/adherents/class/api_members.class.php b/htdocs/adherents/class/api_members.class.php index e5b93c4bfd1..7ad51fdcfda 100644 --- a/htdocs/adherents/class/api_members.class.php +++ b/htdocs/adherents/class/api_members.class.php @@ -304,7 +304,7 @@ class Members extends DolibarrApi // Remove the subscriptions because they are handled as a subresource. unset($object->subscriptions); unset($object->fk_incoterms); - unset($object->libelle_incoterms); + unset($object->label_incoterms); unset($object->location_incoterms); unset($object->fk_delivery_address); unset($object->shipping_method_id); diff --git a/htdocs/adherents/class/api_memberstypes.class.php b/htdocs/adherents/class/api_memberstypes.class.php index abfaf84993d..80b7d738ad7 100644 --- a/htdocs/adherents/class/api_memberstypes.class.php +++ b/htdocs/adherents/class/api_memberstypes.class.php @@ -307,7 +307,7 @@ class MembersTypes extends DolibarrApi unset($object->note_public); unset($object->note_private); unset($object->fk_incoterms); - unset($object->libelle_incoterms); + unset($object->label_incoterms); unset($object->location_incoterms); unset($object->name); unset($object->lastname); diff --git a/htdocs/api/class/api.class.php b/htdocs/api/class/api.class.php index eb5cd3c73fb..458de02a2db 100644 --- a/htdocs/api/class/api.class.php +++ b/htdocs/api/class/api.class.php @@ -186,7 +186,7 @@ class DolibarrApi unset($object->lines[$i]->note_public); unset($object->lines[$i]->note_private); unset($object->lines[$i]->fk_incoterms); - unset($object->lines[$i]->libelle_incoterms); + unset($object->lines[$i]->label_incoterms); unset($object->lines[$i]->location_incoterms); unset($object->lines[$i]->name); unset($object->lines[$i]->lastname); diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php index d7302a2c795..c313a0b7666 100644 --- a/htdocs/blockedlog/class/blockedlog.class.php +++ b/htdocs/blockedlog/class/blockedlog.class.php @@ -398,7 +398,7 @@ class BlockedLog 'name','lastname','firstname','region','region_id','region_code','state','state_id','state_code','country','country_id','country_code', 'total_ht','total_tva','total_ttc','total_localtax1','total_localtax2', 'barcode_type','barcode_type_code','barcode_type_label','barcode_type_coder','mode_reglement_id','cond_reglement_id','mode_reglement','cond_reglement','shipping_method_id', - 'fk_incoterms','libelle_incoterms','location_incoterms','lines') + 'fk_incoterms','label_incoterms','location_incoterms','lines') ); } diff --git a/htdocs/categories/class/api_categories.class.php b/htdocs/categories/class/api_categories.class.php index c389e1b63d1..eecb2f44048 100644 --- a/htdocs/categories/class/api_categories.class.php +++ b/htdocs/categories/class/api_categories.class.php @@ -290,7 +290,7 @@ class Categories extends DolibarrApi unset($object->total_tva); unset($object->lines); unset($object->fk_incoterms); - unset($object->libelle_incoterms); + unset($object->label_incoterms); unset($object->location_incoterms); unset($object->civility_id); unset($object->name); diff --git a/htdocs/comm/action/class/api_agendaevents.class.php b/htdocs/comm/action/class/api_agendaevents.class.php index ec899d72ae1..833f97b3b6b 100644 --- a/htdocs/comm/action/class/api_agendaevents.class.php +++ b/htdocs/comm/action/class/api_agendaevents.class.php @@ -356,7 +356,7 @@ class AgendaEvents extends DolibarrApi unset($object->total_localtax2); unset($object->total_ttc); unset($object->fk_incoterms); - unset($object->libelle_incoterms); + unset($object->label_incoterms); unset($object->location_incoterms); unset($object->name); unset($object->lastname); diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 7331d7a86e9..8b52aedcaad 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -1688,7 +1688,7 @@ if ($action == 'create') if (!empty($conf->incoterm->enabled)) { print '
'; - print ''; + print ''; print ''; @@ -2305,7 +2305,7 @@ $formquestion = array_merge($formquestion, array( print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; @@ -1973,7 +1973,7 @@ elseif ($id || $ref) print ''; - print ''; + print ''; print ''; @@ -2151,7 +2151,7 @@ elseif (! empty($object->id)) print ''; - print ''; + print ''; print ''; @@ -2617,7 +2617,7 @@ else print ''; - print ''; + print ''; print ''; @@ -1602,7 +1602,7 @@ elseif ($id || $ref) print ''; print ''; print ''; print ''; } From 7f62fdbfe454fe2cf2ec029e33fa7686a9443291 Mon Sep 17 00:00:00 2001 From: atm-quentin Date: Tue, 25 Jun 2019 14:16:00 +0200 Subject: [PATCH 104/127] FIX buyprice barcode default val --- htdocs/product/fournisseurs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index dbcdec666e3..f1e27c02501 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -688,7 +688,7 @@ SCRIPT; print ''; print ''; print ''; print ''; } From 171a173935537aca3ce6ff6f8bf944e94f3c798b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 14:30:48 +0200 Subject: [PATCH 105/127] Fix phpcs --- htdocs/core/actions_massactions.inc.php | 30 ++++++++++++------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index be6dcf37bfa..f474b1b05f8 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -171,7 +171,7 @@ if (! $error && $massaction == 'confirm_presend') } } } - $sendto=implode(',',$tmparray); + $sendto=implode(',', $tmparray); // Define $sendtocc $receivercc=$_POST['receivercc']; @@ -196,7 +196,7 @@ if (! $error && $massaction == 'confirm_presend') } elseif ($val) // Id du contact { - $tmparray[] = $thirdparty->contact_get_property((int) $val,'email'); + $tmparray[] = $thirdparty->contact_get_property((int) $val, 'email'); //$sendtoid[] = $val; TODO Add also id of contact in CC ? } } @@ -385,8 +385,8 @@ if (! $error && $massaction == 'confirm_presend') { // Make substitution in email content $substitutionarray=getCommonSubstitutionArray($langs, 0, null, $objecttmp); - $substitutionarray['__ID__'] = ($oneemailperrecipient ? join(', ',array_keys($listofqualifiedobj)) : $objecttmp->id); - $substitutionarray['__REF__'] = ($oneemailperrecipient ? join(', ',$listofqualifiedref) : $objecttmp->ref); + $substitutionarray['__ID__'] = ($oneemailperrecipient ? join(', ', array_keys($listofqualifiedobj)) : $objecttmp->id); + $substitutionarray['__REF__'] = ($oneemailperrecipient ? join(', ', $listofqualifiedref) : $objecttmp->ref); $substitutionarray['__EMAIL__'] = $thirdparty->email; $substitutionarray['__CHECK_READ__'] = ''; @@ -466,7 +466,7 @@ if (! $error && $massaction == 'confirm_presend') $result=$mailfile->sendfile(); if ($result) { - $resaction.=$langs->trans('MailSuccessfulySent',$mailfile->getValidAddress($from,2),$mailfile->getValidAddress($sendto,2)).'
'; // Must not contain " + $resaction.=$langs->trans('MailSuccessfulySent', $mailfile->getValidAddress($from, 2), $mailfile->getValidAddress($sendto, 2)).'
'; // Must not contain " $error=0; @@ -574,7 +574,7 @@ if (! $error && $massaction == 'confirm_presend') if ($massaction == 'confirm_createbills') // Create bills from orders { - $orders = GETPOST('toselect','array'); + $orders = GETPOST('toselect', 'array'); $createbills_onebythird = GETPOST('createbills_onebythird', 'int'); $validate_invoices = GETPOST('validate_invoices', 'int'); @@ -936,7 +936,7 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se $basename = dol_sanitizeFileName($basename); foreach($listoffiles as $filefound) { - if (strstr($filefound["name"],$basename)) + if (strstr($filefound["name"], $basename)) { $files[] = $uploaddir.'/'.$basename.'/'.$filefound["name"]; break; @@ -950,7 +950,7 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang=GETPOST('lang_id', 'aZ09'); if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$objecttmp->thirdparty->default_lang; if (! empty($newlang)) { - $outputlangs = new Translate("",$conf); + $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } @@ -961,7 +961,7 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se // Defined name of merged file $filename=strtolower(dol_sanitizeFileName($langs->transnoentities($objectlabel))); - $filename=preg_replace('/\s/','_',$filename); + $filename=preg_replace('/\s/', '_', $filename); // Save merged file if (in_array($objecttmp->element, array('facture', 'facture_fournisseur')) && $search_status == Facture::STATUS_VALIDATED) @@ -975,7 +975,7 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se if (count($files)>0) { $now=dol_now(); - $file=$diroutputmassaction.'/'.$filename.'_'.dol_print_date($now,'dayhourlog').'.pdf'; + $file=$diroutputmassaction.'/'.$filename.'_'.dol_print_date($now, 'dayhourlog').'.pdf'; $input_files = ''; foreach($files as $f) { @@ -989,7 +989,7 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se @chmod($file, octdec($conf->global->MAIN_UMASK)); $langs->load("exports"); - setEventMessages($langs->trans('FileSuccessfullyBuilt', $filename.'_'.dol_print_date($now,'dayhourlog')), null, 'mesgs'); + setEventMessages($langs->trans('FileSuccessfullyBuilt', $filename.'_'.dol_print_date($now, 'dayhourlog')), null, 'mesgs'); } else { @@ -1046,13 +1046,13 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se if ($pagecount) { $now=dol_now(); - $file=$diroutputmassaction.'/'.$filename.'_'.dol_print_date($now,'dayhourlog').'.pdf'; + $file=$diroutputmassaction.'/'.$filename.'_'.dol_print_date($now, 'dayhourlog').'.pdf'; $pdf->Output($file, 'F'); if (! empty($conf->global->MAIN_UMASK)) @chmod($file, octdec($conf->global->MAIN_UMASK)); $langs->load("exports"); - setEventMessages($langs->trans('FileSuccessfullyBuilt', $filename.'_'.dol_print_date($now,'dayhourlog')), null, 'mesgs'); + setEventMessages($langs->trans('FileSuccessfullyBuilt', $filename.'_'.dol_print_date($now, 'dayhourlog')), null, 'mesgs'); } else { @@ -1262,7 +1262,7 @@ if (! $error && $massaction == 'generate_doc' && $permtoread) if ($conf->global->MAIN_MULTILANGS && empty($newlang) && isset($objecttmp->default_lang)) $newlang=$objecttmp->default_lang; // for thirdparty if (! empty($newlang)) { - $outputlangs = new Translate("",$conf); + $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } @@ -1307,5 +1307,5 @@ $parameters['uploaddir']=$uploaddir; $parameters['massaction']=$massaction; $parameters['diroutputmassaction']=$diroutputmassaction; -$reshook=$hookmanager->executeHooks('doMassActions',$parameters, $object, $action); // Note that $action and $object may have been modified by some hooks +$reshook=$hookmanager->executeHooks('doMassActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); From a98ceb584db5526a521ee5e5b9374c9d11547ed7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 16:08:01 +0200 Subject: [PATCH 106/127] Fix syntax error --- htdocs/fourn/class/fournisseur.facture.class.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index daba64e2e39..23aff1a9991 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -596,7 +596,6 @@ class FactureFournisseur extends CommonInvoice $sql.= " t.tva,"; $sql.= " t.localtax1,"; $sql.= " t.localtax2,"; - //$sql.= " t.total,"; $sql.= " t.total_ht,"; $sql.= " t.total_tva,"; $sql.= " t.total_ttc,"; @@ -2860,7 +2859,7 @@ class SupplierInvoiceLine extends CommonObjectLine */ public function fetch($rowid) { - $sql = 'SELECT f.rowid, f.ref as ref_supplier, f.libelle as label, f.description, f.date_start, f.date_end, f.pu_ht, f.pu_ttc, f.qty, f.remise_percent, f.tva_tx,'; + $sql = 'SELECT f.rowid, f.ref as ref_supplier, f.libelle as label, f.description, f.date_start, f.date_end, f.pu_ht, f.pu_ttc, f.qty, f.remise_percent, f.tva_tx'; $sql.= ', f.localtax1_type, f.localtax2_type, f.localtax1_tx, f.localtax2_tx, f.total_localtax1, f.total_localtax2 '; $sql.= ', f.total_ht, f.tva as total_tva, f.total_ttc, f.fk_facture_fourn, f.fk_product, f.product_type, f.info_bits, f.rang, f.special_code, f.fk_parent_line, f.fk_unit'; $sql.= ', p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.description as product_desc'; From 33ce52364a9447bffc291ef9b7f24e257047efe8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 16:08:22 +0200 Subject: [PATCH 107/127] Drop no more used column --- htdocs/install/mysql/migration/10.0.0-11.0.0.sql | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/install/mysql/migration/10.0.0-11.0.0.sql b/htdocs/install/mysql/migration/10.0.0-11.0.0.sql index 5f0d04040de..ca90da80335 100644 --- a/htdocs/install/mysql/migration/10.0.0-11.0.0.sql +++ b/htdocs/install/mysql/migration/10.0.0-11.0.0.sql @@ -43,3 +43,6 @@ ALTER TABLE llx_c_shipment_mode ADD COLUMN entity integer DEFAULT 1 NOT NULL; ALTER TABLE llx_c_shipment_mode DROP INDEX uk_c_shipment_mode; ALTER TABLE llx_c_shipment_mode ADD UNIQUE INDEX uk_c_shipment_mode (code, entity); + +ALTER TABLE llx_facture_fourn DROP COLUMN total; + From 0c3f524319a2c7c5050873bc9b82108569bbfe01 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 16:12:16 +0200 Subject: [PATCH 108/127] Clean code --- htdocs/fourn/class/fournisseur.facture.class.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index ae29c0d6fed..1e282f62776 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -656,7 +656,6 @@ class FactureFournisseur extends CommonInvoice $this->tva = $obj->tva; $this->total_localtax1 = $obj->localtax1; $this->total_localtax2 = $obj->localtax2; - //$this->total = $obj->total; $this->total_ht = $obj->total_ht; $this->total_tva = $obj->total_tva; $this->total_ttc = $obj->total_ttc; @@ -791,13 +790,13 @@ class FactureFournisseur extends CommonInvoice $line->localtax2_type = $obj->localtax2_type; $line->qty = $obj->qty; $line->remise_percent = $obj->remise_percent; - $line->tva = $obj->total_tva; + $line->tva = $obj->total_tva; // deprecated $line->total_ht = $obj->total_ht; + $line->total_ttc = $obj->total_ttc; $line->total_tva = $obj->total_tva; $line->total_localtax1 = $obj->total_localtax1; $line->total_localtax2 = $obj->total_localtax2; $line->fk_facture_fourn = $obj->fk_facture_fourn; - $line->total_ttc = $obj->total_ttc; $line->fk_product = $obj->fk_product; $line->product_type = $obj->product_type; $line->product_label = $obj->label; @@ -899,7 +898,6 @@ class FactureFournisseur extends CommonInvoice $sql.= " tva=".(isset($this->tva)?$this->tva:"null").","; $sql.= " localtax1=".(isset($this->localtax1)?$this->localtax1:"null").","; $sql.= " localtax2=".(isset($this->localtax2)?$this->localtax2:"null").","; - //$sql.= " total=".(isset($this->total)?$this->total:"null").","; $sql.= " total_ht=".(isset($this->total_ht)?$this->total_ht:"null").","; $sql.= " total_tva=".(isset($this->total_tva)?$this->total_tva:"null").","; $sql.= " total_ttc=".(isset($this->total_ttc)?$this->total_ttc:"null").","; From 27ad0d1f88cea27b132b3a3da01df7c741b1362e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 16:35:25 +0200 Subject: [PATCH 109/127] Trans --- htdocs/langs/en_US/admin.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 76631626eeb..d73ff3b4dbc 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1107,7 +1107,7 @@ AreaForAdminOnly=Setup parameters can be set by administrator users only. SystemInfoDesc=System information is miscellaneous technical information you get in read only mode and visible for administrators only. SystemAreaForAdminOnly=This area is available to administrator users only. Dolibarr user permissions cannot change this restriction. CompanyFundationDesc=Edit the information of the company/entity. Click on "%s" or "%s" button at the bottom of the page. -AccountantDesc=Edit the details of your accountant/bookkeeper +AccountantDesc=If you have an external accountant/bookkeeper, you can edit here its information. AccountantFileNumber=Accountant code DisplayDesc=Parameters affecting the look and behaviour of Dolibarr can be modified here. AvailableModules=Available app/modules From a776f3671b7a1e048ff979e81731c7a949e537cd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 16:50:42 +0200 Subject: [PATCH 110/127] Fix demo profiles --- htdocs/public/demo/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/public/demo/index.php b/htdocs/public/demo/index.php index 7228778144f..0f6e21f0984 100644 --- a/htdocs/public/demo/index.php +++ b/htdocs/public/demo/index.php @@ -106,13 +106,13 @@ if (empty($reshook)) // Visible $alwayscheckedmodules=array('barcode','bookmark','categorie','externalrss','fckeditor','geoipmaxmind','gravatar','memcached','syslog','user','webservices'); // Technical module we always want - $alwaysuncheckedmodules=array('dynamicprices','incoterm','loan','multicurrency','paybox','paypal','stripe','google','printing','scanner','skype','workflow'); // Module we dont want by default + $alwaysuncheckedmodules=array('dav','dynamicprices','incoterm','loan','multicurrency','paybox','paypal','stripe','google','printing','scanner','skype','takepos','workflow','website'); // Module we dont want by default // Not visible $alwayshiddencheckedmodules=array('accounting','api','barcode','blockedlog','bookmark','clicktodial','comptabilite','cron','document','domain','externalrss','externalsite','fckeditor','geoipmaxmind','gravatar','label','ldap', 'mailmanspip','notification','oauth','syslog','user','webservices', // Extended modules 'memcached','numberwords','zipautofillfr'); - $alwayshiddenuncheckedmodules=array('ftp','hrm','webservicesclient','websites', + $alwayshiddenuncheckedmodules=array('debugbar','emailcollector','ftp','hrm','modulebuilder','webservicesclient','websites', // Extended modules 'awstats','bittorrent','bootstrap','cabinetmed','cmcic','concatpdf','customfield','deplacement','dolicloud','filemanager','lightbox','mantis','monitoring','moretemplates','multicompany','nltechno','numberingpack','openstreetmap', 'ovh','phenix','phpsysinfo','pibarcode','postnuke','selectbank','skincoloreditor','submiteverywhere','survey','thomsonphonebook','topten','tvacerfa','voyage','webcalendar','webmail'); From 441b279fd86c1e8b893fd26b5a2617918ba23cbd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 18:03:12 +0200 Subject: [PATCH 111/127] Add log to help track travis error --- test/phpunit/FactureFournisseurTest.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/phpunit/FactureFournisseurTest.php b/test/phpunit/FactureFournisseurTest.php index 2d6218471aa..33d503825ac 100644 --- a/test/phpunit/FactureFournisseurTest.php +++ b/test/phpunit/FactureFournisseurTest.php @@ -135,7 +135,7 @@ class FactureFournisseurTest extends PHPUnit_Framework_TestCase $localobject->initAsSpecimen(); $result=$localobject->create($user); - $this->assertLessThan($result, 0); + $this->assertLessThan($result, 0, $localobject->errorsToString()); print __METHOD__." result=".$result."\n"; return $result; } @@ -160,7 +160,7 @@ class FactureFournisseurTest extends PHPUnit_Framework_TestCase $localobject=new FactureFournisseur($this->savdb); $result=$localobject->fetch($id); - $this->assertLessThan($result, 0); + $this->assertLessThan($result, 0, $localobject->errorsToString()); print __METHOD__." id=".$id." result=".$result."\n"; return $localobject; } @@ -186,7 +186,7 @@ class FactureFournisseurTest extends PHPUnit_Framework_TestCase $result=$localobject->update($user); print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); + $this->assertLessThan($result, 0, $localobject->errorsToString()); return $localobject; } @@ -210,7 +210,7 @@ class FactureFournisseurTest extends PHPUnit_Framework_TestCase $result=$localobject->validate($user); print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); + $this->assertLessThan($result, 0, $localobject->errorsToString()); return $localobject; } @@ -265,7 +265,7 @@ class FactureFournisseurTest extends PHPUnit_Framework_TestCase $result=$localobject->delete($user); print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertLessThan($result, 0); + $this->assertLessThan($result, 0, $localobject->errorsToString()); return $result; } } From a2d50eb95ac3fba436190b422a09595fe0fe3fbe Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 18:12:12 +0200 Subject: [PATCH 112/127] Fix sql regression --- htdocs/fourn/class/fournisseur.facture.class.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 23aff1a9991..15169e79f6d 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -343,7 +343,7 @@ class FactureFournisseur extends CommonInvoice $sql.= ", '".$this->db->escape($this->ref_supplier)."'"; $sql.= ", ".$conf->entity; $sql.= ", '".$this->db->escape($this->type)."'"; - $sql.= ", '".$this->db->escape($this->libelle)."'"; + $sql.= ", '".$this->db->escape($this->label?$this->label:$this->libelle)."'"; $sql.= ", ".$this->socid; $sql.= ", '".$this->db->idate($now)."'"; $sql.= ", '".$this->db->idate($this->date)."'"; @@ -484,7 +484,7 @@ class FactureFournisseur extends CommonInvoice { $idligne = $this->db->last_insert_id(MAIN_DB_PREFIX.'facture_fourn_det'); - $this->updateline( + $this->updateline( $idligne, $line->description, $line->pu_ht, @@ -511,8 +511,6 @@ class FactureFournisseur extends CommonInvoice $result=$this->update_price(); if ($result > 0) { - $action='create'; - // Actions on extra fields if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used { @@ -587,7 +585,7 @@ class FactureFournisseur extends CommonInvoice $sql.= " t.datec,"; $sql.= " t.datef,"; $sql.= " t.tms,"; - $sql.= " t.libelle,"; + $sql.= " t.libelle as label,"; $sql.= " t.paye,"; $sql.= " t.amount,"; $sql.= " t.remise,"; @@ -646,8 +644,8 @@ class FactureFournisseur extends CommonInvoice $this->date = $this->db->jdate($obj->datef); $this->datep = $this->db->jdate($obj->datef); $this->tms = $this->db->jdate($obj->tms); - $this->libelle = $obj->libelle; // deprecated - $this->label = $obj->libelle; + $this->libelle = $obj->label; // deprecated + $this->label = $obj->label; $this->paye = $obj->paye; $this->amount = $obj->amount; $this->remise = $obj->remise; @@ -2859,7 +2857,7 @@ class SupplierInvoiceLine extends CommonObjectLine */ public function fetch($rowid) { - $sql = 'SELECT f.rowid, f.ref as ref_supplier, f.libelle as label, f.description, f.date_start, f.date_end, f.pu_ht, f.pu_ttc, f.qty, f.remise_percent, f.tva_tx'; + $sql = 'SELECT f.rowid, f.ref as ref_supplier, f.description, f.date_start, f.date_end, f.pu_ht, f.pu_ttc, f.qty, f.remise_percent, f.tva_tx'; $sql.= ', f.localtax1_type, f.localtax2_type, f.localtax1_tx, f.localtax2_tx, f.total_localtax1, f.total_localtax2 '; $sql.= ', f.total_ht, f.tva as total_tva, f.total_ttc, f.fk_facture_fourn, f.fk_product, f.product_type, f.info_bits, f.rang, f.special_code, f.fk_parent_line, f.fk_unit'; $sql.= ', p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.description as product_desc'; From 4696d35bcbc5db53a46fd66a03bb4d8ecd08ab7b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 19:02:24 +0200 Subject: [PATCH 113/127] Fix we need to keep temp dir --- htdocs/core/class/utils.class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/core/class/utils.class.php b/htdocs/core/class/utils.class.php index 3d43a319e51..8f2b1ef303e 100644 --- a/htdocs/core/class/utils.class.php +++ b/htdocs/core/class/utils.class.php @@ -165,6 +165,12 @@ class Utils } else $this->output=$langs->trans("PurgeNothingToDelete").($choice == 'tempfilesold' ? ' (older than 24h)':''); + // Recreate temp dir that are not automatically recreated for performance purpose + if (! empty($conf->api->enabled)) + { + dol_mkdir($conf->api->dir_temp); + } + //return $count; return 0; // This function can be called by cron so must return 0 if OK } From d41850c7cdf0e326815b3e7a9906506f0655d124 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 20:02:14 +0200 Subject: [PATCH 114/127] Fix purge of old files --- htdocs/core/class/utils.class.php | 25 +++++++++++++++---------- htdocs/langs/en_US/admin.lang | 2 +- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/htdocs/core/class/utils.class.php b/htdocs/core/class/utils.class.php index 8f2b1ef303e..6b6d2d42c67 100644 --- a/htdocs/core/class/utils.class.php +++ b/htdocs/core/class/utils.class.php @@ -50,33 +50,36 @@ class Utils * Purge files into directory of data files. * CAN BE A CRON TASK * - * @param string $choice Choice of purge mode ('tempfiles', '' or 'tempfilesold' to purge temp older than 24h, 'allfiles', 'logfile') - * @return int 0 if OK, < 0 if KO (this function is used also by cron so only 0 is OK) + * @param string $choice Choice of purge mode ('tempfiles', '' or 'tempfilesold' to purge temp older than $nbsecondsold seconds, 'allfiles', 'logfile') + * @param int $nbsecondsold Nb of seconds old to accept deletion of a directory if $choice is 'tempfilesold' + * @return int 0 if OK, < 0 if KO (this function is used also by cron so only 0 is OK) */ - function purgeFiles($choice='tempfilesold') + function purgeFiles($choice = 'tempfilesold', $nbsecondsold = 86400) { global $conf, $langs, $dolibarr_main_data_root; $langs->load("admin"); - dol_syslog("Utils::purgeFiles choice=".$choice, LOG_DEBUG); require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $filesarray=array(); if (empty($choice)) $choice='tempfilesold'; + dol_syslog("Utils::purgeFiles choice=".$choice, LOG_DEBUG); + if ($choice=='tempfiles' || $choice=='tempfilesold') { // Delete temporary files if ($dolibarr_main_data_root) { - $filesarray=dol_dir_list($dolibarr_main_data_root, "directories", 1, '^temp$', '', 'name', SORT_ASC, 2, 0, '', 1); // Do not follow symlinks - if ($choice == 'tempfilesold') + $filesarray=dol_dir_list($dolibarr_main_data_root, "directories", 1, '^temp$', '', 'name', SORT_ASC, 2, 0, '', 1); // Do not follow symlinks + + if ($choice == 'tempfilesold') { $now = dol_now(); foreach($filesarray as $key => $val) { - if ($val['date'] > ($now - (24 * 3600))) unset($filesarray[$key]); // Discard files not older than 24h + if ($val['date'] > ($now - ($nbsecondsold))) unset($filesarray[$key]); // Discard temp dir not older than $nbsecondsold } } } @@ -119,13 +122,14 @@ class Utils $counterror=0; if (count($filesarray)) { - foreach($filesarray as $key => $value) + foreach($filesarray as $key => $value) { //print "x ".$filesarray[$key]['fullname']."-".$filesarray[$key]['type']."
\n"; - if ($filesarray[$key]['type'] == 'dir') + if ($filesarray[$key]['type'] == 'dir') { $startcount=0; $tmpcountdeleted=0; + $result=dol_delete_dir_recursive($filesarray[$key]['fullname'], $startcount, 1, 0, $tmpcountdeleted); $count+=$result; $countdeleted+=$tmpcountdeleted; @@ -165,11 +169,12 @@ class Utils } else $this->output=$langs->trans("PurgeNothingToDelete").($choice == 'tempfilesold' ? ' (older than 24h)':''); - // Recreate temp dir that are not automatically recreated for performance purpose + // Recreate temp dir that are not automatically recreated by core code for performance purpose, we need them if (! empty($conf->api->enabled)) { dol_mkdir($conf->api->dir_temp); } + dol_mkdir($conf->user->dir_temp); //return $count; return 0; // This function can be called by cron so must return 0 if OK diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 256cdc46105..a05eb631e13 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -145,7 +145,7 @@ SystemToolsAreaDesc=This area provides administration features. Use the menu to Purge=Purge PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in %s directory). Using this feature is not necessary. It is provided as a workaround for users whose Dolibarr is hosted by a provider that does not offer permissions to delete files generated by the web server. PurgeDeleteLogFile=Delete log files, including %s defined for Syslog module (no risk of losing data) -PurgeDeleteTemporaryFiles=Delete all temporary files (no risk of losing data) +PurgeDeleteTemporaryFiles=Delete all temporary files (no risk of losing data). Note: Deletion is done only if the temp directory was created 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete temporary files PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory %s. Temporary files but also database backup dumps, files attached to elements (third parties, invoices, ...) and uploaded into the ECM module will be deleted. PurgeRunNow=Purge now From 85919d83244127e67db1d7840a8a979f34b90261 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 22:02:19 +0200 Subject: [PATCH 115/127] Code comment --- htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql b/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql index 5317254d79d..a169c6cb0bd 100644 --- a/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql +++ b/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql @@ -22,7 +22,7 @@ CREATE TABLE llx_accounting_bookkeeping rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, -- | multi company id doc_date date NOT NULL, -- FEC:PieceDate - doc_type varchar(30) NOT NULL, -- | facture_client/reglement_client/facture_fournisseur/reglement_fournisseur + doc_type varchar(30) NOT NULL, -- | facture_client/reglement_client/facture_fournisseur/reglement_fournisseur/import doc_ref varchar(300) NOT NULL, -- FEC:PieceRef | facture_client/reglement_client/... reference number fk_doc integer NOT NULL, -- | facture_client/reglement_client/... rowid fk_docdet integer NOT NULL, -- | facture_client/reglement_client/... line rowid From 0ae0951d7d4dcb04f1300e1a84149202cba01a59 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 22:23:30 +0200 Subject: [PATCH 116/127] Fix import code (regex of data imported + import of constant) --- .../core/modules/import/import_csv.modules.php | 16 ++++++++++++++-- .../modules/import/import_xlsx.modules.php | 18 +++++++++++++++--- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/htdocs/core/modules/import/import_csv.modules.php b/htdocs/core/modules/import/import_csv.modules.php index f75e5035670..1311264f7fb 100644 --- a/htdocs/core/modules/import/import_csv.modules.php +++ b/htdocs/core/modules/import/import_csv.modules.php @@ -669,18 +669,30 @@ class ImportCsv extends ModeleImports if (! preg_match('/^'.preg_quote($alias).'\./', $key)) continue; // Not a field of current table if ($val == 'user->id') { - $listfields[] = preg_replace('/^'.preg_quote($alias).'\./', '', $key); + $listfields[] = preg_replace('/^'.preg_quote($alias, '/').'\./', '', $key); $listvalues[] = $user->id; } elseif (preg_match('/^lastrowid-/', $val)) { $tmp=explode('-', $val); $lastinsertid=(isset($last_insert_id_array[$tmp[1]]))?$last_insert_id_array[$tmp[1]]:0; - $keyfield = preg_replace('/^'.preg_quote($alias).'\./', '', $key); + $keyfield = preg_replace('/^'.preg_quote($alias, '/').'\./', '', $key); $listfields[] = $keyfield; $listvalues[] = $lastinsertid; //print $key."-".$val."-".$listfields."-".$listvalues."
";exit; } + elseif (preg_match('/^const-/', $val)) + { + $tmp=explode('-', $val, 2); + $listfields[] = preg_replace('/^'.preg_quote($alias, '/').'\./', '', $key); + $listvalues[] = "'".$tmp[1]."'"; + } + else + { + $this->errors[$error]['lib']='Bad value of profile setup '.$val.' for array_import_fieldshidden'; + $this->errors[$error]['type']='Import profile setup'; + $error++; + } } } //print 'listfields='.$listfields.'
listvalues='.$listvalues.'
'; diff --git a/htdocs/core/modules/import/import_xlsx.modules.php b/htdocs/core/modules/import/import_xlsx.modules.php index ae0290401cc..00db9096bca 100644 --- a/htdocs/core/modules/import/import_xlsx.modules.php +++ b/htdocs/core/modules/import/import_xlsx.modules.php @@ -688,21 +688,33 @@ class ImportXlsx extends ModeleImports // Loop on each hidden fields to add them into listfields/listvalues foreach($objimport->array_import_fieldshidden[0] as $key => $val) { - if (! preg_match('/^'.preg_quote($alias).'\./', $key)) continue; // Not a field of current table + if (! preg_match('/^'.preg_quote($alias, '/').'\./', $key)) continue; // Not a field of current table if ($val == 'user->id') { - $listfields[] = preg_replace('/^'.preg_quote($alias).'\./', '', $key); + $listfields[] = preg_replace('/^'.preg_quote($alias, '/').'\./', '', $key); $listvalues[] = $user->id; } elseif (preg_match('/^lastrowid-/', $val)) { $tmp=explode('-', $val); $lastinsertid=(isset($last_insert_id_array[$tmp[1]]))?$last_insert_id_array[$tmp[1]]:0; - $keyfield = preg_replace('/^'.preg_quote($alias).'\./', '', $key); + $keyfield = preg_replace('/^'.preg_quote($alias, '/').'\./', '', $key); $listfields[] = $keyfield; $listvalues[] = $lastinsertid; //print $key."-".$val."-".$listfields."-".$listvalues."
";exit; } + elseif (preg_match('/^const-/', $val)) + { + $tmp=explode('-', $val, 2); + $listfields[] = preg_replace('/^'.preg_quote($alias, '/').'\./', '', $key); + $listvalues[] = "'".$tmp[1]."'"; + } + else + { + $this->errors[$error]['lib']='Bad value of profile setup '.$val.' for array_import_fieldshidden'; + $this->errors[$error]['type']='Import profile setup'; + $error++; + } } } //print 'listfields='.$listfields.'
listvalues='.$listvalues.'
'; From fc574946b19860f90485ebd5f8852ee1482c177b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 22:23:51 +0200 Subject: [PATCH 117/127] Fix import of ledger --- htdocs/core/modules/modAccounting.class.php | 28 ++++++++++++--------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/htdocs/core/modules/modAccounting.class.php b/htdocs/core/modules/modAccounting.class.php index 65638a1cab2..e4d7faa31ff 100644 --- a/htdocs/core/modules/modAccounting.class.php +++ b/htdocs/core/modules/modAccounting.class.php @@ -264,32 +264,36 @@ class modAccounting extends DolibarrModules $this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon $this->import_tables_array[$r]=array('b'=>MAIN_DB_PREFIX.'accounting_bookkeeping'); // List of tables to insert into (insert done in same order) $this->import_fields_array[$r]=array( - 'b.doc_date'=>"Docdate", - 'b.piece_num'=>"TransactionNumShort", + 'b.piece_num'=>"TransactionNumShort", + 'b.doc_date'=>"Docdate", + //'b.doc_type'=>'Doctype', + 'b.doc_ref'=>'Piece', 'b.code_journal'=>'Codejournal', - 'b.journal_label'=>'JournalLabel', + //'b.journal_label'=>'JournalLabel', 'b.numero_compte'=>'AccountAccounting', - 'b.label_compte'=>'LabelAccount', + //'b.label_compte'=>'LabelAccount', 'b.subledger_account'=>'SubledgerAccount', 'b.subledger_label'=>'SubledgerAccountLabel', 'b.label_operation'=>'LabelOperation', 'b.debit'=>"Debit", 'b.credit'=>"Credit" ); - $this->import_fieldshidden_array[$r]=array('b.fk_user_author'=>'user->id'); // aliastable.field => ('user->id' or 'lastrowid-'.tableparent) + $this->import_fieldshidden_array[$r]=array('b.doc_type'=>'const-import_from_external', 'b.fk_doc'=>'const-0', 'b.fk_docdet'=>'const-0', 'b.fk_user_author'=>'user->id', 'b.date_creation'=>'const-'.dol_print_date(dol_now(), 'standard')); // aliastable.field => ('user->id' or 'lastrowid-'.tableparent) $this->import_regex_array[$r]=array('b.doc_date'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$'); $this->import_examplevalues_array[$r]=array( - 'b.doc_date'=>'formatted as \'.dol_print_date(dol_now(),\'%Y-%m-%d\')', - 'b.piece_num'=>'1', + 'b.piece_num'=>'1', + 'b.doc_date'=>dol_print_date(dol_now(), "%Y-%m-%d"), + //'b.doc_type'=>'import', + 'b.doc_ref'=>'My document ABC', 'b.code_journal'=>"VTE", - 'b.journal_label'=>"Journal des ventes", + //'b.journal_label'=>"Sale journal", 'b.numero_compte'=>"707", - 'b.label_compte'=>'Ventes', + //'b.label_compte'=>'Product account 707', 'b.subledger_account'=>'', 'b.subledger_label'=>'', - 'b.label_operation'=>"Ventes services", - 'b.debit'=>"0,00", - 'b.credit'=>"100,00" + 'b.label_operation'=>"Sale of ABC", + 'b.debit'=>"0", + 'b.credit'=>"100" ); // Chart of accounts From 20471c54e1a24c4cf4de1d387ca6c8df16da2b14 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 22:23:30 +0200 Subject: [PATCH 118/127] Fix import code (regex of data imported + import of constant) Conflicts: htdocs/core/modules/import/import_csv.modules.php htdocs/core/modules/import/import_xlsx.modules.php --- .../core/modules/import/import_csv.modules.php | 16 ++++++++++++++-- .../modules/import/import_xlsx.modules.php | 18 +++++++++++++++--- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/htdocs/core/modules/import/import_csv.modules.php b/htdocs/core/modules/import/import_csv.modules.php index feeddb399c2..38568a81903 100644 --- a/htdocs/core/modules/import/import_csv.modules.php +++ b/htdocs/core/modules/import/import_csv.modules.php @@ -633,18 +633,30 @@ class ImportCsv extends ModeleImports if (! preg_match('/^'.preg_quote($alias).'\./', $key)) continue; // Not a field of current table if ($val == 'user->id') { - $listfields[] = preg_replace('/^'.preg_quote($alias).'\./','',$key); + $listfields[] = preg_replace('/^'.preg_quote($alias, '/').'\./', '', $key); $listvalues[] = $user->id; } elseif (preg_match('/^lastrowid-/',$val)) { $tmp=explode('-',$val); $lastinsertid=(isset($last_insert_id_array[$tmp[1]]))?$last_insert_id_array[$tmp[1]]:0; - $keyfield = preg_replace('/^'.preg_quote($alias).'\./','',$key); + $keyfield = preg_replace('/^'.preg_quote($alias, '/').'\./', '', $key); $listfields[] = $keyfield; $listvalues[] = $lastinsertid; //print $key."-".$val."-".$listfields."-".$listvalues."
";exit; } + elseif (preg_match('/^const-/', $val)) + { + $tmp=explode('-', $val, 2); + $listfields[] = preg_replace('/^'.preg_quote($alias, '/').'\./', '', $key); + $listvalues[] = "'".$tmp[1]."'"; + } + else + { + $this->errors[$error]['lib']='Bad value of profile setup '.$val.' for array_import_fieldshidden'; + $this->errors[$error]['type']='Import profile setup'; + $error++; + } } } //print 'listfields='.$listfields.'
listvalues='.$listvalues.'
'; diff --git a/htdocs/core/modules/import/import_xlsx.modules.php b/htdocs/core/modules/import/import_xlsx.modules.php index 1c5fae77338..486d72f3d0d 100644 --- a/htdocs/core/modules/import/import_xlsx.modules.php +++ b/htdocs/core/modules/import/import_xlsx.modules.php @@ -653,21 +653,33 @@ class ImportXlsx extends ModeleImports // Loop on each hidden fields to add them into listfields/listvalues foreach($objimport->array_import_fieldshidden[0] as $key => $val) { - if (! preg_match('/^'.preg_quote($alias).'\./', $key)) continue; // Not a field of current table + if (! preg_match('/^'.preg_quote($alias, '/').'\./', $key)) continue; // Not a field of current table if ($val == 'user->id') { - $listfields[] = preg_replace('/^'.preg_quote($alias).'\./','',$key); + $listfields[] = preg_replace('/^'.preg_quote($alias, '/').'\./', '', $key); $listvalues[] = $user->id; } elseif (preg_match('/^lastrowid-/',$val)) { $tmp=explode('-',$val); $lastinsertid=(isset($last_insert_id_array[$tmp[1]]))?$last_insert_id_array[$tmp[1]]:0; - $keyfield = preg_replace('/^'.preg_quote($alias).'\./','',$key); + $keyfield = preg_replace('/^'.preg_quote($alias, '/').'\./', '', $key); $listfields[] = $keyfield; $listvalues[] = $lastinsertid; //print $key."-".$val."-".$listfields."-".$listvalues."
";exit; } + elseif (preg_match('/^const-/', $val)) + { + $tmp=explode('-', $val, 2); + $listfields[] = preg_replace('/^'.preg_quote($alias, '/').'\./', '', $key); + $listvalues[] = "'".$tmp[1]."'"; + } + else + { + $this->errors[$error]['lib']='Bad value of profile setup '.$val.' for array_import_fieldshidden'; + $this->errors[$error]['type']='Import profile setup'; + $error++; + } } } //print 'listfields='.$listfields.'
listvalues='.$listvalues.'
'; From ad725b3bb065df9adf5fa6374865d0f303c96aad Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 22:27:35 +0200 Subject: [PATCH 119/127] Doc --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 0ec173983e1..d98d1300e07 100644 --- a/ChangeLog +++ b/ChangeLog @@ -50,6 +50,7 @@ FIX: Use of cron with multicompany FIX: var name FIX: we need to fetch fourn invoice with ref in current entity FIX: Wrong stock movement on supplier credit notes +FIX: Import of record in ledger ***** ChangeLog for 9.0.3 compared to 9.0.2 ***** FIX: #11013 From d5479cd9ae41484b4a818ec56e179b0564c88b5d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 22:37:13 +0200 Subject: [PATCH 120/127] Fix import of ledger --- htdocs/core/modules/modAccounting.class.php | 37 +++++++++++++++++---- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/htdocs/core/modules/modAccounting.class.php b/htdocs/core/modules/modAccounting.class.php index ec8622f2b95..708b3a147b6 100644 --- a/htdocs/core/modules/modAccounting.class.php +++ b/htdocs/core/modules/modAccounting.class.php @@ -262,15 +262,38 @@ class modAccounting extends DolibarrModules $this->import_icon[$r]=$this->picto; $this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon $this->import_tables_array[$r]=array('b'=>MAIN_DB_PREFIX.'accounting_bookkeeping'); // List of tables to insert into (insert done in same order) - $this->import_fields_array[$r]=array('b.doc_date'=>"Docdate",'b.code_journal'=>'Codejournal','b.numero_compte'=>'AccountAccountingShort','b.label_operation'=>'LabelOperation','b.debit'=>"Debit",'b.credit'=>"Credit",'b.date_creation'=>"DateCreation"); - $this->import_fieldshidden_array[$r]=array('b.fk_user'=>'user->id'); // aliastable.field => ('user->id' or 'lastrowid-'.tableparent) - $this->import_convertvalue_array[$r]=array( - 't.fk_projet'=>array('rule'=>'fetchidfromref','classfile'=>'/projet/class/project.class.php','class'=>'Project','method'=>'fetch','element'=>'Project'), - 't.ref'=>array('rule'=>'getrefifauto') + $this->import_fields_array[$r]=array( + 'b.piece_num'=>"TransactionNumShort", + 'b.doc_date'=>"Docdate", + //'b.doc_type'=>'Doctype', + 'b.doc_ref'=>'Piece', + 'b.code_journal'=>'Codejournal', + //'b.journal_label'=>'JournalLabel', + 'b.numero_compte'=>'AccountAccounting', + //'b.label_compte'=>'LabelAccount', + 'b.subledger_account'=>'SubledgerAccount', + 'b.subledger_label'=>'SubledgerAccountLabel', + 'b.label_operation'=>'LabelOperation', + 'b.debit'=>"Debit", + 'b.credit'=>"Credit" ); - //$this->import_convertvalue_array[$r]=array('s.fk_soc'=>array('rule'=>'lastrowid',table='t'); + $this->import_fieldshidden_array[$r]=array('b.doc_type'=>'const-import_from_external', 'b.fk_doc'=>'const-0', 'b.fk_docdet'=>'const-0', 'b.fk_user_author'=>'user->id', 'b.date_creation'=>'const-'.dol_print_date(dol_now(), 'standard')); // aliastable.field => ('user->id' or 'lastrowid-'.tableparent) $this->import_regex_array[$r]=array('b.doc_date'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$'); - //$this->import_examplevalues_array[$r]=array('t.fk_projet'=>'MyProjectRef','t.ref'=>"auto or TK2010-1234",'t.label'=>"My task",'t.progress'=>"0 (not started) to 100 (finished)",'t.datec'=>'1972-10-10','t.note_private'=>"My private note",'t.note_public'=>"My public note"); + $this->import_examplevalues_array[$r]=array( + 'b.piece_num'=>'123 (!!! use next value not already used)', + 'b.doc_date'=>dol_print_date(dol_now(), "%Y-%m-%d"), + //'b.doc_type'=>'import', + 'b.doc_ref'=>'My document ABC', + 'b.code_journal'=>"VTE", + //'b.journal_label'=>"Sale journal", + 'b.numero_compte'=>"707", + //'b.label_compte'=>'Product account 707', + 'b.subledger_account'=>'', + 'b.subledger_label'=>'', + 'b.label_operation'=>"Sale of ABC", + 'b.debit'=>"0", + 'b.credit'=>"100" + ); // Chart of accounts $r++; From 83f5b23ade299fc08e7c30834782b0fceceb628c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 22:39:04 +0200 Subject: [PATCH 121/127] Doc --- htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql b/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql index a169c6cb0bd..88aa6d4e129 100644 --- a/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql +++ b/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql @@ -21,7 +21,8 @@ CREATE TABLE llx_accounting_bookkeeping ( rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, -- | multi company id - doc_date date NOT NULL, -- FEC:PieceDate + piece_num integer NOT NULL, -- FEC:EcritureNum | accounting transaction id + doc_date date NOT NULL, -- FEC:PieceDate | date of source document doc_type varchar(30) NOT NULL, -- | facture_client/reglement_client/facture_fournisseur/reglement_fournisseur/import doc_ref varchar(300) NOT NULL, -- FEC:PieceRef | facture_client/reglement_client/... reference number fk_doc integer NOT NULL, -- | facture_client/reglement_client/... rowid @@ -48,7 +49,6 @@ CREATE TABLE llx_accounting_bookkeeping fk_user integer NULL, -- The id of user that validate the accounting source document code_journal varchar(32) NOT NULL, -- FEC:JournalCode journal_label varchar(255), -- FEC:JournalLib - piece_num integer NOT NULL, -- FEC:EcritureNum | accounting source document date_validated datetime, -- FEC:ValidDate | if empty: movement not validated / if not empty: movement validated (No deleting / No modification) date_export datetime DEFAULT NULL, -- import_key varchar(14), From 67909302834bc9d4f5ce4a5903f5272fa1cae76a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 23:11:49 +0200 Subject: [PATCH 122/127] Add info on signature generator --- build/generate_filelist_xml.php | 1 + 1 file changed, 1 insertion(+) diff --git a/build/generate_filelist_xml.php b/build/generate_filelist_xml.php index ec9ded557ff..2a0b4996f79 100755 --- a/build/generate_filelist_xml.php +++ b/build/generate_filelist_xml.php @@ -121,6 +121,7 @@ else } print "Release : ".$release."\n"; +print "Working on files into : ".DOL_DOCUMENT_ROOT."\n"; print "Include custom in signature : ".$includecustom."\n"; print "Include constants in signature : "; foreach ($includeconstants as $countrycode => $tmp) From 1ae9d94de939d816956f7b5a213b4f70c3ed7db5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 23:11:49 +0200 Subject: [PATCH 123/127] Add info on signature generator --- build/generate_filelist_xml.php | 1 + 1 file changed, 1 insertion(+) diff --git a/build/generate_filelist_xml.php b/build/generate_filelist_xml.php index 0764d64b491..25f4af98207 100755 --- a/build/generate_filelist_xml.php +++ b/build/generate_filelist_xml.php @@ -121,6 +121,7 @@ else } print "Release : ".$release."\n"; +print "Working on files into : ".DOL_DOCUMENT_ROOT."\n"; print "Include custom in signature : ".$includecustom."\n"; print "Include constants in signature : "; foreach ($includeconstants as $countrycode => $tmp) From 162498d2f8b52433ef8d941924515d8b44358864 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 23:11:49 +0200 Subject: [PATCH 124/127] Add info on signature generator --- build/generate_filelist_xml.php | 1 + 1 file changed, 1 insertion(+) diff --git a/build/generate_filelist_xml.php b/build/generate_filelist_xml.php index 5f71ff54072..489f3592f1a 100755 --- a/build/generate_filelist_xml.php +++ b/build/generate_filelist_xml.php @@ -99,6 +99,7 @@ else } print "Release : ".$release."\n"; +print "Working on files into : ".DOL_DOCUMENT_ROOT."\n"; print "Include custom in signature : ".$includecustom."\n"; print "Include constants in signature : "; foreach ($includeconstants as $countrycode => $tmp) From c5572e017670ecb56723231caf13a6888377cb24 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 23:11:49 +0200 Subject: [PATCH 125/127] Add info on signature generator --- build/generate_filelist_xml.php | 1 + 1 file changed, 1 insertion(+) diff --git a/build/generate_filelist_xml.php b/build/generate_filelist_xml.php index 5f71ff54072..489f3592f1a 100755 --- a/build/generate_filelist_xml.php +++ b/build/generate_filelist_xml.php @@ -99,6 +99,7 @@ else } print "Release : ".$release."\n"; +print "Working on files into : ".DOL_DOCUMENT_ROOT."\n"; print "Include custom in signature : ".$includecustom."\n"; print "Include constants in signature : "; foreach ($includeconstants as $countrycode => $tmp) From 9b9070dbf89c17aa1dc37ce7560308fbf9a5667e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 23:26:34 +0200 Subject: [PATCH 126/127] Removed useless files --- htdocs/takepos/dev/img/README.md | 53 ---- htdocs/takepos/dev/img/gfdl-129x44.png | Bin 4709 -> 0 bytes htdocs/takepos/dev/img/gfdl-66x23.png | Bin 2453 -> 0 bytes htdocs/takepos/dev/img/gfdl-logo.svg | 110 ------- htdocs/takepos/dev/img/gpl-v3-logo.svg | 389 ------------------------ htdocs/takepos/dev/img/gplv3-127x51.png | Bin 3471 -> 0 bytes htdocs/takepos/dev/img/gplv3-88x31.png | Bin 2666 -> 0 bytes htdocs/takepos/dev/img/takepos.svg | 70 ----- 8 files changed, 622 deletions(-) delete mode 100644 htdocs/takepos/dev/img/README.md delete mode 100644 htdocs/takepos/dev/img/gfdl-129x44.png delete mode 100644 htdocs/takepos/dev/img/gfdl-66x23.png delete mode 100644 htdocs/takepos/dev/img/gfdl-logo.svg delete mode 100644 htdocs/takepos/dev/img/gpl-v3-logo.svg delete mode 100644 htdocs/takepos/dev/img/gplv3-127x51.png delete mode 100644 htdocs/takepos/dev/img/gplv3-88x31.png delete mode 100644 htdocs/takepos/dev/img/takepos.svg diff --git a/htdocs/takepos/dev/img/README.md b/htdocs/takepos/dev/img/README.md deleted file mode 100644 index 5cd4c76d010..00000000000 --- a/htdocs/takepos/dev/img/README.md +++ /dev/null @@ -1,53 +0,0 @@ -Source images -============= - -Used to generate icons and publication assets. - -Icons ------ - -### Dolibarr - -These resides in the [/img](../../img) directory. - -#### Small - -Required. -Name must begin by ```object_```. - -- Sample: ![object_takepos.png](../../img/object_takepos.png) [object_takepos.png](../../img/object_takepos.png) -- Size: 14×14 pixels -- Type: PNG - -#### Large - -Optional. - -- Sample: ![takepos.png](../../img/takepos.png) [takepos.png](../../img/takepos.png) -- Size: 32×32 pixels -- Type: PNG - -### Dolistore - -Designed to fit a 512×512 icon + publisher branding. - -- Size: 704×704 -- Type: PNG - -Export to 512×512 - -### Transifex - -- Size: 96×96 -- Type: PNG - -### Others - -To be on the safe side, you may also want to generate all popular sizes: -- 16×16 -- 32×32 -- 48×48 -- 64×64 -- 128×128 -- 256×256 -- 512×512 diff --git a/htdocs/takepos/dev/img/gfdl-129x44.png b/htdocs/takepos/dev/img/gfdl-129x44.png deleted file mode 100644 index f2bacfd179a99f051654eaa6ba30089dd8691d7a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4709 zcmV-r5}NIaP)00004b3#c}2nYxW zd%dU$Ce+szoV9OJ5UN#164pJ za0WO590CqYl2p=>Ff$P7r^@&6|A`4W3~T|`N|IF5`l0|F2QD6e^`*?6HSvE?zuzWy zyMy#Y+3fr|ot#{w$8|vvh>MLRF(HQFAT4@*Ao`#{g7ksTbDaj8&CYi}{6cX_1=ZDc z)YjEgS$PJ#-O--t24Fq#t|UnZ!Knn_0@G$(KZf-mukiof_TYiBsGJ!$KgNmd)2_I% zupp*S8%=UjB1uCNNE#A{R;xjhB#KKaFq<0@MLTx81H0YsJa;&-+Z{wk7>JLH0>Er; z;H!;4^RM+=*|RqjNs<^kIF5*jFm~)Z&{jb{0u~CuTR_UtA@QW`S$zQ?#cvabLt^BW z3&}d+RDe+<2eatz8QgTkIC63eIdnLOoLnP$`9;oSUJ;E=mUhe3^iorh^99<#UT*QJ z`!Y#+=ygtHpJvG5I6nBtpV+u*45;IFTL%GwW}e%XH%;1QP+nClxUFRvjyJoth{N~xTIhDEdo^gc(H37_?HGxG7Zy-4-fzq-nKHso|^h4QX9?2s+rw~!J zcdBeb5YXu~gaqpd3DFTB7sY_Y7_Ph`i7}&-*|a5<_dnRgp1m2Zv)Ke70H?<&tXcgy zbIzfKV6oW9$t~pA@sqCK>B2G$20f7xVMIiPGIVep)23dDPN(t6Z?13T+s&z{RLbU` z0<}tsAPCs)4n(^hi^WD$lNF1_iq$F-7#M&~r{R+1M4}?Y`1G?MQK^)u)k@SV6)Kei zheN_9ir8!-qG-ovvm=Tkf*{bpe*^;)`w|kO>(o8|`}6H6l?v2qB>`#`N~Hp;Rm5Vo zVzJl&xcSC$9hTEt31l(>hvTgIPfUm=IVq9kqy(pPI5eImB&kUdgd!lO zpo@NiBuT7UyO}4SSxsGCLx<_rY9*7e8O7Y$lel5}7*~8%RV|B_ywXwA#w#!Wc@Yn$ z%;w$)UUM^}oyA}XVqjtn6UJXg%92~WDk;D{_r2V1{S1bnPANfa4y3K&ll9y9=eqAH zGgXnBS43`J5nq12%aul})esV_MW@rC*9AI{dJS5w22r$ASJyyoU48Sh0drjgl~rf3 zTD?CDwOZ*?+7<*!k`M%87clnrTd!sHyN`D226FR?c;LamvOCpjT4XYTDc4@XsLKa) z`G`Tp#Pr5!G;u8JB%gn=qs0jUAV966vUH1Ec@BrfR~vt3@sd~Eyx{=@`Vt)#My~)h z0Rbv%>l&!2sNv|b0z}cy>USUI_FJz7V8_mbELi*!CR4R5|G2TknL7CjR4N5|c|~OB z6q21&NTIRJ?OzBG8mi}CYoBK9Rl_{)x4gWDox9Wd(-W&&d)CDEkKm=}?`8Dwk}w#8 zI(%-eEkR}J76Q~NY&Mbax2BQypJQZX=8<_M&+Q)06`4#RAwHVqqy)mkg86#m&y<;} z35gtyrM{Sk+5!NJqB(sYFt)QTgiV`Mx$Ev1T`xE)cD@7dov5olb*Jt05#r$Dl#63>h3pLwys^zOaV(KKKTQL&6Xfjh3^@Ipr=D5Ot{+!= z%@-W3bqj}tbWUDZ>C-!uYbJ(r&BT#i&fCyv;k)mD;cstz$`9Mpuv$gbns6c#XAu-W z8~{O(wImnZl%S-vk|v9l0JX}efECZJaWhqqKYB-p3eZAKbU1x_htR)YgwHg=!JTu| zf`YVYwHl8mZD=PQy%y%onn-lEn`k+A9HN8F%l~PG@Nd?9t6Go$nLZb}wX#c9TyW?0 zTsmxEm-2KsDwTo}xRPQy#j-^*S1yof>-L}cPj>|!Gh zu@Sr2(CXKSU2H^h*ifoNPzHpe3J66RU~nCk>JYaV>E3QbA**g@pL%^De7}acx=zk|a@RG?AF#KN;;Y`<4m3 zzh)Du`!Ycg2k}oBQo<{`P7La=DDs+zmMFP2DO>ke#&zo=V`u66EF@-980!xyyAb5%8Br+Y z9VhGpp`m&Y(|_{Rg;j!~L*iMqa0WI@4Q2V8x>=g1PXNtIknh71WVIUm28fI>`29tA zBe-?W zHT>h9KN1;XaJzQHjH?LL1az(D&4h;PJ<2;@T8|70g1{4x&G&2h=Yqiy#ERv2;jr5% z&i>S|WqT+A&Hey5&Au;|J$##6UwQhW?6y;td@zOd-0A~kKd*Arvqy%oib+TLB z%6B*TuVP-1EcHRj1 zumpW$dUx0Xv|{-JH#7e2mc6W6{k7jJ*LId{eVeeqS@+2gtbT8!E4=LCTm9A@ZZcJ4 zGFAJWvepr1a|1Weev*oc8X^;Cq7S>oFZBXI@Ekixfc8HHEkyJQ<>{yHa)l*HV%cLW z`OB;8{8G1?n!0ww9nsN3jTWk^YPoIx3Krl0sw>ZfDYHBD1)3T=S3W>SrgLysuj~3! zPlrQd{(=`co^_It$kBxNpWJb#F5oeWNV5{e`)D4v<$?QVk`N!w;`?8vvbl%xxfj=R zFg=^=rd+|evBQarjiji!oYZ}p?A@E$slk}66Q?j1xqHF;e?3lJT|=k;O<7r|+`>Qa zIYdaX4xL`Z$&)3V$Sx#1=QLSar>Jjm4$|oLfvi}*fW>#;&|&$Xt5tN( zkZx?Uay;uKM~)Vdo9A3(crKRU@u&XI58KiR3?4|##q+wHzazZOCvbKY_3wN?_0-8% zus`)Z7A}5?ox9Qj*!e*Gf&`KNb$wkYg&2TLD)+rtU_ar>|QxcyhJc?^aiX3reYW6S1s zxah{=ka&36Tds+FS%U9UF=MV?evpJNJL;9f{@(YSFn;VFU4ksqMH~sqdVanuDOuv4N*A5u9 zO39=NBb+O2RL)g4a=FYozh1N>+MILk<#OMXC9F0ZGMS7A?wg51DMzJLy2`NHM8xK` z2RfaG$jC4TCdM#s?C?$xg0;y1!~M6o)<*zXtu|NrR;%c$M}S&|IzUB$TIqFStuJ=& zO6Q?vZ=z84A~rb%xl-G4rgNaRB@lpNKsrF`&Q%P%WI(qF?ZJt+Dd#QZ=lSh4Zwkyu11U**Z!Xw&5P^)DBDsa~Oac(|+vsCW68*B``Pvg{tFKP3<8$Y*-phn5(leR~@6iCL6oxK6TBd1il82 zdhjp0RxO1>qlrNm$MXEMi{)qMWt4gglYy^Q(urnp_V+a2uPm&tcq(?~y*O-5#3mpjZ_ z2o2Q}+dqQX{*hchaxjx7T*jb_W3gIA=FWSDAGW0doD^_wdlqtDch(|WraUuzr+ zjV6vAFQB%r0ZWsWCX2OsnZ9$mev`$DDB6jN3~PSr&KKXdld7n=oDV)9GUg1KF z()HkpAP7p}W?%_0*2{I`Vk5cuqW%O2YtQaYpwpn!2cpyVLKN-P)-|~8QBYUcK$)qU zBS-UHUHWbC+`_I$3I6v8f-nTQ8@LikqLqd46YXzi*`oyiUkJ|Oy#Y9Ta);rZ1+H)Y n1+_VfIJdB^ZFB6>wzmHTwMhFML%JGy00000NkvXXu0mjfK;ap? diff --git a/htdocs/takepos/dev/img/gfdl-66x23.png b/htdocs/takepos/dev/img/gfdl-66x23.png deleted file mode 100644 index b43479bf3c817b3f780eb453ef3c4e770e1ddc35..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2453 zcmV;G32OFElDZw|yVYEgfW}Cy|k! zgx#J@dYX;&G#ew5FXBW=C5OK*=2TfN#mCEavsn&k0X^XE@ra^mcvn%BC6d8lC^yN* zgv%!6U+9|78#_Pv8yh$6;F+iA^Rt^S=eg(K;ne9GKHv8bT3R{~4F)91KtjBg?~c9+ zKp>zA^B;UpI`(a;w0h+{e!c3A*(XaX3nahaf8umSeE}d`*s{(aZ~lHS27`z_BN>w{ z)8p|{e7u6l2osYhk4831$g&YhGH}an%V}%tqN%AJS(dos@=M5aq|oK^N}8tUONtUG zDJ`w`0p`JiH8*$g$)CTX_;@+BbuEm(IE%|BY65MYMQ97X`-&a1yv0I5Fc+1&5g9wL>%^HzWsL<5pfe~ zt=*3Vlr=Q8nlw#E6wj`X-5(#~-uu^b)spr6vwa1c22VMN#3je)$7vnod)5J63BHW|K@^ zeG8v`euTB_-$N4<7?J-V-tJmJ2oj+N0%C1lGwEqI06bnF%O2Ydz`Cawgh=Rx$z){A z=xkE^BxjB=4VvWAC4~S)3?a|UP3NTz4{`0(MSQsX3r?0)F)}YBXk(V?7{<02KEJ|* z$@8dhXd}uJMRasDu`w26V=cJdUTSI@=;-Jo(h`fwl8GgC9%f5w(AHg#07$y7Hye$T zx1yrn+)KoPgU6_L6VRZl|O&rC@ybMm3RPoi} z??Xg{3$saP{kos?z@pbkaxNyIdT=Xly1IH04JP7p5=fM-gBuG12m&I2*(_I=SJa1O zC8ae06If01i z3@mX@BCVN7Ly-UkDL6xfrs?I?HBBL5d3hZGHe1|zC-lLt131SN;>f!_L})m;C?N&_ zzoMLX%wD|w!a_Q0KSB%m!Z#8`fFKc~ASA}cMTcaGiLn4QHn#V(2?R8HJU%o{M^yv3 zd%Wm+{|)D+8z*!0@ar5q@}DsG$gI0++eBqnhhIr+2jc>Vo!OeUGANHa;ccxK;ueb@=r z)wclPblStV84N2|%)!(4HGWTXcm};h2!asl_4?zoGE+jb3FDm@3?knbms3(&9r{1t z>EM%()-&_w;GVu{;q62YGtuW1O%E%V`i53coUCNb=xioU9QA|xHMK(*X|+bN>WMjY zRPP8YwjhWILU3th3If>e$su7@W(q}x)6jLD^)J3Nz}RG#0Wcb+(0`hyo%tQ~Y&I;` zJ@+<#zsgf9<_s0QT;9;oLqwOL?Amp*6K5xHhRw~=x z`IIMD{uV`10Z`QdE|+_NJC~~mfUd5AGJv+Wu23NW?jA2k|9O(4dsgw*w!LiLxP%+0 zO%Ca+Y9Qpx?e?Oo0ovPL?E2^+lEE-!SqBatW6iVgW6PUQIM=7%86g4Lj?853T!rMM zc)r}fg~dxY^759QY<+bXqef+N{6rk*vS0i+-r9q^#|yxe>lXHt&Aa#J zL5nJ{sORo`o*^-J!LVEAKq5d8MP9z^jvMCxX6vIv(yS;d#m6gXZ+DTFX2W4mMv~5| zd%QkGK}41%R5gIluV9Ia=;y=T<3%<~NRk0X37`f7!_F74&yPVAF&cwD{bw#}vTO`p z-WEN)0k7B3tDBe6?e;Kv$}iBPred{C42uMS?zZDp{%b2zgvmTAD=TH_UL!aQhB{#a zM3_zeboylzUaGDCCSi__;aD_I)!uA;PTl>aZDK2Z(k_hHoDtS z1Y_s|IeoXz9}~ - - - - - - - - - image/svg+xml - - - - - - - - - GFDL - - - - - - - diff --git a/htdocs/takepos/dev/img/gpl-v3-logo.svg b/htdocs/takepos/dev/img/gpl-v3-logo.svg deleted file mode 100644 index 6754c994bda..00000000000 --- a/htdocs/takepos/dev/img/gpl-v3-logo.svg +++ /dev/null @@ -1,389 +0,0 @@ - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/htdocs/takepos/dev/img/gplv3-127x51.png b/htdocs/takepos/dev/img/gplv3-127x51.png deleted file mode 100644 index 3e9136e626683ac152b73bc8fffcb15d1806091a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3471 zcmV;A4RG>_P)00006VoOIv00000008+zyMF)x4ID{C zK~#9!?Okh_R#g=~B^4E=rR9Z+luC`X!sM1^DUntL7W9auAxV*!N`Y>UQ6*7FVLoW0N9 z``vrp*TJi)sqvcV#HTr)cj_~qccsv;g^Gk$2^|os5!x^J|1G}{&hosE`)!&Q?gXZ# zp7$;R^eUmr3TV(Sp+!Q4Lif-0ywL<7&r}HYO9Z|&{)+0nG13N{kP~IRb4cp%J@WT6 z@;gxIoDd8@EA$*TfozD2oWYj{ziH&)-y^i`I3C{~j;~sQ{)W)V*`9ZvD~=_ecZRgx zE$yZz0e?zk245DVqx`;doQ-QA+4oYRt-Mw(G(te^n1y}-5%6ph@V7T&;QuEQ@E!8| z;&CvZ!@`nF6`XZb&BVA1wG#vs2Ff;I%?bc!b7#hi1#YlDZ)Nh!e&l|gj? zS8ye1_jzgeQ|V)pnc(sy{b+jH^S&s3-eiE=rk|02Ulz6a(#Hkdk0JNWlTR2;JeerwD;HGprq{=ka>QJX5QbO?0kBTG>bg_=zZCha&4kqdn%6b zV$<(GRiC{LSc6>ploNZt0e=qryxm;CHv))K_1usggAPwyzR-nK=7OGCHq-My9EL}+ z=eZ%5|-hkA`anc7cXw&azb-%T_x86l7mPwrK zw<++vcfx+_xsw2kV#zA4fk=0Vyk*C+gS2u`z@e`OZH@0Is|8;3;teZb-QN_qYVjJ+p$&pdF6Ak46yKKFuuCdw?2llM=k7YWjL3&guc4a^FAcMa~<1&y&p>G zjeOCLSzA1^HjnGgXgOgL@VBZ3|E^i^nJIujB19{VqrqmJ1-w4ZjIn!MU$B1z=DjiD zJa)is3XPue@?3fZV{Lm0@t!5mT@B@z8>UAh@L_xF7sDNBoI5*H2&i0V-uakgyKk9x zvv@DhY^J*%^pO?;bDxl49$VoamecqiBva%t_*4?*{E2YvK#y3G6#Q$o$zs^^`6&fd zK4adw!Li+`W+U$6_0A#gUT3z?b^{#&`LCR^PeaCQcXbYE6#Nw#y1XC7K}`fcOeQtS zaSl;FI5QrPBE$tWtIW{3v(Ba_`C7IHl7Ljk^#>UpW95X=`dZsuHeU_{LWgRDJK4oM z;1%4K^yHVRLELQa6$U9H4lYJ5gX_p=04Iz2H3z!DY{Wa*-%2yawvJ}#X+erpO!CSq zKg^oLV9+LO1}7!B)Nue{Z8?Ka8~%_w`4>fOjHA&$3zU^nMh53)6{R}D?t7|n7MhKA zlglF4(Piq+@gE^=uqj&QIL~3!BG3Ck3bFeh#IKt(_{wyuH5asV2Pf3kJb^q6a}@{3 zXUN(69SIS!9p-)4n~gTk5&W}5)}VI~8}_|wj8E)JJDm)E1|x!6P;(zku~`b2xLp5& z1Ix$r6+sqFDEKg?)SwoaMd|D~neAp0&6KaYj(leDWp6eM7vM$Q;Hb22T}H$NbNn2JVTtT~ZL)w>hsfBt$xJoie@Wdhi@28wm22lt z0_E`-|AkqH*>wU?d`H^s9$ruA9`bt)6|^dcNa3XsZh3e-w?HWkJN1F!^MqC?5W5Gk z5|>HknRd6Rdxa7AGFiMCnM4Lj{UX5cuQdCUbHwiFGOevD!F&hBu=`O#c@44PL%B2T z^bDh9l{=n%E7ObA;QKl%SFS8GKf}o2F`UheYZ|rX3)Qs;8#v)~a16V@hH;KDaXLZJ zg!L)hm|+U{A?rNRE>oL+B?JCXmJ8A)lgJ=9&Ql>Wzq92G)J+t4lG5}uhIMA|y5+VQIPA#9|tIpODqSLvo*m9sXA!a11WLE3wVM1||CapnU zKn$yI$9b;{iru@Od>vE1CC<4MLRO|XZoI4 z-}QNr?{ThOa^&qW6~j!|SnyH1ZCK*P4$hq*Ioj8-&_AmC1ra%dnaKOUW#Zfk^GA?# ztV1D%S>WbLl(G~o0C3=z4vrjT0>2I=G-)fZ+ld4x*m`ORr$Y+_{bqnc&pC z4e0>q4>Pwq%q!*>KBPo2eFwv7_+2CVgN%Yn_uHN^2*4O(GMGQ{^;j=X|j!2l?e z&^ODsJF>duT%S9j4N9?)Mve#^HVi#&6A)yg;xk@O<(cqh^By+9a5!kdR{0qcI6*q$ z^m0x?dQE8TJ0L|GT&WL3$5WUtJ)H+94;F;3!pVfB?=REr#P}w zA&>1^Qsfk~9`9#VdhTY}braLXevgkv(Skr0Ob;b4hEa4Clr(F0Nt7=jN#$#3f=$VW6Xh*@(j{vbuYq@sws=T%rnA=_;?S6r{F<3oQhLA!%km*`)>J%^kix9qP z1v?sL+DOad^~K~2`>1tKM}nkZ$U)8a6mp4f90L+Sw&K)-BY_L>M8X6-%l9Eb#xgmh zfShYm1eeYlLfaU zxB)l=KT2>qS>!5In6Rd-HDy~lIT2*`G^8_;rEc(b6MWr+#SwUBGB?6dxHkC}j!oK! zz;_~0a|1Y9RDK@5H`oxM!$qsaQO-_#5coP@eg#v8tgCUkF;j+`WQQ$u;}(Y~d@I>z zm|s`tXXEmt2!55zW_+o`FJ~hATf&SMv@J))j?z)~bG$>SSQW84cBD4tFh}SeaZ$Or z$XVJ%U8RtR4RaZuG(SHp@KXq>Hl~j=mDb0?Q!g6A4GznpC`nKz74W(9nt-o+`Y+AZ zg2R%5;;R(wxi&kx-oTIfSkc?<)ce0EaO{-UB14CvB{Ykt93NVoVS`-t4nAdS6ZqzX z#&eG7Eg4tK!1@8;LVuxWu7>rE!|lhZ8WQ{^O`wNvfEp^g`C>Yr>7udIDw?f6%1}*{ zv!DGaRfB`ivgltnQC*sI#AmV5SPbx2JmeRTAXWii1-+Gf)U$AgjY1|+SS|f=0e;he xS`h1WfrqgdO~;o)s%+--KQtI%YYC5M`ag&6T?f%9P7444002ovPDHLkV1mp+x~c#G diff --git a/htdocs/takepos/dev/img/gplv3-88x31.png b/htdocs/takepos/dev/img/gplv3-88x31.png deleted file mode 100644 index ba78d4c4941dabf2fcac5409a92ac4c57920c69f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2666 zcmV-w3YGPVP)Px#32;bRa{vGVivR!tivi)#(!2lw00(qQO+^RT0uvMpF24YJ`L;(K) z{{a7>y{D4^014_zL_t(&-tC%skW|$b#(x5`77PlZ01Xf|tXfvU1+9P)Nl;9MMIeIW zf~A;|yxWx-F&@d<9Z!mSGK`{-NXD*+V< z1U?qnFHjo71r>243NtglEQV7Q5|M$wwPW#3mU1Xa75(4)}+D^1dj!r-wg;N!7wPTlz6cv~* zaG8PJ%ocdxi%_r(8VF2J2gJd((|x~-stE3f0*?zktgtfz_z{7D0<}|XS^^CmbayaJ zV6ea`S+E+%|4L05^x|!{8+(dT?jEM~Js`$27+y6h2%>GgYF0wJYE0l-O z)7o925Tv&W;2eAZgu;B5;j^dJ8-bz3oKpjkZt1g)zX^66mI| z)j_Xp5wNzxdh2k6HU6=}>lr5fjzC|47oe%aZiQ_MKeNs1Wz;5au`^ddqYxT8_`O0| z2+eKGVG3K)+k_Uu1%|7S@cDv!RA5U0Jp{%pe3tfppM%?rytQ5}8P;njwoMwi^#raG z_|!q~0P19O58V`YC~Ow^rGefh%fweYXuAOFEA&%1pirdH-T=NSi#0u9by^9`QxJv5 zHjl?NEpVEPINjb~s%aLOrIZQ$Er2cpYhwES(!o;>ZWd4fj>h!yt-vP^&Rzf~rSJ-% zg@aKFTLZW-2{m&$=#dIvD=Zf1XvcR*1&`sq0ThV$zmI09^NGMv1M6&ojS7EJsBiOF z8n;M=9{?nvrNFcK_*#Yg1^TDhK}Ke?#C57YX(PO#~hmZ&YIfXpm0?Of77b zcz4lUy){(?;9j;d=Zg=NarIQ8n^{2*frBCRE`gImI7i`?I3Q90+X5fTF_*Oh*9+WO z1x|lZpeTTXIJ}Zj$9dYg#Asf_jNm>ECo6nxzAm326$kDY0%zN14N};eq2A;GS}N34 z_?^POB%Ep+b3>f}wIrZv1mNKjYL#A=I=IZiomF5OUkN;%%t28n`n7hnwKmOUxi!^C z?!7sJ)RYjqCgH3A+6T}!^hf+gd!G=mbKa5;2^2Z#5Q*l| zfdhdl0@EDyF+dtC++#s#w6j4H&?112wh__NE(zy`FhF3r<@t|C0A7{B|L)KTzz$ld zr)$xAGn~&v$ExqQqQD+9qd48hXc$805H1yOr8Q%W^E8V!qcoEr7HA|sO)M9(j7va) zLPO)u<>K8*eH(mXo|E4b6{n4!WlMoas%ZhvALqY1(?UYejX$qum2H*6CFz(2o?R^x zDEv(hmVvj&jg=p^uDHvkZKlwQXnG#Q_KXL#Ubbsr9Nn7x7-IFOx}g0W@Fj z20>x8!ootY1Jtn~{dF~g`?~m)`Q!|iyHa6%kmfQnQM3*U9~p3ePDSc@Q2%*2Wf?S% zmJ%okp_W5IHRG)GOwilcdW(Gu*4g{T~>dyLTd*<7nqH5>P4bO#m15lF^bQk0@fXG4I;>Zi8G4~)h=aS0UnUjaR`^J~?z=+$ zHTWKdViR&!n`TiY-;I@$Nas4sHq*3$R%RqSBP!U};>Y>BK#9N@@vNzKHf)UY&9JQQ zCMxp?bTg|ev(NnmCWO%6!B~MAp&w|lz>EMc4xx`RjCHn%FPzVQekwkb8YeK{!Gi*~ zsNb|P0)6c!`IJklP`iK9vb6vc-7RoHJ0Nq5dRwk5m+UDA)gAo?O?LN0*eFN#QW*D#LIwjzkygL(4{)S zRcNGevoWb@0%ujrt~sxh79Qi@G*o92@TaP*zZ6=F7pc}Mlq8{3Nv<1-3c80vD-#)#iR!fAg3`3i=|n0Ep+VCB*yVN$x?2_YiZ5k$@3&Tcz#W!=Gm9%=?NxpL Y19h*OP%`Tk_W%F@07*qoM6N<$g8#_jNdN!< diff --git a/htdocs/takepos/dev/img/takepos.svg b/htdocs/takepos/dev/img/takepos.svg deleted file mode 100644 index f51ead1a94e..00000000000 --- a/htdocs/takepos/dev/img/takepos.svg +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - M - - From a68d9fc5e6e6a4d2a8794a18ca18c0da500f081c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 23:31:29 +0200 Subject: [PATCH 127/127] Fix css --- htdocs/contrat/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index 28c4702a5c2..01cc12dd34a 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -592,7 +592,7 @@ if (! empty($arrayfields['c.tms']['checked'])){ print_liste_field_titre($arrayfields['c.tms']['label'], $_SERVER["PHP_SELF"], "c.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap '); } if (! empty($arrayfields['lower_planned_end_date']['checked'])) { - print_liste_field_titre($arrayfields['lower_planned_end_date']['label'], $_SERVER["PHP_SELF"], "lower_planned_end_date", "", $param, '', $sortfield, $sortorder, 'center nowrap '); + print_liste_field_titre($arrayfields['lower_planned_end_date']['label'], $_SERVER["PHP_SELF"], "lower_planned_end_date", "", $param, '', $sortfield, $sortorder, 'center '); } if (! empty($arrayfields['status']['checked'])) { print_liste_field_titre($staticcontratligne->LibStatut(0, 3), '', '', '', '', 'width="16"');
'; + print ''; + print ''; + print ''; + print ''; @@ -386,21 +436,23 @@ if ($resql) print "
'; + if ($obj->projectid > 0) { + $projectstatic->ref = $obj->projectref; + $projectstatic->id = $obj->projectid; + $projectstatic->title = $obj->projecttitle; + print $projectstatic->getNomUrl(1, '', 44); + } + print ''; + if ($obj->contractid > 0) { + $contratstatic->ref = $obj->contractref; + $contratstatic->id = $obj->contractid; + print $contratstatic->getNomUrl(1, '', 44); + } + print ''.dol_trunc(dolGetFirstLineOfText($obj->description),48).''; - print ''; - print ''; + print ''; print''; - print ''; - print ''; - print '
'.$langs->trans("Type").''; - if (! empty($object->fk_type) ) { - $adht->fetch($object->fk_type); + if ($object->fk_type > 0 || $adh->typeid > 0) { + $typeid = ($object->fk_type > 0 ? $object->fk_type : $adh->typeid); + $adht->fetch($typeid); print $adht->getNomUrl(1); } else { print $langs->trans("NoType"); From 36f1527f763fc476c39bceb6d8c773e922bbab19 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 11:06:10 +0200 Subject: [PATCH 083/127] Fix backward compatibility for type of members --- htdocs/adherents/subscription.php | 14 +++++++++----- htdocs/adherents/subscription/card.php | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index eeeb821c223..fef89da8754 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -667,7 +667,7 @@ if ($rowid > 0) */ if ($action != 'addsubscription' && $action != 'create_thirdparty') { - $sql = "SELECT d.rowid, d.firstname, d.lastname, d.societe,"; + $sql = "SELECT d.rowid, d.firstname, d.lastname, d.societe, d.type,"; $sql.= " c.rowid as crowid, c.subscription,"; $sql.= " c.datec, c.fk_type as cfk_type,"; $sql.= " c.dateadh as dateh,"; @@ -705,26 +705,30 @@ if ($rowid > 0) print "
'.$subscriptionstatic->getNomUrl(1).''.dol_print_date($db->jdate($objp->datec), 'dayhour')."'; - if ($objp->cfk_type > 0) - { + if ($typeid > 0) { print $adht->getNomUrl(1); } print '
'.$langs->trans("Amount").''.price($object->amount).'
'.$langs->trans("Label").''.$object->note.'
'; - if ( ! empty($obj->fk_type) ) print $adht->getNomUrl(1); + if ($typeid > 0) + { + print $adht->getNomUrl(1); + } print '
'; print $form->select_incoterms((!empty($soc->fk_incoterms) ? $soc->fk_incoterms : ''), (!empty($soc->location_incoterms)?$soc->location_incoterms:'')); print '
'; if ($action != 'editincoterm') { - print $form->textwithpicto($object->display_incoterms(), $object->libelle_incoterms, 1); + print $form->textwithpicto($object->display_incoterms(), $object->label_incoterms, 1); } else { diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 0b9863f287b..36162e8b9aa 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -1383,7 +1383,7 @@ class Propal extends CommonObject $sql.= ", p.fk_incoterms, p.location_incoterms"; $sql.= ", p.fk_multicurrency, p.multicurrency_code, p.multicurrency_tx, p.multicurrency_total_ht, p.multicurrency_total_tva, p.multicurrency_total_ttc"; $sql.= ", p.tms as date_modification"; - $sql.= ", i.libelle as libelle_incoterms"; + $sql.= ", i.libelle as label_incoterms"; $sql.= ", c.label as statut_label"; $sql.= ", ca.code as availability_code, ca.label as availability"; $sql.= ", dr.code as demand_reason_code, dr.label as demand_reason"; @@ -1471,7 +1471,7 @@ class Propal extends CommonObject //Incoterms $this->fk_incoterms = $obj->fk_incoterms; $this->location_incoterms = $obj->location_incoterms; - $this->libelle_incoterms = $obj->libelle_incoterms; + $this->label_incoterms = $obj->label_incoterms; // Multicurrency $this->fk_multicurrency = $obj->fk_multicurrency; diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 8ceadce89e5..7362f30e5a8 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1737,7 +1737,7 @@ if ($action == 'create' && $user->rights->commande->creer) if (!empty($conf->incoterm->enabled)) { print '
'; $incoterm_id = GETPOST('incoterm_id'); $incoterm_location = GETPOST('location_incoterms'); @@ -2361,7 +2361,7 @@ if ($action == 'create' && $user->rights->commande->creer) print ''; if ($action != 'editincoterm') { - print $form->textwithpicto($object->display_incoterms(), $object->libelle_incoterms, 1); + print $form->textwithpicto($object->display_incoterms(), $object->label_incoterms, 1); } else { diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index fd7832f868f..4eb3b3236e0 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -1676,7 +1676,7 @@ class Commande extends CommonOrder $sql.= ', c.fk_incoterms, c.location_incoterms'; $sql.= ", c.fk_multicurrency, c.multicurrency_code, c.multicurrency_tx, c.multicurrency_total_ht, c.multicurrency_total_tva, c.multicurrency_total_ttc"; $sql.= ", c.module_source, c.pos_source"; - $sql.= ", i.libelle as libelle_incoterms"; + $sql.= ", i.libelle as label_incoterms"; $sql.= ', p.code as mode_reglement_code, p.libelle as mode_reglement_libelle'; $sql.= ', cr.code as cond_reglement_code, cr.libelle as cond_reglement_libelle, cr.libelle_facture as cond_reglement_libelle_doc'; $sql.= ', ca.code as availability_code, ca.label as availability_label'; @@ -1758,7 +1758,7 @@ class Commande extends CommonOrder //Incoterms $this->fk_incoterms = $obj->fk_incoterms; $this->location_incoterms = $obj->location_incoterms; - $this->libelle_incoterms = $obj->libelle_incoterms; + $this->label_incoterms = $obj->label_incoterms; // Multicurrency $this->fk_multicurrency = $obj->fk_multicurrency; diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 44be21898f8..68ed6fc3f57 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -3171,7 +3171,7 @@ if ($action == 'create') if (!empty($conf->incoterm->enabled)) { print '
'; $incoterm_id = GETPOST('incoterm_id'); $incoterm_location = GETPOST('location_incoterms'); @@ -4007,7 +4007,7 @@ elseif ($id > 0 || ! empty($ref)) print ''; if ($action != 'editincoterm') { - print $form->textwithpicto($object->display_incoterms(), $object->libelle_incoterms, 1); + print $form->textwithpicto($object->display_incoterms(), $object->label_incoterms, 1); } else { diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 574d5d55dd1..f249443ac66 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -1335,7 +1335,7 @@ class Facture extends CommonInvoice $sql.= ', c.code as cond_reglement_code, c.libelle as cond_reglement_libelle, c.libelle_facture as cond_reglement_libelle_doc'; $sql.= ', f.fk_incoterms, f.location_incoterms'; $sql.= ', f.module_source, f.pos_source'; - $sql.= ", i.libelle as libelle_incoterms"; + $sql.= ", i.libelle as label_incoterms"; $sql.= ' FROM '.MAIN_DB_PREFIX.'facture as f'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_payment_term as c ON f.fk_cond_reglement = c.rowid'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as p ON f.fk_mode_reglement = p.id'; @@ -1410,7 +1410,7 @@ class Facture extends CommonInvoice //Incoterms $this->fk_incoterms = $obj->fk_incoterms; $this->location_incoterms = $obj->location_incoterms; - $this->libelle_incoterms = $obj->libelle_incoterms; + $this->label_incoterms = $obj->label_incoterms; $this->module_source = $obj->module_source; $this->pos_source = $obj->pos_source; diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 3dd27db9084..5016d10780d 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -391,7 +391,7 @@ abstract class CommonObject * @var string * @see SetIncoterms() */ - public $libelle_incoterms; + public $label_incoterms; /** * @var string @@ -3762,7 +3762,7 @@ abstract class CommonObject { // phpcs:enable $out = ''; - $this->libelle_incoterms = ''; + $this->label_incoterms = ''; if (!empty($this->fk_incoterms)) { $sql = 'SELECT code FROM '.MAIN_DB_PREFIX.'c_incoterms WHERE rowid = '.(int) $this->fk_incoterms; @@ -3835,7 +3835,7 @@ abstract class CommonObject if ($res) { $obj = $this->db->fetch_object($res); - $this->libelle_incoterms = $obj->libelle; + $this->label_incoterms = $obj->libelle; } return 1; } diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 39a902ed979..f337a007a1a 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -1046,7 +1046,7 @@ if ($action == 'create') if (!empty($conf->incoterm->enabled)) { print '
'; print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms)?$object->location_incoterms:'')); print '
'; if ($action != 'editincoterm') { - print $form->textwithpicto($object->display_incoterms(), $object->libelle_incoterms, 1); + print $form->textwithpicto($object->display_incoterms(), $object->label_incoterms, 1); } else { diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 4676d48073c..a17da1c84b4 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -536,7 +536,7 @@ class Expedition extends CommonObject $sql.= ", e.fk_shipping_method, e.tracking_number"; $sql.= ", e.note_private, e.note_public"; $sql.= ', e.fk_incoterms, e.location_incoterms'; - $sql.= ', i.libelle as libelle_incoterms'; + $sql.= ', i.libelle as label_incoterms'; $sql.= ', s.libelle as shipping_method'; $sql.= ", el.fk_source as origin_id, el.sourcetype as origin"; $sql.= " FROM ".MAIN_DB_PREFIX."expedition as e"; @@ -601,7 +601,7 @@ class Expedition extends CommonObject //Incoterms $this->fk_incoterms = $obj->fk_incoterms; $this->location_incoterms = $obj->location_incoterms; - $this->libelle_incoterms = $obj->libelle_incoterms; + $this->label_incoterms = $obj->label_incoterms; $this->db->free($result); diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php index 84681f049c4..bb1d106e393 100644 --- a/htdocs/expedition/shipment.php +++ b/htdocs/expedition/shipment.php @@ -529,7 +529,7 @@ if ($id > 0 || ! empty($ref)) print ''; if ($action != 'editincoterm') { - print $form->textwithpicto($object->display_incoterms(), $object->libelle_incoterms, 1); + print $form->textwithpicto($object->display_incoterms(), $object->label_incoterms, 1); } else { diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index bf0a3da62b3..96a43c91f3a 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -154,7 +154,7 @@ class CommandeFournisseur extends CommonOrder //Incoterms public $fk_incoterms; public $location_incoterms; - public $libelle_incoterms; //Used into tooltip + public $label_incoterms; //Used into tooltip public $extraparams=array(); @@ -267,7 +267,7 @@ class CommandeFournisseur extends CommonOrder $sql.= " cr.code as cond_reglement_code, cr.libelle as cond_reglement_libelle, cr.libelle_facture as cond_reglement_libelle_doc,"; $sql.= " p.code as mode_reglement_code, p.libelle as mode_reglement_libelle"; $sql.= ', c.fk_incoterms, c.location_incoterms'; - $sql.= ', i.libelle as libelle_incoterms'; + $sql.= ', i.libelle as label_incoterms'; $sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as c"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_payment_term as cr ON c.fk_cond_reglement = cr.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as p ON c.fk_mode_reglement = p.id"; @@ -335,7 +335,7 @@ class CommandeFournisseur extends CommonOrder //Incoterms $this->fk_incoterms = $obj->fk_incoterms; $this->location_incoterms = $obj->location_incoterms; - $this->libelle_incoterms = $obj->libelle_incoterms; + $this->label_incoterms = $obj->label_incoterms; // Multicurrency $this->fk_multicurrency = $obj->fk_multicurrency; diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 073497a46f3..9b2a62bded3 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -192,7 +192,7 @@ class FactureFournisseur extends CommonInvoice public $fk_incoterms; public $location_incoterms; - public $libelle_incoterms; //Used into tooltip + public $label_incoterms; //Used into tooltip public $extraparams=array(); @@ -618,7 +618,7 @@ class FactureFournisseur extends CommonInvoice $sql.= " p.code as mode_reglement_code, p.libelle as mode_reglement_libelle,"; $sql.= ' s.nom as socnom, s.rowid as socid,'; $sql.= ' t.fk_incoterms, t.location_incoterms,'; - $sql.= " i.libelle as libelle_incoterms,"; + $sql.= " i.libelle as label_incoterms,"; $sql.= ' t.fk_multicurrency, t.multicurrency_code, t.multicurrency_tx, t.multicurrency_total_ht, t.multicurrency_total_tva, t.multicurrency_total_ttc'; $sql.= ' FROM '.MAIN_DB_PREFIX.'facture_fourn as t'; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON (t.fk_soc = s.rowid)"; @@ -687,7 +687,7 @@ class FactureFournisseur extends CommonInvoice //Incoterms $this->fk_incoterms = $obj->fk_incoterms; $this->location_incoterms = $obj->location_incoterms; - $this->libelle_incoterms = $obj->libelle_incoterms; + $this->label_incoterms = $obj->label_incoterms; // Multicurrency $this->fk_multicurrency = $obj->fk_multicurrency; diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 94eeef8da38..9b27810e6bb 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -1630,7 +1630,7 @@ if ($action=='create') if (!empty($conf->incoterm->enabled)) { print '
'; print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms)?$object->location_incoterms:'')); print '
'; if ($action != 'editincoterm') { - print $form->textwithpicto($object->display_incoterms(), $object->libelle_incoterms, 1); + print $form->textwithpicto($object->display_incoterms(), $object->label_incoterms, 1); } else { diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 4f1340a27d8..dfab5ebf2ac 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -2035,7 +2035,7 @@ if ($action == 'create') if (!empty($conf->incoterm->enabled)) { print '
'; print $form->select_incoterms((!empty($objectsrc->fk_incoterms) ? $objectsrc->fk_incoterms : ''), (!empty($objectsrc->location_incoterms)?$objectsrc->location_incoterms:'')); print '
'; if ($action != 'editincoterm') { - print $form->textwithpicto($object->display_incoterms(), $object->libelle_incoterms, 1); + print $form->textwithpicto($object->display_incoterms(), $object->label_incoterms, 1); } else { diff --git a/htdocs/livraison/card.php b/htdocs/livraison/card.php index cdc12553401..45a851b43a5 100644 --- a/htdocs/livraison/card.php +++ b/htdocs/livraison/card.php @@ -529,7 +529,7 @@ else print ''; if ($action != 'editincoterm') { - print $form->textwithpicto($object->display_incoterms(), $object->libelle_incoterms, 1); + print $form->textwithpicto($object->display_incoterms(), $object->label_incoterms, 1); } else { diff --git a/htdocs/livraison/class/livraison.class.php b/htdocs/livraison/class/livraison.class.php index 9a84274d0c5..9a5780b351d 100644 --- a/htdocs/livraison/class/livraison.class.php +++ b/htdocs/livraison/class/livraison.class.php @@ -278,7 +278,7 @@ class Livraison extends CommonObject $sql.= ", l.date_delivery, l.fk_address, l.model_pdf"; $sql.= ", el.fk_source as origin_id, el.sourcetype as origin"; $sql.= ', l.fk_incoterms, l.location_incoterms'; - $sql.= ", i.libelle as libelle_incoterms"; + $sql.= ", i.libelle as label_incoterms"; $sql.= " FROM ".MAIN_DB_PREFIX."livraison as l"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON el.fk_target = l.rowid AND el.targettype = '".$this->db->escape($this->element)."'"; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_incoterms as i ON l.fk_incoterms = i.rowid'; @@ -313,7 +313,7 @@ class Livraison extends CommonObject //Incoterms $this->fk_incoterms = $obj->fk_incoterms; $this->location_incoterms = $obj->location_incoterms; - $this->libelle_incoterms = $obj->libelle_incoterms; + $this->label_incoterms = $obj->label_incoterms; $this->db->free($result); if ($this->statut == 0) $this->brouillon = 1; diff --git a/htdocs/product/stock/class/api_stockmovements.class.php b/htdocs/product/stock/class/api_stockmovements.class.php index 7bc4054751e..113e45482a8 100644 --- a/htdocs/product/stock/class/api_stockmovements.class.php +++ b/htdocs/product/stock/class/api_stockmovements.class.php @@ -292,7 +292,7 @@ class StockMovements extends DolibarrApi unset($object->lastname); unset($object->name); unset($object->location_incoterms); - unset($object->libelle_incoterms); + unset($object->label_incoterms); unset($object->fk_incoterms); unset($object->lines); unset($object->total_ht); diff --git a/htdocs/projet/class/api_projects.class.php b/htdocs/projet/class/api_projects.class.php index 9680cd66591..48ae3cbf337 100644 --- a/htdocs/projet/class/api_projects.class.php +++ b/htdocs/projet/class/api_projects.class.php @@ -560,7 +560,7 @@ class Projects extends DolibarrApi unset($object->fk_account); unset($object->note); unset($object->fk_incoterms); - unset($object->libelle_incoterms); + unset($object->label_incoterms); unset($object->location_incoterms); unset($object->name); unset($object->lastname); diff --git a/htdocs/projet/class/api_tasks.class.php b/htdocs/projet/class/api_tasks.class.php index 9fafcb98343..2ca676f9c96 100644 --- a/htdocs/projet/class/api_tasks.class.php +++ b/htdocs/projet/class/api_tasks.class.php @@ -570,7 +570,7 @@ class Tasks extends DolibarrApi unset($object->fk_account); unset($object->note); unset($object->fk_incoterms); - unset($object->libelle_incoterms); + unset($object->label_incoterms); unset($object->location_incoterms); unset($object->name); unset($object->lastname); diff --git a/htdocs/reception/card.php b/htdocs/reception/card.php index 7cbd77dd4da..2153d8a53c7 100644 --- a/htdocs/reception/card.php +++ b/htdocs/reception/card.php @@ -890,7 +890,7 @@ if ($action == 'create') if (!empty($conf->incoterm->enabled)) { print '
'; print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms)?$object->location_incoterms:'')); print '
'; if ($action != 'editincoterm') { - print $form->textwithpicto($object->display_incoterms(), $object->libelle_incoterms, 1); + print $form->textwithpicto($object->display_incoterms(), $object->label_incoterms, 1); } else { diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php index 811c2b8586f..f1877ace179 100644 --- a/htdocs/reception/class/reception.class.php +++ b/htdocs/reception/class/reception.class.php @@ -372,7 +372,7 @@ class Reception extends CommonObject $sql.= ", el.fk_source as origin_id, el.sourcetype as origin"; $sql.= ", e.note_private, e.note_public"; $sql.= ', e.fk_incoterms, e.location_incoterms'; - $sql.= ', i.libelle as libelle_incoterms'; + $sql.= ', i.libelle as label_incoterms'; $sql.= " FROM ".MAIN_DB_PREFIX."reception as e"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON el.fk_target = e.rowid AND el.targettype = '".$this->db->escape($this->element)."'"; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_incoterms as i ON e.fk_incoterms = i.rowid'; @@ -431,7 +431,7 @@ class Reception extends CommonObject //Incoterms $this->fk_incoterms = $obj->fk_incoterms; $this->location_incoterms = $obj->location_incoterms; - $this->libelle_incoterms = $obj->libelle_incoterms; + $this->label_incoterms = $obj->label_incoterms; $this->db->free($result); diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index d7034017691..26bfbc89b9f 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -2540,7 +2540,7 @@ else print ''; if ($action != 'editincoterm') { - print $form->textwithpicto($object->display_incoterms(), $object->libelle_incoterms, 1); + print $form->textwithpicto($object->display_incoterms(), $object->label_incoterms, 1); } else { diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index f27f2e315bf..16b690ecaf7 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -475,7 +475,7 @@ class Societe extends CommonObject public $fk_incoterms; public $location_incoterms; - public $libelle_incoterms; //Used into tooltip + public $label_incoterms; //Used into tooltip // Multicurrency /** @@ -1276,7 +1276,7 @@ class Societe extends CommonObject $sql .= ', d.code_departement as state_code, d.nom as state'; $sql .= ', st.libelle as stcomm'; $sql .= ', te.code as typent_code'; - $sql .= ', i.libelle as libelle_incoterms'; + $sql .= ', i.libelle as label_incoterms'; $sql .= ', sr.remise_client'; $sql .= ' FROM '.MAIN_DB_PREFIX.'societe as s'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_effectif as e ON s.fk_effectif = e.id'; @@ -1435,7 +1435,7 @@ class Societe extends CommonObject //Incoterms $this->fk_incoterms = $obj->fk_incoterms; $this->location_incoterms = $obj->location_incoterms; - $this->libelle_incoterms = $obj->libelle_incoterms; + $this->label_incoterms = $obj->label_incoterms; // multicurrency $this->fk_multicurrency = $obj->fk_multicurrency; diff --git a/htdocs/ticket/class/api_tickets.class.php b/htdocs/ticket/class/api_tickets.class.php index 818514868c2..1395d8acf2b 100644 --- a/htdocs/ticket/class/api_tickets.class.php +++ b/htdocs/ticket/class/api_tickets.class.php @@ -555,7 +555,7 @@ class Tickets extends DolibarrApi "total_localtax2", "total_ttc", "fk_incoterms", - "libelle_incoterms", + "label_incoterms", "location_incoterms", "name", "lastname", diff --git a/htdocs/user/class/api_users.class.php b/htdocs/user/class/api_users.class.php index 17e22a314ef..f570dd21285 100644 --- a/htdocs/user/class/api_users.class.php +++ b/htdocs/user/class/api_users.class.php @@ -378,7 +378,7 @@ class Users extends DolibarrApi unset($object->total_localtax2); unset($object->total_ttc); - unset($object->libelle_incoterms); + unset($object->label_incoterms); unset($object->location_incoterms); unset($object->fk_delivery_address); From fd4dd0504063bd540c39baecce983013ca2788a4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 13:00:34 +0200 Subject: [PATCH 096/127] Properties ->libelle_incoterms were renamed into ->label_incoterms --- ChangeLog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index eefa22844fc..814d48d278b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -13,7 +13,7 @@ For Developers: WARNING: Following changes may create regressions for some external modules, but were necessary to make Dolibarr better: -... +* Properties ->libelle_incoterms were renamed into ->label_incoterms ***** ChangeLog for 10.0.0 compared to 9.0.0 ***** @@ -71,7 +71,7 @@ NEW: Can generate invoices from the timespent entered on a project NEW: Can update product supplier price ref NEW: Can upload files from the edit page of expense report NEW: Color for hover and for checked line is on by default -NEW: Column of parent company is available in list of third parties +NEW: Column of p...arent company is available in list of third parties NEW: conditionnal add member button by statut NEW: constant KEEP_DISCOUNT_LINES_FROM_ORIGIN NEW: Contact related items tab From def94b55c007aa676389eb5fab5701cd81bdcc9e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 13:02:11 +0200 Subject: [PATCH 097/127] CSS --- htdocs/projet/element.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index a2c2ea36f7d..08351fc752f 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -776,7 +776,7 @@ foreach ($listofreferent as $key => $value) if (empty($conf->global->PROJECT_CREATE_ON_OVERVIEW_DISABLED) && $urlnew) { $addform.='
'; - if ($testnew) $addform.=''.($buttonnew?$langs->trans($buttonnew):$langs->trans("Create")).''; + if ($testnew) $addform.=''.($buttonnew?$langs->trans($buttonnew):$langs->trans("Create")).''; elseif (empty($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)) { $addform.=''.($buttonnew?$langs->trans($buttonnew):$langs->trans("Create")).''; } From 736f918bac957af6f80605749440fd0585c0eecb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 13:14:11 +0200 Subject: [PATCH 098/127] Fix phpcs --- htdocs/core/actions_massactions.inc.php | 53 ++++++++++++------------- 1 file changed, 25 insertions(+), 28 deletions(-) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 9c9be3e1b9b..9c4dc872fbf 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -53,7 +53,7 @@ if (! empty($massaction) && is_array($toselect) && count($toselect) < 1) } if (! $error && is_array($toselect) && count($toselect) > $maxformassaction) { - setEventMessages($langs->trans('TooManyRecordForMassAction',$maxformassaction), null, 'errors'); + setEventMessages($langs->trans('TooManyRecordForMassAction', $maxformassaction), null, 'errors'); $error++; } @@ -104,7 +104,7 @@ if (! $error && $massaction == 'confirm_presend') } // Check mandatory parameters - if (GETPOST('fromtype','alpha') === 'user' && empty($user->email)) + if (GETPOST('fromtype', 'alpha') === 'user' && empty($user->email)) { $error++; setEventMessages($langs->trans("NoSenderEmailDefined"), null, 'warnings'); @@ -124,7 +124,7 @@ if (! $error && $massaction == 'confirm_presend') $massaction='presend'; } - if (! GETPOST('subject','none')) + if (! GETPOST('subject', 'none')) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("MailTopic")), null, 'warnings'); @@ -166,7 +166,7 @@ if (! $error && $massaction == 'confirm_presend') } elseif ($val && method_exists($thirdparty, 'contact_get_property')) // Id of contact { - $tmparray[] = $thirdparty->contact_get_property((int) $val,'email'); + $tmparray[] = $thirdparty->contact_get_property((int) $val, 'email'); $sendtoid[] = $val; } } @@ -201,7 +201,7 @@ if (! $error && $massaction == 'confirm_presend') } } } - $sendtocc=implode(',',$tmparray); + $sendtocc=implode(',', $tmparray); //var_dump($listofobjectref);exit; $listofqualifiedobj=array(); @@ -215,21 +215,21 @@ if (! $error && $massaction == 'confirm_presend') { $langs->load("errors"); $nbignored++; - $resaction.='
'.$langs->trans('ErrorOnlyProposalNotDraftCanBeSentInMassAction',$objectobj->ref).'

'; + $resaction.='
'.$langs->trans('ErrorOnlyProposalNotDraftCanBeSentInMassAction', $objectobj->ref).'

'; continue; // Payment done or started or canceled } if ($objectclass == 'Commande' && $objectobj->statut == Commande::STATUS_DRAFT) { $langs->load("errors"); $nbignored++; - $resaction.='
'.$langs->trans('ErrorOnlyOrderNotDraftCanBeSentInMassAction',$objectobj->ref).'

'; + $resaction.='
'.$langs->trans('ErrorOnlyOrderNotDraftCanBeSentInMassAction', $objectobj->ref).'

'; continue; } if ($objectclass == 'Facture' && $objectobj->statut == Facture::STATUS_DRAFT) { $langs->load("errors"); $nbignored++; - $resaction.='
'.$langs->trans('ErrorOnlyInvoiceValidatedCanBeSentInMassAction',$objectobj->ref).'

'; + $resaction.='
'.$langs->trans('ErrorOnlyInvoiceValidatedCanBeSentInMassAction', $objectobj->ref).'

'; continue; // Payment done or started or canceled } @@ -261,7 +261,7 @@ if (! $error && $massaction == 'confirm_presend') $nbignored++; if (empty($thirdpartywithoutemail[$objectobj->thirdparty->id])) { - $resaction.='
'.$langs->trans('NoRecipientEmail',$objectobj->thirdparty->name).'

'; + $resaction.='
'.$langs->trans('NoRecipientEmail', $objectobj->thirdparty->name).'

'; } dol_syslog('No recipient for thirdparty: '.$objectobj->thirdparty->name, LOG_WARNING); $thirdpartywithoutemail[$objectobj->thirdparty->id]=1; @@ -282,7 +282,7 @@ if (! $error && $massaction == 'confirm_presend') // For supplier invoices, we use the file provided by supplier, not the one we generate if ($objectobj->element == 'invoice_supplier') { - $fileparams = dol_most_recent_file($uploaddir . '/' . get_exdir($objectobj->id,2,0,0,$objectobj,$objectobj->element).$objectobj->ref, preg_quote($objectobj->ref,'/').'([^\-])+'); + $fileparams = dol_most_recent_file($uploaddir . '/' . get_exdir($objectobj->id, 2, 0, 0, $objectobj, $objectobj->element).$objectobj->ref, preg_quote($objectobj->ref, '/').'([^\-])+'); $file = $fileparams['fullname']; } @@ -301,7 +301,7 @@ if (! $error && $massaction == 'confirm_presend') { $nbignored++; $langs->load("errors"); - $resaction.='
'.$langs->trans('ErrorCantReadFile',$file).'

'; + $resaction.='
'.$langs->trans('ErrorCantReadFile', $file).'

'; dol_syslog('Failed to read file: '.$file, LOG_WARNING); continue; } @@ -349,8 +349,8 @@ if (! $error && $massaction == 'confirm_presend') } $replyto = $from; - $subject = GETPOST('subject','none'); - $message = GETPOST('message','none'); + $subject = GETPOST('subject', 'none'); + $message = GETPOST('message', 'none'); $sendtobcc = GETPOST('sendtoccc'); if ($objectclass == 'Propal') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_PROPOSAL_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_PROPOSAL_TO)); @@ -535,7 +535,7 @@ if (! $error && $massaction == 'confirm_presend') $langs->load("other"); if ($mailfile->error) { - $resaction.=$langs->trans('ErrorFailedToSendMail',$from,$sendto); + $resaction.=$langs->trans('ErrorFailedToSendMail', $from, $sendto); $resaction.='
'.$mailfile->error.'
'; } else @@ -925,9 +925,9 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se } $arrayofinclusion=array(); - foreach($listofobjectref as $tmppdf) $arrayofinclusion[]='^'.preg_quote(dol_sanitizeFileName($tmppdf),'/').'\.pdf$'; - foreach($listofobjectref as $tmppdf) $arrayofinclusion[]='^'.preg_quote(dol_sanitizeFileName($tmppdf),'/').'_[a-zA-Z0-9-_]+\.pdf$'; // To include PDF generated from ODX files - $listoffiles = dol_dir_list($uploaddir,'all',1,implode('|',$arrayofinclusion),'\.meta$|\.png','date',SORT_DESC,0,true); + foreach($listofobjectref as $tmppdf) $arrayofinclusion[]='^'.preg_quote(dol_sanitizeFileName($tmppdf), '/').'\.pdf$'; + foreach($listofobjectref as $tmppdf) $arrayofinclusion[]='^'.preg_quote(dol_sanitizeFileName($tmppdf), '/').'_[a-zA-Z0-9-_]+\.pdf$'; // To include PDF generated from ODX files + $listoffiles = dol_dir_list($uploaddir, 'all', 1, implode('|', $arrayofinclusion), '\.meta$|\.png', 'date', SORT_DESC, 0, true); // build list of files with full path $files = array(); @@ -947,7 +947,7 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se // Define output language (Here it is not used because we do only merging existing PDF) $outputlangs = $langs; $newlang=''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id','aZ09')) $newlang=GETPOST('lang_id','aZ09'); + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang=GETPOST('lang_id', 'aZ09'); if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$objecttmp->thirdparty->default_lang; if (! empty($newlang)) { $outputlangs = new Translate("",$conf); @@ -989,7 +989,7 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se @chmod($file, octdec($conf->global->MAIN_UMASK)); $langs->load("exports"); - setEventMessages($langs->trans('FileSuccessfullyBuilt',$filename.'_'.dol_print_date($now,'dayhourlog')), null, 'mesgs'); + setEventMessages($langs->trans('FileSuccessfullyBuilt', $filename.'_'.dol_print_date($now,'dayhourlog')), null, 'mesgs'); } else { @@ -1001,7 +1001,7 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se $formatarray=pdf_getFormat(); $page_largeur = $formatarray['width']; $page_hauteur = $formatarray['height']; - $format = array($page_largeur,$page_hauteur); + $format = array($page_largeur, $page_hauteur); $pdf=pdf_getInstance($format); @@ -1033,7 +1033,7 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se // Defined name of merged file $filename=strtolower(dol_sanitizeFileName($langs->transnoentities($objectlabel))); - $filename=preg_replace('/\s/','_',$filename); + $filename=preg_replace('/\s/', '_', $filename); // Save merged file if (in_array($objecttmp->element, array('facture', 'facture_fournisseur')) && $search_status == Facture::STATUS_VALIDATED) @@ -1047,12 +1047,12 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se { $now=dol_now(); $file=$diroutputmassaction.'/'.$filename.'_'.dol_print_date($now,'dayhourlog').'.pdf'; - $pdf->Output($file,'F'); + $pdf->Output($file, 'F'); if (! empty($conf->global->MAIN_UMASK)) @chmod($file, octdec($conf->global->MAIN_UMASK)); $langs->load("exports"); - setEventMessages($langs->trans('FileSuccessfullyBuilt',$filename.'_'.dol_print_date($now,'dayhourlog')), null, 'mesgs'); + setEventMessages($langs->trans('FileSuccessfullyBuilt', $filename.'_'.dol_print_date($now,'dayhourlog')), null, 'mesgs'); } else { @@ -1193,7 +1193,7 @@ if (! $error && ($massaction == 'delete' || ($action == 'delete' && $confirm == { $langs->load("errors"); $nbignored++; - $resaction.='
'.$langs->trans('ErrorOnlyDraftStatusCanBeDeletedInMassAction',$objecttmp->ref).'

'; + $resaction.='
'.$langs->trans('ErrorOnlyDraftStatusCanBeDeletedInMassAction', $objecttmp->ref).'

'; continue; } @@ -1257,7 +1257,7 @@ if (! $error && $massaction == 'generate_doc' && $permtoread) $outputlangs = $langs; $newlang=''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id','aZ09')) $newlang=GETPOST('lang_id','aZ09'); + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang=GETPOST('lang_id', 'aZ09'); if ($conf->global->MAIN_MULTILANGS && empty($newlang) && isset($objecttmp->thirdparty->default_lang)) $newlang=$objecttmp->thirdparty->default_lang; // for proposal, order, invoice, ... if ($conf->global->MAIN_MULTILANGS && empty($newlang) && isset($objecttmp->default_lang)) $newlang=$objecttmp->default_lang; // for thirdparty if (! empty($newlang)) @@ -1309,6 +1309,3 @@ $parameters['diroutputmassaction']=$diroutputmassaction; $reshook=$hookmanager->executeHooks('doMassActions',$parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - - - From 700acbeefbea74a53bcf9233d02d5270461a1380 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 13:26:02 +0200 Subject: [PATCH 099/127] Fix phpcs --- htdocs/core/actions_massactions.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 9c4dc872fbf..be6dcf37bfa 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -392,10 +392,10 @@ if (! $error && $massaction == 'confirm_presend') $parameters=array('mode'=>'formemail'); - if ( ! empty( $listofobjectthirdparties ) ) { + if (! empty($listofobjectthirdparties)) { $parameters['listofobjectthirdparties'] = $listofobjectthirdparties; } - if ( ! empty( $listofobjectref ) ) { + if (! empty($listofobjectref)) { $parameters['listofobjectref'] = $listofobjectref; } From 1277e3617978241de8196e4789e82f7e76056ae2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 13:30:18 +0200 Subject: [PATCH 100/127] Prepare 9.0.4 --- ChangeLog | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/ChangeLog b/ChangeLog index 2a4aa492055..0ec173983e1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,54 @@ English Dolibarr ChangeLog -------------------------------------------------------------- +***** ChangeLog for 9.0.4 compared to 9.0.3 ***** +FIX: #5249 +FIX: #11025 +FIX: #11032 +FIX: #11097 +FIX: #11169 +FIX: #11202 +FIX: #11244 +FIX: #11296 +FIX: #11316 +FIX: #11335 +FIX: Add missing end date of subscription in export +FIX: A user may read holiday and expense report without permissions +FIX: better syntax +FIX: condition +FIX: confirmation of mass email sending + option MAILING_NO_USING_PHPMAIL +FIX: crabe pdf: bad detailed VAT for situation invoices, in situations S2 and above +FIX: default value for duration of validity can be set from generic +FIX: do not include tpl from disabled modules +FIX: Error management when MAILING_NO_USING_PHPMAIL is set +FIX: Even with permission, can't validate leave once validator defined. +FIX: extrafield list search: SQL error when field is multiselect +FIX: if last char of customercode is accent making the truncate of first +FIX: Import of chart of account +FIX: in edit mode, dictionary inputs do not escape the string inside the 'value' attribute, causing errors if there are any double quotes +FIX: invalid link on user.fk_user +FIX: invoice class: bad SQL request if product type not set +FIX: javascript error when ckeditor module not enabled +FIX: mail presend: can overwrite a file previously uploaded (Issue #11056) +FIX: mass send mail +FIX: missing compatibility with multicompany transverse mode +FIX: missing llx_const encrypt +FIX: modulebuilder: hardcoded llx_ +FIX: Not showing Contract and Project columns on ficheinter list +FIX: only profid1 to 4 were editable for pdf option to show. Not 5 and 6. +FIX: productaccount buylist with pages +FIX: remove isolated transaction commit +FIX: security (a user can read leave or holiday of other without perm. +FIX: situation invoices: bad detailed VAT in situations following the first one +FIX: situation invoices: block progress percentage change for discount lines +FIX: syntax error +FIX: the id was not loaded in fetch of accounting system +FIX: try to use WHERE EXISTS instead of DISTINCT +FIX: use dol_sanitizeFileName() function to remove double spaces in filenames, as well as done on document.php when we want to download pdf +FIX: Use of cron with multicompany +FIX: var name +FIX: we need to fetch fourn invoice with ref in current entity +FIX: Wrong stock movement on supplier credit notes ***** ChangeLog for 9.0.3 compared to 9.0.2 ***** FIX: #11013 From fffdd8797ddd7930c093b36e97b64d92482c939f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 14:02:58 +0200 Subject: [PATCH 101/127] FIX Fallback on main language for alternative languages --- htdocs/core/class/html.formmail.class.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index e0d03d970d0..b0cdcd23a96 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -1154,6 +1154,12 @@ class FormMail extends Form return -1; } + $languagetosearch = (is_object($outputlangs) ? $outputlangs->defaultlang : ''); + // Define $languagetosearchmain to fall back on main language (for example to get 'es_ES' for 'es_MX') + $tmparray = explode('_', $languagetosearch); + $languagetosearchmain = $tmparray[0].'_'.strtoupper($tmparray[0]); + if ($languagetosearchmain == $languagetosearch) $languagetosearchmain = ''; + $sql = "SELECT rowid, label, topic, joinfiles, content, content_lines, lang"; $sql.= " FROM ".MAIN_DB_PREFIX.'c_email_templates'; $sql.= " WHERE (type_template='".$db->escape($type_template)."' OR type_template='all')"; @@ -1161,10 +1167,10 @@ class FormMail extends Form $sql.= " AND (private = 0 OR fk_user = ".$user->id.")"; // Get all public or private owned if ($active >= 0) $sql.=" AND active = ".$active; if ($label) $sql.=" AND label ='".$db->escape($label)."'"; - if (! ($id > 0) && is_object($outputlangs)) $sql.= " AND (lang = '".$db->escape($outputlangs->defaultlang)."' OR lang IS NULL OR lang = '')"; + if (! ($id > 0) && $languagetosearch) $sql.= " AND (lang = '".$db->escape($languagetosearch)."'".($languagetosearchmain ? " OR lang = '".$db->escape($languagetosearchmain)."'" : "")." OR lang IS NULL OR lang = '')"; if ($id > 0) $sql.= " AND rowid=".$id; if ($id == -1) $sql.= " AND position=0"; - if (is_object($outputlangs)) $sql.= $db->order("position,lang,label", "ASC,DESC,ASC"); // We want line with lang set first, then with lang null or '' + if ($languagetosearch) $sql.= $db->order("position,lang,label", "ASC,DESC,ASC"); // We want line with lang set first, then with lang null or '' else $sql.= $db->order("position,lang,label", "ASC,ASC,ASC"); // If no language provided, we give priority to lang not defined $sql.= $db->plimit(1); //print $sql; From f984a77044b3260b01b49dc42155c8ad0782edd6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 14:02:58 +0200 Subject: [PATCH 102/127] FIX Fallback on main language for alternative languages --- htdocs/core/class/html.formmail.class.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index e0d03d970d0..b0cdcd23a96 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -1154,6 +1154,12 @@ class FormMail extends Form return -1; } + $languagetosearch = (is_object($outputlangs) ? $outputlangs->defaultlang : ''); + // Define $languagetosearchmain to fall back on main language (for example to get 'es_ES' for 'es_MX') + $tmparray = explode('_', $languagetosearch); + $languagetosearchmain = $tmparray[0].'_'.strtoupper($tmparray[0]); + if ($languagetosearchmain == $languagetosearch) $languagetosearchmain = ''; + $sql = "SELECT rowid, label, topic, joinfiles, content, content_lines, lang"; $sql.= " FROM ".MAIN_DB_PREFIX.'c_email_templates'; $sql.= " WHERE (type_template='".$db->escape($type_template)."' OR type_template='all')"; @@ -1161,10 +1167,10 @@ class FormMail extends Form $sql.= " AND (private = 0 OR fk_user = ".$user->id.")"; // Get all public or private owned if ($active >= 0) $sql.=" AND active = ".$active; if ($label) $sql.=" AND label ='".$db->escape($label)."'"; - if (! ($id > 0) && is_object($outputlangs)) $sql.= " AND (lang = '".$db->escape($outputlangs->defaultlang)."' OR lang IS NULL OR lang = '')"; + if (! ($id > 0) && $languagetosearch) $sql.= " AND (lang = '".$db->escape($languagetosearch)."'".($languagetosearchmain ? " OR lang = '".$db->escape($languagetosearchmain)."'" : "")." OR lang IS NULL OR lang = '')"; if ($id > 0) $sql.= " AND rowid=".$id; if ($id == -1) $sql.= " AND position=0"; - if (is_object($outputlangs)) $sql.= $db->order("position,lang,label", "ASC,DESC,ASC"); // We want line with lang set first, then with lang null or '' + if ($languagetosearch) $sql.= $db->order("position,lang,label", "ASC,DESC,ASC"); // We want line with lang set first, then with lang null or '' else $sql.= $db->order("position,lang,label", "ASC,ASC,ASC"); // If no language provided, we give priority to lang not defined $sql.= $db->plimit(1); //print $sql; From 4b3824a1a940af48f14fba40fce84581fca98012 Mon Sep 17 00:00:00 2001 From: atm-quentin Date: Tue, 25 Jun 2019 14:16:00 +0200 Subject: [PATCH 103/127] FIX buyprice barcode default val --- htdocs/product/fournisseurs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index dbcdec666e3..f1e27c02501 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -688,7 +688,7 @@ SCRIPT; print '
' . $langs->trans('BarcodeType') . ''; - print $formbarcode->selectBarcodeType(($rowid ? $object->fourn_fk_barcode_type : ''), 'fk_barcode_type', 1); + print $formbarcode->selectBarcodeType(($rowid ? $object->fourn_fk_barcode_type : $conf->global->PRODUIT_DEFAULT_BARCODE_TYPE), 'fk_barcode_type', 1); print '
' . $langs->trans('BarcodeType') . ''; - print $formbarcode->selectBarcodeType(($rowid ? $object->fourn_fk_barcode_type : ''), 'fk_barcode_type', 1); + print $formbarcode->selectBarcodeType(($rowid ? $object->fourn_fk_barcode_type : $conf->global->PRODUIT_DEFAULT_BARCODE_TYPE), 'fk_barcode_type', 1); print '