Overhead and labour cost changed to define standard costs.
[fa-stable.git] / manufacturing / includes / manufacturing_ui.inc
index 2d55477ba767fb01651173eb6e5ea9ac930b1359..71997576d292b6c16e00e7941f5072fdb5d7f037 100644 (file)
@@ -26,7 +26,7 @@ function display_bom($item_check)
 
         start_table(TABLESTYLE);
         $th = array(_("Component"), _("Description"), _("Work Centre"),
-               _("From Location"), _("Quantity"), _("Unit Cost"), _("Total Cost"));
+               _("From Location"), _("Quantity"), _("Unit Cost"), _("Cost"));
 
         table_header($th);
 
@@ -45,19 +45,34 @@ function display_bom($item_check)
                        label_cell($myrow["WorkCentreDescription"]);
                        label_cell($myrow["location_name"]);
                        qty_cell($myrow["quantity"], false, get_qty_dec($myrow["component"]));
-                       amount_cell($myrow["standard_cost"]);
+                       amount_cell($myrow["ProductCost"]);
                        amount_cell($myrow["ComponentCost"]);
                        end_row();
                $total_cost += $myrow["ComponentCost"];
 
                $j++;
-               If ($j == 12)
+               if ($j == 12)
                {
                        $j = 1;
                        table_header($th);
-               }//end of page full new headings if
-               }//end of while
+               }
+               }
 
+               $item = get_item($item_check);
+               if ($item['labour_cost'] != 0)
+               {
+                       alt_table_row_color($k);
+               label_cells(_("Standard Labour Cost"), number_format2($item['labour_cost'],user_price_dec()),
+               "colspan=6 align=left", "class=odd_row nowrap align=right");
+           end_row();
+               }
+               if ($item['overhead_cost'] != 0)
+               {
+                       alt_table_row_color($k);
+               label_cells(_("Standard Overhead Cost"), number_format2($item['overhead_cost'],user_price_dec()),
+               "colspan=6 align=left", "nowrap align=right");
+           end_row();
+               }
         label_row("<b>" . _("Total Cost") . "</b>", "<b>" . number_format2($total_cost,user_price_dec()) ."</b>",
                "colspan=6 align=right", "nowrap align=right");
                end_table();