diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index 7294274d26b..64111a311b3 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -532,7 +532,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 + 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);