X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=manufacturing%2Fsearch_work_orders.php;h=1c407b6487eb81087249a0dcd10bdcd2280db564;hb=6bcd87642330092910f5d6977845a76ac59350ac;hp=6d52e5f5ff57ba08bd000754a35cb30aa867099c;hpb=d9b4de9d7e9d3ba77f6ece752fd6cc988effd8f1;p=fa-stable.git diff --git a/manufacturing/search_work_orders.php b/manufacturing/search_work_orders.php index 6d52e5f5..1c407b64 100644 --- a/manufacturing/search_work_orders.php +++ b/manufacturing/search_work_orders.php @@ -17,7 +17,7 @@ include_once($path_to_root . "/includes/session.inc"); include_once($path_to_root . "/includes/date_functions.inc"); include_once($path_to_root . "/manufacturing/includes/manufacturing_ui.inc"); $js = ""; -if ($use_popup_windows) +if ($SysPrefs->use_popup_windows) $js .= get_js_open_window(800, 500); if (isset($_GET['outstanding_only']) && ($_GET['outstanding_only'] == true)) { @@ -64,10 +64,16 @@ start_form(false, false, $_SERVER['PHP_SELF'] ."?outstanding_only=$outstanding_o start_table(TABLESTYLE_NOBORDER); start_row(); +ref_cells(_("#:"), 'OrderId', '',null, '', true); ref_cells(_("Reference:"), 'OrderNumber', '',null, '', true); locations_list_cells(_("at Location:"), 'StockLocation', null, true); +end_row(); +end_table(); +start_table(TABLESTYLE_NOBORDER); +start_row(); + check_cells( _("Only Overdue:"), 'OverdueOnly', null); if ($outstanding_only==0) @@ -106,8 +112,7 @@ function wo_type_name($dummy, $type) function edit_link($row) { return $row['closed'] ? ''._('Closed').'' : - pager_link(_("Edit"), - "/manufacturing/work_order_entry.php?trans_no=" . $row["id"], ICON_EDIT); + trans_editor_link(ST_WORKORDER, $row["id"]); } function release_link($row) @@ -130,12 +135,6 @@ function produce_link($row) function costs_link($row) { -/* - return $row["closed"] || !$row["released"] ? '' : - pager_link(_('Costs'), - "/gl/gl_bank.php?NewPayment=1&PayType=" - .PT_WORKORDER. "&PayPerson=" .$row["id"]); -*/ return $row["closed"] || !$row["released"] ? '' : pager_link(_('Costs'), "/manufacturing/work_order_costs.php?trans_no=" .$row["id"]); @@ -143,8 +142,6 @@ function costs_link($row) function view_gl_link($row) { - if ($row['closed'] == 0) - return ''; return get_gl_view_str(ST_WORKORDER, $row['id']); } @@ -153,22 +150,23 @@ function dec_amount($row, $amount) return number_format2($amount, $row['decimals']); } -$sql = get_sql_for_work_orders($outstanding_only, $all_items); +$sql = get_sql_for_work_orders($outstanding_only, get_post('SelectedStockItem'), get_post('StockLocation'), + get_post('OrderId'), get_post('OrderNumber'), check_value('OverdueOnly')); $cols = array( - _("#") => array('fun'=>'view_link'), + _("#") => array('fun'=>'view_link', 'ord'=>''), _("Reference"), // viewlink 2 ? _("Type") => array('fun'=>'wo_type_name'), _("Location"), - _("Item") => array('fun'=>'view_stock'), + _("Item") => array('fun'=>'view_stock', 'ord'=>''), _("Required") => array('fun'=>'dec_amount', 'align'=>'right'), _("Manufactured") => array('fun'=>'dec_amount', 'align'=>'right'), - _("Date") => 'date', + _("Date") => array('name'=>'date_', 'type'=>'date', 'ord'=>'desc'), _("Required By") => array('type'=>'date', 'ord'=>''), array('insert'=>true, 'fun'=> 'edit_link'), array('insert'=>true, 'fun'=> 'release_link'), - array('insert'=>true, 'fun'=> 'produce_link'), array('insert'=>true, 'fun'=> 'costs_link'), + array('insert'=>true, 'fun'=> 'produce_link'), array('insert'=>true, 'fun'=> 'view_gl_link') ); @@ -181,4 +179,3 @@ display_db_pager($table); end_form(); end_page(); -?>