diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index 7e94a1f5448..f9a822fdfc8 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -376,7 +376,7 @@ class Paiement extends CommonObject if (! $notrigger) { // Appel des triggers - $result=$this->call_trigger('PAYMENT_DELETE', $user); + $result=$this->call_trigger('PAYMENT_CUSTOMER_DELETE', $user); if ($result < 0) { $this->db->rollback(); diff --git a/htdocs/fourn/class/paiementfourn.class.php b/htdocs/fourn/class/paiementfourn.class.php index df122ef1fff..7ca6e2c305c 100644 --- a/htdocs/fourn/class/paiementfourn.class.php +++ b/htdocs/fourn/class/paiementfourn.class.php @@ -319,6 +319,19 @@ class PaiementFourn extends Paiement return -4; } } + + if (! $notrigger) + { + // Appel des triggers + $result=$this->call_trigger('PAYMENT_SUPPLIER_DELETE', $user); + if ($result < 0) + { + $this->db->rollback(); + return -1; + } + // Fin appel triggers + } + $this->db->commit(); return 1; }