X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=purchasing%2Finquiry%2Fpo_search_completed.php;h=a7495eab100e172acbdf4a9c3f0d47612a6b224b;hb=7561718ee5113232ce917f63085d272884b0929c;hp=8ff321b8b62c3be0a27163fb85ffb85b21055911;hpb=5b8f4c4b4aa8cf996bc071f116bfce1273200fa2;p=fa-stable.git diff --git a/purchasing/inquiry/po_search_completed.php b/purchasing/inquiry/po_search_completed.php index 8ff321b8..a7495eab 100644 --- a/purchasing/inquiry/po_search_completed.php +++ b/purchasing/inquiry/po_search_completed.php @@ -16,8 +16,9 @@ include_once($path_to_root . "/includes/session.inc"); 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 (user_use_date_picker()) $js .= get_js_date_picker(); @@ -59,7 +60,7 @@ start_table(TABLESTYLE_NOBORDER); 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(_("into location:"), 'StockLocation', null, true); @@ -71,13 +72,28 @@ start_row(); stock_items_list_cells(_("for item:"), 'SelectStockFromList', null, true); -if (!@$_GET['popup']) +if (!$page_nested) supplier_list_cells(_("Select a supplier: "), 'supplier_id', null, true, true); submit_cells('SearchOrders', _("Search"),'',_('Select documents'), 'default'); end_row(); end_table(1); //--------------------------------------------------------------------------------------------- +if (isset($_POST['order_number'])) +{ + $order_number = $_POST['order_number']; +} + +if (isset($_POST['SelectStockFromList']) && ($_POST['SelectStockFromList'] != "") && + ($_POST['SelectStockFromList'] != ALL_TEXT)) +{ + $selected_stock_item = $_POST['SelectStockFromList']; +} +else +{ + unset($selected_stock_item); +} +//--------------------------------------------------------------------------------------------- function trans_view($trans) { @@ -88,11 +104,8 @@ function edit_link($row) { global $page_nested; - if ($page_nested) - return ''; - return pager_link( _("Edit"), - "/purchasing/po_entry_items.php?" . SID - . "ModifyOrderNumber=" . $row["order_no"], ICON_EDIT); + return $page_nested ? '' : + trans_editor_link(ST_PURCHORDER, $row["order_no"]); } function prt_link($row) @@ -103,8 +116,7 @@ function prt_link($row) //--------------------------------------------------------------------------------------------- $sql = get_sql_for_po_search_completed(get_post('OrdersAfterDate'), get_post('OrdersToDate'), - @$_GET['popup'] ? ALL_TEXT : get_post('supplier_id'), - get_post('StockLocation'), get_post('order_number'), get_post('SelectStockFromList')); + get_post('supplier_id'), get_post('StockLocation'), get_post('order_number'), get_post('SelectStockFromList')); $cols = array( _("#") => array('fun'=>'trans_view', 'ord'=>''), @@ -119,9 +131,10 @@ $cols = array( array('insert'=>true, 'fun'=>'prt_link'), ); -if (get_post('StockLocation') != $all_items) { +if (get_post('StockLocation') != ALL_TEXT) { $cols[_("Location")] = 'skip'; } + //--------------------------------------------------------------------------------------------------- $table =& new_db_pager('orders_tbl', $sql, $cols);