Rerun en_US-demo.sql.
[fa-stable.git] / manufacturing / includes / manufacturing_ui.inc
index 71997576d292b6c16e00e7941f5072fdb5d7f037..812590edd1a9f6a51884f7e5c1921e7cbd5a3867 100644 (file)
@@ -61,6 +61,7 @@ function display_bom($item_check)
                $item = get_item($item_check);
                if ($item['labour_cost'] != 0)
                {
+                       $total_cost += $item['labour_cost'];
                        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");
@@ -68,6 +69,7 @@ function display_bom($item_check)
                }
                if ($item['overhead_cost'] != 0)
                {
+                       $total_cost += $item['overhead_cost'];
                        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");
@@ -239,7 +241,7 @@ function display_wo_payments($woid)
 {
        global $path_to_root, $wo_cost_types;
 
-    $result = get_gl_wo_cost_trans($woid);
+    $result = get_wo_costing($woid);
 
     if (db_num_rows($result) == 0)
     {
@@ -252,18 +254,16 @@ function display_wo_payments($woid)
 
         table_header($th);
 
-        $k = 0; //row colour counter
-               
+        $k = 0;
         while ($myrow = db_fetch($result))
         {
-
                        alt_table_row_color($k);
 
-               label_cell(get_gl_view_str( $myrow["type"], $myrow["type_no"], $myrow["type_no"]));
+               label_cell(get_gl_view_str( $myrow["trans_type"], $myrow["trans_no"], $myrow["trans_no"]));
                label_cell($wo_cost_types[$myrow['cost_type']]);
                $date = sql2date($myrow["tran_date"]);
                label_cell($date);
-                       amount_cell(-($myrow['amount']));
+                       amount_cell($myrow['amount']);
                        end_row();
                }