From 0837597cea11f9680ec15be2149cb9c21d68ad72 Mon Sep 17 00:00:00 2001 From: Rikard Bosnjakovic Date: Sun, 22 Mar 2026 20:14:38 +0100 Subject: [PATCH 1/2] Fix 37406 (#37565) * FIX #37451 * Fix #37406 * Update api_thirdparties.class.php --------- Co-authored-by: Laurent Destailleur --- htdocs/societe/class/api_thirdparties.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/class/api_thirdparties.class.php b/htdocs/societe/class/api_thirdparties.class.php index e9aaef56d25..599567772cb 100644 --- a/htdocs/societe/class/api_thirdparties.class.php +++ b/htdocs/societe/class/api_thirdparties.class.php @@ -1080,7 +1080,7 @@ class Thirdparties extends DolibarrApi } $result = $this->company->fetch($id); - if (!is_array($result)) { + if ($result <= 0) { throw new RestException(404, 'Thirdparty not found'); } From 15c63dd34b7dd608a3d335738937a416eb99e225 Mon Sep 17 00:00:00 2001 From: atm-lucas <121817516+atm-lucasmantegari@users.noreply.github.com> Date: Mon, 23 Mar 2026 11:30:50 +0100 Subject: [PATCH 2/2] concat supplier order ref/date in mass invoice line descriptions (#37558) --- htdocs/fourn/commande/list.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index 23fc14c332c..38de1e3854a 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -493,6 +493,10 @@ if (empty($reshook)) { for ($i = 0; $i < $num; $i++) { $desc = ($lines[$i]->desc ? $lines[$i]->desc : $lines[$i]->libelle); + // If we build one invoice for several supplier orders, append the source order reference on the invoice line. + if (!empty($createbills_onebythird)) { + $desc = dol_concatdesc($desc, $langs->trans("SupplierOrder").' '.$cmd->ref.' - '.dol_print_date($cmd->date, 'day')); + } if ($lines[$i]->subprice < 0) { require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';