Implemented Selectable Print Orientation (Portrait, Landscape) for all reports in...
[fa-stable.git] / inventory / manage / locations.php
index 1deb1f2064df5f9db3d34fe516273bfd5fc9a8a8..21b3f64176a80cca58f0f75dc8a54559df57aa02 100644 (file)
@@ -33,7 +33,7 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM')
        //first off validate inputs sensible
        $_POST['loc_code'] = strtoupper($_POST['loc_code']);
 
-       if (strlen(db_escape($_POST['loc_code'])) > 7) //check length after conversion
+       if ((strlen(db_escape($_POST['loc_code'])) > 7) || empty($_POST['loc_code'])) //check length after conversion
        {
                $input_error = 1;
                display_error( _("The location code must be five characters or less long (including converted special chars)."));
@@ -142,7 +142,7 @@ if ($Mode == 'RESET')
 $result = get_item_locations(check_value('show_inactive'));
 
 start_form();
-start_table($table_style);
+start_table(TABLESTYLE);
 $th = array(_("Location Code"), _("Location Name"), _("Address"), _("Phone"), _("Secondary Phone"), "", "");
 inactive_control_column($th);
 table_header($th);
@@ -168,7 +168,7 @@ end_table();
 
 echo '<br>';
 
-start_table($table_style2);
+start_table(TABLESTYLE2);
 
 $_POST['email'] = "";
 if ($selected_id != -1)