Merge pull request #14101 from mistraloz/patch-5

Fix: Bug when delete payment when already deleted in account
This commit is contained in:
Laurent Destailleur 2020-06-20 12:15:59 +02:00 committed by GitHub
commit 5a53a16c17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -532,7 +532,9 @@ class Paiement extends CommonObject
$accline = new AccountLine($this->db);
$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
$result=$accline->delete_urls($user);