From d81c124b77f585cbf1c06365dd55a0ea2493f32e Mon Sep 17 00:00:00 2001 From: John BOTELLA <68917336+thersane-john@users.noreply.github.com> Date: Fri, 28 Feb 2025 11:55:32 +0100 Subject: [PATCH 1/3] Fix setup default value --- htdocs/core/class/html.formsetup.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.formsetup.class.php b/htdocs/core/class/html.formsetup.class.php index efc97ad63f2..392fa8232c1 100644 --- a/htdocs/core/class/html.formsetup.class.php +++ b/htdocs/core/class/html.formsetup.class.php @@ -700,10 +700,10 @@ class FormSetupItem { global $conf; if (isset($conf->global->{$this->confKey})) { - $this->fieldValue = getDolGlobalString($this->confKey); + $this->fieldValue = getDolGlobalString($this->confKey, null); return true; } else { - $this->fieldValue = ''; + $this->fieldValue = null; return false; } } From 778482d4be21f3eec5dcefc8f61b83b8c720ce76 Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Mon, 3 Mar 2025 03:11:27 +0100 Subject: [PATCH 2/3] Fix bad link to payment (forum https://www.dolibarr.fr/forum/t/liens-de-paiement-sur-les-pdf/46733/28) --- htdocs/core/modules/facture/doc/pdf_crabe.modules.php | 2 +- htdocs/core/modules/facture/doc/pdf_octopus.modules.php | 2 +- htdocs/core/modules/facture/doc/pdf_sponge.modules.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 026b03ad970..ebbaedfbc06 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -1259,7 +1259,7 @@ class pdf_crabe extends ModelePDFFactures $langs->loadLangs(array('payment', 'paybox', 'stripe')); $servicename = $langs->transnoentities('Online'); - $paiement_url = getOnlinePaymentUrl('', 'invoice', $object->ref, '', '', ''); + $paiement_url = getOnlinePaymentUrl(0, 'invoice', $object->ref, '', '', ''); $linktopay = $langs->trans("ToOfferALinkForOnlinePayment", $servicename).' '.$outputlangs->transnoentities("ClickHere").''; $pdf->SetXY($this->marge_gauche, $posy); diff --git a/htdocs/core/modules/facture/doc/pdf_octopus.modules.php b/htdocs/core/modules/facture/doc/pdf_octopus.modules.php index c958a8549c9..2b06f336901 100644 --- a/htdocs/core/modules/facture/doc/pdf_octopus.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_octopus.modules.php @@ -1462,7 +1462,7 @@ class pdf_octopus extends ModelePDFFactures $langs->loadLangs(array('payment', 'paybox', 'stripe')); $servicename = $langs->transnoentities('Online'); - $paiement_url = getOnlinePaymentUrl('', 'invoice', $object->ref, '', '', ''); + $paiement_url = getOnlinePaymentUrl(0, 'invoice', $object->ref, '', '', ''); $linktopay = $langs->trans("ToOfferALinkForOnlinePayment", $servicename).' '.$outputlangs->transnoentities("ClickHere").''; $pdf->SetXY($this->marge_gauche, $posy); diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index 548d40bcb72..620fc2cc8c2 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -1363,7 +1363,7 @@ class pdf_sponge extends ModelePDFFactures $langs->loadLangs(array('payment', 'paybox', 'stripe')); $servicename = $langs->transnoentities('Online'); - $paiement_url = getOnlinePaymentUrl('', 'invoice', $object->ref, '', '', ''); + $paiement_url = getOnlinePaymentUrl(0, 'invoice', $object->ref, '', '', ''); $linktopay = $langs->trans("ToOfferALinkForOnlinePayment", $servicename).' '.$outputlangs->transnoentities("ClickHere").''; $pdf->SetXY($this->marge_gauche, $posy); From 06854f00e5a52e57d8fa61b83314d1c199c925ec Mon Sep 17 00:00:00 2001 From: John BOTELLA <68917336+thersane-john@users.noreply.github.com> Date: Mon, 3 Mar 2025 07:34:42 +0100 Subject: [PATCH 3/3] change type var in comment --- htdocs/core/class/html.formsetup.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formsetup.class.php b/htdocs/core/class/html.formsetup.class.php index 392fa8232c1..b4eae28beb0 100644 --- a/htdocs/core/class/html.formsetup.class.php +++ b/htdocs/core/class/html.formsetup.class.php @@ -615,7 +615,7 @@ class FormSetupItem /** @var string $picto */ public $picto = ''; - /** @var string $fieldValue */ + /** @var string|null $fieldValue */ public $fieldValue; /** @var string $defaultFieldValue */