X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=manufacturing%2Fsearch_work_orders.php;h=f4cf1624d38bb82c9b4053ca3b3eadd217a6a827;hb=5dec41f0d87e407e1c9ffcb8eb63b92e4e471a9b;hp=15b466ce12131f7929430dc130e355e3576c2a30;hpb=a5242af68e65661edb7175412444dce536a7f311;p=fa-stable.git diff --git a/manufacturing/search_work_orders.php b/manufacturing/search_work_orders.php index 15b466ce..f4cf1624 100644 --- a/manufacturing/search_work_orders.php +++ b/manufacturing/search_work_orders.php @@ -60,7 +60,7 @@ if (isset($_GET["stock_id"])) //-------------------------------------------------------------------------------------- -start_form(false, false, $_SERVER['PHP_SELF'] ."?outstanding_only=" . $outstanding_only .SID); +start_form(false, false, $_SERVER['PHP_SELF'] ."?outstanding_only=$outstanding_only"); start_table("class='tablestyle_noborder'"); start_row(); @@ -75,7 +75,7 @@ if ($outstanding_only==0) stock_manufactured_items_list_cells(_("for item:"), 'SelectedStockItem', null, true); -submit_cells('SearchOrders', _("Search"),'',_('Select documents'), true); +submit_cells('SearchOrders', _("Search"),'',_('Select documents'), 'default'); end_row(); end_table(); @@ -130,10 +130,22 @@ function produce_link($row) function costs_link($row) { +/* return $row["closed"] || !$row["released"] ? '' : pager_link(_('Costs'), "/gl/gl_bank.php?NewPayment=1&PayType=" .payment_person_types::WorkOrder(). "&PayPerson=" .$row["id"]); +*/ + return $row["closed"] || !$row["released"] ? '' : + pager_link(_('Costs'), + "/manufacturing/work_order_costs.php?trans_no=" .$row["id"]); +} + +function view_gl_link($row) +{ + if ($row['closed'] == 0) + return ''; + return get_gl_view_str(systypes::work_order(), $row['id']); } function dec_amount($row, $amount) @@ -204,7 +216,8 @@ $cols = array( 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'=> 'costs_link'), + array('insert'=>true, 'fun'=> 'view_gl_link') ); $table =& new_db_pager('orders_tbl', $sql, $cols);