diff --git a/htdocs/compta/bank/categ.php b/htdocs/compta/bank/categ.php
index 00755959ab924131540be11a01f07f44eb01a818..176f8d6101b7fdf1a2f459a15636a96ef0151fc3 100644
--- a/htdocs/compta/bank/categ.php
+++ b/htdocs/compta/bank/categ.php
@@ -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;