Fix: Bug when delete payment when already deleted in account
Related to : https://github.com/Dolibarr/dolibarr/blame/11.0/htdocs/compta/bank/class/account.class.php#L1976 Mistake between id / rowid. I prefere add the fix here (but a fix in account class can be also a good fix). And best fix may use setter to do it (but to complicated : maybe latter ? i may check it in september if you want in all CommonObject properties)
This commit is contained in:
parent
de5a2d738b
commit
2f7bb18e2b
@ -532,7 +532,10 @@ class Paiement extends CommonObject
|
|||||||
$accline = new AccountLine($this->db);
|
$accline = new AccountLine($this->db);
|
||||||
|
|
||||||
$result=$accline->fetch($bank_line_id);
|
$result=$accline->fetch($bank_line_id);
|
||||||
if ($result == 0) $accline->rowid=$bank_line_id; // If not found, we set artificially rowid to allow delete of llx_bank_url
|
if ($result == 0)
|
||||||
|
{
|
||||||
|
$accline->id=$accline->rowid=$bank_line_id; // If not found, we set artificially rowid to allow delete of llx_bank_url
|
||||||
|
}
|
||||||
|
|
||||||
// Delete bank account url lines linked to payment
|
// Delete bank account url lines linked to payment
|
||||||
$result=$accline->delete_urls($user);
|
$result=$accline->delete_urls($user);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user