From c6333c77829ee2c6b708616a4356e559dc525bd6 Mon Sep 17 00:00:00 2001 From: MDW Date: Thu, 7 Mar 2024 18:57:18 +0100 Subject: [PATCH 1/5] Fix: Missing parameter (#28691) # Fix: Missing parameter dol_print_error was missing db parameter --- htdocs/compta/prelevement/create.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/prelevement/create.php b/htdocs/compta/prelevement/create.php index 930c01db9fe24..8102984f3b20b 100644 --- a/htdocs/compta/prelevement/create.php +++ b/htdocs/compta/prelevement/create.php @@ -258,7 +258,7 @@ $pricetowithdraw = $bprev->SommeAPrelever($type, 'salary'); } if ($nb < 0) { - dol_print_error($bprev->error); + dol_print_error($db, $bprev->error); } print ''; @@ -479,7 +479,7 @@ } $title = $langs->trans("InvoiceWaitingWithdraw"); $picto = 'bill'; - if ($type =='bank-transfer') { + if ($type == 'bank-transfer') { if ($sourcetype != 'salary') { $title = $langs->trans("InvoiceWaitingPaymentByBankTransfer"); } else { From d79b3ba8ec33af9e498fff4cdefa0561a2ca7c19 Mon Sep 17 00:00:00 2001 From: thibdrev Date: Thu, 7 Mar 2024 18:57:38 +0100 Subject: [PATCH 2/5] qual: phpstan for htdocs/expedition/class/expedition.class.php (#28686) htdocs/expedition/class/expedition.class.php 1245 Property CommonObject::$origin (CommonObject|string) does not accept null. htdocs/expedition/class/expedition.class.php 1438 Property CommonObject::$origin (CommonObject|string) does not accept null. --- htdocs/expedition/class/expedition.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 1079f83402415..b9b21899b28c8 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -1242,7 +1242,7 @@ public function cancel($notrigger = 0, $also_update_stock = false) $mouvS = new MouvementStock($this->db); // we do not log origin because it will be deleted - $mouvS->origin = null; + $mouvS->origin = ''; // get lot/serial $lotArray = null; if (isModEnabled('productbatch')) { @@ -1440,7 +1440,7 @@ public function delete($user = null, $notrigger = 0, $also_update_stock = false) $mouvS = new MouvementStock($this->db); // we do not log origin because it will be deleted - $mouvS->origin = null; + $mouvS->origin = ''; // get lot/serial $lotArray = $shipmentlinebatch->fetchAll($obj->expeditiondet_id); if (!is_array($lotArray)) { From b55804841fda1c9a15d6b01b0a11a23a92ec0c91 Mon Sep 17 00:00:00 2001 From: Jon Bendtsen Date: Thu, 7 Mar 2024 19:01:38 +0100 Subject: [PATCH 3/5] using note_public since note_private is not working (#28675) Co-authored-by: Jon Bendtsen --- htdocs/adherents/subscription/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/adherents/subscription/card.php b/htdocs/adherents/subscription/card.php index 6dba7fa0d9333..ad1f0633c96b3 100644 --- a/htdocs/adherents/subscription/card.php +++ b/htdocs/adherents/subscription/card.php @@ -238,7 +238,7 @@ // Label print ''; print ''; + print ''; // Bank line if (isModEnabled("bank") && (getDolGlobalString('ADHERENT_BANK_USE') || $object->fk_bank)) { @@ -334,7 +334,7 @@ print ''; // Label - print ''; + print ''; // Bank line if (isModEnabled("bank") && (getDolGlobalString('ADHERENT_BANK_USE') || $object->fk_bank)) { From a63d7e08020d0409a4bf734e9bf41ba1d5e7295b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 7 Mar 2024 19:06:08 +0100 Subject: [PATCH 4/5] Fix regression --- htdocs/resource/class/dolresource.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/resource/class/dolresource.class.php b/htdocs/resource/class/dolresource.class.php index 2a40c0406c5f2..cce2244df4281 100644 --- a/htdocs/resource/class/dolresource.class.php +++ b/htdocs/resource/class/dolresource.class.php @@ -530,6 +530,8 @@ public function delete(User $user, int $notrigger = 0) require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + $rowid = $this->id; + $error = 0; $this->db->begin(); From 6e2f1d350aa7aed98606afc521183df4ebc50ab7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 7 Mar 2024 19:10:27 +0100 Subject: [PATCH 5/5] Fix position of parameter --- htdocs/expedition/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 4fdefef202b61..8c259b63e2a10 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -506,7 +506,7 @@ } } elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->hasRight('expedition', 'supprimer')) { $also_update_stock = (GETPOST('alsoUpdateStock', 'alpha') ? 1 : 0); - $result = $object->delete(0, $also_update_stock); + $result = $object->delete($user, 0, $also_update_stock); if ($result > 0) { header("Location: ".DOL_URL_ROOT.'/expedition/index.php'); exit;
'.$langs->trans("Label").''; - print '
'.$langs->trans("Amount").''.price($object->amount).'
'.$langs->trans("Label").''.dol_string_onlythesehtmltags(dol_htmlentitiesbr($object->note_private)).'
'.$langs->trans("Label").''.dol_string_onlythesehtmltags(dol_htmlentitiesbr($object->note_public)).'