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/data_checks.inc");
20 include_once($path_to_root . "/manufacturing/includes/manufacturing_db.inc");
21 include_once($path_to_root . "/manufacturing/includes/manufacturing_ui.inc");
23 if ($SysPrefs->use_popup_windows)
24 $js .= get_js_open_window(800, 500);
25 page(_($help_context = "View Work Order"), true, false, "", $js);
27 //-------------------------------------------------------------------------------------------------
29 if ($_GET['trans_no'] != "")
31 $woid = $_GET['trans_no'];
34 display_heading($systypes_array[ST_WORKORDER] . " # " . $woid);
37 $myrow = get_work_order($woid);
39 if ($myrow["type"] == WO_ADVANCED)
40 display_wo_details($woid, true);
42 display_wo_details_quick($woid, true);
46 // display the WO requirements
48 if ($myrow["released"] == false)
50 display_heading2(_("BOM for item:") . " " . $myrow["StockItemName"]);
51 display_bom($myrow["stock_id"]);
55 display_heading2(_("Work Order Requirements"));
56 display_wo_requirements($woid, $myrow["units_reqd"]);
57 if ($myrow["type"] == WO_ADVANCED)
59 echo "<br><table cellspacing=7><tr valign=top><td>";
60 display_heading2(_("Issues"));
61 display_wo_issues($woid);
63 display_heading2(_("Productions"));
64 display_wo_productions($woid);
66 display_heading2(_("Additional Costs"));
67 display_wo_payments($woid);
68 echo "</td></tr></table>";
72 echo "<br><table cellspacing=7><tr valign=top><td>";
73 display_heading2(_("Additional Costs"));
74 display_wo_payments($woid);
75 echo "</td></tr></table>";
81 is_voided_display(ST_WORKORDER, $woid, _("This work order has been voided."));
83 end_page(true, false, false, ST_WORKORDER, $woid);