From 190a5e8b28db28131464ff1eba0672631a067939 Mon Sep 17 00:00:00 2001 From: codesieg Date: Thu, 25 May 2023 10:31:34 +0200 Subject: [PATCH 01/68] add hook in user bank page --- .gitignore | 1 + htdocs/user/bank.php | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/.gitignore b/.gitignore index 3315a7eed88..ab0841c0efe 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ htdocs/conf/conf.php.sav htdocs/conf/conf.php.back documents/ custom2/ +htdocs/custom test/report/ nbproject default.properties diff --git a/htdocs/user/bank.php b/htdocs/user/bank.php index fc7efd23749..822df32f9cc 100644 --- a/htdocs/user/bank.php +++ b/htdocs/user/bank.php @@ -56,6 +56,9 @@ $bankid = GETPOST('bankid', 'int'); $action = GETPOST("action", 'alpha'); $cancel = GETPOST('cancel', 'alpha'); +// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array +$hookmanager->initHooks(array('usercardBank', 'globalcard')); + // Security check $socid = 0; if ($user->socid > 0) { @@ -862,8 +865,15 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac print ''.$langs->trans("NoBANRecord").''; } + + print ''; print ''; + + // Add hook in fields + $parameters = array('colspan' => ' colspan="2"'); + $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + } // Edit From e802f8874243ddb82c2a940e26c8f9c72d25e4f8 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Thu, 25 May 2023 08:41:19 +0000 Subject: [PATCH 02/68] Fixing style errors. --- htdocs/user/bank.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/user/bank.php b/htdocs/user/bank.php index 822df32f9cc..9fb8ffa4fdb 100644 --- a/htdocs/user/bank.php +++ b/htdocs/user/bank.php @@ -865,7 +865,7 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac print ''.$langs->trans("NoBANRecord").''; } - + print ''; print ''; @@ -873,7 +873,6 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac // Add hook in fields $parameters = array('colspan' => ' colspan="2"'); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - } // Edit From ac6623a5ce9dfd45c9f4c78c1632a440f41cd8e5 Mon Sep 17 00:00:00 2001 From: ATM-NicolasV Date: Mon, 29 May 2023 09:33:39 +0200 Subject: [PATCH 03/68] remove custom dir in .gitignore --- .gitignore | 1 - htdocs/core/actions_builddoc.inc.php | 22 ++++++++++++---------- htdocs/core/class/commonobject.class.php | 2 +- htdocs/custom/.gitignore | 3 +++ 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index ab0841c0efe..3315a7eed88 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,6 @@ htdocs/conf/conf.php.sav htdocs/conf/conf.php.back documents/ custom2/ -htdocs/custom test/report/ nbproject default.properties diff --git a/htdocs/core/actions_builddoc.inc.php b/htdocs/core/actions_builddoc.inc.php index 0a5f63de9aa..20e431849e3 100644 --- a/htdocs/core/actions_builddoc.inc.php +++ b/htdocs/core/actions_builddoc.inc.php @@ -35,6 +35,7 @@ if (!empty($permissioncreate) && empty($permissiontoadd)) { // Build doc if ($action == 'builddoc' && ($permissiontoadd || !empty($usercangeneretedoc))) { + var_dump(GETPOST('model', 'alpha')); if (is_numeric(GETPOST('model', 'alpha'))) { $error = $langs->trans("ErrorFieldRequired", $langs->transnoentities("Model")); } else { @@ -46,23 +47,24 @@ if ($action == 'builddoc' && ($permissiontoadd || !empty($usercangeneretedoc))) dol_print_error('Object must have been loaded by a fetch'); exit; }*/ - + // Save last template used to generate document if (GETPOST('model', 'alpha')) { $object->setDocModel($user, GETPOST('model', 'alpha')); } - + // Special case to force bank account //if (property_exists($object, 'fk_bank')) //{ - if (GETPOST('fk_bank', 'int')) { - // this field may come from an external module - $object->fk_bank = GETPOST('fk_bank', 'int'); - } elseif (!empty($object->fk_account)) { - $object->fk_bank = $object->fk_account; - } - //} - + if (GETPOST('fk_bank', 'int')) { + // this field may come from an external module + $object->fk_bank = GETPOST('fk_bank', 'int'); + } elseif (!empty($object->fk_account)) { + $object->fk_bank = $object->fk_account; + } + //} + + $outputlangs = $langs; $newlang = ''; diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 6c129b86250..ba0f2d4bcf1 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -5334,7 +5334,6 @@ abstract class CommonObject protected function commonGenerateDocument($modelspath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams = null) { global $conf, $langs, $user, $hookmanager, $action; - $srctemplatepath = ''; $parameters = array('modelspath'=>$modelspath, 'modele'=>$modele, 'outputlangs'=>$outputlangs, 'hidedetails'=>$hidedetails, 'hidedesc'=>$hidedesc, 'hideref'=>$hideref, 'moreparams'=>$moreparams); @@ -5384,6 +5383,7 @@ abstract class CommonObject // On verifie l'emplacement du modele $file = dol_buildpath($reldir.$modelspath.$file, 0); + var_dump($file); if (file_exists($file)) { $filefound = $file; $classname = $prefix.'_'.$modele; diff --git a/htdocs/custom/.gitignore b/htdocs/custom/.gitignore index 9420e8c61eb..224a544fee7 100644 --- a/htdocs/custom/.gitignore +++ b/htdocs/custom/.gitignore @@ -2,3 +2,6 @@ !.gitignore !README.md !index.html +/advancedhrm +/ship2bill + From db3332aacee4492bea761d6b03cc2dc7feaff8cc Mon Sep 17 00:00:00 2001 From: ATM-NicolasV Date: Mon, 29 May 2023 09:39:14 +0200 Subject: [PATCH 04/68] remove custom dir in .gitignore --- htdocs/core/actions_builddoc.inc.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/htdocs/core/actions_builddoc.inc.php b/htdocs/core/actions_builddoc.inc.php index 20e431849e3..5bebf887f4a 100644 --- a/htdocs/core/actions_builddoc.inc.php +++ b/htdocs/core/actions_builddoc.inc.php @@ -35,7 +35,6 @@ if (!empty($permissioncreate) && empty($permissiontoadd)) { // Build doc if ($action == 'builddoc' && ($permissiontoadd || !empty($usercangeneretedoc))) { - var_dump(GETPOST('model', 'alpha')); if (is_numeric(GETPOST('model', 'alpha'))) { $error = $langs->trans("ErrorFieldRequired", $langs->transnoentities("Model")); } else { @@ -47,12 +46,12 @@ if ($action == 'builddoc' && ($permissiontoadd || !empty($usercangeneretedoc))) dol_print_error('Object must have been loaded by a fetch'); exit; }*/ - + // Save last template used to generate document if (GETPOST('model', 'alpha')) { $object->setDocModel($user, GETPOST('model', 'alpha')); } - + // Special case to force bank account //if (property_exists($object, 'fk_bank')) //{ @@ -63,8 +62,8 @@ if ($action == 'builddoc' && ($permissiontoadd || !empty($usercangeneretedoc))) $object->fk_bank = $object->fk_account; } //} - - + + $outputlangs = $langs; $newlang = ''; From 407859eae4ce3b0645b6f1c88b1f4ed33c430945 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Mon, 29 May 2023 08:22:15 +0000 Subject: [PATCH 05/68] Fixing style errors. --- htdocs/core/actions_builddoc.inc.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/htdocs/core/actions_builddoc.inc.php b/htdocs/core/actions_builddoc.inc.php index 20e431849e3..a1f88007983 100644 --- a/htdocs/core/actions_builddoc.inc.php +++ b/htdocs/core/actions_builddoc.inc.php @@ -47,24 +47,24 @@ if ($action == 'builddoc' && ($permissiontoadd || !empty($usercangeneretedoc))) dol_print_error('Object must have been loaded by a fetch'); exit; }*/ - + // Save last template used to generate document if (GETPOST('model', 'alpha')) { $object->setDocModel($user, GETPOST('model', 'alpha')); } - + // Special case to force bank account //if (property_exists($object, 'fk_bank')) //{ - if (GETPOST('fk_bank', 'int')) { - // this field may come from an external module - $object->fk_bank = GETPOST('fk_bank', 'int'); - } elseif (!empty($object->fk_account)) { - $object->fk_bank = $object->fk_account; - } + if (GETPOST('fk_bank', 'int')) { + // this field may come from an external module + $object->fk_bank = GETPOST('fk_bank', 'int'); + } elseif (!empty($object->fk_account)) { + $object->fk_bank = $object->fk_account; + } //} - - + + $outputlangs = $langs; $newlang = ''; From f97ebce52afe1a70db2ce4d877f7865675b14e28 Mon Sep 17 00:00:00 2001 From: ATM-NicolasV Date: Mon, 29 May 2023 09:43:49 +0200 Subject: [PATCH 06/68] remove custom dir in .gitignore and add to custom .gitignore --- htdocs/core/class/commonobject.class.php | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index ba0f2d4bcf1..13b2e348bc4 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -5383,7 +5383,6 @@ abstract class CommonObject // On verifie l'emplacement du modele $file = dol_buildpath($reldir.$modelspath.$file, 0); - var_dump($file); if (file_exists($file)) { $filefound = $file; $classname = $prefix.'_'.$modele; From bd27a9ded2de4be22eff1c36e0bedace1e0ec98d Mon Sep 17 00:00:00 2001 From: ATM-NicolasV Date: Mon, 29 May 2023 09:44:58 +0200 Subject: [PATCH 07/68] remove custom dir in .gitignore and add to custom .gitignore --- htdocs/core/actions_builddoc.inc.php | 2 +- htdocs/core/class/commonobject.class.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/actions_builddoc.inc.php b/htdocs/core/actions_builddoc.inc.php index c1af06597b0..216b32e9758 100644 --- a/htdocs/core/actions_builddoc.inc.php +++ b/htdocs/core/actions_builddoc.inc.php @@ -61,7 +61,7 @@ if ($action == 'builddoc' && ($permissiontoadd || !empty($usercangeneretedoc))) } elseif (!empty($object->fk_account)) { $object->fk_bank = $object->fk_account; } - //} + //} $outputlangs = $langs; diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 13b2e348bc4..6c129b86250 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -5334,6 +5334,7 @@ abstract class CommonObject protected function commonGenerateDocument($modelspath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams = null) { global $conf, $langs, $user, $hookmanager, $action; + $srctemplatepath = ''; $parameters = array('modelspath'=>$modelspath, 'modele'=>$modele, 'outputlangs'=>$outputlangs, 'hidedetails'=>$hidedetails, 'hidedesc'=>$hidedesc, 'hideref'=>$hideref, 'moreparams'=>$moreparams); From 4920bfc540e145ba645ccaeaf50a053a6f2bb2d7 Mon Sep 17 00:00:00 2001 From: ATM-NicolasV Date: Mon, 29 May 2023 09:45:31 +0200 Subject: [PATCH 08/68] remove custom dir in .gitignore and add to custom .gitignore --- htdocs/core/actions_builddoc.inc.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/actions_builddoc.inc.php b/htdocs/core/actions_builddoc.inc.php index 216b32e9758..e13f7f4e52e 100644 --- a/htdocs/core/actions_builddoc.inc.php +++ b/htdocs/core/actions_builddoc.inc.php @@ -62,8 +62,7 @@ if ($action == 'builddoc' && ($permissiontoadd || !empty($usercangeneretedoc))) $object->fk_bank = $object->fk_account; } //} - - + $outputlangs = $langs; $newlang = ''; From bc9b02e88826fe7b5240267901cbcc816de2b7a1 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Mon, 29 May 2023 08:33:50 +0000 Subject: [PATCH 09/68] Fixing style errors. --- htdocs/core/actions_builddoc.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/actions_builddoc.inc.php b/htdocs/core/actions_builddoc.inc.php index e13f7f4e52e..0a5f63de9aa 100644 --- a/htdocs/core/actions_builddoc.inc.php +++ b/htdocs/core/actions_builddoc.inc.php @@ -62,7 +62,7 @@ if ($action == 'builddoc' && ($permissiontoadd || !empty($usercangeneretedoc))) $object->fk_bank = $object->fk_account; } //} - + $outputlangs = $langs; $newlang = ''; From 1395a9ff8f72deb8ef70601bb60f35d5840e8fd9 Mon Sep 17 00:00:00 2001 From: Hystepik Date: Fri, 23 Jun 2023 16:32:01 +0200 Subject: [PATCH 10/68] New : mass modification of status for coferenceorbooth --- .../conferenceorbooth_list.php | 53 +++++++++++++++++++ htdocs/langs/en_US/eventorganization.lang | 6 +++ 2 files changed, 59 insertions(+) diff --git a/htdocs/eventorganization/conferenceorbooth_list.php b/htdocs/eventorganization/conferenceorbooth_list.php index 49940ef7881..e9b1c0d01cd 100644 --- a/htdocs/eventorganization/conferenceorbooth_list.php +++ b/htdocs/eventorganization/conferenceorbooth_list.php @@ -223,6 +223,42 @@ if (empty($reshook)) { $uploaddir = $conf->eventorganization->dir_output; include DOL_DOCUMENT_ROOT.'/eventorganization/core/actions_massactions_mail.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; + + if ($permissiontoadd && (($action == 'setstatus' && $confirm == "yes") || $massaction == 'setstatus')) { + $db->begin(); + $error = 0;$nbok = 0; + $objecttmp = new $objectclass($db); + foreach ($toselect as $key => $idselect) { + $result = $objecttmp->fetch($idselect); + if ($result > 0) { + $objecttmp->status = GETPOST("statusmassaction", 'int'); + $result = $objecttmp->update($user); + if ($result <= 0) { + setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); + $error++; + break; + } else { + $nbok++; + } + } else { + setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); + $error ++; + break; + } + } + if (empty($error)) { + if ($nbok > 1) { + setEventMessages($langs->trans("RecordsUpdated", $nbok), null, 'mesgs'); + } elseif ($nbok > 0) { + setEventMessages($langs->trans("RecordUpdated", $nbok), null, 'mesgs'); + } else { + setEventMessages($langs->trans("NoRecordUpdated"), null, 'mesgs'); + } + $db->commit(); + } else { + $db->rollback(); + } + } } @@ -680,6 +716,9 @@ $arrayofmassactions = array( if (!empty($permissiontodelete)) { $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); } +if (!empty($permissiontoadd)) { + $arrayofmassactions['presetstatus'] = img_picto('', 'edit', 'class="pictofixedwidth"').$langs->trans("ModifyStatus"); +} if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { $arrayofmassactions = array(); } @@ -716,6 +755,20 @@ $trackid = 'conferenceorbooth_'.$object->id; $withmaindocfilemail = 0; include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; +if ($massaction == 'presetstatus') { + $formquestion = array(); + $statuslist[$objecttmp::STATUS_DRAFT] = $objecttmp->LibStatutEvent($objecttmp::STATUS_DRAFT); + $statuslist[$objecttmp::STATUS_SUGGESTED] = $objecttmp->LibStatutEvent($objecttmp::STATUS_SUGGESTED); + $statuslist[$objecttmp::STATUS_CONFIRMED] = $objecttmp->LibStatutEvent($objecttmp::STATUS_CONFIRMED); + $statuslist[$objecttmp::STATUS_NOT_QUALIFIED] = $objecttmp->LibStatutEvent($objecttmp::STATUS_NOT_QUALIFIED); + $statuslist[$objecttmp::STATUS_DONE] = $objecttmp->LibStatutEvent($objecttmp::STATUS_DONE); + $statuslist[$objecttmp::STATUS_CANCELED] = $objecttmp->LibStatutEvent($objecttmp::STATUS_CANCELED); + $formquestion[] = array('type' => 'other', + 'name' => 'affectedcommercial', + 'label' => $form->editfieldkey('ModifyStatus', 'status_id', '', $object, 0), + 'value' => $form->selectarray('statusmassaction', $statuslist, GETPOST('statusmassaction'))); + print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmModifyStatus"), $langs->trans("ConfirmModifyStatusQuestion", count($toselect)), "setstatus", $formquestion, 1, 0, 200, 500, 1); +} if ($search_all) { $setupstring = ''; diff --git a/htdocs/langs/en_US/eventorganization.lang b/htdocs/langs/en_US/eventorganization.lang index 894c9de4f13..4c9fd31b896 100644 --- a/htdocs/langs/en_US/eventorganization.lang +++ b/htdocs/langs/en_US/eventorganization.lang @@ -175,3 +175,9 @@ NoPublicActionsAllowedForThisEvent=No public actions are open to public for this MaxNbOfAttendees=Max number of attendees DateStartEvent=Event start date DateEndEvent=Event end date +ModifyStatus=Modify status +ConfirmModifyStatus=Confirm status modification +ConfirmModifyStatusQuestion=Are you sure you want to modify the %s selected record(s)? +RecordsUpdated = %s Records updated +RecordUpdated = Record updated +NoRecordUpdated = No Record updated \ No newline at end of file From 37e39f5305308e720ab5002839136b7534ac8911 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 26 Jun 2023 13:48:16 +0200 Subject: [PATCH 11/68] do not add default value in list --- htdocs/comm/propal/list.php | 2 +- htdocs/commande/list.php | 2 +- htdocs/compta/facture/invoicetemplate_list.php | 2 +- htdocs/compta/facture/list.php | 2 +- htdocs/core/class/html.form.class.php | 7 ++++--- htdocs/fourn/facture/list-rec.php | 2 +- htdocs/fourn/facture/list.php | 2 +- 7 files changed, 10 insertions(+), 9 deletions(-) diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 753c449a278..4d05a1a825a 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -1318,7 +1318,7 @@ if ($resql) { // Payment term if (!empty($arrayfields['p.fk_cond_reglement']['checked'])) { print ''; - print $form->getSelectConditionsPaiements($search_fk_cond_reglement, 'search_fk_cond_reglement', 1, 1, 1); + print $form->getSelectConditionsPaiements($search_fk_cond_reglement, 'search_fk_cond_reglement', 1, 1, 1, '', -1, 'list'); print ''; } // Payment mode diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index ead429c7152..acba0190450 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -1582,7 +1582,7 @@ if ($resql) { // Payment term if (!empty($arrayfields['c.fk_cond_reglement']['checked'])) { print ''; - print $form->getSelectConditionsPaiements($search_fk_cond_reglement, 'search_fk_cond_reglement', 1, 1, 1); + print $form->getSelectConditionsPaiements($search_fk_cond_reglement, 'search_fk_cond_reglement', 1, 1, 1, '', -1, 'list'); print ''; } // Payment mode diff --git a/htdocs/compta/facture/invoicetemplate_list.php b/htdocs/compta/facture/invoicetemplate_list.php index 56ef08d1f1e..561880243d1 100644 --- a/htdocs/compta/facture/invoicetemplate_list.php +++ b/htdocs/compta/facture/invoicetemplate_list.php @@ -627,7 +627,7 @@ if (!empty($arrayfields['f.total_ttc']['checked'])) { if (!empty($arrayfields['f.fk_cond_reglement']['checked'])) { // Payment term print ''; - print $form->getSelectConditionsPaiements($search_payment_term, 'search_payment_term', -1, 1, 1, 'maxwidth100'); + print $form->getSelectConditionsPaiements($search_payment_term, 'search_payment_term', -1, 1, 1, 'maxwidth100', -1, 'list'); print ""; } if (!empty($arrayfields['f.fk_mode_reglement']['checked'])) { diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 5e5dde00ab2..31afb45bed6 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -1458,7 +1458,7 @@ if ($resql) { // Payment terms if (!empty($arrayfields['f.fk_cond_reglement']['checked'])) { print ''; - print $form->getSelectConditionsPaiements($search_paymentterms, 'search_paymentterms', -1, 1, 1, 'minwidth100 maxwidth100'); + print $form->getSelectConditionsPaiements($search_paymentterms, 'search_paymentterms', -1, 1, 1, 'minwidth100 maxwidth100', -1, 'list'); print ''; } // Module source diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index dd94edf7228..91d4f52881a 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -4252,9 +4252,10 @@ class Form * @param string $deposit_percent < 0 : deposit_percent input makes no sense (for example, in list filters) * 0 : use default deposit percentage from entry * > 0 : force deposit percentage (for example, from company object) + * @param string $mode card or list * @return string String for the HTML select component */ - public function getSelectConditionsPaiements($selected = 0, $htmlname = 'condid', $filtertype = -1, $addempty = 0, $noinfoadmin = 0, $morecss = '', $deposit_percent = -1) + public function getSelectConditionsPaiements($selected = 0, $htmlname = 'condid', $filtertype = -1, $addempty = 0, $noinfoadmin = 0, $morecss = '', $deposit_percent = -1, $mode = 'card') { global $langs, $user, $conf; @@ -4263,8 +4264,8 @@ class Form $this->load_cache_conditions_paiements(); - // Set default value if not already set by caller - if (empty($selected) && !empty($conf->global->MAIN_DEFAULT_PAYMENT_TERM_ID)) { + // Set default value if not already set by caller only for cards + if (empty($selected) && $mode == 'card' && !empty($conf->global->MAIN_DEFAULT_PAYMENT_TERM_ID)) { $selected = $conf->global->MAIN_DEFAULT_PAYMENT_TERM_ID; } diff --git a/htdocs/fourn/facture/list-rec.php b/htdocs/fourn/facture/list-rec.php index 684c7d01b11..48751b702ef 100644 --- a/htdocs/fourn/facture/list-rec.php +++ b/htdocs/fourn/facture/list-rec.php @@ -522,7 +522,7 @@ if ($resql) { if (!empty($arrayfields['f.fk_cond_reglement']['checked'])) { // Payment term print ''; - print $form->getSelectConditionsPaiements($search_payment_term, 'search_payment_term', -1, 1, 1, 'maxwidth100'); + print $form->getSelectConditionsPaiements($search_payment_term, 'search_payment_term', -1, 1, 1, 'maxwidth100', -1, 'list'); print ""; } if (!empty($arrayfields['f.fk_mode_reglement']['checked'])) { diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index a3cb7e016a7..c04830f61ac 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -1118,7 +1118,7 @@ if (!empty($arrayfields['typent.code']['checked'])) { // Condition of payment if (!empty($arrayfields['f.fk_cond_reglement']['checked'])) { print ''; - print $form->getSelectConditionsPaiements($search_paymentcond, 'search_paymentcond', -1, 1, 1, 'maxwidth100'); + print $form->getSelectConditionsPaiements($search_paymentcond, 'search_paymentcond', -1, 1, 1, 'maxwidth100', -1, 'list'); print ''; } // Payment mode From 276a6ae6a408a4e32cf688da71e6676500f9bc1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 26 Jun 2023 13:58:44 +0200 Subject: [PATCH 12/68] do not add default value in list --- htdocs/comm/propal/list.php | 2 +- htdocs/commande/list.php | 2 +- htdocs/commande/list_det.php | 2 +- htdocs/compta/bank/various_payment/list.php | 2 +- htdocs/compta/facture/invoicetemplate_list.php | 2 +- htdocs/compta/facture/list.php | 2 +- htdocs/compta/paiement/list.php | 2 +- htdocs/compta/sociales/list.php | 2 +- htdocs/compta/tva/list.php | 2 +- htdocs/core/class/html.form.class.php | 5 +++-- htdocs/fourn/paiement/list.php | 2 +- htdocs/salaries/list.php | 2 +- 12 files changed, 14 insertions(+), 13 deletions(-) diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 4d05a1a825a..21a6d5a63b8 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -1324,7 +1324,7 @@ if ($resql) { // Payment mode if (!empty($arrayfields['p.fk_mode_reglement']['checked'])) { print ''; - print $form->select_types_paiements($search_fk_mode_reglement, 'search_fk_mode_reglement', '', 0, 1, 1, 0, -1, '', 1); + print $form->select_types_paiements($search_fk_mode_reglement, 'search_fk_mode_reglement', '', 0, 1, 1, 0, -1, '', 1, 'list'); print ''; } if (!empty($arrayfields['p.total_ht']['checked'])) { diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index acba0190450..db8b3b29edc 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -1588,7 +1588,7 @@ if ($resql) { // Payment mode if (!empty($arrayfields['c.fk_mode_reglement']['checked'])) { print ''; - print $form->select_types_paiements($search_fk_mode_reglement, 'search_fk_mode_reglement', '', 0, 1, 1, 0, -1, '', 1); + print $form->select_types_paiements($search_fk_mode_reglement, 'search_fk_mode_reglement', '', 0, 1, 1, 0, -1, '', 1, 'list'); print ''; } // Channel diff --git a/htdocs/commande/list_det.php b/htdocs/commande/list_det.php index 884ba9cf390..24e1703eaa6 100644 --- a/htdocs/commande/list_det.php +++ b/htdocs/commande/list_det.php @@ -1052,7 +1052,7 @@ if ($resql) { // Payment mode if (!empty($arrayfields['c.fk_mode_reglement']['checked'])) { print ''; - $form->select_types_paiements($search_fk_mode_reglement, 'search_fk_mode_reglement', '', 0, 1, 1, 0, -1); + $form->select_types_paiements($search_fk_mode_reglement, 'search_fk_mode_reglement', '', 0, 1, 1, 0, -1, '', 0, 'list'); print ''; } // Channel diff --git a/htdocs/compta/bank/various_payment/list.php b/htdocs/compta/bank/various_payment/list.php index 36855eb653c..0470a5a1b73 100644 --- a/htdocs/compta/bank/various_payment/list.php +++ b/htdocs/compta/bank/various_payment/list.php @@ -488,7 +488,7 @@ if ($arrayfields['datev']['checked']) { // Payment type if ($arrayfields['type']['checked']) { print ''; - print $form->select_types_paiements($search_type_id, 'search_type_id', '', 0, 1, 1, 16, 1, 'maxwidth100', 1); + print $form->select_types_paiements($search_type_id, 'search_type_id', '', 0, 1, 1, 16, 1, 'maxwidth100', 1, 'list'); print ''; } diff --git a/htdocs/compta/facture/invoicetemplate_list.php b/htdocs/compta/facture/invoicetemplate_list.php index 561880243d1..cd08f61b869 100644 --- a/htdocs/compta/facture/invoicetemplate_list.php +++ b/htdocs/compta/facture/invoicetemplate_list.php @@ -633,7 +633,7 @@ if (!empty($arrayfields['f.fk_cond_reglement']['checked'])) { if (!empty($arrayfields['f.fk_mode_reglement']['checked'])) { // Payment mode print ''; - print $form->select_types_paiements($search_payment_mode, 'search_payment_mode', '', 0, 1, 1, 0, 1, 'maxwidth100', 1); + print $form->select_types_paiements($search_payment_mode, 'search_payment_mode', '', 0, 1, 1, 0, 1, 'maxwidth100', 1, 'list'); print ''; } if (!empty($arrayfields['recurring']['checked'])) { diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 31afb45bed6..22fb0fd7e5b 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -1452,7 +1452,7 @@ if ($resql) { // Payment mode if (!empty($arrayfields['f.fk_mode_reglement']['checked'])) { print ''; - print $form->select_types_paiements($search_paymentmode, 'search_paymentmode', '', 0, 1, 1, 0, 1, 'minwidth100 maxwidth100', 1); + print $form->select_types_paiements($search_paymentmode, 'search_paymentmode', '', 0, 1, 1, 0, 1, 'minwidth100 maxwidth100', 1, 'list'); print ''; } // Payment terms diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php index 12036bd07bc..006e6ee6088 100644 --- a/htdocs/compta/paiement/list.php +++ b/htdocs/compta/paiement/list.php @@ -416,7 +416,7 @@ if (!empty($arrayfields['s.nom']['checked'])) { // Filter: Payment type if (!empty($arrayfields['c.libelle']['checked'])) { print ''; - print $form->select_types_paiements($search_paymenttype, 'search_paymenttype', '', 2, 1, 1, 1, 1, '', 1); + print $form->select_types_paiements($search_paymenttype, 'search_paymenttype', '', 2, 1, 1, 1, 1, '', 1, 'list'); print ''; } diff --git a/htdocs/compta/sociales/list.php b/htdocs/compta/sociales/list.php index ea415784943..eb5c6ef33f7 100644 --- a/htdocs/compta/sociales/list.php +++ b/htdocs/compta/sociales/list.php @@ -519,7 +519,7 @@ if (!empty($arrayfields['cs.fk_user']['checked'])) { // Filter: Type if (!empty($arrayfields['cs.fk_mode_reglement']['checked'])) { print ''; - print $form->select_types_paiements($search_type, 'search_type', '', 0, 1, 1, 0, 1, 'maxwidth150', 1); + print $form->select_types_paiements($search_type, 'search_type', '', 0, 1, 1, 0, 1, 'maxwidth150', 1, 'list'); print ''; } diff --git a/htdocs/compta/tva/list.php b/htdocs/compta/tva/list.php index 22ac6310efc..82dcc151e12 100644 --- a/htdocs/compta/tva/list.php +++ b/htdocs/compta/tva/list.php @@ -465,7 +465,7 @@ if (!empty($arrayfields['t.datev']['checked'])) { // Filter: Type if (!empty($arrayfields['t.fk_typepayment']['checked'])) { print ''; - print $form->select_types_paiements($search_type, 'search_type', '', 0, 1, 1, 16, 1, '', 1); + print $form->select_types_paiements($search_type, 'search_type', '', 0, 1, 1, 16, 1, '', 1, 'list'); print ''; } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 91d4f52881a..f68dff5a879 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -4346,9 +4346,10 @@ class Form * @param int $active Active or not, -1 = all * @param string $morecss Add more CSS on select tag * @param int $nooutput 1=Return string, do not send to output + * @param string $mode card or list * @return string|void String for the HTML select component */ - public function select_types_paiements($selected = '', $htmlname = 'paiementtype', $filtertype = '', $format = 0, $empty = 1, $noadmininfo = 0, $maxlength = 0, $active = 1, $morecss = '', $nooutput = 0) + public function select_types_paiements($selected = '', $htmlname = 'paiementtype', $filtertype = '', $format = 0, $empty = 1, $noadmininfo = 0, $maxlength = 0, $active = 1, $morecss = '', $nooutput = 0, $mode = 'card') { // phpcs:enable global $langs, $user, $conf; @@ -4369,7 +4370,7 @@ class Form $this->load_cache_types_paiements(); // Set default value if not already set by caller - if (empty($selected) && !empty($conf->global->MAIN_DEFAULT_PAYMENT_TYPE_ID)) { + if (empty($selected) && $mode == 'card' && !empty($conf->global->MAIN_DEFAULT_PAYMENT_TYPE_ID)) { $selected = $conf->global->MAIN_DEFAULT_PAYMENT_TYPE_ID; } diff --git a/htdocs/fourn/paiement/list.php b/htdocs/fourn/paiement/list.php index 61b6ae23df4..bd4b976c833 100644 --- a/htdocs/fourn/paiement/list.php +++ b/htdocs/fourn/paiement/list.php @@ -390,7 +390,7 @@ if (!empty($arrayfields['s.nom']['checked'])) { // Filter: Payment type if (!empty($arrayfields['c.libelle']['checked'])) { print ''; - $form->select_types_paiements($search_payment_type, 'search_payment_type', '', 2, 1, 1); + $form->select_types_paiements($search_payment_type, 'search_payment_type', '', 2, 1, 1, 0, 1, '', 0, 'list'); print ''; } diff --git a/htdocs/salaries/list.php b/htdocs/salaries/list.php index 5a908a4d58e..d904aa839d9 100644 --- a/htdocs/salaries/list.php +++ b/htdocs/salaries/list.php @@ -522,7 +522,7 @@ print ''; // Type print ''; -print $form->select_types_paiements($search_type_id, 'search_type_id', '', 0, 1, 1, 16, 1, 'maxwidth125', 1); +print $form->select_types_paiements($search_type_id, 'search_type_id', '', 0, 1, 1, 16, 1, 'maxwidth125', 1, 'list'); print ''; // Bank account From a09adc9633ed911f9806f4996496c3197f96e01e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9=20GDSOFT?= Date: Fri, 30 Jun 2023 11:01:57 +0200 Subject: [PATCH 13/68] stock : exports : ajout code barre du produit --- htdocs/core/modules/modStock.class.php | 27 ++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/htdocs/core/modules/modStock.class.php b/htdocs/core/modules/modStock.class.php index e99742a14c4..e4b25dd6239 100644 --- a/htdocs/core/modules/modStock.class.php +++ b/htdocs/core/modules/modStock.class.php @@ -237,6 +237,9 @@ class modStock extends DolibarrModules 'p.datec'=>'DateCreation', 'p.tms'=>'DateModification', 'p.pmp'=>'PMPValue', 'p.cost_price'=>'CostPrice', 'p.seuil_stock_alerte'=>'StockLimit', ); + if (isModEnabled('barcode')) { + $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.barcode'=>'BarCode')); + } $this->export_TypeFields_array[$r] = array( 'e.rowid'=>'List:entrepot:ref::stock', 'e.ref'=>'Text', 'e.lieu'=>'Text', 'e.address'=>'Text', 'e.zip'=>'Text', 'e.town'=>'Text', 'p.rowid'=>"Numeric", 'p.ref'=>"Text", 'p.fk_product_type'=>"Text", 'p.label'=>"Text", 'p.description'=>"Text", 'p.note'=>"Text", @@ -245,6 +248,9 @@ class modStock extends DolibarrModules 'ps.reel'=>'Numeric', 'p.seuil_stock_alerte'=>'Numeric', ); + if (isModEnabled('barcode')) { + $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('p.barcode'=>'Text')); + } $this->export_entities_array[$r] = array( 'p.rowid'=>"product", 'p.ref'=>"product", 'p.fk_product_type'=>"product", 'p.label'=>"product", 'p.description'=>"product", 'p.note'=>"product", 'p.price'=>"product", 'p.tva_tx'=>'product', 'p.tosell'=>"product", 'p.tobuy'=>"product", 'p.duration'=>"product", @@ -252,6 +258,9 @@ class modStock extends DolibarrModules 'ps.reel'=>'stock', 'p.seuil_stock_alerte'=>'product', ); // We define here only fields that use another icon that the one defined into export_icon + if (isModEnabled('barcode')) { + $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.barcode'=>'product')); + } $this->export_aggregate_array[$r] = array('ps.reel'=>'SUM'); // TODO Not used yet $this->export_dependencies_array[$r] = array('stock'=>array('p.rowid', 'e.rowid')); // We must keep this until the aggregate_array is used. To have a unique key, if we ask a field of a child, to avoid the DISTINCT to discard them. $keyforselect = 'product'; @@ -284,6 +293,9 @@ class modStock extends DolibarrModules 'pb.rowid'=>'Id', 'pb.batch'=>'Batch', 'pb.qty'=>'Qty', 'pl.eatby'=>'EatByDate', 'pl.sellby'=>'SellByDate' ); + if (isModEnabled('barcode')) { + $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.barcode'=>'BarCode')); + } $this->export_TypeFields_array[$r] = array( 'e.rowid'=>'List:entrepot:ref::stock', 'e.ref'=>'Text', 'e.lieu'=>'Text', 'e.description'=>'Text', 'e.address'=>'Text', 'e.zip'=>'Text', 'e.town'=>'Text', 'p.rowid'=>"Numeric", 'p.ref'=>"Text", 'p.fk_product_type'=>"Text", 'p.label'=>"Text", 'p.description'=>"Text", 'p.note'=>"Text", @@ -292,6 +304,9 @@ class modStock extends DolibarrModules 'pb.batch'=>'Text', 'pb.qty'=>'Numeric', 'pl.eatby'=>'Date', 'pl.sellby'=>'Date' ); + if (isModEnabled('barcode')) { + $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('p.barcode'=>'Text')); + } $this->export_entities_array[$r] = array( 'p.rowid'=>"product", 'p.ref'=>"product", 'p.fk_product_type'=>"product", 'p.label'=>"product", 'p.description'=>"product", 'p.note'=>"product", 'p.price'=>"product", 'p.tva_tx'=>'product', 'p.tosell'=>"product", 'p.tobuy'=>"product", 'p.duration'=>"product", @@ -299,6 +314,9 @@ class modStock extends DolibarrModules 'pb.rowid'=>'batch', 'pb.batch'=>'batch', 'pb.qty'=>'batch', 'pl.eatby'=>'batch', 'pl.sellby'=>'batch' ); // We define here only fields that use another icon that the one defined into export_icon + if (isModEnabled('barcode')) { + $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.barcode'=>'product')); + } $this->export_aggregate_array[$r] = array('ps.reel'=>'SUM'); // TODO Not used yet $this->export_dependencies_array[$r] = array('stockbatch'=>array('pb.rowid'), 'batch'=>array('pb.rowid')); // We must keep this until the aggregate_array is used. To add unique key if we ask a field of a child to avoid the DISTINCT to discard them. $keyforselect = 'product_lot'; @@ -329,12 +347,18 @@ class modStock extends DolibarrModules 'p.rowid'=>"ProductId", 'p.ref'=>"Ref", 'p.fk_product_type'=>"Type", 'p.label'=>"Label", 'p.description'=>"Description", 'p.note'=>"Note", 'p.price'=>"Price", 'p.tva_tx'=>'VAT', 'p.tosell'=>"OnSell", 'p.tobuy'=>'OnBuy', 'p.duration'=>"Duration", 'p.datec'=>'DateCreation', 'p.tms'=>'DateModification' ); + if (isModEnabled('barcode')) { + $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.barcode'=>'BarCode')); + } $this->export_TypeFields_array[$r] = array( 'sm.rowid'=>'Numeric', 'sm.value'=>'Numeric', 'sm.datem'=>'Date', 'sm.batch'=>'Text', 'sm.label'=>'Text', 'sm.inventorycode'=>'Text', 'e.rowid'=>'List:entrepot:ref::stock', 'e.ref'=>'Text', 'e.description'=>'Text', 'e.lieu'=>'Text', 'e.address'=>'Text', 'e.zip'=>'Text', 'e.town'=>'Text', 'p.rowid'=>"Numeric", 'p.ref'=>"Text", 'p.fk_product_type'=>"Text", 'p.label'=>"Text", 'p.description'=>"Text", 'p.note'=>"Text", 'p.price'=>"Numeric", 'p.tva_tx'=>'Numeric', 'p.tosell'=>"Boolean", 'p.tobuy'=>"Boolean", 'p.duration'=>"Duree", 'p.datec'=>'Date', 'p.tms'=>'Date' ); + if (isModEnabled('barcode')) { + $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('p.barcode'=>'Text')); + } $this->export_entities_array[$r] = array( 'e.rowid'=>'warehouse', 'e.ref'=>'warehouse', 'e.description'=>'warehouse', 'e.lieu'=>'warehouse', 'e.address'=>'warehouse', 'e.zip'=>'warehouse', 'e.town'=>'warehouse', 'p.rowid'=>"product", 'p.ref'=>"product", 'p.fk_product_type'=>"product", 'p.label'=>"product", 'p.description'=>"product", 'p.note'=>"product", @@ -345,6 +369,9 @@ class modStock extends DolibarrModules $this->export_TypeFields_array[$r]['sm.batch'] = 'Text'; $this->export_entities_array[$r]['sm.batch'] = 'movement'; } + if (isModEnabled('barcode')) { + $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.barcode'=>'product')); + } $this->export_aggregate_array[$r] = array('sm.value'=>'SUM'); // TODO Not used yet $this->export_dependencies_array[$r] = array('movement'=>array('sm.rowid')); // We must keep this until the aggregate_array is used. To add unique key if we ask a field of a child to avoid the DISTINCT to discard them. From 48541caee573bdc7b8c54c8aa43515382381ecc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charl=C3=A8ne=20Benke?= <1179011+defrance@users.noreply.github.com> Date: Fri, 30 Jun 2023 12:22:27 +0200 Subject: [PATCH 14/68] add contact field --- htdocs/install/mysql/tables/llx_ticket-ticket.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/install/mysql/tables/llx_ticket-ticket.sql b/htdocs/install/mysql/tables/llx_ticket-ticket.sql index c651eaccca2..dc7ab197735 100644 --- a/htdocs/install/mysql/tables/llx_ticket-ticket.sql +++ b/htdocs/install/mysql/tables/llx_ticket-ticket.sql @@ -1,5 +1,6 @@ -- SQL definition for module ticket -- Copyright (C) 2013 Jean-François FERRY +-- Copyright (C) 2023 Charlene Benke -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by @@ -22,6 +23,7 @@ CREATE TABLE llx_ticket track_id varchar(128) NOT NULL, fk_soc integer DEFAULT 0, fk_project integer DEFAULT 0, + fk_contract integer DEFAULT 0, origin_email varchar(128), fk_user_create integer, fk_user_assign integer, From 9b596c6e19443b4d9841c481c3e1428089b7e5f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charl=C3=A8ne=20Benke?= <1179011+defrance@users.noreply.github.com> Date: Fri, 30 Jun 2023 12:24:30 +0200 Subject: [PATCH 15/68] Create 18.0.0-19.0.0.sql --- .../install/mysql/migration/18.0.0-19.0.0.sql | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 htdocs/install/mysql/migration/18.0.0-19.0.0.sql diff --git a/htdocs/install/mysql/migration/18.0.0-19.0.0.sql b/htdocs/install/mysql/migration/18.0.0-19.0.0.sql new file mode 100644 index 00000000000..d4b3a6c8d2c --- /dev/null +++ b/htdocs/install/mysql/migration/18.0.0-19.0.0.sql @@ -0,0 +1,36 @@ + +-- +-- Be carefull to requests order. +-- This file must be loaded by calling /install/index.php page +-- when current version is 18.0.0 or higher. +-- +-- To restrict request to Mysql version x.y minimum use -- VMYSQLx.y +-- To restrict request to Pgsql version x.y minimum use -- VPGSQLx.y +-- To rename a table: ALTER TABLE llx_table RENAME TO llx_table_new; +-- To add a column: ALTER TABLE llx_table ADD COLUMN newcol varchar(60) NOT NULL DEFAULT '0' AFTER existingcol; +-- To rename a column: ALTER TABLE llx_table CHANGE COLUMN oldname newname varchar(60); +-- To drop a column: ALTER TABLE llx_table DROP COLUMN oldname; +-- To change type of field: ALTER TABLE llx_table MODIFY COLUMN name varchar(60); +-- To drop a foreign key: ALTER TABLE llx_table DROP FOREIGN KEY fk_name; +-- To create a unique index ALTER TABLE llx_table ADD UNIQUE INDEX uk_table_field (field); +-- To drop an index: -- VMYSQL4.1 DROP INDEX nomindex on llx_table; +-- To drop an index: -- VPGSQL8.2 DROP INDEX nomindex; +-- To make pk to be auto increment (mysql): +-- -- VMYSQL4.3 ALTER TABLE llx_table ADD PRIMARY KEY(rowid); +-- -- VMYSQL4.3 ALTER TABLE llx_table CHANGE COLUMN rowid rowid INTEGER NOT NULL AUTO_INCREMENT; +-- To make pk to be auto increment (postgres): +-- -- VPGSQL8.2 CREATE SEQUENCE llx_table_rowid_seq OWNED BY llx_table.rowid; +-- -- VPGSQL8.2 ALTER TABLE llx_table ADD PRIMARY KEY (rowid); +-- -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN rowid SET DEFAULT nextval('llx_table_rowid_seq'); +-- -- VPGSQL8.2 SELECT setval('llx_table_rowid_seq', MAX(rowid)) FROM llx_table; +-- To set a field as NULL: -- VMYSQL4.3 ALTER TABLE llx_table MODIFY COLUMN name varchar(60) NULL; +-- To set a field as NULL: -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name DROP NOT NULL; +-- To set a field as NOT NULL: -- VMYSQL4.3 ALTER TABLE llx_table MODIFY COLUMN name varchar(60) NOT NULL; +-- To set a field as NOT NULL: -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name SET NOT NULL; +-- To set a field as default NULL: -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name SET DEFAULT NULL; +-- Note: fields with type BLOB/TEXT can't have default value. +-- To rebuild sequence for postgresql after insert by forcing id autoincrement fields: +-- -- VPGSQL8.2 SELECT dol_util_rebuild_sequences(); + + +- V18 From ff7a2ca40cd6ed563f2dca84e3461b8bb2a5f78b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charl=C3=A8ne=20Benke?= <1179011+defrance@users.noreply.github.com> Date: Fri, 30 Jun 2023 12:26:44 +0200 Subject: [PATCH 16/68] Update 18.0.0-19.0.0.sql add fk_contract on ticket table --- htdocs/install/mysql/migration/18.0.0-19.0.0.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/install/mysql/migration/18.0.0-19.0.0.sql b/htdocs/install/mysql/migration/18.0.0-19.0.0.sql index d4b3a6c8d2c..d1f2a74af7a 100644 --- a/htdocs/install/mysql/migration/18.0.0-19.0.0.sql +++ b/htdocs/install/mysql/migration/18.0.0-19.0.0.sql @@ -33,4 +33,5 @@ -- -- VPGSQL8.2 SELECT dol_util_rebuild_sequences(); -- V18 +- V19 +ALTER TABLE llx_ticket_ticket ADD COLUMN fk_contract integer DEFAULT 0 after fk_project; From f56bc55b49ab488d6f898ced5d59595c4ec4d55e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charl=C3=A8ne=20Benke?= <1179011+defrance@users.noreply.github.com> Date: Sun, 2 Jul 2023 14:00:50 +0200 Subject: [PATCH 17/68] Update 18.0.0-19.0.0.sql --- htdocs/install/mysql/migration/18.0.0-19.0.0.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/install/mysql/migration/18.0.0-19.0.0.sql b/htdocs/install/mysql/migration/18.0.0-19.0.0.sql index d1f2a74af7a..abd778f71aa 100644 --- a/htdocs/install/mysql/migration/18.0.0-19.0.0.sql +++ b/htdocs/install/mysql/migration/18.0.0-19.0.0.sql @@ -34,4 +34,4 @@ - V19 -ALTER TABLE llx_ticket_ticket ADD COLUMN fk_contract integer DEFAULT 0 after fk_project; +ALTER TABLE llx_ticket ADD COLUMN fk_contract integer DEFAULT 0 after fk_project; From 5584609662d63a9a0d760227395c2f0103384f25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20France?= Date: Mon, 3 Jul 2023 21:08:29 +0200 Subject: [PATCH 18/68] fix --- htdocs/comm/propal/list.php | 2 +- htdocs/commande/list.php | 4 ++-- htdocs/core/class/html.form.class.php | 12 ++++++------ htdocs/fourn/facture/list.php | 2 +- htdocs/salaries/list.php | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 21a6d5a63b8..e442ccbbc3f 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -1318,7 +1318,7 @@ if ($resql) { // Payment term if (!empty($arrayfields['p.fk_cond_reglement']['checked'])) { print ''; - print $form->getSelectConditionsPaiements($search_fk_cond_reglement, 'search_fk_cond_reglement', 1, 1, 1, '', -1, 'list'); + print $form->getSelectConditionsPaiements($search_fk_cond_reglement, 'search_fk_cond_reglement', 1, 1, 1); print ''; } // Payment mode diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index db8b3b29edc..ead429c7152 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -1582,13 +1582,13 @@ if ($resql) { // Payment term if (!empty($arrayfields['c.fk_cond_reglement']['checked'])) { print ''; - print $form->getSelectConditionsPaiements($search_fk_cond_reglement, 'search_fk_cond_reglement', 1, 1, 1, '', -1, 'list'); + print $form->getSelectConditionsPaiements($search_fk_cond_reglement, 'search_fk_cond_reglement', 1, 1, 1); print ''; } // Payment mode if (!empty($arrayfields['c.fk_mode_reglement']['checked'])) { print ''; - print $form->select_types_paiements($search_fk_mode_reglement, 'search_fk_mode_reglement', '', 0, 1, 1, 0, -1, '', 1, 'list'); + print $form->select_types_paiements($search_fk_mode_reglement, 'search_fk_mode_reglement', '', 0, 1, 1, 0, -1, '', 1); print ''; } // Channel diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index f68dff5a879..78b033c6bb0 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -4252,10 +4252,9 @@ class Form * @param string $deposit_percent < 0 : deposit_percent input makes no sense (for example, in list filters) * 0 : use default deposit percentage from entry * > 0 : force deposit percentage (for example, from company object) - * @param string $mode card or list * @return string String for the HTML select component */ - public function getSelectConditionsPaiements($selected = 0, $htmlname = 'condid', $filtertype = -1, $addempty = 0, $noinfoadmin = 0, $morecss = '', $deposit_percent = -1, $mode = 'card') + public function getSelectConditionsPaiements($selected = 0, $htmlname = 'condid', $filtertype = -1, $addempty = 0, $noinfoadmin = 0, $morecss = '', $deposit_percent = -1) { global $langs, $user, $conf; @@ -4265,7 +4264,8 @@ class Form $this->load_cache_conditions_paiements(); // Set default value if not already set by caller only for cards - if (empty($selected) && $mode == 'card' && !empty($conf->global->MAIN_DEFAULT_PAYMENT_TERM_ID)) { + if (empty($selected) && !empty($conf->global->MAIN_DEFAULT_PAYMENT_TERM_ID)) { + dol_syslog(__METHOD__ . "Using deprecated option MAIN_DEFAULT_PAYMENT_TERM_ID", LOG_NOTICE); $selected = $conf->global->MAIN_DEFAULT_PAYMENT_TERM_ID; } @@ -4346,10 +4346,9 @@ class Form * @param int $active Active or not, -1 = all * @param string $morecss Add more CSS on select tag * @param int $nooutput 1=Return string, do not send to output - * @param string $mode card or list * @return string|void String for the HTML select component */ - public function select_types_paiements($selected = '', $htmlname = 'paiementtype', $filtertype = '', $format = 0, $empty = 1, $noadmininfo = 0, $maxlength = 0, $active = 1, $morecss = '', $nooutput = 0, $mode = 'card') + public function select_types_paiements($selected = '', $htmlname = 'paiementtype', $filtertype = '', $format = 0, $empty = 1, $noadmininfo = 0, $maxlength = 0, $active = 1, $morecss = '', $nooutput = 0) { // phpcs:enable global $langs, $user, $conf; @@ -4370,7 +4369,8 @@ class Form $this->load_cache_types_paiements(); // Set default value if not already set by caller - if (empty($selected) && $mode == 'card' && !empty($conf->global->MAIN_DEFAULT_PAYMENT_TYPE_ID)) { + if (empty($selected) && !empty($conf->global->MAIN_DEFAULT_PAYMENT_TYPE_ID)) { + dol_syslog(__METHOD__ . "Using deprecated option MAIN_DEFAULT_PAYMENT_TYPE_ID", LOG_NOTICE); $selected = $conf->global->MAIN_DEFAULT_PAYMENT_TYPE_ID; } diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index c04830f61ac..ea46e8ed25d 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -1118,7 +1118,7 @@ if (!empty($arrayfields['typent.code']['checked'])) { // Condition of payment if (!empty($arrayfields['f.fk_cond_reglement']['checked'])) { print ''; - print $form->getSelectConditionsPaiements($search_paymentcond, 'search_paymentcond', -1, 1, 1, 'maxwidth100', -1, 'list'); + print $form->getSelectConditionsPaiements($search_paymentcond, 'search_paymentcond', -1, 1, 1, 'maxwidth100', -1); print ''; } // Payment mode diff --git a/htdocs/salaries/list.php b/htdocs/salaries/list.php index d904aa839d9..5a908a4d58e 100644 --- a/htdocs/salaries/list.php +++ b/htdocs/salaries/list.php @@ -522,7 +522,7 @@ print ''; // Type print ''; -print $form->select_types_paiements($search_type_id, 'search_type_id', '', 0, 1, 1, 16, 1, 'maxwidth125', 1, 'list'); +print $form->select_types_paiements($search_type_id, 'search_type_id', '', 0, 1, 1, 16, 1, 'maxwidth125', 1); print ''; // Bank account From 107cdc881011708893de0f00ba7dc41a1367761c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20France?= Date: Mon, 3 Jul 2023 21:09:34 +0200 Subject: [PATCH 19/68] fix --- htdocs/fourn/paiement/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/paiement/list.php b/htdocs/fourn/paiement/list.php index bd4b976c833..61b6ae23df4 100644 --- a/htdocs/fourn/paiement/list.php +++ b/htdocs/fourn/paiement/list.php @@ -390,7 +390,7 @@ if (!empty($arrayfields['s.nom']['checked'])) { // Filter: Payment type if (!empty($arrayfields['c.libelle']['checked'])) { print ''; - $form->select_types_paiements($search_payment_type, 'search_payment_type', '', 2, 1, 1, 0, 1, '', 0, 'list'); + $form->select_types_paiements($search_payment_type, 'search_payment_type', '', 2, 1, 1); print ''; } From e65f4c0ec6b5972f39e1a0b51c292cddc6fc823e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20France?= Date: Mon, 3 Jul 2023 21:10:58 +0200 Subject: [PATCH 20/68] fix --- htdocs/comm/propal/list.php | 2 +- htdocs/commande/list_det.php | 2 +- htdocs/compta/bank/various_payment/list.php | 2 +- htdocs/compta/facture/invoicetemplate_list.php | 4 ++-- htdocs/compta/facture/list.php | 4 ++-- htdocs/compta/paiement/list.php | 2 +- htdocs/compta/sociales/list.php | 2 +- htdocs/compta/tva/list.php | 2 +- htdocs/core/class/html.form.class.php | 2 +- htdocs/fourn/facture/list-rec.php | 2 +- htdocs/fourn/facture/list.php | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-) diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index e442ccbbc3f..753c449a278 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -1324,7 +1324,7 @@ if ($resql) { // Payment mode if (!empty($arrayfields['p.fk_mode_reglement']['checked'])) { print ''; - print $form->select_types_paiements($search_fk_mode_reglement, 'search_fk_mode_reglement', '', 0, 1, 1, 0, -1, '', 1, 'list'); + print $form->select_types_paiements($search_fk_mode_reglement, 'search_fk_mode_reglement', '', 0, 1, 1, 0, -1, '', 1); print ''; } if (!empty($arrayfields['p.total_ht']['checked'])) { diff --git a/htdocs/commande/list_det.php b/htdocs/commande/list_det.php index 24e1703eaa6..884ba9cf390 100644 --- a/htdocs/commande/list_det.php +++ b/htdocs/commande/list_det.php @@ -1052,7 +1052,7 @@ if ($resql) { // Payment mode if (!empty($arrayfields['c.fk_mode_reglement']['checked'])) { print ''; - $form->select_types_paiements($search_fk_mode_reglement, 'search_fk_mode_reglement', '', 0, 1, 1, 0, -1, '', 0, 'list'); + $form->select_types_paiements($search_fk_mode_reglement, 'search_fk_mode_reglement', '', 0, 1, 1, 0, -1); print ''; } // Channel diff --git a/htdocs/compta/bank/various_payment/list.php b/htdocs/compta/bank/various_payment/list.php index 0470a5a1b73..36855eb653c 100644 --- a/htdocs/compta/bank/various_payment/list.php +++ b/htdocs/compta/bank/various_payment/list.php @@ -488,7 +488,7 @@ if ($arrayfields['datev']['checked']) { // Payment type if ($arrayfields['type']['checked']) { print ''; - print $form->select_types_paiements($search_type_id, 'search_type_id', '', 0, 1, 1, 16, 1, 'maxwidth100', 1, 'list'); + print $form->select_types_paiements($search_type_id, 'search_type_id', '', 0, 1, 1, 16, 1, 'maxwidth100', 1); print ''; } diff --git a/htdocs/compta/facture/invoicetemplate_list.php b/htdocs/compta/facture/invoicetemplate_list.php index cd08f61b869..56ef08d1f1e 100644 --- a/htdocs/compta/facture/invoicetemplate_list.php +++ b/htdocs/compta/facture/invoicetemplate_list.php @@ -627,13 +627,13 @@ if (!empty($arrayfields['f.total_ttc']['checked'])) { if (!empty($arrayfields['f.fk_cond_reglement']['checked'])) { // Payment term print ''; - print $form->getSelectConditionsPaiements($search_payment_term, 'search_payment_term', -1, 1, 1, 'maxwidth100', -1, 'list'); + print $form->getSelectConditionsPaiements($search_payment_term, 'search_payment_term', -1, 1, 1, 'maxwidth100'); print ""; } if (!empty($arrayfields['f.fk_mode_reglement']['checked'])) { // Payment mode print ''; - print $form->select_types_paiements($search_payment_mode, 'search_payment_mode', '', 0, 1, 1, 0, 1, 'maxwidth100', 1, 'list'); + print $form->select_types_paiements($search_payment_mode, 'search_payment_mode', '', 0, 1, 1, 0, 1, 'maxwidth100', 1); print ''; } if (!empty($arrayfields['recurring']['checked'])) { diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 22fb0fd7e5b..5e5dde00ab2 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -1452,13 +1452,13 @@ if ($resql) { // Payment mode if (!empty($arrayfields['f.fk_mode_reglement']['checked'])) { print ''; - print $form->select_types_paiements($search_paymentmode, 'search_paymentmode', '', 0, 1, 1, 0, 1, 'minwidth100 maxwidth100', 1, 'list'); + print $form->select_types_paiements($search_paymentmode, 'search_paymentmode', '', 0, 1, 1, 0, 1, 'minwidth100 maxwidth100', 1); print ''; } // Payment terms if (!empty($arrayfields['f.fk_cond_reglement']['checked'])) { print ''; - print $form->getSelectConditionsPaiements($search_paymentterms, 'search_paymentterms', -1, 1, 1, 'minwidth100 maxwidth100', -1, 'list'); + print $form->getSelectConditionsPaiements($search_paymentterms, 'search_paymentterms', -1, 1, 1, 'minwidth100 maxwidth100'); print ''; } // Module source diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php index 006e6ee6088..12036bd07bc 100644 --- a/htdocs/compta/paiement/list.php +++ b/htdocs/compta/paiement/list.php @@ -416,7 +416,7 @@ if (!empty($arrayfields['s.nom']['checked'])) { // Filter: Payment type if (!empty($arrayfields['c.libelle']['checked'])) { print ''; - print $form->select_types_paiements($search_paymenttype, 'search_paymenttype', '', 2, 1, 1, 1, 1, '', 1, 'list'); + print $form->select_types_paiements($search_paymenttype, 'search_paymenttype', '', 2, 1, 1, 1, 1, '', 1); print ''; } diff --git a/htdocs/compta/sociales/list.php b/htdocs/compta/sociales/list.php index eb5c6ef33f7..ea415784943 100644 --- a/htdocs/compta/sociales/list.php +++ b/htdocs/compta/sociales/list.php @@ -519,7 +519,7 @@ if (!empty($arrayfields['cs.fk_user']['checked'])) { // Filter: Type if (!empty($arrayfields['cs.fk_mode_reglement']['checked'])) { print ''; - print $form->select_types_paiements($search_type, 'search_type', '', 0, 1, 1, 0, 1, 'maxwidth150', 1, 'list'); + print $form->select_types_paiements($search_type, 'search_type', '', 0, 1, 1, 0, 1, 'maxwidth150', 1); print ''; } diff --git a/htdocs/compta/tva/list.php b/htdocs/compta/tva/list.php index 82dcc151e12..22ac6310efc 100644 --- a/htdocs/compta/tva/list.php +++ b/htdocs/compta/tva/list.php @@ -465,7 +465,7 @@ if (!empty($arrayfields['t.datev']['checked'])) { // Filter: Type if (!empty($arrayfields['t.fk_typepayment']['checked'])) { print ''; - print $form->select_types_paiements($search_type, 'search_type', '', 0, 1, 1, 16, 1, '', 1, 'list'); + print $form->select_types_paiements($search_type, 'search_type', '', 0, 1, 1, 16, 1, '', 1); print ''; } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 78b033c6bb0..06801ce12d2 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -4263,7 +4263,7 @@ class Form $this->load_cache_conditions_paiements(); - // Set default value if not already set by caller only for cards + // Set default value if not already set by caller if (empty($selected) && !empty($conf->global->MAIN_DEFAULT_PAYMENT_TERM_ID)) { dol_syslog(__METHOD__ . "Using deprecated option MAIN_DEFAULT_PAYMENT_TERM_ID", LOG_NOTICE); $selected = $conf->global->MAIN_DEFAULT_PAYMENT_TERM_ID; diff --git a/htdocs/fourn/facture/list-rec.php b/htdocs/fourn/facture/list-rec.php index 48751b702ef..684c7d01b11 100644 --- a/htdocs/fourn/facture/list-rec.php +++ b/htdocs/fourn/facture/list-rec.php @@ -522,7 +522,7 @@ if ($resql) { if (!empty($arrayfields['f.fk_cond_reglement']['checked'])) { // Payment term print ''; - print $form->getSelectConditionsPaiements($search_payment_term, 'search_payment_term', -1, 1, 1, 'maxwidth100', -1, 'list'); + print $form->getSelectConditionsPaiements($search_payment_term, 'search_payment_term', -1, 1, 1, 'maxwidth100'); print ""; } if (!empty($arrayfields['f.fk_mode_reglement']['checked'])) { diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index ea46e8ed25d..a3cb7e016a7 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -1118,7 +1118,7 @@ if (!empty($arrayfields['typent.code']['checked'])) { // Condition of payment if (!empty($arrayfields['f.fk_cond_reglement']['checked'])) { print ''; - print $form->getSelectConditionsPaiements($search_paymentcond, 'search_paymentcond', -1, 1, 1, 'maxwidth100', -1); + print $form->getSelectConditionsPaiements($search_paymentcond, 'search_paymentcond', -1, 1, 1, 'maxwidth100'); print ''; } // Payment mode From afa4cc7bce7dfde702480078d2cb0840e70d88b3 Mon Sep 17 00:00:00 2001 From: FLIO Date: Tue, 4 Jul 2023 23:19:04 +0200 Subject: [PATCH 21/68] FIX|Fix (#24085) Add the Project filter --- htdocs/product/stock/movement_list.php | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/htdocs/product/stock/movement_list.php b/htdocs/product/stock/movement_list.php index 232b31ca984..b0d61297e97 100644 --- a/htdocs/product/stock/movement_list.php +++ b/htdocs/product/stock/movement_list.php @@ -85,7 +85,7 @@ $search_user = trim(GETPOST("search_user")); $search_batch = trim(GETPOST("search_batch")); $search_qty = trim(GETPOST("search_qty")); $search_type_mouvement = GETPOST('search_type_mouvement', 'int'); -$search_fk_projet=GETPOST("search_fk_projet", 'int'); +$search_fk_project=GETPOST("search_fk_project"); $type = GETPOST("type", "int"); @@ -226,10 +226,10 @@ if (empty($reshook)) { $search_user = ""; $search_batch = ""; $search_qty = ''; - $search_fk_projet=0; $search_all = ""; $toselect = array(); $search_array_options = array(); + $search_fk_project = ""; } if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha') || GETPOST('button_search_x', 'alpha') || GETPOST('button_search.x', 'alpha') || GETPOST('button_search', 'alpha')) { @@ -690,8 +690,8 @@ if (!empty($search_batch)) { if (!empty($product_id) && $product_id != '-1') { $sql .= natural_search('p.rowid', $product_id); } -if (!empty($search_fk_projet) && $search_fk_projet != '-1') { - $sql .= natural_search('m.fk_projet', $search_fk_projet); +if (!empty($search_fk_project)) { + $sql .= natural_search('m.fk_projet', $search_fk_project); } if ($search_qty != '') { $sql .= natural_search('m.value', $search_qty, 1); @@ -1008,6 +1008,9 @@ if ($search_user) { if ($idproduct > 0) { $param .= '&idproduct='.urlencode($idproduct); } +if ($search_fk_project != '') { + $param .= '&search_fk_project='.urlencode($search_fk_project); +} // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; // Add $param from hooks @@ -1178,10 +1181,17 @@ if (!empty($arrayfields['origin']['checked'])) { print '  '; print ''; } +// if (!empty($arrayfields['p.ref']['checked'])) { +// print ''; +// print ''; +// print ''; +// } if (!empty($arrayfields['m.fk_projet']['checked'])) { // fk_project print ''; - print '  '; + // var_dump($val, $key, $search_fk_projet, $object->fields['fk_project']); + print $object->showInputField($object->fields['fk_project'], 'fk_project', '', '', '', 'search_', 'maxwidth125', 1); + // print ''; print ''; } if (!empty($arrayfields['m.type_mouvement']['checked'])) { From b8232551da792591587dfe829d8b1b6f7800e4f8 Mon Sep 17 00:00:00 2001 From: FLIO Date: Tue, 4 Jul 2023 23:22:28 +0200 Subject: [PATCH 22/68] remove comments --- htdocs/product/stock/movement_list.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/htdocs/product/stock/movement_list.php b/htdocs/product/stock/movement_list.php index b0d61297e97..fc9e9bf19bd 100644 --- a/htdocs/product/stock/movement_list.php +++ b/htdocs/product/stock/movement_list.php @@ -1181,17 +1181,10 @@ if (!empty($arrayfields['origin']['checked'])) { print '  '; print ''; } -// if (!empty($arrayfields['p.ref']['checked'])) { -// print ''; -// print ''; -// print ''; -// } if (!empty($arrayfields['m.fk_projet']['checked'])) { // fk_project print ''; - // var_dump($val, $key, $search_fk_projet, $object->fields['fk_project']); print $object->showInputField($object->fields['fk_project'], 'fk_project', '', '', '', 'search_', 'maxwidth125', 1); - // print ''; print ''; } if (!empty($arrayfields['m.type_mouvement']['checked'])) { From 11509c2e9447c527864a40f0ec9fb734126cc187 Mon Sep 17 00:00:00 2001 From: FLIO Date: Wed, 5 Jul 2023 13:16:12 +0200 Subject: [PATCH 23/68] fix the condition if you put nothing in the selectbox --- htdocs/product/stock/movement_list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/stock/movement_list.php b/htdocs/product/stock/movement_list.php index fc9e9bf19bd..addb445b8e6 100644 --- a/htdocs/product/stock/movement_list.php +++ b/htdocs/product/stock/movement_list.php @@ -690,7 +690,7 @@ if (!empty($search_batch)) { if (!empty($product_id) && $product_id != '-1') { $sql .= natural_search('p.rowid', $product_id); } -if (!empty($search_fk_project)) { +if (!empty($search_fk_project) && $search_fk_project != '-1') { $sql .= natural_search('m.fk_projet', $search_fk_project); } if ($search_qty != '') { @@ -1008,7 +1008,7 @@ if ($search_user) { if ($idproduct > 0) { $param .= '&idproduct='.urlencode($idproduct); } -if ($search_fk_project != '') { +if ($search_fk_project != '' && $search_fk_project != '-1') { $param .= '&search_fk_project='.urlencode($search_fk_project); } // Add $param from extra fields From 91f19cfaa9a80eed451734ce1ed22430133feaab Mon Sep 17 00:00:00 2001 From: jyhere Date: Fri, 7 Jul 2023 11:28:37 +0200 Subject: [PATCH 24/68] FIX : extrafield quick edit not working on products --- htdocs/core/tpl/extrafields_view.tpl.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/core/tpl/extrafields_view.tpl.php b/htdocs/core/tpl/extrafields_view.tpl.php index c75317471fb..21b756f892f 100644 --- a/htdocs/core/tpl/extrafields_view.tpl.php +++ b/htdocs/core/tpl/extrafields_view.tpl.php @@ -153,6 +153,9 @@ if (empty($reshook) && isset($extrafields->attributes[$object->table_element]['l if ($object->element == 'fichinter') { $keyforperm = 'ficheinter'; } + if ($object->element == 'product') { + $keyforperm = 'produit'; + } if (isset($user->rights->$keyforperm)) { $permok = !empty($user->rights->$keyforperm->creer) || !empty($user->rights->$keyforperm->create) || !empty($user->rights->$keyforperm->write); } From 862dbf7e23ba49369c36809407fccf20d64358f5 Mon Sep 17 00:00:00 2001 From: jyhere Date: Fri, 7 Jul 2023 11:42:54 +0200 Subject: [PATCH 25/68] FIX: quickedit code missing on product card --- htdocs/product/card.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 25ef7c2899a..7c601d9a61c 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -448,6 +448,30 @@ if (empty($reshook)) { } } + // Quick edit for extrafields + if ($action == 'update_extras') { + $object->oldcopy = dol_clone($object); + + // Fill array 'array_options' with data from update form + $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'restricthtml')); + if ($ret < 0) { + $error++; + } + + if (!$error) { + // Actions on extra fields + $result = $object->insertExtraFields('PRODUCT_MODIFY'); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + $error++; + } + } + + if ($error) { + $action = 'edit_extras'; + } + } + // Add a product or service if ($action == 'add' && $usercancreate) { $error = 0; From ac7ce38aee826f4f51e8f4195d082a44c1e751f8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 7 Jul 2023 13:45:24 +0200 Subject: [PATCH 26/68] Fix warnings --- htdocs/core/tpl/extrafields_view.tpl.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/htdocs/core/tpl/extrafields_view.tpl.php b/htdocs/core/tpl/extrafields_view.tpl.php index 94eb8ff0a86..16d5ba8c3b2 100644 --- a/htdocs/core/tpl/extrafields_view.tpl.php +++ b/htdocs/core/tpl/extrafields_view.tpl.php @@ -157,42 +157,42 @@ if (empty($reshook) && isset($extrafields->attributes[$object->table_element]['l $keyforperm = 'ficheinter'; } if (isset($user->rights->$keyforperm)) { - $permok = !empty($user->rights->$keyforperm->creer) || !empty($user->rights->$keyforperm->create) || !empty($user->rights->$keyforperm->write); + $permok = $user->hasRight($keyforperm, 'creer') || $user->hasRight($keyforperm, 'create') || $user->hasRights($keyforperm, 'write'); } if ($object->element == 'order_supplier') { if (empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) { - $permok = $user->rights->fournisseur->commande->creer; + $permok = $user->hasRight('fournisseur', 'commande', 'creer'); } else { - $permok = $user->rights->supplier_order->creer; + $permok = $user->hasRight('supplier_order', 'creer'); } } if ($object->element == 'invoice_supplier') { if (empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) { - $permok = $user->rights->fournisseur->facture->creer; + $permok = $user->hasRight('fournisseur', 'facture', 'creer'); } else { - $permok = $user->rights->supplier_invoice->creer; + $permok = $user->hasRight('supplier_invoice', 'creer'); } } if ($object->element == 'shipping') { - $permok = $user->rights->expedition->creer; + $permok = $user->hasRight('expedition', 'creer'); } if ($object->element == 'delivery') { - $permok = $user->rights->expedition->delivery->creer; + $permok = $user->hasRight('expedition', 'delivery', 'creer'); } if ($object->element == 'productlot') { - $permok = $user->rights->stock->creer; + $permok = $user->hasRight('stock', 'creer'); } if ($object->element == 'facturerec') { $permok = $user->hasRight('facture', 'creer'); } if ($object->element == 'mo') { - $permok = $user->rights->mrp->write; + $permok = $user->hasRight('mrp', 'write'); } if ($object->element == 'contact') { $permok = $user->hasRight('societe', 'contact', 'creer'); } if ($object->element == 'salary') { - $permok = $user->rights->salaries->read; + $permok = $user->hasRight('salaries', 'read'); } $isdraft = ((isset($object->statut) && $object->statut == 0) || (isset($object->status) && $object->status == 0)); From 754acf917f0b8e2108dc17268f8372216375ccb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 7 Jul 2023 14:36:59 +0200 Subject: [PATCH 27/68] fix no supplier_proposal stats page --- htdocs/fourn/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/card.php b/htdocs/fourn/card.php index 7d1d04158ae..51ef50bc144 100644 --- a/htdocs/fourn/card.php +++ b/htdocs/fourn/card.php @@ -633,7 +633,7 @@ if ($object->id > 0) { print ''; print ''; print ''; - print ''; + // print ''; print '
'.$langs->trans("LastSupplierProposals", ($num < $MAXLIST ? "" : $MAXLIST)).''.$langs->trans("AllPriceRequests").''.$num.''.img_picto($langs->trans("Statistics"), 'stats').''.img_picto($langs->trans("Statistics"), 'stats').'
'; print ''; } From e2412a1cc7ff76b8fea9e9f3ea1786add25ee0e8 Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Fri, 7 Jul 2023 15:16:56 +0200 Subject: [PATCH 28/68] FIX llx_chargesociales sql for greek --- htdocs/install/mysql/data/llx_c_chargesociales.sql | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/install/mysql/data/llx_c_chargesociales.sql b/htdocs/install/mysql/data/llx_c_chargesociales.sql index 6e0102c6fbf..7719b9f9f21 100644 --- a/htdocs/install/mysql/data/llx_c_chargesociales.sql +++ b/htdocs/install/mysql/data/llx_c_chargesociales.sql @@ -80,8 +80,7 @@ insert into llx_c_chargesociales (fk_pays, id, libelle, deductible, active, code insert into llx_c_chargesociales (fk_pays, id, libelle, deductible, active, code) values ( 102, 10203, 'Ασφαλιστικές εισφορές (ΕΦΚΑ)', 1, 1, 'ΕΦΚΑ'); insert into llx_c_chargesociales (fk_pays, id, libelle, deductible, active, code) values ( 102, 10204, 'Προκαταβολή Φόρου Εισοδήματος', 0, 1, 'ΕΦΟΡΙΑ'); insert into llx_c_chargesociales (fk_pays, id, libelle, deductible, active, code) values ( 102, 10205, 'Ενιαίος Φόρος Ιδιοκτησίας Ακινήτων (ΕΝ.Φ.Ι.Α) ', 0, 1, 'ΕΝΦΙΑ'); -insert into llx_c_chargesociales (fk_pays, id, libelle, deductible, active, code) values ( 102, 10206, 'Ετήσιο τέλος διατήρησης Μερίδας στο -Γ.Ε.ΜΗ.', 1, 1, 'ΓΕΜΗ'); +insert into llx_c_chargesociales (fk_pays, id, libelle, deductible, active, code) values ( 102, 10206, 'Ετήσιο τέλος διατήρησης Μερίδας στο Γ.Ε.ΜΗ.', 1, 1, 'ΓΕΜΗ'); insert into llx_c_chargesociales (fk_pays, id, libelle, deductible, active, code) values ( 102, 10207, 'Επαγγελματικό Επιμελητήριο', 1, 1, 'ΕΕ'); insert into llx_c_chargesociales (fk_pays, id, libelle, deductible, active, code) values ( 102, 10208, 'Εμπορικό και Βιομηχανικό Επιμελητηρίο', 1, 1, 'ΕΒΕ'); insert into llx_c_chargesociales (fk_pays, id, libelle, deductible, active, code) values ( 102, 10209, 'Τέλη Κυκλοφορίας', 1, 1,'ΤΕΛΗ'); From 6a6af8472a7c9c8c7aa36df78334ed1423b5e8c6 Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Fri, 7 Jul 2023 15:50:45 +0200 Subject: [PATCH 29/68] FIX website access rights --- htdocs/website/websiteaccount_card.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/htdocs/website/websiteaccount_card.php b/htdocs/website/websiteaccount_card.php index f7658a28a97..9c48a3051fc 100644 --- a/htdocs/website/websiteaccount_card.php +++ b/htdocs/website/websiteaccount_card.php @@ -70,15 +70,15 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be includ //if ($user->socid > 0) accessforbidden(); //if ($user->socid > 0) $socid = $user->socid; //$result = restrictedArea($user, 'website', $id); -if (empty($user->rights->websiteaccount->read)) { +if (empty($user->hasRight('website', 'read'))) { accessforbidden('NotAllowed'); } // Permissions -$permissionnote = $user->rights->websiteaccount->write; // Used by the include of actions_setnotes.inc.php -$permissiondellink = $user->rights->websiteaccount->write; // Used by the include of actions_dellink.inc.php -$permissiontoadd = $user->rights->websiteaccount->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php -$permissiontodelete = $user->rights->websiteaccount->delete; +$permissionnote = $user->hasRight('website', 'write'); // Used by the include of actions_setnotes.inc.php +$permissiondellink = $user->hasRight('website', 'write'); // Used by the include of actions_dellink.inc.php +$permissiontoadd = $user->hasRight('website', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php +$permissiontodelete = $user->hasRight('website', 'delete'); /* @@ -94,8 +94,8 @@ if ($reshook < 0) { if (empty($reshook)) { $error = 0; - $permissiontoadd = $user->rights->website->write; - $permissiontodelete = $user->rights->website->delete; + $permissiontoadd = $user->hasRight('website', 'write'); + $permissiontodelete = $user->hasRight('website', 'delete'); $backurlforlist = dol_buildpath('/website/websiteaccount_list.php', 1); // Actions cancel, add, update or delete @@ -221,8 +221,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $morehtmlref = '
'; /* // Ref bis - $morehtmlref.=$form->editfieldkey("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->website->creer, 'string', '', 0, 1); - $morehtmlref.=$form->editfieldval("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->website->creer, 'string', '', null, null, '', 1); + $morehtmlref.=$form->editfieldkey("RefBis", 'ref_client', $object->ref_client, $object, $user->hasRight('website', 'write'), 'string', '', 0, 1); + $morehtmlref.=$form->editfieldval("RefBis", 'ref_client', $object->ref_client, $object, $user->hasRight('website', 'write'), 'string', '', null, null, '', 1); // Thirdparty $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $soc->getNomUrl(1); // Project @@ -230,7 +230,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea { $langs->load("projects"); $morehtmlref.='
'.$langs->trans('Project') . ' '; - if ($user->rights->website->creer) + if ($user->hasRight('website', 'write')) { if ($action != 'classify') { @@ -305,7 +305,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''."\n"; } - if ($user->rights->website->write) { + if ($user->hasRight('website', 'write')) { print ''."\n"; } From d47f004759fbdc2741d32260c608fc926f3add7a Mon Sep 17 00:00:00 2001 From: vmaury Date: Fri, 7 Jul 2023 16:16:55 +0200 Subject: [PATCH 30/68] Fix #25302 Sum of tasks time spent on project referrers page (projet/element.php) --- htdocs/projet/element.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 3b8393c402d..26a60ff2370 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -853,13 +853,8 @@ foreach ($listofreferent as $key => $value) { } elseif ($tablename == 'stock_mouvement') { $total_ht_by_line = $element->price * abs($element->qty); } elseif ($tablename == 'projet_task') { - if ($idofelementuser) { - $tmp = $element->getSumOfAmount($elementuser, $dates, $datee); - $total_ht_by_line = price2num($tmp['amount'], 'MT'); - } else { - $tmp = $element->getSumOfAmount('', $dates, $datee); - $total_ht_by_line = price2num($tmp['amount'], 'MT'); - } + $tmp = $element->getSumOfAmount($idofelementuser ? $elementuser : '', $dates, $datee); + $total_ht_by_line = price2num($tmp['amount'], 'MT'); } elseif ($key == 'loan') { if ((empty($dates) && empty($datee)) || (intval($dates) <= $element->datestart && intval($datee) >= $element->dateend)) { // Get total loan @@ -1344,7 +1339,7 @@ foreach ($listofreferent as $key => $value) { print " - ".dol_print_date($element->datef, 'dayhour'); } } elseif (in_array($tablename, array('projet_task'))) { - $tmpprojtime = $element->getSumOfAmount($elementuser, $dates, $datee); // $element is a task. $elementuser may be empty + $tmpprojtime = $element->getSumOfAmount($idofelementuser ? $elementuser : '', $dates, $datee); // $element is a task. $elementuser may be empty print ''; print convertSecondToTime($tmpprojtime['nbseconds'], 'allhourmin'); print ''; @@ -1673,4 +1668,4 @@ function sortElementsByClientName($elementarray) } return $elementarray; -} +} \ No newline at end of file From 8a3c0491ec9e24e5911f84842a2cdda2b7c9217a Mon Sep 17 00:00:00 2001 From: Kamel Khelifa Date: Fri, 7 Jul 2023 16:46:11 +0200 Subject: [PATCH 31/68] FIX: Fix errors or missing langs for MO and BOM --- htdocs/admin/bomline_extrafields.php | 4 ++-- htdocs/core/modules/mrp/doc/pdf_vinci.modules.php | 1 + htdocs/langs/en_US/mrp.lang | 2 ++ htdocs/langs/fr_FR/mrp.lang | 2 ++ htdocs/mrp/mo_card.php | 2 +- htdocs/mrp/mo_list.php | 2 +- htdocs/mrp/mo_movements.php | 4 ++-- htdocs/mrp/mo_production.php | 4 ++-- 8 files changed, 13 insertions(+), 8 deletions(-) diff --git a/htdocs/admin/bomline_extrafields.php b/htdocs/admin/bomline_extrafields.php index 1a21f052b84..69a89e208fe 100644 --- a/htdocs/admin/bomline_extrafields.php +++ b/htdocs/admin/bomline_extrafields.php @@ -65,11 +65,11 @@ require DOL_DOCUMENT_ROOT . '/core/actions_extrafields.inc.php'; */ $help_url = ''; -llxHeader('', $langs->trans("BOMLinesSetup"), $help_url); +llxHeader('', $langs->trans("BOMsSetup"), $help_url); $linkback = '' . $langs->trans("BackToModuleList") . ''; -print load_fiche_titre($langs->trans("BOMLinesSetup"), $linkback, 'title_setup'); +print load_fiche_titre($langs->trans("BOMsSetup"), $linkback, 'title_setup'); $head = bomAdminPrepareHead(); diff --git a/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php b/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php index e4d46662197..b118a0b021e 100644 --- a/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php +++ b/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php @@ -1089,6 +1089,7 @@ class pdf_vinci extends ModelePDFMo $posx = $this->page_largeur - $this->marge_droite - 100; $posy = $this->marge_haute; + $w = 100; $pdf->SetXY($this->marge_gauche, $posy); diff --git a/htdocs/langs/en_US/mrp.lang b/htdocs/langs/en_US/mrp.lang index d73eb5f831b..47cf27a0cdf 100644 --- a/htdocs/langs/en_US/mrp.lang +++ b/htdocs/langs/en_US/mrp.lang @@ -122,3 +122,5 @@ BOMServicesList=BOM's services Manufacturing=Manufacturing Disassemble=Disassemble ProducedBy=Produced by +QtyTot=Qty Total +InProgress=In progress diff --git a/htdocs/langs/fr_FR/mrp.lang b/htdocs/langs/fr_FR/mrp.lang index f4ad2b4a6b6..34deaa9f553 100644 --- a/htdocs/langs/fr_FR/mrp.lang +++ b/htdocs/langs/fr_FR/mrp.lang @@ -122,3 +122,5 @@ BOMServicesList=Les services de BOM Manufacturing=Fabrication Disassemble=Déassemblage ProducedBy=Produit par +QtyTot=Qty Total +InProgress=En cours diff --git a/htdocs/mrp/mo_card.php b/htdocs/mrp/mo_card.php index 675c3363576..52f93870619 100644 --- a/htdocs/mrp/mo_card.php +++ b/htdocs/mrp/mo_card.php @@ -423,7 +423,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $ref = substr($object->ref, 1, 4); if ($ref == 'PROV') { $object->fetch_product(); - $numref = $object->getNextNumRef($object->fk_product); + $numref = $object->getNextNumRef($object->product); } else { $numref = $object->ref; } diff --git a/htdocs/mrp/mo_list.php b/htdocs/mrp/mo_list.php index 1d81a4d137e..4ab5563a591 100644 --- a/htdocs/mrp/mo_list.php +++ b/htdocs/mrp/mo_list.php @@ -625,7 +625,7 @@ while ($i < $imaxinloop) { $objectBom = $bom->fetch($obj->fk_bom); // Output Kanban - print $object->getKanbanView('', array('bom'=>$objectBom->getNomUrl(1), 'selected' => in_array($object->id, $arrayofselected))); + print $object->getKanbanView('', array('bom'=>$bom->getNomUrl(1), 'selected' => in_array($object->id, $arrayofselected))); if ($i == ($imaxinloop - 1)) { print '
'; print ''; diff --git a/htdocs/mrp/mo_movements.php b/htdocs/mrp/mo_movements.php index 87cedbab0cb..ea378e30fdb 100644 --- a/htdocs/mrp/mo_movements.php +++ b/htdocs/mrp/mo_movements.php @@ -991,10 +991,10 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''; if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined $selected = 0; - if (in_array($obj->rowid, $arrayofselected)) { + if (in_array($objp->rowid, $arrayofselected)) { $selected = 1; } - print ''; + print ''; } print ''; if (!$i) { diff --git a/htdocs/mrp/mo_production.php b/htdocs/mrp/mo_production.php index 7bb0fb780aa..90cc59a22f8 100644 --- a/htdocs/mrp/mo_production.php +++ b/htdocs/mrp/mo_production.php @@ -182,7 +182,7 @@ if (empty($reshook)) { $resultline = $moline->create($user, false); // Never use triggers here if ($resultline <= 0) { $error++; - setEventMessages($moline->error, $molines->errors, 'errors'); + setEventMessages($moline->error, $moline->errors, 'errors'); } $action = ''; @@ -486,7 +486,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $ref = substr($object->ref, 1, 4); if ($ref == 'PROV') { $object->fetch_product(); - $numref = $object->getNextNumRef($object->fk_product); + $numref = $object->getNextNumRef($object->product); } else { $numref = $object->ref; } From f6206770bd457daea705d1b755337b278b7be77b Mon Sep 17 00:00:00 2001 From: mc2rcanarslan <138895927+mc2rcanarslan@users.noreply.github.com> Date: Fri, 7 Jul 2023 15:24:12 +0000 Subject: [PATCH 32/68] fix: project status bug when PROJECT_CREATE_NO_DRAFT is set --- htdocs/projet/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index 1f834639626..7e5219e7e1f 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -191,7 +191,7 @@ if (empty($reshook)) { } // Create with status validated immediatly - if (!empty($conf->global->PROJECT_CREATE_NO_DRAFT)) { + if (!empty($conf->global->PROJECT_CREATE_NO_DRAFT) && !$error) { $status = Project::STATUS_VALIDATED; } From 4b708e9f3f7fbca0c945110351c83bca640ed390 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 9 Jul 2023 12:43:32 +0200 Subject: [PATCH 33/68] Fix warning --- htdocs/user/class/user.class.php | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 8e9fdf95575..d64aaa910c4 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -688,7 +688,6 @@ class User extends CommonObject */ public function hasRight($module, $permlevel1, $permlevel2 = '') { - global $conf; // For compatibility with bad naming permissions on module $moduletomoduletouse = array( 'compta' => 'comptabilite', From aae4598405b7f71e6d65331aac409585e141bc29 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 9 Jul 2023 12:55:44 +0200 Subject: [PATCH 34/68] Fix phpcs --- htdocs/product/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 7c601d9a61c..e48f2dfc42a 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -471,7 +471,7 @@ if (empty($reshook)) { $action = 'edit_extras'; } } - + // Add a product or service if ($action == 'add' && $usercancreate) { $error = 0; From 3998413445bfe755680b33925c278d096307e7eb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 9 Jul 2023 13:12:17 +0200 Subject: [PATCH 35/68] Doc --- htdocs/install/mysql/tables/llx_stock_mouvement.sql | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/install/mysql/tables/llx_stock_mouvement.sql b/htdocs/install/mysql/tables/llx_stock_mouvement.sql index ec3465a6c2d..32afd3c575b 100644 --- a/htdocs/install/mysql/tables/llx_stock_mouvement.sql +++ b/htdocs/install/mysql/tables/llx_stock_mouvement.sql @@ -27,12 +27,12 @@ create table llx_stock_mouvement eatby date DEFAULT NULL, -- Eatby date (deprecated, we should get value from batch number in table llx_product_lot) sellby date DEFAULT NULL, -- Sellby date (deprecated, we should get value from batch number in table llx_product_lot) fk_entrepot integer NOT NULL, -- Id warehouse - value real, -- Qty of movement - price double(24,8) DEFAULT 0, -- Entry price (used to calculate PMP, FIFO or LIFO value) - type_mouvement smallint, -- Type/Direction of movement - fk_user_author integer, -- Id user making movement - label varchar(255), -- Comment on movement - inventorycode varchar(128), -- Code used to group different movement line into one operation (may be an inventory, a mass picking) + value real, -- Qty of movement + price double(24,8) DEFAULT 0, -- Entry price (used to calculate PMP, FIFO or LIFO value) + type_mouvement smallint, -- Type/Direction of movement (manual entry = 0, manual exit = 1, automatic exit = 2, automatic entry = 3) + fk_user_author integer, -- Id user making movement + label varchar(255), -- Comment on movement + inventorycode varchar(128), -- Code used to group different movement line into one operation (may be an inventory, a mass picking) fk_project integer, fk_origin integer, origintype varchar(64), From 8308a90df70dbe89ea4d61a635a0e6f2ec11584d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 9 Jul 2023 13:21:27 +0200 Subject: [PATCH 36/68] Move term --- htdocs/langs/en_US/main.lang | 4 +++- htdocs/langs/en_US/ticket.lang | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 55f27b6db33..ab6179f525c 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -1229,4 +1229,6 @@ PublicVirtualCard=Virtual business card TreeView=Tree view DropFileToAddItToObject=Drop a file to add it to this object UploadFileDragDropSuccess=The file(s) have been uploaded successfully -SearchSyntaxTooltipForStringOrNum=For searching inside text fields, you can use the characters ^ or $ to make a 'start or end with' search or use the ! to make a 'does not contain' test. You can use the | between two strings instead of a space for a 'OR' condition instead of 'AND'. For numeric values, you can use the operator <, >, <=, >= or != before the value, to filter using a mathematical comparison \ No newline at end of file +SearchSyntaxTooltipForStringOrNum=For searching inside text fields, you can use the characters ^ or $ to make a 'start or end with' search or use the ! to make a 'does not contain' test. You can use the | between two strings instead of a space for a 'OR' condition instead of 'AND'. For numeric values, you can use the operator <, >, <=, >= or != before the value, to filter using a mathematical comparison +InProgress=In progress + \ No newline at end of file diff --git a/htdocs/langs/en_US/ticket.lang b/htdocs/langs/en_US/ticket.lang index 5f9ca0e1f5e..f2e2294071f 100644 --- a/htdocs/langs/en_US/ticket.lang +++ b/htdocs/langs/en_US/ticket.lang @@ -67,7 +67,6 @@ ExportDataset_ticket_1=Tickets # Status Read=Read Assigned=Assigned -InProgress=In progress NeedMoreInformation=Waiting for reporter feedback NeedMoreInformationShort=Waiting for feedback Answered=Answered From ef31cf34ffe60ad1c35b6cd0beba2a81e50f8935 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 9 Jul 2023 13:24:43 +0200 Subject: [PATCH 37/68] Fix duplicate string --- htdocs/langs/en_US/mrp.lang | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/langs/en_US/mrp.lang b/htdocs/langs/en_US/mrp.lang index 47cf27a0cdf..92105e3b63e 100644 --- a/htdocs/langs/en_US/mrp.lang +++ b/htdocs/langs/en_US/mrp.lang @@ -123,4 +123,3 @@ Manufacturing=Manufacturing Disassemble=Disassemble ProducedBy=Produced by QtyTot=Qty Total -InProgress=In progress From 92f6536459580bf2e10eeba224f8e1604b0c3878 Mon Sep 17 00:00:00 2001 From: mc2rcanarslan <138895927+mc2rcanarslan@users.noreply.github.com> Date: Fri, 7 Jul 2023 15:24:12 +0000 Subject: [PATCH 38/68] fix: project status bug when PROJECT_CREATE_NO_DRAFT is set --- htdocs/projet/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index 1f834639626..7e5219e7e1f 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -191,7 +191,7 @@ if (empty($reshook)) { } // Create with status validated immediatly - if (!empty($conf->global->PROJECT_CREATE_NO_DRAFT)) { + if (!empty($conf->global->PROJECT_CREATE_NO_DRAFT) && !$error) { $status = Project::STATUS_VALIDATED; } From 34908a72c7b0633a5077a264eaf5166e50828e4b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 9 Jul 2023 13:48:05 +0200 Subject: [PATCH 39/68] Test CI --- .github/workflows/phpcsfixer.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/phpcsfixer.yml b/.github/workflows/phpcsfixer.yml index eeb943534d7..490a61281ff 100644 --- a/.github/workflows/phpcsfixer.yml +++ b/.github/workflows/phpcsfixer.yml @@ -41,6 +41,6 @@ jobs: phpcs_ref_name: ${{github.ref_name}} phpcs_github_event_name: ${{github.event_name}} phpcs_files: ${{ needs.filesChanged.outputs.all_changed_files }} - - uses: stefanzweifel/git-auto-commit-action@v4 # auto commit the fixes action for GitHub - with: - commit_message: Fix PHPCS errors by GitHub PHPCSfixer action + #- uses: stefanzweifel/git-auto-commit-action@v4 # auto commit the fixes action for GitHub + # with: + # commit_message: Fix PHPCS errors by GitHub PHPCSfixer action From 2c835002bd3bcf8858ee18c2303bb815749a3655 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 9 Jul 2023 13:48:34 +0200 Subject: [PATCH 40/68] Test CI --- 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 26a60ff2370..0669ba9f61b 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -1668,4 +1668,4 @@ function sortElementsByClientName($elementarray) } return $elementarray; -} \ No newline at end of file +} From 043bda80a081383ad8b741ec115282e4f57f6ef2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 9 Jul 2023 14:04:57 +0200 Subject: [PATCH 41/68] Test CI --- .github/workflows/phpcsfixer.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/phpcsfixer.yml b/.github/workflows/phpcsfixer.yml index 490a61281ff..0e8ebbfc895 100644 --- a/.github/workflows/phpcsfixer.yml +++ b/.github/workflows/phpcsfixer.yml @@ -20,8 +20,10 @@ jobs: #needs: filesChanged steps: - uses: actions/checkout@v3 - #with: - # fetch-depth: 10 + with: + repository: ${{ github.event.pull_request.head.repo.full_name }} + ref: ${{ github.event.pull_request.head.ref }} + # fetch-depth: 10 - name: echo Get list of all changed files run: | From b74fe4f99b3dd31ead5a784b7d022643047ce1ed Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 9 Jul 2023 14:20:28 +0200 Subject: [PATCH 42/68] Test CI --- .github/workflows/phpcsfixer.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/phpcsfixer.yml b/.github/workflows/phpcsfixer.yml index 0e8ebbfc895..1bd342f9737 100644 --- a/.github/workflows/phpcsfixer.yml +++ b/.github/workflows/phpcsfixer.yml @@ -43,6 +43,20 @@ jobs: phpcs_ref_name: ${{github.ref_name}} phpcs_github_event_name: ${{github.event_name}} phpcs_files: ${{ needs.filesChanged.outputs.all_changed_files }} + #- uses: stefanzweifel/git-auto-commit-action@v4 # auto commit the fixes action for GitHub # with: # commit_message: Fix PHPCS errors by GitHub PHPCSfixer action + + - name: Commit changes + uses: EndBug/add-and-commit@v9.1.3 + with: + default_author: github_actions + committer_name: GitHub Actions + committer_email: actions@github.com + #author_name: PHP CS fixer + #author_email: eldy@destailleur.fr + #committer_name: PHP CS fixer + #committer_email: eldy@destailleur.fr + message: 'PHP CS fixer github action' + add: '*.php' From b74482a3db300b0f2ff36038623338306c034513 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 9 Jul 2023 14:40:01 +0200 Subject: [PATCH 43/68] css --- 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 01218283092..9996ad26bfe 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -652,7 +652,7 @@ if ($id > 0 || $ref) { } $price_expression_preselection = GETPOST('eid') ? GETPOST('eid') : ($object->fk_supplier_price_expression ? $object->fk_supplier_price_expression : '0'); print $form->selectarray('eid', $price_expression_list, $price_expression_preselection); - print ' 
'.$langs->trans("PriceExpressionEditor").'
'; + print ' 
'.$langs->trans("PriceExpressionEditor").'
'; print ''; // This code hides the numeric price input if is not selected, loads the editor page if editor button is pressed print ''."\n"; $formproject->selectTasks((!empty($societe->id) ? $societe->id : -1), $object->fk_element, 'fk_element', 24, 0, 0, 1, 0, 0, 'maxwidth500', $object->fk_project); @@ -2049,12 +2046,12 @@ if ($id > 0) { } else { $checked = ''; $actionCommReminder = new ActionCommReminder($db); - $actionCommReminder->offsetvalue = 10; + $actionCommReminder->offsetvalue = getDolGlobalInt('AGENDA_REMINDER_DEFAULT_OFFSET', 30); $actionCommReminder->offsetunit = 'i'; $actionCommReminder->typeremind = 'email'; } - print '
'; + print '
'; print '
'; @@ -2079,9 +2076,11 @@ if ($id > 0) { } // Mail Model - print ''.$langs->trans("EMailTemplates").''; - print $form->selectModelMail('actioncommsend', 'actioncomm_send', 1, 1); - print ''; + if (getDolGlobalString('AGENDA_REMINDER_EMAIL')) { + print ''.$langs->trans("EMailTemplates").''; + print $form->selectModelMail('actioncommsend', 'actioncomm_send', 1, 1); + print ''; + } print ''; diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index 10d1aa31d0c..47f9c6d0778 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -1377,6 +1377,7 @@ class FormTicket // If constant set, allow to send private messages as email if (empty($conf->global->TICKET_SEND_PRIVATE_EMAIL)) { print 'jQuery("#send_msg_email").click(function() { + console.log("Click send_msg_email"); if(jQuery(this).is(":checked")) { if (jQuery("#private_message").is(":checked")) { jQuery("#private_message").prop("checked", false).trigger("change"); @@ -1389,6 +1390,7 @@ class FormTicket }); jQuery("#private_message").click(function() { + console.log("Click private_message"); if (jQuery(this).is(":checked")) { if (jQuery("#send_msg_email").is(":checked")) { jQuery("#send_msg_email").prop("checked", false).trigger("change"); @@ -1444,7 +1446,12 @@ class FormTicket $checkbox_selected = (GETPOST('send_email') == "1" ? ' checked' : (getDolGlobalInt('TICKETS_MESSAGE_FORCE_MAIL')?'checked':'')); print ' '; print ''; - $texttooltip = $langs->trans("TicketMessageSendEmailHelp", '{s1}'); + $texttooltip = $langs->trans("TicketMessageSendEmailHelp"); + if (empty($conf->global->TICKET_SEND_PRIVATE_EMAIL)) { + $texttooltip .= ' '.$langs->trans("TicketMessageSendEmailHelp2b"); + } else { + $texttooltip .= ' '.$langs->trans("TicketMessageSendEmailHelp2a", '{s1}'); + } $texttooltip = str_replace('{s1}', $langs->trans('MarkMessageAsPrivate'), $texttooltip); print ' '.$form->textwithpicto('', $texttooltip, 1, 'help'); print ''; diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index cdd3fdc61ff..02c4fccabed 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -1906,6 +1906,15 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin $out .= ''; $out .= ''; + + // Action column + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + $out .= ''; + } + if ($donetodo) { $out .= ''; } @@ -1923,13 +1932,19 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin $out .= ''; $out .= ''; // Action column - $out .= ''; + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + $out .= ''; + } $out .= ''; $out .= ''; + // Action column + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + $out .= getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'maxwidthsearch '); + } if ($donetodo) { $tmp = ''; if (get_class($filterobj) == 'Societe') { @@ -1952,7 +1967,10 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin $out .= getTitleFieldOfList("RelatedObjects", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder); $out .= getTitleFieldOfList("ActionOnContact", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'tdoverflowmax125 ', 0, '', 0); $out .= getTitleFieldOfList("Status", 0, $_SERVER["PHP_SELF"], 'a.percent', '', $param, '', $sortfield, $sortorder, 'center '); - $out .= getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'maxwidthsearch '); + // Action column + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + $out .= getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'maxwidthsearch '); + } $out .= ''; require_once DOL_DOCUMENT_ROOT.'/comm/action/class/cactioncomm.class.php'; @@ -1967,6 +1985,11 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin $out .= ''; + // Action column + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + $out .= ''; + } + // Done or todo if ($donetodo) { $out .= ''; - // Actions - $out .= ''; + // Action column + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + $out .= ''; + } $out .= "\n"; $i++; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 04226d1af53..9e3d3f79496 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -12516,6 +12516,14 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = '', $n $out .= ''; + // Action column + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + $out .= ''; + } + $out .= getTitleFieldOfList('Date', 0, $_SERVER["PHP_SELF"], 'a.datep', '', $param, '', $sortfield, $sortorder, '')."\n"; $out .= ''; @@ -12531,10 +12539,14 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = '', $n $out .= ''; $out .= ''; - $out .= ''; + // Action column + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + $out .= ''; + } + $out .= ''; @@ -12615,7 +12627,7 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = '', $n $out .= ''; // Date - $out .= ' '; + $out .= ' '; $out .= dol_print_date($histo[$key]['datestart'], 'dayhour', 'tzuserrel'); if ($histo[$key]['dateend'] && $histo[$key]['dateend'] != $histo[$key]['datestart']) { $tmpa = dol_getdate($histo[$key]['datestart'], true); @@ -12642,13 +12654,13 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = '', $n if ($late) { $out .= img_warning($langs->trans("Late")).' '; } - $out .= "\n"; + $out .= "\n"; // Ref $out .= '

'; // Author of event - $out .= '
'; + $out .= '
'; if ($histo[$key]['userid'] > 0) { if (!isset($userGetNomUrlCache[$histo[$key]['userid']])) { // is in cache ? $userstatic->fetch($histo[$key]['userid']); diff --git a/htdocs/core/tpl/extrafields_view.tpl.php b/htdocs/core/tpl/extrafields_view.tpl.php index 16d5ba8c3b2..8ee35172b97 100644 --- a/htdocs/core/tpl/extrafields_view.tpl.php +++ b/htdocs/core/tpl/extrafields_view.tpl.php @@ -157,7 +157,7 @@ if (empty($reshook) && isset($extrafields->attributes[$object->table_element]['l $keyforperm = 'ficheinter'; } if (isset($user->rights->$keyforperm)) { - $permok = $user->hasRight($keyforperm, 'creer') || $user->hasRight($keyforperm, 'create') || $user->hasRights($keyforperm, 'write'); + $permok = $user->hasRight($keyforperm, 'creer') || $user->hasRight($keyforperm, 'create') || $user->hasRight($keyforperm, 'write'); } if ($object->element == 'order_supplier') { if (empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) { diff --git a/htdocs/knowledgemanagement/knowledgerecord_list.php b/htdocs/knowledgemanagement/knowledgerecord_list.php index f4aeaad2c36..5181f979ea6 100644 --- a/htdocs/knowledgemanagement/knowledgerecord_list.php +++ b/htdocs/knowledgemanagement/knowledgerecord_list.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2007-2023 Laurent Destailleur * Copyright (C) 2021 Frédéric France * Copyright (C) 2023 Anthony Berton * @@ -519,7 +519,7 @@ if (empty($reshook)) { if (!empty($moreforfilter)) { print '
'; print $moreforfilter; - $parameters = array('type'=>$type); + $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; print '
'; diff --git a/htdocs/langs/en_US/ticket.lang b/htdocs/langs/en_US/ticket.lang index f2e2294071f..00b1b34d492 100644 --- a/htdocs/langs/en_US/ticket.lang +++ b/htdocs/langs/en_US/ticket.lang @@ -249,8 +249,10 @@ TicketAssignedEmailBody=You have been assigned the ticket #%s by %s TicketAssignedCustomerEmail=Your ticket has been assigned for processing. TicketAssignedCustomerBody=This is an automatic email to confirm your ticket has been assigned for processing. MarkMessageAsPrivate=Mark message as private -TicketMessageSendEmailHelp=An email will be sent to all assigned contact (internal contacts, but also external contacts except if the option "%s" is checked) -TicketMessagePrivateHelp=This message will not display to external users +TicketMessageSendEmailHelp=An email will be sent to all assigned contact +TicketMessageSendEmailHelp2a=(internal contacts, but also external contacts except if the option "%s" is checked) +TicketMessageSendEmailHelp2b=(internal contacts, but also external contacts) +TicketMessagePrivateHelp=This message will not be visible to external users TicketMessageRecipientsHelp=Recipient field completed with active contacts linked to the ticket TicketEmailOriginIssuer=Issuer at origin of the tickets InitialMessage=Initial Message diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index 37b3e6da247..ecfc83a2f82 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -260,7 +260,7 @@ class MyObject extends CommonObject } // Example to show how to set values of fields definition dynamically - /*if ($user->hasRights->('mymodule', 'myobject', 'read')) { + /*if ($user->hasRight('mymodule', 'myobject', 'read')) { $this->fields['myfield']['visible'] = 1; $this->fields['myfield']['noteditable'] = 0; }*/ diff --git a/htdocs/ticket/messaging.php b/htdocs/ticket/messaging.php index 85d4c600d6c..a80b7727e08 100644 --- a/htdocs/ticket/messaging.php +++ b/htdocs/ticket/messaging.php @@ -265,7 +265,6 @@ if (!empty($object->id)) { $url = DOL_URL_ROOT.'/comm/action/card.php?action=create&datep=now&origin=ticket&originid='.$object->id.'&projectid='.$object->fk_project.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?track_id='.$object->track_id); $morehtmlright .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', $url, 'add-new-ticket-even-button', $btnstatus); - print_barre_liste($langs->trans("ActionsOnTicket"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 0); // List of all actions From 2182cb6f1627b38117d454ebd4d6b8ea278eff0e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 10 Jul 2023 02:27:01 +0200 Subject: [PATCH 51/68] Fix css --- htdocs/compta/prelevement/class/bonprelevement.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 3cb56043705..2f4827a4acd 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -441,7 +441,7 @@ class BonPrelevement extends CommonObject $labelforaddpayment = '(BankTransferPayment)'; } else { $modeforaddpayment = 'payment'; - $labelforaddpayment = '(WithdrawalPayment)'; + $labelforaddpayment = '(WithdrawalPayment)'; } $result = $paiement->addPaymentToBank($user, $modeforaddpayment, $labelforaddpayment, $bankaccount, '', ''); From aade58c437ad36fcd154fdaa2a3e312f5a181598 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 10 Jul 2023 02:41:11 +0200 Subject: [PATCH 52/68] Debuv 18 --- htdocs/compta/sociales/card.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php index 187a4ab7b8f..df226ad807e 100644 --- a/htdocs/compta/sociales/card.php +++ b/htdocs/compta/sociales/card.php @@ -63,7 +63,7 @@ $dateech = dol_mktime(GETPOST('echhour'), GETPOST('echmin'), GETPOST('echsec'), $dateperiod = dol_mktime(GETPOST('periodhour'), GETPOST('periodmin'), GETPOST('periodsec'), GETPOST('periodmonth'), GETPOST('periodday'), GETPOST('periodyear')); $label = GETPOST('label', 'alpha'); $actioncode = GETPOST('actioncode'); -$fk_user = GETPOST('userid', 'int'); +$fk_user = GETPOST('userid', 'int') > 0 ? GETPOST('userid', 'int') : 0; // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('taxcard', 'globalcard')); @@ -511,7 +511,7 @@ if ($id > 0) { // Employee if ($action != 'editfk_user') { - if ($object->getSommePaiement() > 0 && !empty($object->fk_user)) { + if ($object->getSommePaiement() > 0 && $object->fk_user > 0) { $userstatic = new User($db); $result = $userstatic->fetch($object->fk_user); if ($result > 0) { @@ -519,7 +519,7 @@ if ($id > 0) { } } else { $morehtmlref .= '
' . $form->editfieldkey("Employee", 'fk_user', $object->label, $object, $user->rights->salaries->write, 'string', '', 0, 1); - if (!empty($object->fk_user)) { + if ($object->fk_user > 0) { $userstatic = new User($db); $result = $userstatic->fetch($object->fk_user); if ($result > 0) { From 456e6441b95c7903bddda1b4bdac76cb1f1634d1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 10 Jul 2023 03:16:21 +0200 Subject: [PATCH 53/68] Debug v18 --- htdocs/core/boxes/box_factures.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/htdocs/core/boxes/box_factures.php b/htdocs/core/boxes/box_factures.php index 3991c95bc60..6f37390d27b 100644 --- a/htdocs/core/boxes/box_factures.php +++ b/htdocs/core/boxes/box_factures.php @@ -99,7 +99,10 @@ class box_factures extends ModeleBoxes $sql .= ", s.code_client, s.code_compta, s.client"; $sql .= ", s.logo, s.email, s.entity"; $sql .= ", s.tva_intra, s.siren as idprof1, s.siret as idprof2, s.ape as idprof3, s.idprof4, s.idprof5, s.idprof6"; - $sql .= " FROM ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."societe as s"; + $sql .= ", SUM(pf.amount) as am"; + $sql .= " FROM ".MAIN_DB_PREFIX."facture as f"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf ON f.rowid = pf.fk_facture,"; + $sql .= " ".MAIN_DB_PREFIX."societe as s"; if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } @@ -111,6 +114,8 @@ class box_factures extends ModeleBoxes if ($user->socid) { $sql .= " AND s.rowid = ".((int) $user->socid); } + $sql .= " GROUP BY s.rowid, s.nom, s.name_alias, s.code_client, s.code_compta, s.client, s.logo, s.email, s.entity, s.tva_intra, s.siren, s.siret, s.ape, s.idprof4, s.idprof5, s.idprof6,"; + $sql .= " f.rowid, f.ref, f.type, f.total_ht, f.total_tva, f.total_ttc, f.datef, f.paye, f.fk_statut, f.datec, f.tms, f.date_lim_reglement"; if (!empty($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE)) { $sql .= " ORDER BY f.datef DESC, f.ref DESC "; } else { @@ -128,8 +133,8 @@ class box_factures extends ModeleBoxes while ($line < $num) { $objp = $this->db->fetch_object($result); + $datelimite = $this->db->jdate($objp->datelimite); - $date = $this->db->jdate($objp->date); $datem = $this->db->jdate($objp->tms); $facturestatic->id = $objp->facid; @@ -142,7 +147,9 @@ class box_factures extends ModeleBoxes $facturestatic->status = $objp->status; $facturestatic->date = $this->db->jdate($objp->date); $facturestatic->date_lim_reglement = $this->db->jdate($objp->datelimite); - $facturestatic->alreadypaid = $objp->paye; + + $facturestatic->paye = $objp->paye; + $facturestatic->alreadypaid = $objp->am; $societestatic->id = $objp->socid; $societestatic->name = $objp->name; @@ -191,7 +198,7 @@ class box_factures extends ModeleBoxes $this->info_box_contents[$line][] = array( 'td' => 'class="right" width="18"', - 'text' => $facturestatic->LibStatut($objp->paye, $objp->status, 3, $objp->paye), + 'text' => $facturestatic->LibStatut($objp->paye, $objp->status, 3, $objp->am), ); $line++; From 9b388e1e327e38ed5602986b6995d4360ee68b18 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 10 Jul 2023 02:41:11 +0200 Subject: [PATCH 54/68] Debuv 18 --- htdocs/compta/sociales/card.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php index 187a4ab7b8f..df226ad807e 100644 --- a/htdocs/compta/sociales/card.php +++ b/htdocs/compta/sociales/card.php @@ -63,7 +63,7 @@ $dateech = dol_mktime(GETPOST('echhour'), GETPOST('echmin'), GETPOST('echsec'), $dateperiod = dol_mktime(GETPOST('periodhour'), GETPOST('periodmin'), GETPOST('periodsec'), GETPOST('periodmonth'), GETPOST('periodday'), GETPOST('periodyear')); $label = GETPOST('label', 'alpha'); $actioncode = GETPOST('actioncode'); -$fk_user = GETPOST('userid', 'int'); +$fk_user = GETPOST('userid', 'int') > 0 ? GETPOST('userid', 'int') : 0; // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('taxcard', 'globalcard')); @@ -511,7 +511,7 @@ if ($id > 0) { // Employee if ($action != 'editfk_user') { - if ($object->getSommePaiement() > 0 && !empty($object->fk_user)) { + if ($object->getSommePaiement() > 0 && $object->fk_user > 0) { $userstatic = new User($db); $result = $userstatic->fetch($object->fk_user); if ($result > 0) { @@ -519,7 +519,7 @@ if ($id > 0) { } } else { $morehtmlref .= '
' . $form->editfieldkey("Employee", 'fk_user', $object->label, $object, $user->rights->salaries->write, 'string', '', 0, 1); - if (!empty($object->fk_user)) { + if ($object->fk_user > 0) { $userstatic = new User($db); $result = $userstatic->fetch($object->fk_user); if ($result > 0) { From 6ff201f07526ab7e53bec4d4e22ef865ecf99c7d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 10 Jul 2023 03:16:21 +0200 Subject: [PATCH 55/68] Debug v18 --- htdocs/core/boxes/box_factures.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/htdocs/core/boxes/box_factures.php b/htdocs/core/boxes/box_factures.php index 3991c95bc60..6f37390d27b 100644 --- a/htdocs/core/boxes/box_factures.php +++ b/htdocs/core/boxes/box_factures.php @@ -99,7 +99,10 @@ class box_factures extends ModeleBoxes $sql .= ", s.code_client, s.code_compta, s.client"; $sql .= ", s.logo, s.email, s.entity"; $sql .= ", s.tva_intra, s.siren as idprof1, s.siret as idprof2, s.ape as idprof3, s.idprof4, s.idprof5, s.idprof6"; - $sql .= " FROM ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."societe as s"; + $sql .= ", SUM(pf.amount) as am"; + $sql .= " FROM ".MAIN_DB_PREFIX."facture as f"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf ON f.rowid = pf.fk_facture,"; + $sql .= " ".MAIN_DB_PREFIX."societe as s"; if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } @@ -111,6 +114,8 @@ class box_factures extends ModeleBoxes if ($user->socid) { $sql .= " AND s.rowid = ".((int) $user->socid); } + $sql .= " GROUP BY s.rowid, s.nom, s.name_alias, s.code_client, s.code_compta, s.client, s.logo, s.email, s.entity, s.tva_intra, s.siren, s.siret, s.ape, s.idprof4, s.idprof5, s.idprof6,"; + $sql .= " f.rowid, f.ref, f.type, f.total_ht, f.total_tva, f.total_ttc, f.datef, f.paye, f.fk_statut, f.datec, f.tms, f.date_lim_reglement"; if (!empty($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE)) { $sql .= " ORDER BY f.datef DESC, f.ref DESC "; } else { @@ -128,8 +133,8 @@ class box_factures extends ModeleBoxes while ($line < $num) { $objp = $this->db->fetch_object($result); + $datelimite = $this->db->jdate($objp->datelimite); - $date = $this->db->jdate($objp->date); $datem = $this->db->jdate($objp->tms); $facturestatic->id = $objp->facid; @@ -142,7 +147,9 @@ class box_factures extends ModeleBoxes $facturestatic->status = $objp->status; $facturestatic->date = $this->db->jdate($objp->date); $facturestatic->date_lim_reglement = $this->db->jdate($objp->datelimite); - $facturestatic->alreadypaid = $objp->paye; + + $facturestatic->paye = $objp->paye; + $facturestatic->alreadypaid = $objp->am; $societestatic->id = $objp->socid; $societestatic->name = $objp->name; @@ -191,7 +198,7 @@ class box_factures extends ModeleBoxes $this->info_box_contents[$line][] = array( 'td' => 'class="right" width="18"', - 'text' => $facturestatic->LibStatut($objp->paye, $objp->status, 3, $objp->paye), + 'text' => $facturestatic->LibStatut($objp->paye, $objp->status, 3, $objp->am), ); $line++; From 54daacca44564894d420c5d8c3e27f2f8d9395fc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 10 Jul 2023 03:31:51 +0200 Subject: [PATCH 56/68] Prepare v18 stable --- htdocs/filefunc.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index f4f7e281cd3..6db33208710 100644 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -34,7 +34,7 @@ if (!defined('DOL_APPLICATION_TITLE')) { define('DOL_APPLICATION_TITLE', 'Dolibarr'); } if (!defined('DOL_VERSION')) { - define('DOL_VERSION', '18.0.0-beta'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c + define('DOL_VERSION', '18.0.0'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c } if (!defined('EURO')) { From 9c54c7e52f7d7a4606c238fba7daf19520d21a5c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 10 Jul 2023 03:55:00 +0200 Subject: [PATCH 57/68] Trans --- htdocs/langs/en_US/errors.lang | 2 +- htdocs/langs/fr_FR/errors.lang | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index 11a65a351bf..12388f6b9d1 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -304,7 +304,7 @@ ErrorValueForTooLow=Value for %s is too low ErrorValueCantBeNull=Value for %s can't be null ErrorDateOfMovementLowerThanDateOfFileTransmission=The date of the bank transaction can't be lower than the date of the file transmission ErrorTooMuchFileInForm=Too much files in form, the maximum number is %s file(s) -ErrorSessionInvalidatedAfterPasswordChange=The session was been invalidated following a change of password, status or dates of validity. Please relogin. +ErrorSessionInvalidatedAfterPasswordChange=The session was been invalidated following a change of password, email, status or dates of validity. Please relogin. ErrorExistingPermission = Permission %s for object %s already exists ErrorFieldExist=The value for %s already exist ErrorEqualModule=Module invalid in %s diff --git a/htdocs/langs/fr_FR/errors.lang b/htdocs/langs/fr_FR/errors.lang index 2ab780bf472..2dc05f8c5e5 100644 --- a/htdocs/langs/fr_FR/errors.lang +++ b/htdocs/langs/fr_FR/errors.lang @@ -304,7 +304,7 @@ ErrorValueForTooLow=La valeur pour %s est trop faible ErrorValueCantBeNull=La valeur pour %s ne peut pas être nulle ErrorDateOfMovementLowerThanDateOfFileTransmission=La date de l'opération bancaire ne peut être inférieure à la date de transmission du fichier ErrorTooMuchFileInForm=Trop de fichiers dans le formulaire, le nombre maximum est de %s fichier(s) -ErrorSessionInvalidatedAfterPasswordChange=La session a été invalidée suite à un changement de mot de passe, d'état ou de dates de validité. Veuillez vous reconnecter. +ErrorSessionInvalidatedAfterPasswordChange=La session a été invalidée suite à un changement de mot de passe, email, statut ou de dates de validité. Veuillez vous reconnecter. ErrorExistingPermission = La permission %s pour l'objet %s existe déjà. ErrorFieldExist=La valeur pour %s existe déjà ErrorEqualModule=Module invalide dans %s. From 83eb8fed611d6a9f349c5128064b844062063902 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 10 Jul 2023 04:03:57 +0200 Subject: [PATCH 58/68] Doc --- htdocs/core/modules/oauth/google_oauthcallback.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/htdocs/core/modules/oauth/google_oauthcallback.php b/htdocs/core/modules/oauth/google_oauthcallback.php index a043cf23e57..39217fdf825 100644 --- a/htdocs/core/modules/oauth/google_oauthcallback.php +++ b/htdocs/core/modules/oauth/google_oauthcallback.php @@ -263,6 +263,7 @@ if (!GETPOST('code')) { dol_syslog("userinfo=".var_export($userinfo, true)); $useremail = $userinfo['email']; + /* $useremailverified = $userinfo['email_verified']; $useremailuniq = $userinfo['sub']; @@ -280,6 +281,12 @@ if (!GETPOST('code')) { // Verify that the ID token is properly signed by the issuer. Google-issued tokens are signed using one of the certificates found at the URI specified in the jwks_uri metadata value of the Discovery document. // TODO + // Verify that email is a verified email + /*if (empty($userinfo['email_verified'])) { + setEventMessages($langs->trans('Bad value for email, emai lwas not verified by Google'), null, 'errors'); + $errorincheck++; + }*/ + // Verify that the value of the iss claim in the ID token is equal to https://accounts.google.com or accounts.google.com. if ($userinfo['iss'] != 'accounts.google.com' && $userinfo['iss'] != 'https://accounts.google.com') { setEventMessages($langs->trans('Bad value for returned userinfo[iss]'), null, 'errors'); From 231658cf68e703f30a96a6e2755f5a8619859203 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 10 Jul 2023 20:01:46 +0200 Subject: [PATCH 59/68] Fix regression --- htdocs/product/class/product.class.php | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 386e7353510..2e6f9bc07c5 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -488,6 +488,19 @@ class Product extends CommonObject */ public $supplierprices; + /** + * Array with list of sub-products for Kits + * + * @var array + */ + public $sousprods; + + /** + * Path of subproducts. Build from ->sousprods with get_arbo_each_prod() + */ + public $res; + + /** * Property set to save result of isObjectUsed(). Used for example by Product API. * @@ -497,8 +510,6 @@ class Product extends CommonObject /** - * - * * */ public $mandatory_period; @@ -4730,7 +4741,7 @@ class Product extends CommonObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Fonction recursive uniquement utilisee par get_arbo_each_prod, recompose l'arborescence des sousproduits + * Function recursive, used only by get_arbo_each_prod(), to build tree of subproducts into ->res * Define value of this->res * * @param array $prod Products array @@ -4808,16 +4819,16 @@ class Product extends CommonObject public function get_arbo_each_prod($multiply = 1, $ignore_stock_load = 0) { // phpcs:enable - $res = array(); + $this->res = array(); if (isset($this->sousprods) && is_array($this->sousprods)) { foreach ($this->sousprods as $prod_name => $desc_product) { if (is_array($desc_product)) { - $this->fetch_prod_arbo($desc_product, "", $multiply, 1, $this->id, $ignore_stock_load); + $this->fetch_prod_arbo($desc_product, "", $multiply, 1, $this->id, $ignore_stock_load); // This set $this->res } } } //var_dump($res); - return $res; + return $this->res; } /** From 3681486fe84f1dc96a8d3c75b2851610ac592bed Mon Sep 17 00:00:00 2001 From: jyhere Date: Wed, 12 Jul 2023 12:27:12 +0200 Subject: [PATCH 60/68] FIX: misleading phpdoc (#25342) --- htdocs/commande/class/commande.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 29b4fc2aa70..64dd3ad564a 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -468,7 +468,7 @@ class Commande extends CommonOrder * @param User $user User making status change * @param int $idwarehouse Id of warehouse to use for stock decrease * @param int $notrigger 1=Does not execute triggers, 0= execute triggers - * @return int <=0 if OK, 0=Nothing done, >0 if KO + * @return int <0 if KO, 0=Nothing done, >0 if OK */ public function valid($user, $idwarehouse = 0, $notrigger = 0) { From bbbf42569724d3c07e247badcac0262daa458119 Mon Sep 17 00:00:00 2001 From: mc2contributor Date: Wed, 12 Jul 2023 04:28:20 -0600 Subject: [PATCH 61/68] Fix undefined property (#25337) --- htdocs/societe/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 857a3f381d3..8b8c80c466f 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -1562,7 +1562,7 @@ while ($i < $imaxinloop) { $companystatic->code_compta_fournisseur = $obj->code_compta_fournisseur; $companystatic->fk_prospectlevel = $obj->fk_prospectlevel; - $companystatic->parent = $obj->fk_parent; + $companystatic->fk_parent = $obj->fk_parent; $companystatic->entity = $obj->entity; } From 6a9c9c684f4782b14b2015ce36491160f0c72a88 Mon Sep 17 00:00:00 2001 From: Yoan Mollard Date: Wed, 12 Jul 2023 12:55:53 +0200 Subject: [PATCH 62/68] Show nb docs in list of suppliers invoices (#25338) * FIX Selection of customer on second or more parallel sell in TakePOS * FIX Bad management of localtax on TakePOS due to typo error in var name * FIX Missing localtaxes on receipt in TakePOS * Show nb docs in list of suppliers invoices --------- Co-authored-by: Laurent Destailleur --- htdocs/fourn/facture/list.php | 20 ++++++++++++++++++++ htdocs/societe/list.php | 3 +++ htdocs/takepos/invoice.php | 4 ++-- htdocs/takepos/receipt.php | 22 ++++++++++++++++++++-- 4 files changed, 45 insertions(+), 4 deletions(-) diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 9e9a8a46a62..910d22e9319 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -200,6 +200,7 @@ $arrayfields = array( 'f.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>501), 'f.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>502), 'f.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000), + 'f.nb_docs'=>array('label'=>"Documents", 'checked'=>1, 'position'=>510), ); // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; @@ -1157,6 +1158,11 @@ if (!empty($arrayfields['f.total_ttc']['checked'])) { print ''; print ''; } +if (!empty($arrayfields['f.nb_docs']['checked'])) { + // Nb of attached documents + print '

'; +} if (!empty($arrayfields['u.login']['checked'])) { // Author print ''; + } + // Author if (!empty($arrayfields['u.login']['checked'])) { print ' @@ -251,6 +252,23 @@ if ($conf->global->TAKEPOS_SHOW_CUSTOMER) { echo $langs->trans("TotalVAT").' +useLocalTax(1) || price2num($object->total_localtax1, 'MU')) { ?> + + + + +useLocalTax(2) || price2num($object->total_localtax2, 'MU')) { ?> + + +
'; + $searchpicto = $form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0, 'checkforselect', 1); + $out .= $searchpicto; + $out .= ''; - $searchpicto = $form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0, 'checkforselect', 1); - $out .= $searchpicto; - $out .= ''; + $searchpicto = $form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0, 'checkforselect', 1); + $out .= $searchpicto; + $out .= '
'; @@ -2127,8 +2150,10 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin // Status $out .= ''.$actionstatic->LibStatut($histo[$key]['percent'], 2, 0, $histo[$key]['datestart']).'
'; + $searchpicto = $form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0, 'checkforselect', 1); + $out .= $searchpicto; + $out .= ''.$langs->trans("Search").' : '; - $searchpicto = $form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0, 'checkforselect', 1); - $out .= $searchpicto; - $out .= ''; + $searchpicto = $form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0, 'checkforselect', 1); + $out .= $searchpicto; + $out .= '
'; + print ''; @@ -1341,6 +1347,9 @@ if (!empty($arrayfields['f.total_ttc']['checked'])) { print_liste_field_titre($arrayfields['f.total_ttc']['label'], $_SERVER['PHP_SELF'], 'f.total_ttc', '', $param, '', $sortfield, $sortorder, 'right '); $totalarray['nbfield']++; } +if (!empty($arrayfields['f.nb_docs']['checked'])) { + print_liste_field_titre($arrayfields['f.nb_docs']['label'], $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'right '); +} if (!empty($arrayfields['u.login']['checked'])) { print_liste_field_titre($arrayfields['u.login']['label'], $_SERVER["PHP_SELF"], 'u.login', '', $param, 'align="center"', $sortfield, $sortorder); $totalarray['nbfield']++; @@ -1770,6 +1779,17 @@ while ($i < $imaxinloop) { $totalarray['val']['f.total_ttc'] += $obj->total_ttc; } + // Number of attached documents + if (!empty($arrayfields['f.nb_docs']['checked'])) { + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; + $upload_dir = $conf->fournisseur->facture->dir_output.'/'.get_exdir($facturestatic->id, 2, 0, 0, $facturestatic, 'invoice_supplier').$facturestatic->ref; + $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$')); + $nbLinks = Link::count($db, $facturestatic->element, $facturestatic->id); + $nbTotal = $nbFiles + $nbLinks; + echo ''.(empty($nbTotal)? '':$nbTotal).''; diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 8b8c80c466f..9a488edf056 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -1018,6 +1018,9 @@ print ''; print ''; //print ''; print ''; +if (!empty($place)) { + print ''; +} print ''; print ''; if (empty($arrayfields['customerorsupplier']['checked'])) { diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 592da00c24d..56a850f11fd 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -460,7 +460,7 @@ if (empty($reshook)) { } if (($action == "addline" || $action == "freezone") && $placeid == 0) { - $invoice->socid = getDolGlobalString("$constforcompanyid"); + $invoice->socid = getDolGlobalString($constforcompanyid); $invoice->date = dol_now(); $invoice->module_source = 'takepos'; $invoice->pos_source = isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '' ; @@ -537,7 +537,7 @@ if (empty($reshook)) { $invoice->fetch_thirdparty(); $array_options = array(); - $line = array('description' => $prod->description, 'price' => $price, 'tva_tx' => $tva_tx, 'locatax1_tx' => $localtax1_tx, 'locatax2_tx' => $localtax2_tx, 'remise_percent' => $customer->remise_percent, 'price_ttc' => $price_ttc, 'array_options' => $array_options); + $line = array('description' => $prod->description, 'price' => $price, 'tva_tx' => $tva_tx, 'localtax1_tx' => $localtax1_tx, 'localtax2_tx' => $localtax2_tx, 'remise_percent' => $customer->remise_percent, 'price_ttc' => $price_ttc, 'array_options' => $array_options); /* setup of margin calculation */ if (isset($conf->global->MARGIN_TYPE)) { diff --git a/htdocs/takepos/receipt.php b/htdocs/takepos/receipt.php index d09869d22dc..99579eeaf97 100644 --- a/htdocs/takepos/receipt.php +++ b/htdocs/takepos/receipt.php @@ -1,10 +1,10 @@ - * Copyright (C) 2011 Laurent Destailleur + * Copyright (C) 2011-2023 Laurent Destailleur * Copyright (C) 2012 Marcos García * Copyright (C) 2018 Andreu Bisquerra * Copyright (C) 2019 Josep Lluís Amador - * Copyright (C) 2021 Nicolas ZABOURI + * Copyright (C) 2021 Nicolas ZABOURI * * 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 @@ -233,6 +233,7 @@ if ($conf->global->TAKEPOS_SHOW_CUSTOMER) { } $vat_groups[$line->tva_tx] += $line->total_tva; } + // Loop on each VAT group foreach ($vat_groups as $key => $val) { ?>
'.price($object->total_tva, 1, '', 1, - 1, - 1, $conf->currency)."\n"; } ?>
trans("TotalLT1").''.price($object->total_localtax1, 1, '', 1, - 1, - 1, $conf->currency)."\n"; + } ?>
trans("TotalLT2").''.price($object->total_localtax2, 1, '', 1, - 1, - 1, $conf->currency)."\n"; + } ?>
Date: Wed, 12 Jul 2023 13:15:04 +0200 Subject: [PATCH 63/68] php V8 error on ticket module (#25327) * php V8 warning append on create contract * php V8 warning * Update card.php --- htdocs/contrat/card.php | 4 +++- htdocs/ticket/card.php | 2 +- htdocs/ticket/list.php | 8 +++++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 72b7ebed3ed..c3b7099e70d 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -10,6 +10,7 @@ * Copyright (C) 2014-2016 Marcos García * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2018-2021 Frédéric France + * Copyright (C) 2023 Charlene Benke * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -993,7 +994,7 @@ if (empty($reshook)) { include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; // Actions to build doc - $upload_dir = $conf->contrat->multidir_output[$object->entity]; + $upload_dir = $conf->contrat->multidir_output[!empty($object->entity)?$object->entity:$conf->entity]; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; // Actions to send emails @@ -1086,6 +1087,7 @@ if ($result > 0) { // Create if ($action == 'create') { + $objectsrc = null; print load_fiche_titre($langs->trans('AddContract'), '', 'contract'); $soc = new Societe($db); diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index 4c318197b1e..1baabd1e0d2 100755 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -1131,7 +1131,7 @@ if ($action == 'create' || $action == 'presend') { $foundinter = 0; if ($num) { foreach ($object->linkedObjects as $objecttype => $objects) { - if ($objecttype = "fichinter") { + if ($objecttype == "fichinter") { foreach ($objects as $fichinter) { $foundinter++; $timing += $fichinter->duration; diff --git a/htdocs/ticket/list.php b/htdocs/ticket/list.php index 89550402515..36b3f33d800 100644 --- a/htdocs/ticket/list.php +++ b/htdocs/ticket/list.php @@ -55,10 +55,13 @@ $mode = GETPOST('mode', 'alpha'); $id = GETPOST('id', 'int'); $msg_id = GETPOST('msg_id', 'int'); $socid = GETPOST('socid', 'int'); +$contractid = GETPOST('contractid', 'int'); $projectid = GETPOST('projectid', 'int'); $project_ref = GETPOST('project_ref', 'alpha'); $search_societe = GETPOST('search_societe', 'alpha'); $search_fk_project = GETPOST('search_fk_project', 'int') ?GETPOST('search_fk_project', 'int') : GETPOST('projectid', 'int'); +$search_fk_contract = GETPOST('search_fk_contract', 'int') ?GETPOST('search_fk_contract', 'int') : GETPOST('contractid', 'int'); + $search_date_start = dol_mktime(0, 0, 0, GETPOST('search_date_startmonth', 'int'), GETPOST('search_date_startday', 'int'), GETPOST('search_date_startyear', 'int')); $search_date_end = dol_mktime(23, 59, 59, GETPOST('search_date_endmonth', 'int'), GETPOST('search_date_endday', 'int'), GETPOST('search_date_endyear', 'int')); $search_dateread_start = dol_mktime(0, 0, 0, GETPOST('search_dateread_startmonth', 'int'), GETPOST('search_dateread_startday', 'int'), GETPOST('search_dateread_startyear', 'int')); @@ -427,6 +430,9 @@ if ($search_societe) { if ($search_fk_project > 0) { $sql .= natural_search('fk_project', $search_fk_project, 2); } +if ($search_fk_contracct > 0) { + $sql .= natural_search('fk_contract', $search_fk_contract, 2); +} if ($search_date_start) { $sql .= " AND t.datec >= '".$db->idate($search_date_start)."'"; } @@ -918,7 +924,7 @@ foreach ($object->fields as $key => $val) { if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); } elseif (strpos($val['type'], 'integer:') === 0) { - print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth150', 1); + print $object->showInputField($val, $key, !empty($search[$key])?$search[$key]:"", '', '', 'search_', 'maxwidth150', 1); } elseif (!preg_match('/^(date|timestamp)/', $val['type'])) { print ''; } From eb53dd2d8778ce4cf2075978d5b8fe6814de321b Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Wed, 12 Jul 2023 13:24:21 +0200 Subject: [PATCH 64/68] Update ChangeLog (#25323) minor adjustments / assortments + two duplicate entries deleted: - Ticket - notification email - PDF - more recend model as default --- ChangeLog | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 29418815dd1..da15649487f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -60,7 +60,6 @@ NEW: Can set the page "List of opportunities" as landing page NEW: Can show the sql request used on emailing selection NEW: can stay on edit field when errors occurs NEW: comment in api_mymodule for seperate methods -NEW: constant PROPALE_ADDON_NOTE_PUBLIC_DEFAULT NEW: create email substitution variable for intervention signature URL NEW: Debug the custom CSS feature to avoid a directory search/scan at NEW: dev name @@ -75,6 +74,7 @@ NEW: Email-Collector: operation type in email collector to load or create contac NEW: Email-Collector: easier setup - can also use ! for negative search NEW: Events: can add any contact on events if global MAIN_ACTIONCOM_CAN_ADD_ANY_CONTACT is set at 1 NEW: Events: list with color +NEW: Events: remove default percentage for event creation url NEW: expend/collapse list of social networks NEW: Filter on amount and qty on list of service's contracts NEW: formconfirm can support field with format datetime @@ -98,7 +98,6 @@ NEW: Import: map table to element for get entity in import NEW: inc.php: handle parameters from argv NEW: Invoice - show category of operations NEW: Keep a link between user created from recruitment and application -NEW: List product in orders NEW: Mass Actions: Better responsive for mass actions NEW: Members: add numbering modules for members NEW: Members: add widget box_members_by_tags.php @@ -116,28 +115,31 @@ NEW: only get openned contact from liste_contact function, to not have acces to NEW: Option to manage deposit slips for more payment modes (not only NEW: Option to show column for field and line selection on the left NEW: Orders: add sub total in order list det +NEW: Orders: list product in orders NEW: Orders export: allow to export field 'shipment method' NEW: payment default values when supplier order created from reception -NEW: Payment : manage contracts +NEW: Payment: manage contracts +NEW: Payment: sepaStripe now creates the payment mode with type pm_ using new API NEW: presend mass action in contact list NEW: Print PDF: category of operation for crabe PDF model NEW: Print PDF: Name and date to print on PDF Sign NEW: Print PDF: Use the more recent PDF templates for documents by default on a fresh install +NEW: Print PDF: Option PDF_SHOW_PHONE_AFTER_USER_CONTACT to show phone after specific assigned contact on PDF +NEW: Print PDF: Option PDF_SHOW_EMAIL_AFTER_USER_CONTACT to show email after specific assigned contact on PDF NEW: product images on popup are cached NEW: Products: Add statistics by amount on statistics of products. NEW: Proposals: filter for Signed+Billed in proposals NEW: Proposals: can modify margin rates in offers like VAT rates NEW: Proposals: option filter for NoSalesRepresentativeAffected in proposals list +NEW: Proposals: constant PROPALE_ADDON_NOTE_PUBLIC_DEFAULT NEW: Provide the oldcopy value when calling setValueFrom() function with a trigger key NEW: Reception: can receive more than qty ordered on reception NEW: referential objects of batch -NEW: remove default percentage for event creation url NEW: remove keys whose table element is the same as element in map list NEW: repair script skip views NEW: Security: Save date to invalidate other session into user table NEW: Security: Invalidate all sessions of a user when password is modified. NEW: search on time spent duration range -NEW: sepaStripe now creates the payment mode with type pm_ using new API NEW: set payment default values when supplier order created from reception NEW: set today start time at beginning NEW: Show counter of access of website in website list @@ -159,9 +161,8 @@ NEW: tables: llx_element_time to store time spent on several elements (mo, ticke NEW: TakePOS: adapt category and product pictures sizes on TakePOS NEW: TakePOS: limit load products in TakePOS NEW: The batch for remind on due date can be setup for using validation date -NEW: The refresh link for imap collector is always visible +NEW: The refresh link for IMAP collector is always visible NEW: The upgrade process can be done by creating a file upgrade.unlock -NEW: Tickets: --Send an email when ticket assigned-- NEW: Tickets: Send a notification email when ticket assigned NEW: Tickets: set ticket status to answered if the client has answered from the public interface NEW: Tickets: added an option to display the progress of tickets on the public interface @@ -169,13 +170,10 @@ NEW: Tickets: add link to thirdparty tickets history NEW: Tickets: notify also the contributor affected to a ticket if a new message public is post (add global TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_ALSO_CONTRIBUTOR) NEW: Use a cache file for external RSS in calendar NEW: Use by default the domain $dolibarr_main_url_root for SMTP HELO -NEW: use more recent model by default NEW: VAT can be modified during add of line NEW: Website Module: Increment website counter on each page access in website module NEW: write all fields and their properties in asciidoc format NEW: Can add an array of several links in date selector -NEW: Option PDF_SHOW_PHONE_AFTER_USER_CONTACT to show phone after specific assigned contact on PDF -NEW: Option PDF_SHOW_EMAIL_AFTER_USER_CONTACT to show email after specific assigned contact on PDF NEW: Widgets: Implement MAIN_ACTIVATE_FILECACHE on birthday widget NEW: Widgets: Add widget "The next upcoming events" NEW: Widgets: Add widget of open opportunities @@ -192,10 +190,11 @@ NEW: add triggers on mailing NEW: Add a trigger when create a shipping line batch and fix propagate missing errors NEW: add function for listiong objects from directory NEW: add helplist property to describe fields of objects -NEW: add hook in loadLotStock() in html.formproduct.class.php file, add hook 'llxFooter', Add hook online sign +NEW: Hooks: printFieldListFrom in contact list +NEW: Hooks: add hook in loadLotStock() in html.formproduct.class.php file, add hook 'llxFooter', Add hook online sign NEW: Update lib parsedownto 1.7.4, phpspreadsheet lib to v1.12, ESCPOS v3.0, jquery, Stripe. -NEW: Support contact in post() document API -NEW: More APIs (update currency rate, upload of supplier documents, ...) +NEW: API: Support contact in post() document API +NEW: API: more APIs (update currency rate, upload of supplier documents, ...) NEW: ModuleBuilder: updating in modulbuilder on tab Menu when adding object NEW: ModuleBuilder: add/edit permissions NEW: ModuleBuilder: better generated documentation From 4ca8d2ef78714c1fe3ec6cc74037b04db67d2bdb Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Wed, 12 Jul 2023 13:24:31 +0200 Subject: [PATCH 65/68] Update admin.lang (#25322) --- htdocs/langs/en_US/admin.lang | 76 ++++++++++++++++++----------------- 1 file changed, 39 insertions(+), 37 deletions(-) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 21cc6602048..9e1ccef84e2 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -365,10 +365,10 @@ GenericMaskCodes=You may enter any numbering mask. In this mask, the following t GenericMaskCodes2={cccc} the client code on n characters
{cccc000} the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.
{tttt} The code of third party type on n characters (see menu Home - Setup - Dictionary - Types of third parties). If you add this tag, the counter will be different for each type of third party.
GenericMaskCodes3=All other characters in the mask will remain intact.
Spaces are not allowed.
GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).
Spaces are not allowed.
In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.
-GenericMaskCodes4a=Example on the 99th %s of the third party TheCompany, with date 2007-01-31:
-GenericMaskCodes4b=Example on third party created on 2007-03-01:
-GenericMaskCodes4c=Example on product created on 2007-03-01:
-GenericMaskCodes5=ABC{yy}{mm}-{000000} will give ABC0701-000099
{0000+100@1}-ZZZ/{dd}/XXX will give 0199-ZZZ/31/XXX
IN{yy}{mm}-{0000}-{t} will give IN0701-0099-A if the type of company is 'Responsable Inscripto' with code for type that is 'A_RI' +GenericMaskCodes4a=Example on the 99th %s of the third party TheCompany, with date 2023-01-31:
+GenericMaskCodes4b=Example on third party created on 2023-01-31:
+GenericMaskCodes4c=Example on product created on 2023-01-31:
+GenericMaskCodes5=ABC{yy}{mm}-{000000} will give ABC2301-000099
{0000+100@1}-ZZZ/{dd}/XXX will give 0199-ZZZ/31/XXX
IN{yy}{mm}-{0000}-{t} will give IN2301-0099-A if the type of company is 'Responsable Inscripto' with code for type that is 'A_RI' GenericNumRefModelDesc=Returns a customizable number according to a defined mask. ServerAvailableOnIPOrPort=Server is available at address %s on port %s ServerNotAvailableOnIPOrPort=Server is not available at address %s on port %s @@ -394,7 +394,7 @@ ListOfDirectoriesForModelGenODT=List of directories containing templates files w NumberOfModelFilesFound=Number of ODT/ODS template files found in these directories ExampleOfDirectoriesForModelGen=Examples of syntax:
c:\\myapp\\mydocumentdir\\mysubdir
/home/myapp/mydocumentdir/mysubdir
DOL_DATA_ROOT/ecm/ecmdir FollowingSubstitutionKeysCanBeUsed=
To know how to create your odt document templates, before storing them in those directories, read wiki documentation: -FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template +FullListOnOnlineDocumentation=https://wiki.dolibarr.org/index.php/Create_an_ODT_document_template FirstnameNamePosition=Position of Name/Lastname DescWeather=The following images will be shown on the dashboard when the number of late actions reach the following values: KeyForWebServicesAccess=Key to use Web Services (parameter "dolibarrkey" in webservices) @@ -542,7 +542,7 @@ DAV_ALLOW_PUBLIC_DIR=Enable the generic public directory (WebDAV dedicated direc DAV_ALLOW_PUBLIC_DIRTooltip=The generic public directory is a WebDAV directory anybody can access (in read and write mode), with no authorization required (login/password account). DAV_ALLOW_ECM_DIR=Enable the DMS/ECM private directory (root directory of the DMS/ECM module - login required) DAV_ALLOW_ECM_DIRTooltip=The root directory where all files are manually uploaded when using the DMS/ECM module. Similarly as access from the web interface, you will need a valid login/password with adecuate permissions to access it. -# Modules +##### Modules ##### Module0Name=Users & Groups Module0Desc=Users / Employees and Groups management Module1Name=Third Parties @@ -712,6 +712,7 @@ Module63000Desc=Manage resources (printers, cars, rooms, ...) for allocating to Module66000Name=OAuth2 token management Module66000Desc=Provide a tool to generate and manage OAuth2 tokens. The token can then be used by some other modules. Module94160Name=Receptions +##### Permissions ##### Permission11=Read customer invoices (and payments) Permission12=Create/modify customer invoices Permission13=Invalidate customer invoices @@ -1439,10 +1440,10 @@ MustBeUnique=Must be unique? MustBeMandatory=Mandatory to create third parties (if VAT number or type of company defined) ? MustBeInvoiceMandatory=Mandatory to validate invoices? TechnicalServicesProvided=Technical services provided -#####DAV ##### +##### WebDAV ##### WebDAVSetupDesc=This is the link to access the WebDAV directory. It contains a "public" dir open to any user knowing the URL (if public directory access allowed) and a "private" directory that needs an existing login account/password for access. WebDavServer=Root URL of %s server: %s -##### Webcal setup ##### +##### WebCAL setup ##### WebCalUrlForVCalExport=An export link to %s format is available at following link: %s ##### Invoices ##### BillsSetup=Invoices module setup @@ -1641,9 +1642,9 @@ LDAPFieldEndLastSubscription=Date of subscription end LDAPFieldTitle=Job position LDAPFieldTitleExample=Example: title LDAPFieldGroupid=Group id -LDAPFieldGroupidExample=Exemple : gidnumber +LDAPFieldGroupidExample=Example : gidnumber LDAPFieldUserid=User id -LDAPFieldUseridExample=Exemple : uidnumber +LDAPFieldUseridExample=Example : uidnumber LDAPFieldHomedirectory=Home directory LDAPFieldHomedirectoryExample=Exemple : homedirectory LDAPFieldHomedirectoryprefix=Home directory prefix @@ -1834,26 +1835,26 @@ AccountancyCodeSell=Sale account. code AccountancyCodeBuy=Purchase account. code CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### -AgendaSetup=Events and agenda module setup -PasswordTogetVCalExport=Key to authorize export link -SecurityKey = Security Key +AgendaSetup = Events and agenda module setup +AGENDA_DEFAULT_FILTER_TYPE = Automatically set this type of event in search filter of agenda view +AGENDA_DEFAULT_FILTER_STATUS = Automatically set this status for events in search filter of agenda view +AGENDA_DEFAULT_VIEW = Which view do you want to open by default when selecting menu Agenda +AGENDA_EVENT_PAST_COLOR = Past event color +AGENDA_EVENT_CURRENT_COLOR = Current event color +AGENDA_EVENT_FUTURE_COLOR = Future event color +AGENDA_REMINDER_BROWSER = Enable event reminder on user's browser (When remind date is reached, a popup is shown by the browser. Each user can disable such notifications from its browser notification setup). +AGENDA_REMINDER_BROWSER_SOUND = Enable sound notification +AGENDA_REMINDER_EMAIL = Enable event reminder by emails (remind option/delay can be defined on each event). +AGENDA_REMINDER_EMAIL_NOTE = Note: The frequency of the scheduled job %s must be enough to be sure that the remind are sent at the correct moment. +AGENDA_SHOW_LINKED_OBJECT = Show linked object into agenda view +AGENDA_USE_EVENT_TYPE = Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) +AGENDA_USE_EVENT_TYPE_DEFAULT = Automatically set this default value for type of event in event create form +PasswordTogetVCalExport = Key to authorize export link PastDelayVCalExport=Do not export event older than -AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) -AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form -AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view -AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_EVENT_PAST_COLOR=Past event color -AGENDA_EVENT_CURRENT_COLOR=Current event color -AGENDA_EVENT_FUTURE_COLOR=Future event color -AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda -AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (When remind date is reached, a popup is shown by the browser. Each user can disable such notifications from its browser notification setup). -AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification -AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). -AGENDA_REMINDER_EMAIL_NOTE=Note: The frequency of the scheduled job %s must be enough to be sure that the remind are sent at the correct moment. -AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view -##### Clicktodial ##### +SecurityKey = Security Key +##### ClickToDial ##### ClickToDialSetup=Click To Dial module setup -ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
__PHONETO__ that will be replaced with the phone number of person to call
__PHONEFROM__ that will be replaced with phone number of calling person (yours)
__LOGIN__ that will be replaced with clicktodial login (defined on user card)
__PASS__ that will be replaced with clicktodial password (defined on user card). +ClickToDialUrlDesc=URL called when a click on phone picto is done. In URL, you can use tags
__PHONETO__ that will be replaced with the phone number of person to call
__PHONEFROM__ that will be replaced with phone number of calling person (yours)
__LOGIN__ that will be replaced with clicktodial login (defined on user card)
__PASS__ that will be replaced with clicktodial password (defined on user card). ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Use just a link "tel:" on phone numbers ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface, installed on the same computer as the browser, and called when you click on a link starting with "tel:" in your browser. If you need a link that start with "sip:" or a full server solution (no need of local software installation), you must set this to "No" and fill the next field. @@ -2066,6 +2067,7 @@ BaseCurrency=Reference currency of the company (go into setup of company to chan WarningNoteModuleInvoiceForFrenchLaw=This module %s is compliant with French laws (Loi Finance 2016). WarningNoteModulePOSForFrenchLaw=This module %s is compliant with French laws (Loi Finance 2016) because module Non Reversible Logs is automatically activated. WarningInstallationMayBecomeNotCompliantWithLaw=You are trying to install module %s that is an external module. Activating an external module means you trust the publisher of that module and that you are sure that this module does not adversely impact the behavior of your application, and is compliant with laws of your country (%s). If the module introduces an illegal feature, you become responsible for the use of illegal software. + MAIN_PDF_MARGIN_LEFT=Left margin on PDF MAIN_PDF_MARGIN_RIGHT=Right margin on PDF MAIN_PDF_MARGIN_TOP=Top margin on PDF @@ -2110,7 +2112,7 @@ NewEmailCollector=New Email Collector EMailHost=Host of email IMAP server EMailHostPort=Port of email IMAP server loginPassword=Login/Password -oauthToken=Oauth2 token +oauthToken=OAuth2 token accessType=Acces type oauthService=Oauth service TokenMustHaveBeenCreated=Module OAuth2 must be enabled and an oauth2 token must have been created with the correct permissions (for example scope "gmail_full" with OAuth for Gmail). @@ -2336,7 +2338,7 @@ IconOnly=Icon only - Text on tooltip only INVOICE_ADD_ZATCA_QR_CODE=Show the ZATCA QR code on invoices INVOICE_ADD_ZATCA_QR_CODEMore=Some Arabic countries need this QR Code on their invoices INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices -INVOICE_ADD_SWISS_QR_CODEMore=Switzerland's standard for invoices; make sure ZIP&City are filled and that the accounts have valid Swiss/Liechtenstein IBANs. +INVOICE_ADD_SWISS_QR_CODEMore=Switzerland's standard for invoices; make sure ZIP & City are filled and that the accounts have valid Swiss/Liechtenstein IBANs. INVOICE_SHOW_SHIPPING_ADDRESS=Show shipping address INVOICE_SHOW_SHIPPING_ADDRESSMore=Compulsory mention for France UrlSocialNetworksDesc=Url link of social network. Use {socialid} for the variable part that contains the social network ID. @@ -2366,12 +2368,12 @@ DefinedAPathForAntivirusCommandIntoSetup=Define a path for an antivirus program TriggerCodes=Triggerable events TriggerCodeInfo=Enter here the trigger code(s) that must generate a post of a web request (only external URL are allowed). You can enter several trigger codes separated by a comma. EditableWhenDraftOnly=If unchecked, the value can only be modified when object has a draft status -CssOnEdit=Css on edit pages -CssOnView=Css on view pages -CssOnList=Css on lists -HelpCssOnEditDesc=The Css used when editing the field.
Example: "minwiwdth100 maxwidth500 widthcentpercentminusx" -HelpCssOnViewDesc=The Css used when viewing the field. -HelpCssOnListDesc=The Css used when field is inside a list table.
Example: "tdoverflowmax200" +CssOnEdit=CSS on edit pages +CssOnView=CSS on view pages +CssOnList=CSS on lists +HelpCssOnEditDesc=The CSS used when editing the field.
Example: "minwiwdth100 maxwidth500 widthcentpercentminusx" +HelpCssOnViewDesc=The CSS used when viewing the field. +HelpCssOnListDesc=The CSS used when field is inside a list table.
Example: "tdoverflowmax200" RECEPTION_PDF_HIDE_ORDERED=Hide the quantity ordered on the generated documents for receptions MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT=Show the price on the generated documents for receptions WarningDisabled=Warning disabled @@ -2396,4 +2398,4 @@ Defaultfortype=Default DefaultForTypeDesc=Template used by default when creating a new email for the template type OptionXShouldBeEnabledInModuleY=Option "%s" should be enabled into module %s OptionXIsCorrectlyEnabledInModuleY=Option "%s" is enabled into module %s -AtBottomOfPage=At bottom of page \ No newline at end of file +AtBottomOfPage=At bottom of page From c8ba68cda8fcfa889fbfb5b7bbc242672336d739 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 12 Jul 2023 13:24:55 +0200 Subject: [PATCH 66/68] fix: dev/examples/zapier/package.json to reduce vulnerabilities (#25316) The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-JS-SEMVER-3247795 Co-authored-by: snyk-bot --- dev/examples/zapier/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/examples/zapier/package.json b/dev/examples/zapier/package.json index 8852928771f..ef70b2af8fd 100644 --- a/dev/examples/zapier/package.json +++ b/dev/examples/zapier/package.json @@ -15,7 +15,7 @@ "npm": ">=5.6.0" }, "dependencies": { - "zapier-platform-core": "11.3.1" + "zapier-platform-core": "15.0.1" }, "devDependencies": { "mocha": "^5.2.0", From a366e567e83aca0ad7fb00cf7382dd14a1e2bf8d Mon Sep 17 00:00:00 2001 From: HENRY Florian Date: Wed, 12 Jul 2023 14:22:27 +0200 Subject: [PATCH 67/68] fix: cornas PDF have to use the same way of display column as cyan (#25329) * fix: use std method to display column titles * reveiw with cyan --- .../supplier_order/doc/pdf_cornas.modules.php | 31 +++++-------------- 1 file changed, 7 insertions(+), 24 deletions(-) diff --git a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php index cf94376b285..230a46ed90a 100644 --- a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php +++ b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php @@ -161,6 +161,8 @@ class pdf_cornas extends ModelePDFSuppliersOrders // Define position of columns $this->posxdesc = $this->marge_gauche + 1; // For module retrocompatibility support durring PDF transition: TODO remove this at the end + $this->tabTitleHeight = 5; // default height + $this->tva = array(); $this->tva_array = array(); $this->localtax1 = array(); @@ -511,11 +513,11 @@ class pdf_cornas extends ModelePDFSuppliersOrders $height_note = 0; } - $nexY = $tab_top + 5; - // Use new auto collum system $this->prepareArrayColumnField($object, $outputlangs, $hidedetails, $hidedesc, $hideref); + $nexY = $tab_top + $this->tabTitleHeight; + // Loop on each lines $pageposbeforeprintlines = $pdf->getPage(); $pagenb = $pageposbeforeprintlines; @@ -1185,29 +1187,10 @@ class pdf_cornas extends ModelePDFSuppliersOrders // Output Rect $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter - foreach ($this->cols as $colKey => $colDef) { - if (!$this->getColumnStatus($colKey)) { - continue; - } - - // get title label - $colDef['title']['label'] = !empty($colDef['title']['label']) ? $colDef['title']['label'] : $outputlangs->transnoentities($colDef['title']['textkey']); - - // Add column separator - if (!empty($colDef['border-left'])) { - $pdf->line($colDef['xStartPos'], $tab_top, $colDef['xStartPos'], $tab_top + $tab_height); - } - - if (empty($hidetop)) { - $pdf->SetXY($colDef['xStartPos'] + $colDef['title']['padding'][3], $tab_top + $colDef['title']['padding'][0]); - - $textWidth = $colDef['width'] - $colDef['title']['padding'][3] - $colDef['title']['padding'][1]; - $pdf->MultiCell($textWidth, 2, $colDef['title']['label'], '', $colDef['title']['align']); - } - } + $this->pdfTabTitles($pdf, $tab_top, $tab_height, $outputlangs, $hidetop); if (empty($hidetop)) { - $pdf->line($this->marge_gauche, $tab_top + 5, $this->page_largeur - $this->marge_droite, $tab_top + 5); // line takes a position y in 2nd parameter and 4th parameter + $pdf->line($this->marge_gauche, $tab_top + $this->tabTitleHeight, $this->page_largeur - $this->marge_droite, $tab_top + $this->tabTitleHeight); // line takes a position y in 2nd parameter and 4th parameter } } @@ -1547,7 +1530,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders 'align' => 'L', // 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label // 'label' => ' ', // the final label - 'padding' => array(0.5, 1, 0.5, 1.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + 'padding' => array(0.5, 0.5, 0.5, 0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left ), 'content' => array( 'align' => 'L', From 91020eacfadf8fc162ed5f247f3d61e7c7add005 Mon Sep 17 00:00:00 2001 From: Lucas Marcouiller <45882981+Hystepik@users.noreply.github.com> Date: Wed, 12 Jul 2023 16:13:32 +0200 Subject: [PATCH 68/68] Fix : bookcal database structure (#25326) * Fix : bookcal database structure * fix status --------- Co-authored-by: Hystepik --- htdocs/bookcal/class/booking.class.php | 2 ++ htdocs/install/mysql/tables/llx_bookcal_booking-bookcal.sql | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/bookcal/class/booking.class.php b/htdocs/bookcal/class/booking.class.php index fab4cd6ba95..897936f995b 100644 --- a/htdocs/bookcal/class/booking.class.php +++ b/htdocs/bookcal/class/booking.class.php @@ -122,6 +122,7 @@ class Booking extends CommonObject 'email' => array('type'=>'varchar(128)', 'label'=>'email', 'enabled'=>'1', 'position'=>4, 'notnull'=>1, 'visible'=>-1,), 'start' => array('type'=>'datetime', 'label'=>'Start Hour', 'enabled'=>'1', 'position'=>5, 'notnull'=>1, 'visible'=>-1,), 'duration' => array('type'=>'integer', 'label'=>'Duration', 'enabled'=>'1', 'position'=>6, 'notnull'=>1, 'visible'=>-1,), + 'fk_bookcal_availability' => array('type'=>'integer:Availabilities:bookcal/class/availabilities.class.php', 'label'=>'AvailabilityId', 'enabled'=>'1', 'position'=>49, 'notnull'=>1, 'visible'=>-1,), ); public $rowid; public $ref; @@ -143,6 +144,7 @@ class Booking extends CommonObject public $email; public $start; public $duration; + public $fk_bookcal_availability; // END MODULEBUILDER PROPERTIES diff --git a/htdocs/install/mysql/tables/llx_bookcal_booking-bookcal.sql b/htdocs/install/mysql/tables/llx_bookcal_booking-bookcal.sql index df3f6384d23..d327bd56183 100644 --- a/htdocs/install/mysql/tables/llx_bookcal_booking-bookcal.sql +++ b/htdocs/install/mysql/tables/llx_bookcal_booking-bookcal.sql @@ -35,6 +35,7 @@ CREATE TABLE llx_bookcal_booking( lastname varchar(128) NOT NULL, email varchar(128) NOT NULL, start datetime NOT NULL, - duration integer NOT NULL + duration integer NOT NULL, + fk_bookcal_availability integer NOT NULL -- END MODULEBUILDER FIELDS ) ENGINE=innodb;