[0005684] Attach documents: error message when attaching document on some php8 versio...
[fa-stable.git] / manufacturing / includes / manufacturing_ui.inc
index ad27d03a864099c26833ac1adb1fffe4f02d5a21..e3dbbfa3a1e767d627bfa634396c9685f56e18cd 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");
@@ -261,7 +263,7 @@ function display_wo_payments($woid)
                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();
                }
 
@@ -275,9 +277,9 @@ function display_wo_details($woid, $suppress_view_link=false)
 {
        global $wo_types_array;
 
-       $myrow = get_work_order($woid);
+       $myrow = get_work_order($woid, true);
 
-    if (strlen($myrow[0]) == 0)
+    if ($myrow == false)
     {
        display_note(_("The work order number sent is not valid."));
        exit;
@@ -331,9 +333,9 @@ function display_wo_details_quick($woid, $suppress_view_link=false)
 {
        global $wo_types_array;
 
-       $myrow = get_work_order($woid);
+       $myrow = get_work_order($woid, true);
 
-    if (strlen($myrow[0]) == 0)
+    if ($myrow === false)
     {
        display_note(_("The work order number sent is not valid."));
        exit;