X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=gl%2Fmanage%2Fgl_account_types.php;h=8efa766e7e05b2c2b1b45dc1e2f0b22d3e69b459;hb=cc9972b02f2bf4ece12da3431266e85e96872fb1;hp=cad41fbb41fba6cdcc0acf362eb551f528899a23;hpb=9dab04be9d81766f1878d3688ee73d0bcf29f5d2;p=fa-stable.git diff --git a/gl/manage/gl_account_types.php b/gl/manage/gl_account_types.php index cad41fbb..8efa766e 100644 --- a/gl/manage/gl_account_types.php +++ b/gl/manage/gl_account_types.php @@ -79,13 +79,13 @@ function can_delete($selected_id) return false; $type = db_escape($selected_id); - if (account_type_in_chart_master($type)) + if (key_in_foreign_table($type, 'chart_master', 'account_type', true)) { display_error(_("Cannot delete this account group because GL accounts have been created referring to it.")); return false; } - if (account_type_in_parent($type)) + if (key_in_foreign_table($type, 'chart_types', 'parent', true)) { display_error(_("Cannot delete this account group because GL account groups have been created referring to it.")); return false;