X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=gl%2Fmanage%2Fgl_account_types.php;h=b4ca18665f55ce9ea2d70438c53a0c7292333228;hb=56631aa65f39f4f2471f1e31350f5b6c912cabbf;hp=128438433276e087f16fd4f1495e01dbbfac17c7;hpb=80dd97a37f674cc3691fa04af4c29607067566b2;p=fa-stable.git diff --git a/gl/manage/gl_account_types.php b/gl/manage/gl_account_types.php index 12843843..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'; } }