Fixed a couple of problems in installation procedures.
[fa-stable.git] / purchasing / inquiry / supplier_inquiry.php
index d1e2ee82f4ebc3fc4f070f7e3242d047952ee809..b0f045258363032ebc79ec5bff79b0357d8ece4c 100644 (file)
@@ -18,9 +18,9 @@ include_once($path_to_root . "/purchasing/includes/purchasing_ui.inc");
 include_once($path_to_root . "/reporting/includes/reporting.inc");
 
 $js = "";
-if ($use_popup_windows)
+if ($SysPrefs->use_popup_windows)
        $js .= get_js_open_window(900, 500);
-if ($use_date_picker)
+if (user_use_date_picker())
        $js .= get_js_date_picker();
 page(_($help_context = "Supplier Inquiry"), isset($_GET['supplier_id']), false, "", $js);
 
@@ -47,7 +47,7 @@ start_row();
 if (!$page_nested)
        supplier_list_cells(_("Select a supplier:"), 'supplier_id', null, true, false, false, 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');
 
 supp_transactions_list_cell("filterType", null, true);
@@ -163,11 +163,11 @@ function check_overdue($row)
 
 function edit_link($row)
 {
-       return edit_trans_link($row['type'], $row['trans_no']);
+       return trans_editor_link($row['type'], $row['trans_no']);
 }
 //------------------------------------------------------------------------------------------------
 
-$sql = get_sql_for_supplier_inquiry();
+$sql = get_sql_for_supplier_inquiry(get_post('filterType'), get_post('TransAfterDate'), get_post('TransToDate'), get_post('supplier_id'));
 
 $cols = array(
                        _("Type") => array('fun'=>'systype_name', 'ord'=>''), 
@@ -203,4 +203,3 @@ display_db_pager($table);
 end_form();
 end_page();
 
-?>