Skip to content
Snippets Groups Projects
Commit 1be389fd authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

FIX deletion of bank tag

parent 10838983
No related branches found
No related tags found
No related merge requests found
......@@ -202,7 +202,6 @@ class BankCateg // extends CommonObject
// Delete link between tag and bank account
if (! $error)
{
//$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class"; // No more used
$sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_account";
$sql.= " WHERE fk_categorie = ".$this->id;
......@@ -214,6 +213,20 @@ class BankCateg // extends CommonObject
}
}
// Delete link between tag and bank lines
if (! $error)
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class"; // No more used
$sql.= " WHERE fk_categ = ".$this->id;
$resql = $this->db->query($sql);
if (!$resql)
{
$error++;
$this->errors[] = "Error ".$this->db->lasterror();
}
}
// Delete bank categ
if (! $error)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment