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 (user_use_date_picker())
$js .= get_js_date_picker();
start_row();
ref_cells(_("#:"), 'order_number', '',null, '', true);
-date_cells(_("from:"), 'OrdersAfterDate', '', null, -$_SESSION["wa_current_user"]->prefs->transaction_days());
+date_cells(_("from:"), 'OrdersAfterDate', '', null, -user_transaction_days());
date_cells(_("to:"), 'OrdersToDate');
locations_list_cells(_("Location:"), 'StockLocation', null, true);
function edit_link($row)
{
- return pager_link( _("Edit"),
- "/purchasing/po_entry_items.php?ModifyOrderNumber=" . $row["order_no"], ICON_EDIT);
+ return trans_editor_link(ST_PURCHORDER, $row["order_no"]);
}
function prt_link($row)
{
- return print_document_link($row['order_no'], _("Print"), true, 18, ICON_PRINT);
+ return print_document_link($row['order_no'], _("Print"), true, ST_PURCHORDER, ICON_PRINT);
}
function receive_link($row)
}
//---------------------------------------------------------------------------------------------
-if (isset($_POST['order_number']) && ($_POST['order_number'] != ""))
-{
- $order_number = $_POST['order_number'];
-}
-
//figure out the sql required from the inputs available
-$sql = get_sql_for_po_search($_POST['OrdersAfterDate'], $_POST['OrdersToDate'], $_POST['supplier_id'],
- $_POST['StockLocation']);
+$sql = get_sql_for_po_search(get_post('OrdersAfterDate'), get_post('OrdersToDate'), get_post('supplier_id'), get_post('StockLocation'),
+ $_POST['order_number'], get_post('SelectStockFromList'));
//$result = db_query($sql,"No orders were returned");
array('insert'=>true, 'fun'=>'receive_link')
);
-if (get_post('StockLocation') != $all_items) {
+if (get_post('StockLocation') != ALL_TEXT) {
$cols[_("Location")] = 'skip';
}
end_form();
end_page();
-?>