Rollback. Update material cost when quantity on hand is zero. @notrinos.
[fa-stable.git] / manufacturing / includes / db / work_order_costing_db.inc
index 7671e7ba35ca910244d6d1403dc5f89c28f10b85..48cb7f3b2d811fdc18c478f26c5dc5f57801920e 100644 (file)
@@ -48,8 +48,8 @@ function update_material_cost($stock_id, $qty, $unit_cost, $date)
 {
        global $Refs;
 
-       $product = get_item($stock_id);
-       $avg_cost =  $product['material_cost'];
+       $item = get_item($stock_id);
+       $avg_cost =  $item['material_cost'];
 
        $qoh = get_qoh_on_date($stock_id, null, $date);