Skip to content
Snippets Groups Projects
Commit c01988ba authored by gauthier's avatar gauthier
Browse files

FIX : delete bank class lines when we delete bank_categ

parent 797b68fc
Branches
Tags
No related merge requests found
......@@ -87,6 +87,17 @@ if ($action == 'delete')
{
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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment