2 /**********************************************************************
3 Copyright (C) FrontAccounting, LLC.
4 Released under the terms of the GNU General Public License, GPL,
5 as published by the Free Software Foundation, either version 3
6 of the License, or (at your option) any later version.
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
11 ***********************************************************************/
12 $page_security = 'SA_MANUFTRANSVIEW';
13 $path_to_root = "../..";
15 include_once($path_to_root . "/includes/session.inc");
17 include_once($path_to_root . "/includes/date_functions.inc");
18 include_once($path_to_root . "/includes/manufacturing.inc");
19 include_once($path_to_root . "/includes/data_checks.inc");
21 include_once($path_to_root . "/manufacturing/includes/manufacturing_db.inc");
22 include_once($path_to_root . "/manufacturing/includes/manufacturing_ui.inc");
24 if ($use_popup_windows)
25 $js .= get_js_open_window(800, 500);
26 page(_($help_context = "View Work Order"), true, false, "", $js);
28 //-------------------------------------------------------------------------------------------------
30 if ($_GET['trans_no'] != "")
32 $woid = $_GET['trans_no'];
35 display_heading($systypes_array[ST_WORKORDER] . " # " . $woid);
38 $myrow = get_work_order($woid);
40 if ($myrow["type"] == WO_ADVANCED)
41 display_wo_details($woid, true);
43 display_wo_details_quick($woid, true);
47 // display the WO requirements
49 if ($myrow["released"] == false)
51 display_heading2(_("BOM for item:") . " " . $myrow["StockItemName"]);
52 display_bom($myrow["stock_id"]);
56 display_heading2(_("Work Order Requirements"));
57 display_wo_requirements($woid, $myrow["units_reqd"]);
58 if ($myrow["type"] == WO_ADVANCED)
60 echo "<br><table cellspacing=7><tr valign=top><td>";
61 display_heading2(_("Issues"));
62 display_wo_issues($woid);
64 display_heading2(_("Productions"));
65 display_wo_productions($woid);
67 display_heading2(_("Additional Costs"));
68 display_wo_payments($woid);
69 echo "</td></tr></table>";
73 echo "<br><table cellspacing=7><tr valign=top><td>";
74 display_heading2(_("Additional Costs"));
75 display_wo_payments($woid);
76 echo "</td></tr></table>";
82 is_voided_display(ST_WORKORDER, $woid, _("This work order has been voided."));
84 end_page(true, false, false, ST_WORKORDER, $woid);