From de2e9f5ea53cfc183ac07a836efedefc39af5566 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Thu, 5 Dec 2024 16:20:53 +0100 Subject: [PATCH] fix: missing error return on invoice created when lines array is filled --- htdocs/compta/facture/class/facture.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 932ed33010d..156cfee46ef 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -863,8 +863,8 @@ class Facture extends CommonInvoice ); if ($result < 0) { - $this->error = $this->db->lasterror(); - $this->errors = array_merge($this->errors, $newinvoiceline->errors); + $this->error = $newinvoiceline->error; + $this->errors = $newinvoiceline->errors; $error++; break; }