<?php
-
+/**********************************************************************
+ Copyright (C) FrontAccounting, LLC.
+ Released under the terms of the GNU General Public License, GPL,
+ as published by the Free Software Foundation, either version 3
+ of the License, or (at your option) any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
+***********************************************************************/
$page_security = 15;
$path_to_root="../..";
include_once($path_to_root . "/includes/session.inc");
-page(_("Sales Types"));
+page(_("POS settings"));
include_once($path_to_root . "/includes/ui.inc");
include_once($path_to_root . "/sales/includes/db/sales_points_db.inc");
label_cell($myrow["location_name"], "");
label_cell($myrow["bank_account_name"], "");
edit_button_cell("Edit".$myrow['id'], _("Edit"));
- edit_button_cell("Delete".$myrow['id'], _("Delete"));
+ delete_button_cell("Delete".$myrow['id'], _("Delete"));
end_row();
}
start_form();
-start_table("$table_style2 width=30%");
+start_table($table_style2);
if ($selected_id != -1)
{
$_POST['name'] = $myrow["pos_name"];
$_POST['location'] = $myrow["pos_location"];
$_POST['account'] = $myrow["pos_account"];
- $_POST['credit_sale'] = $myrow["credit_sale"];
- $_POST['cash_sale'] = $myrow["cash_sale"];
+ if ($myrow["credit_sale"]) $_POST['credit_sale'] = 1;
+ if ($myrow["cash_sale"]) $_POST['cash_sale'] = 1;
}
hidden('selected_id', $selected_id);
}
text_row_ex(_("Point of Sale Name").':', 'name', 20, 30);
-check_row(_('Allowed credit sale'), 'credit', null);
-check_row(_('Allowed cash sale'), 'cash', null);
+check_row(_('Allowed credit sale'), 'credit', check_value('credit_sale'));
+check_row(_('Allowed cash sale'), 'cash', check_value('cash_sale'));
locations_list_row(_("POS location").':', 'location');
cash_accounts_list_row(_("Default cash account").':', 'account');