Fix error was not propagated correctly
This commit is contained in:
parent
1be5145148
commit
e9c43718ba
@ -1070,7 +1070,7 @@ class Account extends CommonObject
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$this->error = $this->db->lasterror;
|
$this->error = $this->db->lasterror();
|
||||||
$this->errors[] = $this->error;
|
$this->errors[] = $this->error;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -643,6 +643,8 @@ class Paiement extends CommonObject
|
|||||||
$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) {
|
if ($result < 0) {
|
||||||
|
$this->error = $acc->error;
|
||||||
|
$this->errors = $acc->errors;
|
||||||
$error++;
|
$error++;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -768,7 +770,7 @@ class Paiement extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add link 'InvoiceRefused' in bank_url
|
// Add link 'InvoiceRefused' in bank_url
|
||||||
if (! $error && $label == '(InvoiceRefused)') {
|
if (!$error && $label == '(InvoiceRefused)') {
|
||||||
$result=$acc->add_url_line(
|
$result=$acc->add_url_line(
|
||||||
$bank_line_id,
|
$bank_line_id,
|
||||||
$this->id_prelevement,
|
$this->id_prelevement,
|
||||||
@ -788,6 +790,7 @@ class Paiement extends CommonObject
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$this->error = $acc->error;
|
$this->error = $acc->error;
|
||||||
|
$this->errors = $acc->errors;
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user