From 7f10566d5e4f2ab900457405956d0112f11a251f Mon Sep 17 00:00:00 2001 From: Florian Mortgat <50440633+atm-florianm@users.noreply.github.com> Date: Thu, 7 Mar 2024 20:21:41 +0100 Subject: [PATCH] FIX 17.0: $num doesn't take trigger-modified newref into account, leading to inconsistencies if BILL_SUPPLIER_VALIDATE changes the invoice's ref (#28684) this is a follow-up of PR #27008 --- htdocs/fourn/class/fournisseur.facture.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 75874fbb86a80..eebb2b95b512c 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -1895,7 +1895,7 @@ public function validate($user, $force_number = '', $idwarehouse = 0, $notrigger // Set new ref and define current statut if (!$error) { - $this->ref = $num; + $this->ref = $this->newref; $this->statut = self::STATUS_VALIDATED; //$this->date_validation=$now; this is stored into log table }