Paged transaction inquiries optimized for maximum links, continued.
[fa-stable.git] / manufacturing / search_work_orders.php
index 1c407b6487eb81087249a0dcd10bdcd2280db564..4762881ff7f2dbc1e818a23bb2c3703870f5549d 100644 (file)
@@ -16,6 +16,8 @@ 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");
+include_once($path_to_root . "/reporting/includes/reporting.inc");
+
 $js = "";
 if ($SysPrefs->use_popup_windows)
        $js .= get_js_open_window(800, 500);
@@ -145,6 +147,11 @@ function view_gl_link($row)
        return get_gl_view_str(ST_WORKORDER, $row['id']);
 }
 
+function prt_link($row)
+{
+       return print_document_link($row['id'], _("Print"), true, ST_WORKORDER, ICON_PRINT);
+}
+
 function dec_amount($row, $amount)
 {
        return number_format2($amount, $row['decimals']);
@@ -163,11 +170,12 @@ $cols = array(
        _("Manufactured") => array('fun'=>'dec_amount', 'align'=>'right'),
        _("Date") => array('name'=>'date_', 'type'=>'date', 'ord'=>'desc'), 
        _("Required By") => array('type'=>'date', 'ord'=>''),
+       array('insert'=>true, 'fun'=> 'view_gl_link'),
        array('insert'=>true, 'fun'=> 'edit_link'),
        array('insert'=>true, 'fun'=> 'release_link'),
        array('insert'=>true, 'fun'=> 'costs_link'),
        array('insert'=>true, 'fun'=> 'produce_link'),
-       array('insert'=>true, 'fun'=> 'view_gl_link')
+       array('insert'=>true, 'fun'=> 'prt_link')
 );
 
 $table =& new_db_pager('orders_tbl', $sql, $cols);