From 616b006f2a053d2a589990adb0c0c3f15a353518 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Fri, 10 Feb 2023 10:56:55 +0100 Subject: [PATCH 01/11] fix : Warning: Undefined property: stdClass:: in /home/httpd/vhosts/aflac.fr/domains/dev.aflac.fr/httpdocs/core/modules/facture/mod_facture_mercure.php on line 80 --- htdocs/core/modules/facture/mod_facture_mercure.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/facture/mod_facture_mercure.php b/htdocs/core/modules/facture/mod_facture_mercure.php index 321741ea8a0..1e96c32129a 100644 --- a/htdocs/core/modules/facture/mod_facture_mercure.php +++ b/htdocs/core/modules/facture/mod_facture_mercure.php @@ -77,7 +77,7 @@ class mod_facture_mercure extends ModeleNumRefFactures // Setting the prefix $texte .= ''.$langs->trans("Mask").' ('.$langs->trans("InvoiceStandard").'):'; - $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; $texte .= '  '; From b52de45f73926958a7f7eecd978b7bed868c1b19 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Fri, 10 Feb 2023 11:01:09 +0100 Subject: [PATCH 02/11] fix : Warning: Undefined property: stdClass:: in /home/httpd/vhosts/aflac.fr/domains/dev.aflac.fr/httpdocs/core/modules/facture/mod_facture_mercure.php on line 88 --- htdocs/core/modules/facture/mod_facture_mercure.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/facture/mod_facture_mercure.php b/htdocs/core/modules/facture/mod_facture_mercure.php index 1e96c32129a..890d56e874b 100644 --- a/htdocs/core/modules/facture/mod_facture_mercure.php +++ b/htdocs/core/modules/facture/mod_facture_mercure.php @@ -85,7 +85,7 @@ class mod_facture_mercure extends ModeleNumRefFactures // Prefix setting of replacement invoices $texte .= ''.$langs->trans("Mask").' ('.$langs->trans("InvoiceReplacement").'):'; - $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; $texte .= ''; // Prefix setting of credit note From f1c929abd0f28aaaeaf3d6d466e5f179832053bc Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Fri, 10 Feb 2023 11:03:31 +0100 Subject: [PATCH 03/11] fix : Warning: Undefined property: stdClass:: in /home/httpd/vhosts/aflac.fr/domains/dev.aflac.fr/httpdocs/core/modules/facture/mod_facture_mercure.php on line 93 --- htdocs/core/modules/facture/mod_facture_mercure.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/facture/mod_facture_mercure.php b/htdocs/core/modules/facture/mod_facture_mercure.php index 890d56e874b..65594470c30 100644 --- a/htdocs/core/modules/facture/mod_facture_mercure.php +++ b/htdocs/core/modules/facture/mod_facture_mercure.php @@ -90,7 +90,7 @@ class mod_facture_mercure extends ModeleNumRefFactures // Prefix setting of credit note $texte .= ''.$langs->trans("Mask").' ('.$langs->trans("InvoiceAvoir").'):'; - $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; $texte .= ''; // Prefix setting of deposit From 4a826d47e93d30a0ec9e0308876169b410cbbbe5 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Fri, 10 Feb 2023 11:17:02 +0100 Subject: [PATCH 04/11] fix : Warning: Undefined property: stdClass:: in /home/httpd/vhosts/aflac.fr/domains/dev.aflac.fr/httpdocs/core/modules/facture/mod_facture_mercure.php on line 98 --- htdocs/core/modules/facture/mod_facture_mercure.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/facture/mod_facture_mercure.php b/htdocs/core/modules/facture/mod_facture_mercure.php index 65594470c30..e624487c9cf 100644 --- a/htdocs/core/modules/facture/mod_facture_mercure.php +++ b/htdocs/core/modules/facture/mod_facture_mercure.php @@ -77,7 +77,7 @@ class mod_facture_mercure extends ModeleNumRefFactures // Setting the prefix $texte .= ''.$langs->trans("Mask").' ('.$langs->trans("InvoiceStandard").'):'; - $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; $texte .= '  '; @@ -85,7 +85,7 @@ class mod_facture_mercure extends ModeleNumRefFactures // Prefix setting of replacement invoices $texte .= ''.$langs->trans("Mask").' ('.$langs->trans("InvoiceReplacement").'):'; - $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; $texte .= ''; // Prefix setting of credit note From 5acefe2e72162f52d95fe2dfc309daa02e16f949 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Fri, 10 Feb 2023 11:33:34 +0100 Subject: [PATCH 05/11] cleaning my previous --- htdocs/core/modules/facture/mod_facture_mercure.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/modules/facture/mod_facture_mercure.php b/htdocs/core/modules/facture/mod_facture_mercure.php index e624487c9cf..1f516fa08f6 100644 --- a/htdocs/core/modules/facture/mod_facture_mercure.php +++ b/htdocs/core/modules/facture/mod_facture_mercure.php @@ -77,7 +77,7 @@ class mod_facture_mercure extends ModeleNumRefFactures // Setting the prefix $texte .= ''.$langs->trans("Mask").' ('.$langs->trans("InvoiceStandard").'):'; - $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; $texte .= '  '; @@ -85,17 +85,17 @@ class mod_facture_mercure extends ModeleNumRefFactures // Prefix setting of replacement invoices $texte .= ''.$langs->trans("Mask").' ('.$langs->trans("InvoiceReplacement").'):'; - $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; $texte .= ''; // Prefix setting of credit note $texte .= ''.$langs->trans("Mask").' ('.$langs->trans("InvoiceAvoir").'):'; - $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; $texte .= ''; // Prefix setting of deposit $texte .= ''.$langs->trans("Mask").' ('.$langs->trans("InvoiceDeposit").'):'; - $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; $texte .= ''; $texte .= ''; From fa856424a4f5a50486ffca16dcc7fcc7decca3aa Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Fri, 10 Feb 2023 11:43:01 +0100 Subject: [PATCH 06/11] fix : Warning: Undefined property: Facture:: in /home/httpd/vhosts/aflac.fr/domains/dev.aflac.fr/httpdocs/core/modules/facture/doc/pdf_sponge.modules.php on line 1620 --- htdocs/core/modules/facture/doc/pdf_sponge.modules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index 5edfc3f6157..1d106f6f024 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -1617,7 +1617,7 @@ class pdf_sponge extends ModelePDFFactures // Get Total HT - $total_ht = (isModEnabled("multicurrency") && $object->mylticurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht); + $total_ht = (isModEnabled("multicurrency") && $object->multicurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht); // Total remise $total_line_remise = 0; From 0cc8b5d7f2e6acc146d9eb51dd2b05179260c1c0 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Fri, 10 Feb 2023 15:02:11 +0100 Subject: [PATCH 07/11] fix : Warning: Undefined variable in /home/httpd/vhosts/aflac.fr/domains/dev.aflac.fr/httpdocs/core/class/html.formfile.class.php on line 924 --- htdocs/core/class/html.formfile.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index bc06d1517dc..ca058603ce1 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -920,6 +920,9 @@ class FormFile } if (is_object($hookmanager)) { + $addcolumforpicto = ($delallowed || $printer || $morepicto); + $colspan = (4 + ($addcolumforpicto ? 1 : 0)); + $colspanmore = 0; $parameters = array('colspan'=>($colspan + $colspanmore), 'socid'=>(isset($GLOBALS['socid']) ? $GLOBALS['socid'] : ''), 'id'=>(isset($GLOBALS['id']) ? $GLOBALS['id'] : ''), 'modulepart'=>$modulepart, 'relativepath'=>$relativepath); $res = $hookmanager->executeHooks('formBuilddocLineOptions', $parameters, $file); if (empty($res)) { From 26ec131048fa28f3c690cdf48302279c1af04ee7 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Fri, 10 Feb 2023 15:24:46 +0100 Subject: [PATCH 08/11] fix : Warning: Undefined property: stdClass:: in /home/httpd/vhosts/aflac.fr/domains/dev.aflac.fr/httpdocs/compta/facture/card-rec.php on line 122 --- htdocs/compta/facture/card-rec.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/card-rec.php b/htdocs/compta/facture/card-rec.php index b2f3521111e..580b585c28f 100644 --- a/htdocs/compta/facture/card-rec.php +++ b/htdocs/compta/facture/card-rec.php @@ -119,7 +119,7 @@ $usercanreopen = (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights $usercanunvalidate = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($usercancreate)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->facture->invoice_advance->unvalidate))); $usercanproductignorepricemin = ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS)); -$usercancreatemargin = $user->rights->margins->creer; +$usercancreatemargin = $user->hasRight("margins", "creer"); $usercanreadallmargin = $user->rights->margins->liretous; $usercancreatewithdrarequest = $user->rights->prelevement->bons->creer; From 66015cb11d754a2404a9a426e44b6187d566e14a Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Fri, 10 Feb 2023 15:30:34 +0100 Subject: [PATCH 09/11] fix : Warning: Undefined property: stdClass:: in /home/httpd/vhosts/aflac.fr/domains/dev.aflac.fr/httpdocs/compta/facture/card-rec.php on line 123 Warning: Attempt to read property liretous on null in /home/httpd/vhosts/aflac.fr/domains/dev.aflac.fr/httpdocs/compta/facture/card-rec.php on line 123 --- htdocs/compta/facture/card-rec.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/card-rec.php b/htdocs/compta/facture/card-rec.php index 580b585c28f..39763375fd2 100644 --- a/htdocs/compta/facture/card-rec.php +++ b/htdocs/compta/facture/card-rec.php @@ -120,7 +120,7 @@ $usercanunvalidate = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($ $usercanproductignorepricemin = ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS)); $usercancreatemargin = $user->hasRight("margins", "creer"); -$usercanreadallmargin = $user->rights->margins->liretous; +$usercanreadallmargin = $user->hasRight("margins", "liretous"); $usercancreatewithdrarequest = $user->rights->prelevement->bons->creer; $now = dol_now(); From d183773ace1f036f1d128294e6c1ac3795031b05 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Fri, 10 Feb 2023 15:34:56 +0100 Subject: [PATCH 10/11] fix : Warning: Undefined property: stdClass:: in /home/httpd/vhosts/aflac.fr/domains/dev.aflac.fr/httpdocs/compta/facture/card-rec.php on line 124 --- htdocs/compta/facture/card-rec.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/card-rec.php b/htdocs/compta/facture/card-rec.php index 39763375fd2..96924f3bdd0 100644 --- a/htdocs/compta/facture/card-rec.php +++ b/htdocs/compta/facture/card-rec.php @@ -121,7 +121,7 @@ $usercanunvalidate = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($ $usercanproductignorepricemin = ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS)); $usercancreatemargin = $user->hasRight("margins", "creer"); $usercanreadallmargin = $user->hasRight("margins", "liretous"); -$usercancreatewithdrarequest = $user->rights->prelevement->bons->creer; +$usercancreatewithdrarequest = $user->hasRight("prelevement", "bons","creer"); $now = dol_now(); From 1d9afa4808a64794970a9baaa52a06dc5ececc45 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Fri, 10 Feb 2023 14:45:03 +0000 Subject: [PATCH 11/11] Fixing style errors. --- htdocs/compta/facture/card-rec.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/card-rec.php b/htdocs/compta/facture/card-rec.php index 96924f3bdd0..06e9a762bca 100644 --- a/htdocs/compta/facture/card-rec.php +++ b/htdocs/compta/facture/card-rec.php @@ -121,7 +121,7 @@ $usercanunvalidate = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($ $usercanproductignorepricemin = ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS)); $usercancreatemargin = $user->hasRight("margins", "creer"); $usercanreadallmargin = $user->hasRight("margins", "liretous"); -$usercancreatewithdrarequest = $user->hasRight("prelevement", "bons","creer"); +$usercancreatewithdrarequest = $user->hasRight("prelevement", "bons", "creer"); $now = dol_now();