Moved all SQL statements from PHP files into relevant *_db.inc files.
[fa-stable.git] / gl / manage / gl_account_classes.php
index d90a952402b033d33a51f0d19eb68f2289a98aba..9e7e13625a58899dd96cd5f3ad5293f4cbfbcb13 100644 (file)
@@ -71,7 +71,7 @@ function can_delete($selected_id)
 {
        if ($selected_id == -1)
                return false;
-       if (account_class_in_account_types($selected_id))       
+       if (key_in_foreign_table($selected_id, 'chart_types', 'class_id'))      
        {
                display_error(_("Cannot delete this account class because GL account types have been created referring to it."));
                return false;