Fix var not always defined

This commit is contained in:
Laurent Destailleur 2016-07-06 11:20:09 +02:00
parent c360189d94
commit 8e9a7cb629

View File

@ -190,11 +190,12 @@ class Cotisation extends CommonObject
*/ */
function delete($user) function delete($user)
{ {
$accountline=new AccountLine($this->db);
// It subscription is linked to a bank transaction, we get it // It subscription is linked to a bank transaction, we get it
if ($this->fk_bank) if ($this->fk_bank > 0)
{ {
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
$accountline=new AccountLine($this->db);
$result=$accountline->fetch($this->fk_bank); $result=$accountline->fetch($this->fk_bank);
} }