Unnecesary direct access to user setting superseded by calls to user_* functions.
[fa-stable.git] / purchasing / inquiry / supplier_allocation_inquiry.php
index eea7418d7f45ef52a4bfbcf1b1135bfcf2acbbd2..84fb2e12a9d3b2ca1d50ad6f8433dfc5b4e36792 100644 (file)
@@ -16,7 +16,7 @@ include($path_to_root . "/includes/session.inc");
 
 include($path_to_root . "/purchasing/includes/purchasing_ui.inc");
 $js = "";
-if ($use_popup_windows)
+if ($SysPrefs->use_popup_windows)
        $js .= get_js_open_window(900, 500);
 if (user_use_date_picker())
        $js .= get_js_date_picker();
@@ -47,7 +47,7 @@ start_row();
 
 supplier_list_cells(_("Select a supplier: "), 'supplier_id', $_POST['supplier_id'], true);
 
-date_cells(_("From:"), 'TransAfterDate', '', null, -$_SESSION["wa_current_user"]->prefs->transaction_days());
+date_cells(_("From:"), 'TransAfterDate', '', null, -user_transaction_days());
 date_cells(_("To:"), 'TransToDate', '', null, 1);
 
 supp_allocations_list_cell("filterType", null);
@@ -120,8 +120,8 @@ function fmt_credit($row)
 }
 //------------------------------------------------------------------------------------------------
 
-$sql = get_sql_for_supplier_allocation_inquiry($_POST['TransAfterDate'],$_POST['TransToDate'],
-       $_POST['filterType'], $_POST['supplier_id'], check_value('showSettled'));
+$sql = get_sql_for_supplier_allocation_inquiry(get_post('TransAfterDate'),get_post('TransToDate'),
+       get_post('filterType'), get_post('supplier_id'), check_value('showSettled'));
 
 $cols = array(
        _("Type") => array('fun'=>'systype_name'),
@@ -154,4 +154,3 @@ display_db_pager($table);
 
 end_form();
 end_page();
-?>