MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
***********************************************************************/
-$page_security = 2;
-$path_to_root="..";
+$page_security = 'SA_MANUFTRANSVIEW';
+$path_to_root = "..";
include($path_to_root . "/includes/db_pager.inc");
include_once($path_to_root . "/includes/session.inc");
function check_overdue($row)
{
return (!$row["closed"]
- && date_diff(Today(), sql2date($row["required_by"]), "d") > 0);
+ && date_diff2(Today(), sql2date($row["required_by"]), "d") > 0);
}
function view_link($dummy, $order_no)
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)
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);