Skip to content

Commit

Permalink
FIX : delete bank class lines when we delete bank_categ
Browse files Browse the repository at this point in the history
  • Loading branch information
atm-gauthier committed Feb 9, 2017
1 parent 797b68f commit c01988b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions htdocs/compta/bank/categ.php
Expand Up @@ -87,6 +87,17 @@
{
if (GETPOST('categid'))
{
// Delete bank class
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class";
$sql.= " WHERE fk_categ = '".GETPOST('categid')."'";

$result = $db->query($sql);
if (!$result)
{
dol_print_error($db);
}

// Delete bank categ
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_categ";
$sql.= " WHERE rowid = '".GETPOST('categid')."'";
$sql.= " AND entity = ".$conf->entity;
Expand Down

0 comments on commit c01988b

Please sign in to comment.