Fix: Can delete even if data corrupted (fk_bank set but entry removed

manually into llx_bank).
This commit is contained in:
Laurent Destailleur 2012-10-15 20:53:49 +02:00
parent 118ec8277b
commit 6f93e9cdac

View File

@ -218,7 +218,7 @@ class Cotisation extends CommonObject
$result=$member->fetch($this->fk_adherent); $result=$member->fetch($this->fk_adherent);
$result=$member->update_end_date($user); $result=$member->update_end_date($user);
if ($this->fk_bank) if ($accountline->rowid > 0) // If we found bank account line (this means this->fk_bank defined)
{ {
$result=$accountline->delete($user); // Return false if refused because line is conciliated $result=$accountline->delete($user); // Return false if refused because line is conciliated
if ($result > 0) if ($result > 0)