Added inactive records support.
[fa-stable.git] / sales / manage / sales_points.php
index b7f292defb58532065020402efb99fb7bb1faecb..6282cf7f6d5e5c2fc3ab2679338284d06bbaeb62 100644 (file)
@@ -72,17 +72,20 @@ if ($Mode == 'Delete')
 if ($Mode == 'RESET')
 {
        $selected_id = -1;
+       $sav = get_post('show_inactive');
        unset($_POST);
+       $_POST['show_inactive'] = $sav;
 }
 //----------------------------------------------------------------------------------------------------
 
-$result = get_all_sales_points();
+$result = get_all_sales_points(check_value('show_inactive'));
 
 start_form();
 start_table("$table_style");
 
 $th = array (_('POS Name'), _('Credit sale'), _('Cash sale'), _('Location'), _('Default account'), 
         '','');
+inactive_control_column($th);
 table_header($th);
 $k = 0;
 
@@ -94,18 +97,16 @@ while ($myrow = db_fetch($result))
        label_cell($myrow['cash_sale'] ? _('Yes') : _('No'));
        label_cell($myrow["location_name"], "");
        label_cell($myrow["bank_account_name"], "");
+       inactive_control_cell($myrow["id"], $myrow["inactive"], "sales_pos", 'id');
        edit_button_cell("Edit".$myrow['id'], _("Edit"));
        delete_button_cell("Delete".$myrow['id'], _("Delete"));
        end_row();
 }
 
-end_table();
-end_form();
-echo '<br>';
+inactive_control_row($th);
+end_table(1);
 //----------------------------------------------------------------------------------------------------
 
-start_form();
-
 $cash = db_has_cash_accounts();
 
 if (!$cash) display_note(_("To have cash POS first define at least one cash bank account."));