From c39cba83957b70b90e49de759d64e4be84b7a55c Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Thu, 4 Dec 2025 10:57:24 +0100 Subject: [PATCH 1/3] fix: when create bills from orders list, title and subtotal attribute is now copied --- htdocs/commande/list.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index e02711b3584..500f9021c8b 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -606,6 +606,15 @@ if (empty($reshook)) { $lines[$i]->fk_unit ); if ($result > 0) { + if (!empty($lines[$i]->extraparams)) { + $factureLine = new FactureLigne($db); + $res = $factureLine->fetch($result); + if ($res>0) { + $factureLine->extraparams = $lines[$i]->extraparams; + $factureLine->setExtraParameters(); + } + } + $lineid = $result; } else { $lineid = 0; @@ -621,7 +630,6 @@ if (empty($reshook)) { } } } - if ($currentIndex <= getDolGlobalInt("MAXREFONDOC", 10)) { $objecttmp->note_public = dol_concatdesc($objecttmp->note_public, $langs->transnoentities($cmd->ref).(empty($cmd->ref_client) ? '' : ' ('.$cmd->ref_client.')')); $objecttmp->update($user); From 7f3ac106fc18657a9936aba51bcf88fe766b6780 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Thu, 4 Dec 2025 11:00:58 +0100 Subject: [PATCH 2/3] fix: when create bills from orders list, title and subtotal attribute is now copied --- htdocs/commande/list.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 500f9021c8b..fcbc4ff8fee 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -630,6 +630,7 @@ if (empty($reshook)) { } } } + if ($currentIndex <= getDolGlobalInt("MAXREFONDOC", 10)) { $objecttmp->note_public = dol_concatdesc($objecttmp->note_public, $langs->transnoentities($cmd->ref).(empty($cmd->ref_client) ? '' : ' ('.$cmd->ref_client.')')); $objecttmp->update($user); From 12936afb1348409809ac0013a85845dc34a2f53d Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Thu, 4 Dec 2025 19:58:42 +0100 Subject: [PATCH 3/3] review --- htdocs/commande/list.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index fcbc4ff8fee..24e0cc34bb0 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -608,11 +608,9 @@ if (empty($reshook)) { if ($result > 0) { if (!empty($lines[$i]->extraparams)) { $factureLine = new FactureLigne($db); - $res = $factureLine->fetch($result); - if ($res>0) { - $factureLine->extraparams = $lines[$i]->extraparams; - $factureLine->setExtraParameters(); - } + $factureLine->id = $result; + $factureLine->extraparams = $lines[$i]->extraparams; + $factureLine->setExtraParameters(); } $lineid = $result;