Fixed editable line layout.
[fa-stable.git] / manufacturing / view / wo_issue_view.php
index 19b62bc0b359153968912f9baef52ffee573ba2a..80f624c4df5a6fc5726731e75d1242a80b16e63b 100644 (file)
@@ -1,10 +1,22 @@
 <?php
-
+/**********************************************************************
+    Copyright (C) FrontAccounting, LLC.
+       Released under the terms of the GNU General Public License, GPL, 
+       as published by the Free Software Foundation, either version 3 
+       of the License, or (at your option) any later version.
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
+    See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
+***********************************************************************/
 $page_security = 10;
 $path_to_root="../..";
 include_once($path_to_root . "/includes/session.inc");
 
-page(_("View Work Order Issue"), true);
+$js = "";
+if ($use_popup_windows)
+       $js .= get_js_open_window(900, 500);
+page(_("View Work Order Issue"), true, false, "", $js);
 
 include_once($path_to_root . "/includes/date_functions.inc");
 include_once($path_to_root . "/includes/manufacturing.inc");
@@ -15,7 +27,7 @@ include_once($path_to_root . "/manufacturing/includes/manufacturing_ui.inc");
 
 //-------------------------------------------------------------------------------------------------
 
-if ($_GET['trans_no'] != "") 
+if ($_GET['trans_no'] != "")
 {
        $wo_issue_no = $_GET['trans_no'];
 }
@@ -28,10 +40,11 @@ function display_wo_issue($issue_no)
 
     $myrow = get_work_order_issue($issue_no);
 
+       br(1);
     start_table($table_style);
     $th = array(_("Issue #"), _("Reference"), _("For Work Order #"),
        _("Item"), _("From Location"), _("To Work Centre"), _("Date of Issue"));
-    table_header($th); 
+    table_header($th);
 
        start_row();
        label_cell($myrow["issue_no"]);
@@ -60,9 +73,9 @@ function display_wo_issue_details($issue_no)
 
     if (db_num_rows($result) == 0)
     {
-       echo "<br>" . _("There are no items for this issue.");
-    } 
-    else 
+       display_note(_("There are no items for this issue."));
+    }
+    else
     {
         start_table($table_style);
         $th = array(_("Component"), _("Quantity"), _("Units"));
@@ -74,13 +87,13 @@ function display_wo_issue_details($issue_no)
 
         $total_cost = 0;
 
-        while ($myrow = db_fetch($result)) 
+        while ($myrow = db_fetch($result))
         {
 
                        alt_table_row_color($k);
 
                label_cell($myrow["stock_id"]  . " - " . $myrow["description"]);
-            qty_cell($myrow["qty_issued"]);
+            qty_cell($myrow["qty_issued"], false, get_qty_dec($myrow["stock_id"]));
                        label_cell($myrow["units"]);
                        end_row();;