From 66c6d1927b872b4fef50d2e336194bb8d69bc198 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 11 Oct 2022 16:46:08 +0200 Subject: [PATCH] Fix duplicate invoice created --- htdocs/core/class/commonobject.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 714320fbf1c..d5e44f4afed 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -4220,7 +4220,7 @@ abstract class CommonObject $nb_rows_affected = $this->db->affected_rows($resql); // should be 1 or 0 if status was already correct - if ($nb_rows_affected >= 0) { + if ($nb_rows_affected > 0) { if (empty($trigkey)) { // Try to guess trigkey (for backward compatibility, now we should have trigkey defined into the call of setStatus) if ($this->element == 'supplier_proposal' && $status == 2) {