X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=gl%2Fmanage%2Fgl_account_types.php;h=b4ca18665f55ce9ea2d70438c53a0c7292333228;hb=56631aa65f39f4f2471f1e31350f5b6c912cabbf;hp=fd7d92ab700386ca146d0a31954c8e5f11c3d6f4;hpb=902f1015d874c33bd7946b17de2ad80b4f2144b6;p=fa-stable.git diff --git a/gl/manage/gl_account_types.php b/gl/manage/gl_account_types.php index fd7d92ab..b4ca1866 100644 --- a/gl/manage/gl_account_types.php +++ b/gl/manage/gl_account_types.php @@ -58,15 +58,16 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') if ($selected_id != -1) { - update_account_type($selected_id, $_POST['name'], $_POST['class_id'], $_POST['parent']); - display_notification(_('Selected account type has been updated')); + if (update_account_type($selected_id, $_POST['name'], $_POST['class_id'], $_POST['parent'])) + display_notification(_('Selected account type has been updated')); } else { - add_account_type($_POST['id'], $_POST['name'], $_POST['class_id'], $_POST['parent']); - display_notification(_('New account type has been added')); + if (add_account_type($_POST['id'], $_POST['name'], $_POST['class_id'], $_POST['parent'])) { + display_notification(_('New account type has been added')); + $Mode = 'RESET'; + } } - $Mode = 'RESET'; } } @@ -137,7 +138,7 @@ while ($myrow = db_fetch($result)) $bs_text = get_account_class_name($myrow["class_id"]); - if ($myrow["parent"] == reserved_words::get_any_numeric()) + if ($myrow["parent"] == ANY_NUMERIC) { $parent_text = ""; }