New: Possibilité de supprimer les categories ecritures bancaires (patch christophe)
This commit is contained in:
parent
626f5503d5
commit
8e21a93963
@ -53,6 +53,23 @@ if ($_POST["action"] == 'add')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Action suppression catégorie
|
||||||
|
*/
|
||||||
|
if ( $_REQUEST['action'] == 'delete' )
|
||||||
|
{
|
||||||
|
if ( $_REQUEST['categid'] )
|
||||||
|
{
|
||||||
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_categ WHERE rowid='".$_REQUEST['categid']."'";
|
||||||
|
$result = $db->query($sql);
|
||||||
|
|
||||||
|
if (!$result)
|
||||||
|
{
|
||||||
|
dolibarr_print_error($db);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Affichage liste des catégories
|
* Affichage liste des catégories
|
||||||
*/
|
*/
|
||||||
@ -80,7 +97,8 @@ if ($result)
|
|||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
print '<td><a href="'.DOL_URL_ROOT.'/compta/bank/budget.php?bid='.$objp->rowid.'">'.$objp->rowid.'</td>';
|
print '<td><a href="'.DOL_URL_ROOT.'/compta/bank/budget.php?bid='.$objp->rowid.'">'.$objp->rowid.'</td>';
|
||||||
print "<td colspan=\"2\">$objp->label</td>";
|
print "<td>$objp->label</td>";
|
||||||
|
print '<td style="text-align: center;"><a href="categ.php?categid='.$objp->rowid.'&action=delete"'.img_delete().'</a></td>';
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user