X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=gl%2Fmanage%2Fgl_account_types.php;h=fcea4dbfcc32611445e8cadf679ba780db94d78f;hb=9bb7d0742be8a96fe8152c338998bbd5b6daa0be;hp=b3e56aca8b1a82e0df8f46191bb709986f37fbd7;hpb=52f1b29671276f9318e03248d788186b911a00a9;p=fa-stable.git diff --git a/gl/manage/gl_account_types.php b/gl/manage/gl_account_types.php index b3e56aca..fcea4dbf 100644 --- a/gl/manage/gl_account_types.php +++ b/gl/manage/gl_account_types.php @@ -79,19 +79,18 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') //----------------------------------------------------------------------------------- -function can_delete($selected_id) +function can_delete($type) { - if ($selected_id == "") + if ($type == "") return false; - $type = db_escape($selected_id); - if (key_in_foreign_table($type, 'chart_master', 'account_type', true)) + if (key_in_foreign_table($type, 'chart_master', 'account_type')) { display_error(_("Cannot delete this account group because GL accounts have been created referring to it.")); return false; } - if (key_in_foreign_table($type, 'chart_types', 'parent', true)) + if (key_in_foreign_table($type, 'chart_types', 'parent')) { display_error(_("Cannot delete this account group because GL account groups have been created referring to it.")); return false;