5 include_once($path_to_root . "/includes/session.inc");
8 if ($use_popup_windows)
9 $js .= get_js_open_window(900, 500);
10 page(_("View Work Order Issue"), true, false, "", $js);
12 include_once($path_to_root . "/includes/date_functions.inc");
13 include_once($path_to_root . "/includes/manufacturing.inc");
14 include_once($path_to_root . "/includes/data_checks.inc");
16 include_once($path_to_root . "/manufacturing/includes/manufacturing_db.inc");
17 include_once($path_to_root . "/manufacturing/includes/manufacturing_ui.inc");
19 //-------------------------------------------------------------------------------------------------
21 if ($_GET['trans_no'] != "")
23 $wo_issue_no = $_GET['trans_no'];
26 //-------------------------------------------------------------------------------------------------
28 function display_wo_issue($issue_no)
32 $myrow = get_work_order_issue($issue_no);
35 start_table($table_style);
36 $th = array(_("Issue #"), _("Reference"), _("For Work Order #"),
37 _("Item"), _("From Location"), _("To Work Centre"), _("Date of Issue"));
41 label_cell($myrow["issue_no"]);
42 label_cell($myrow["reference"]);
43 label_cell(get_trans_view_str(systypes::work_order(),$myrow["workorder_id"]));
44 label_cell($myrow["stock_id"] . " - " . $myrow["description"]);
45 label_cell($myrow["location_name"]);
46 label_cell($myrow["WorkCentreName"]);
47 label_cell(sql2date($myrow["issue_date"]));
50 comments_display_row(28, $issue_no);
54 is_voided_display(28, $issue_no, _("This issue has been voided."));
57 //-------------------------------------------------------------------------------------------------
59 function display_wo_issue_details($issue_no)
63 $result = get_work_order_issue_details($issue_no);
65 if (db_num_rows($result) == 0)
67 display_note(_("There are no items for this issue."));
71 start_table($table_style);
72 $th = array(_("Component"), _("Quantity"), _("Units"));
77 $k = 0; //row colour counter
81 while ($myrow = db_fetch($result))
84 alt_table_row_color($k);
86 label_cell($myrow["stock_id"] . " - " . $myrow["description"]);
87 qty_cell($myrow["qty_issued"], false, get_qty_dec($myrow["stock_id"]));
88 label_cell($myrow["units"]);
96 }//end of page full new headings if
103 //-------------------------------------------------------------------------------------------------
105 display_heading(systypes::name(28) . " # " . $wo_issue_no);
107 display_wo_issue($wo_issue_no);
109 display_heading2(_("Items for this Issue"));
111 display_wo_issue_details($wo_issue_no);
113 //-------------------------------------------------------------------------------------------------