2
0
forked from Wavyzz/dolibarr

Fix regression triggers was not triggered

This commit is contained in:
Laurent Destailleur
2023-10-16 20:55:56 +02:00
parent b0895b93ae
commit d6086f07b4
2 changed files with 8 additions and 6 deletions

View File

@@ -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);