2 /**********************************************************************
3 Copyright (C) FrontAccounting, LLC.
4 Released under the terms of the GNU Affero General Public License,
5 AGPL, as published by the Free Software Foundation, either version
6 3 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/agpl-3.0.html>.
11 ***********************************************************************/
13 $path_to_root="../..";
15 include_once($path_to_root . "/includes/session.inc");
18 if ($use_popup_windows)
19 $js .= get_js_open_window(900, 500);
20 page(_("View Work Order Production"), true, false, "", $js);
22 include_once($path_to_root . "/includes/date_functions.inc");
23 include_once($path_to_root . "/includes/manufacturing.inc");
24 include_once($path_to_root . "/includes/data_checks.inc");
26 include_once($path_to_root . "/manufacturing/includes/manufacturing_db.inc");
27 include_once($path_to_root . "/manufacturing/includes/manufacturing_ui.inc");
29 //-------------------------------------------------------------------------------------------------
31 if ($_GET['trans_no'] != "")
33 $wo_production = $_GET['trans_no'];
36 //-------------------------------------------------------------------------------------------------
38 function display_wo_production($prod_id)
42 $myrow = get_work_order_produce($prod_id);
45 start_table($table_style);
46 $th = array(_("Production #"), _("Reference"), _("For Work Order #"),
47 _("Item"), _("Quantity Manufactured"), _("Date"));
51 label_cell($myrow["id"]);
52 label_cell($myrow["reference"]);
53 label_cell(get_trans_view_str(systypes::work_order(),$myrow["workorder_id"]));
54 label_cell($myrow["stock_id"] . " - " . $myrow["StockDescription"]);
55 qty_cell($myrow["quantity"], false, get_qty_dec($myrow["stock_id"]));
56 label_cell(sql2date($myrow["date_"]));
59 comments_display_row(29, $prod_id);
63 is_voided_display(29, $prod_id, _("This production has been voided."));
66 //-------------------------------------------------------------------------------------------------
68 display_heading(systypes::name(29) . " # " . $wo_production);
70 display_wo_production($wo_production);
72 //-------------------------------------------------------------------------------------------------