From 7a82187acd26a2e732020ea4d7a4fa59bb3b006b Mon Sep 17 00:00:00 2001 From: w3houde Date: Thu, 13 Aug 2026 19:21:43 +0700 Subject: [PATCH] Fix #39245 set TRIGGER_PREFIX to BILL on Facture (#39497) On 23.0 the generic CommonObject methods (setPaymentMethods, setBankAccount, ...) build the trigger name from $this->TRIGGER_PREFIX, falling back to get_class() when it is empty. Facture does not declare it, so it fires FACTURE_MODIFY instead of the BILL_* events the class uses everywhere else (BILL_CREATE, BILL_MODIFY, ...). Modules listening on BILL_MODIFY miss those changes. Declare public $TRIGGER_PREFIX = 'BILL', like the other objects do (Holiday='HOLIDAY', Workstation='WORKSTATION', BOM='BOM'). Signed-off-by: Dolicraft Co-authored-by: Dolicraft --- htdocs/compta/facture/class/facture.class.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 79242f5e608..b051a687600 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -72,6 +72,11 @@ class Facture extends CommonInvoice */ public $element = 'facture'; + /** + * @var string Prefix used to build trigger event names in generic CommonObject methods (BILL_MODIFY, ...) + */ + public $TRIGGER_PREFIX = 'BILL'; + /** * @var string Name of table without prefix where object is stored */