Fix missing error management
This commit is contained in:
parent
99ddef0530
commit
aff7148ed8
@ -585,16 +585,19 @@ class Paiement extends CommonObject
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->db->begin();
|
|
||||||
|
|
||||||
$this->fk_account = $accountid;
|
$this->fk_account = $accountid;
|
||||||
|
|
||||||
|
dol_syslog("addPaymentToBank ".$user->id.", ".$mode.", ".$label.", ".$this->fk_account.", ".$emetteur_nom.", ".$emetteur_banque);
|
||||||
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
dol_syslog("$user->id, $mode, $label, $this->fk_account, $emetteur_nom, $emetteur_banque");
|
|
||||||
|
|
||||||
$acc = new Account($this->db);
|
$acc = new Account($this->db);
|
||||||
$result = $acc->fetch($this->fk_account);
|
$result = $acc->fetch($this->fk_account);
|
||||||
|
if ($result < 0) {
|
||||||
|
$error++;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->db->begin();
|
||||||
|
|
||||||
$totalamount = $this->amount;
|
$totalamount = $this->amount;
|
||||||
if (empty($totalamount)) {
|
if (empty($totalamount)) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user