Added comment to SECURE_ONLY constant.
[fa-stable.git] / sales / manage / sales_types.php
index bc54f635595860db19096be4d749846847a302ba..ebf3a96f3277ad151c881eb8089a1d109d5ee68e 100644 (file)
@@ -43,7 +43,7 @@ function can_process()
 
 if ($Mode=='ADD_ITEM' && can_process())
 {
-       add_sales_type($_POST['sales_type'], isset($_POST['tax_included']) ? 1:0,
+       add_sales_type($_POST['sales_type'], check_value('tax_included'),
            input_num('factor'));
        display_notification(_('New sales type has been added'));
        $Mode = 'RESET';
@@ -54,7 +54,7 @@ if ($Mode=='ADD_ITEM' && can_process())
 if ($Mode=='UPDATE_ITEM' && can_process())
 {
 
-       update_sales_type($selected_id, $_POST['sales_type'], isset($_POST['tax_included']) ? 1:0,
+       update_sales_type($selected_id, $_POST['sales_type'], check_value('tax_included'),
             input_num('factor'));
        display_notification(_('Selected sales type has been updated'));
        $Mode = 'RESET';
@@ -98,7 +98,7 @@ if ($Mode == 'RESET')
 $result = get_all_sales_types(check_value('show_inactive'));
 
 start_form();
-start_table("$table_style width=30%");
+start_table(TABLESTYLE, "width='30%'");
 
 $th = array (_('Type Name'), _('Factor'), _('Tax Incl'), '','');
 inactive_control_column($th);
@@ -134,7 +134,7 @@ display_note(_("Marked sales type is the company base pricelist for prices calcu
  if (!isset($_POST['base']))
        $_POST['base'] = 0;
 
-start_table($table_style2);
+start_table(TABLESTYLE2);
 
 if ($selected_id != -1)
 {
@@ -163,4 +163,3 @@ end_form();
 
 end_page();
 
-?>