Better color in data picker
[fa-stable.git] / manufacturing / includes / manufacturing_ui.inc
index eb14c8a11c64dcd3309d2e873845beda9fcc7769..6726fb34c958c2813aae1e82acc77374edf4a582 100644 (file)
@@ -1,5 +1,14 @@
 <?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>.
+***********************************************************************/
 include_once($path_to_root . "/includes/ui.inc");
 
 //--------------------------------------------------------------------------------------
@@ -37,7 +46,7 @@ function display_bom($item_check)
                        label_cell($myrow["description"]);
                        label_cell($myrow["WorkCentreDescription"]);
                        label_cell($myrow["location_name"]);
-                       qty_cell($myrow["quantity"]);
+                       qty_cell($myrow["quantity"], false, get_qty_dec($myrow["component"]));
                        amount_cell($myrow["standard_cost"]);
                        amount_cell($myrow["ComponentCost"]);
                        end_row();
@@ -88,7 +97,7 @@ function display_wo_requirements($woid, $quantity, $show_qoh=false, $date=null)
         {
 
                        $qoh = 0;
-
+                       $show_qoh = true;
                        // if it's a non-stock item (eg. service) don't show qoh
                        if (!has_stock_holding($myrow["mb_flag"]))
                                $show_qoh = false;
@@ -113,11 +122,12 @@ function display_wo_requirements($woid, $quantity, $show_qoh=false, $date=null)
 
                        label_cell($myrow["location_name"]);
                        label_cell($myrow["WorkCentreDescription"]);
-            qty_cell($myrow["units_req"]);
-                       qty_cell($myrow["units_req"] * $quantity);
-            qty_cell($myrow["units_issued"]);
+                       $dec = get_qty_dec($myrow["stock_id"]);
+            qty_cell($myrow["units_req"], false, $dec);
+                       qty_cell($myrow["units_req"] * $quantity, false, $dec);
+            qty_cell($myrow["units_issued"], false, $dec);
                        if ($show_qoh)
-                               qty_cell($qoh);
+                               qty_cell($qoh, false, $dec);
                        else
                                label_cell("");
                        end_row();
@@ -163,7 +173,7 @@ function display_wo_productions($woid)
                label_cell(get_trans_view_str(29, $myrow["id"]));
                        label_cell($myrow['reference']);
                        label_cell(sql2date($myrow["date_"]));
-                       qty_cell($myrow['quantity']);
+                       qty_cell($myrow['quantity'], false, get_qty_dec($myrow['reference']));
                        end_row();
                }//end of while
 
@@ -284,13 +294,13 @@ function display_wo_details($woid, $suppress_view_link=false)
        label_cell($myrow["location_name"]);
        label_cell(sql2date($myrow["date_"]));
        label_cell(sql2date($myrow["required_by"]));
-
-       qty_cell($myrow["units_reqd"]);
+       $dec = get_qty_dec($myrow["stock_id"]);
+       qty_cell($myrow["units_reqd"], false, $dec);
 
        if ($myrow["released"] == true)
        {
                label_cell(sql2date($myrow["released_date"]));
-               qty_cell($myrow["units_issued"]);
+               qty_cell($myrow["units_issued"], false, $dec);
        }
        end_row();
 
@@ -335,7 +345,7 @@ function display_wo_details_quick($woid, $suppress_view_link=false)
        label_cell($myrow["location_name"]);
        label_cell(sql2date($myrow["date_"]));
 
-       qty_cell($myrow["units_issued"]);
+       qty_cell($myrow["units_issued"], false, get_qty_dec($myrow["stock_id"]));
 
        end_row();