forked from Wavyzz/dolibarr
Fix regression triggers was not triggered
This commit is contained in:
@@ -328,7 +328,7 @@ class Paiement extends CommonObject
|
||||
return -1;
|
||||
}
|
||||
|
||||
dol_syslog(get_class($this)."::create insert paiement", LOG_DEBUG);
|
||||
dol_syslog(get_class($this)."::create insert paiement (closepaidinvoices = ".$closepaidinvoices.")", LOG_DEBUG);
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
@@ -494,6 +494,8 @@ class Paiement extends CommonObject
|
||||
|
||||
$result = $invoice->generateDocument($invoice->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
|
||||
dol_syslog(get_class($this).'::create Regenerate end result='.$result, LOG_DEBUG);
|
||||
|
||||
if ($result < 0) {
|
||||
$this->error = $invoice->error;
|
||||
$this->errors = $invoice->errors;
|
||||
@@ -509,6 +511,8 @@ class Paiement extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
dol_syslog(get_class($this).'::create Now we call the triggers if no error (error = '.$error.')', LOG_DEBUG);
|
||||
|
||||
if (!$error) { // All payments into $this->amounts were recorded without errors
|
||||
// Appel des triggers
|
||||
$result = $this->call_trigger('PAYMENT_CUSTOMER_CREATE', $user);
|
||||
|
||||
Reference in New Issue
Block a user