2
0
forked from Wavyzz/dolibarr

Fix conflict with trigger to delete payment customer and supplier.

This commit is contained in:
Laurent Destailleur
2015-12-23 19:54:56 +01:00
parent 6b25439161
commit 559e621fd2
2 changed files with 14 additions and 1 deletions

View File

@@ -376,7 +376,7 @@ class Paiement extends CommonObject
if (! $notrigger) if (! $notrigger)
{ {
// Appel des triggers // Appel des triggers
$result=$this->call_trigger('PAYMENT_DELETE', $user); $result=$this->call_trigger('PAYMENT_CUSTOMER_DELETE', $user);
if ($result < 0) if ($result < 0)
{ {
$this->db->rollback(); $this->db->rollback();

View File

@@ -319,6 +319,19 @@ class PaiementFourn extends Paiement
return -4; 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(); $this->db->commit();
return 1; return 1;
} }