forked from Wavyzz/dolibarr
Fix conflict with trigger to delete payment customer and supplier.
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user