X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=inventory%2Fmanage%2Flocations.php;h=4fdef13119df1bddd13d34c46a42d6da300603ca;hb=9f2ede887db250a31f9c64c24e2813d81dce0af2;hp=3fcddeae5ec451150f70abc3bea3fa1e30e5ac3c;hpb=8259c324f645a39cb847d5a4346b70e225e1b02c;p=fa-stable.git diff --git a/inventory/manage/locations.php b/inventory/manage/locations.php index 3fcddeae..4fdef131 100644 --- a/inventory/manage/locations.php +++ b/inventory/manage/locations.php @@ -1,5 +1,14 @@ . +***********************************************************************/ $page_security = 11; $path_to_root="../.."; include($path_to_root . "/includes/session.inc"); @@ -101,48 +110,51 @@ if ($Mode == 'Delete') { delete_item_location($selected_id); display_notification(_('Selected location has been deleted')); - $Mode = 'RESET'; } //end if Delete Location + $Mode = 'RESET'; } if ($Mode == 'RESET') { $selected_id = -1; + $sav = get_post('show_inactive'); unset($_POST); + $_POST['show_inactive'] = $sav; } $sql = "SELECT * FROM ".TB_PREF."locations"; +if (!check_value('show_inactive')) $sql .= " WHERE !inactive"; $result = db_query($sql, "could not query locations");; start_form(); start_table("$table_style width=30%"); -$th = array(_("Location Code"), _("Location Name"), "", ""); +$th = array(_("Location Code"), _("Location Name"), _("Address"), _("Phone"), "", ""); +inactive_control_column($th); table_header($th); $k = 0; //row colour counter -while ($myrow = db_fetch_row($result)) +while ($myrow = db_fetch($result)) { alt_table_row_color($k); - label_cell($myrow[0]); - label_cell($myrow[1]); - edit_button_cell("Edit".$myrow[0], _("Edit")); - edit_button_cell("Delete".$myrow[0], _("Delete")); + label_cell($myrow["loc_code"]); + label_cell($myrow["location_name"]); + label_cell($myrow["delivery_address"]); + label_cell($myrow["phone"]); + inactive_control_cell($myrow["loc_code"], $myrow["inactive"], 'locations', 'loc_code'); + edit_button_cell("Edit".$myrow["loc_code"], _("Edit")); + delete_button_cell("Delete".$myrow["loc_code"], _("Delete")); end_row(); } //END WHILE LIST LOOP - -//end of ifs and buts! - +inactive_control_row($th); end_table(); -end_form(); echo '
'; -start_form(); - start_table($table_style2); +$_POST['email'] = ""; if ($selected_id != -1) { //editing an existing Location @@ -174,10 +186,10 @@ textarea_row(_("Address:"), 'delivery_address', null, 35, 5); text_row_ex(_("Telephone No:"), 'phone', 30, 30); text_row_ex(_("Facsimile No:"), 'fax', 30, 30); -text_row_ex(_("Email:"), 'email', 30, 30); +email_row_ex(_("E-mail:"), 'email', 30); end_table(1); -submit_add_or_update_center($selected_id == -1, '', true); +submit_add_or_update_center($selected_id == -1, '', 'both'); end_form();