diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index 630c0f930e0..7a759dde543 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -517,8 +517,10 @@ 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 + $result=$accline->fetch($bank_line_id); + 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);