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))
{
function edit_link($row)
{
return $row['closed'] ? '<i>'._('Closed').'</i>' :
- 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)
function view_gl_link($row)
{
- if ($row['closed'] == 0)
- return '';
+ //if ($row['closed'] == 0)
+ // return '';
return get_gl_view_str(ST_WORKORDER, $row['id']);
}
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('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'),
end_form();
end_page();
-?>