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';
}
}
$bs_text = get_account_class_name($myrow["class_id"]);
- if ($myrow["parent"] == reserved_words::get_any_numeric())
+ if ($myrow["parent"] == ANY_NUMERIC)
{
$parent_text = "";
}