X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=gl%2Fmanage%2Fgl_account_classes.php;h=9015c5835b4af0a378de734cae698c3a30534f15;hb=634019327c53a3e1082c90f4fcece9a97429a039;hp=8de53227e5da3b4463dd2a0c7cf208e8f9b8cfaf;hpb=c09be0dad6b05131e240349a375af7a4b7bf3444;p=fa-stable.git diff --git a/gl/manage/gl_account_classes.php b/gl/manage/gl_account_classes.php index 8de53227..9015c583 100644 --- a/gl/manage/gl_account_classes.php +++ b/gl/manage/gl_account_classes.php @@ -1,5 +1,14 @@ . +***********************************************************************/ $page_security = 3; $path_to_root="../.."; include($path_to_root . "/includes/session.inc"); @@ -15,7 +24,12 @@ simple_page_mode(true); function can_process() { - + if (!is_numeric($_POST['id'])) + { + display_error( _("The account class ID must be numeric.")); + set_focus('id'); + return false; + } if (strlen($_POST['name']) == 0) { display_error( _("The account class name cannot be empty.")); @@ -92,7 +106,7 @@ if ($Mode == 'RESET') $result = get_account_classes(); start_form(); start_table($table_style); -$th = array(_("Class ID"), _("Class Name"), _("Balance Sheet"), "", ""); +$th = array(_("Class ID"), _("Class Name"), _("Class Type"), "", ""); table_header($th); $k = 0; @@ -101,19 +115,11 @@ while ($myrow = db_fetch($result)) alt_table_row_color($k); - if ($myrow["balance_sheet"] == 0) - { - $bs_text = _("No"); - } - else - { - $bs_text = _("Yes"); - } label_cell($myrow["cid"]); label_cell($myrow['class_name']); - label_cell($bs_text); + label_cell($class_types[$myrow["balance_sheet"]]); edit_button_cell("Edit".$myrow["cid"], _("Edit")); - edit_button_cell("Delete".$myrow["cid"], _("Delete")); + delete_button_cell("Delete".$myrow["cid"], _("Delete")); end_row(); } @@ -149,7 +155,7 @@ else text_row_ex(_("Class Name:"), 'name', 50, 60); -yesno_list_row(_("Balance Sheet:"), 'Balance', null, "", "", false); +class_types_list_row(_("Class Type:"), 'Balance', null); end_table(1);