- // check if it's an overdue work order
- if (!$myrow["closed"] && date_diff(Today(), sql2date($myrow["required_by"]), "d") > 0)
- {
- start_row("class='overduebg'");
- }
- else
- alt_table_row_color($k);
-
- $dec = get_qty_dec($myrow["stock_id"]);
- label_cell(get_trans_view_str(systypes::work_order(), $myrow["id"]));
- label_cell(get_trans_view_str(systypes::work_order(), $myrow["id"], $myrow["wo_ref"]));
- label_cell(wo_types::name($myrow["type"]));
- label_cell($myrow["location_name"]);
- view_stock_status_cell($myrow["stock_id"], $myrow["description"]);
- qty_cell($myrow["units_reqd"], false, $dec);
- qty_cell($myrow["units_issued"], false, $dec);
- label_cell(sql2date($myrow["date_"]));
- label_cell(sql2date($myrow["required_by"]));
-
- $l1 = $l2 = $l3 = $l4 = '';
- if ($myrow["closed"] == 0)
- {
- $modify_page = $path_to_root . "/manufacturing/work_order_entry.php?" . SID . "trans_no=" . $myrow["id"];
- $l1 = "<a href=$modify_page>"._('Edit').'</a>';
- if ($myrow["released"] == 0)
- {
- $release_page = $path_to_root . "/manufacturing/work_order_release.php?" . SID . "trans_no=" . $myrow["id"];
- $l2 = "<a href=$release_page>"._('Release').'</a>';
- }
- else
- {
- $issue = $path_to_root . "/manufacturing/work_order_issue.php?" . SID . "trans_no=" .$myrow["id"];
- $add_finished = $path_to_root . "/manufacturing/work_order_add_finished.php?" . SID . "trans_no=" .$myrow["id"];
- $costs = $path_to_root . "/gl/gl_payment.php?NewPayment=1&PayType=" . payment_person_types::WorkOrder(). "&PayPerson=" .$myrow["id"];
- $l2 = "<a href=$issue>" . _("Issue") . "</a>";
- $l3 = "<a href=$add_finished>" . _("Produce") . "</a>";
- $l4 = "<a href=$costs>" . _("Costs") . "</a>";
- }
- }
- else
- {
- $l1 = "<i>"._('Closed')."</i>";
- }
- label_cell($l1);
- label_cell($l2);
- label_cell($l3);
- label_cell($l4);
- label_cell(get_gl_view_str(systypes::work_order(), $myrow["id"]));
-
- end_row();
-
- $j++;
- If ($j == 12)
- {
- $j = 1;
- table_header($th);
- }
- //end of page full new headings if