Missing TB_PREF fix.
[fa-stable.git] / manufacturing / includes / db / work_orders_quick_db.inc
index b3eca142acd233fe7598ea6b295ce988a8d11ad4..054eee23525c6bf2fd06b1f5c8a46245d8ff2ca8 100644 (file)
@@ -36,7 +36,7 @@ function add_work_order_quick($wo_ref, $loc_code, $units_reqd, $stock_id, $type,
                
                $sql = "INSERT INTO ".TB_PREF."wo_requirements (workorder_id, stock_id, workcentre, units_req, units_issued, loc_code)
                        VALUES ($woid, " . "'" . $bom_item["component"] . "'" . ", 
-                       ". $bom_item["workcentre_added"] . "
+                       '". $bom_item["workcentre_added"] . "'
                        $unit_quantity, $item_quantity, '" . $bom_item["loc_code"] . "')";
                        
         db_query($sql, "The work order requirements could not be added");
@@ -86,7 +86,6 @@ function work_order_quick_costs($woid, $stock_id, $units_reqd, $date_, $addition
                
                add_gl_trans_std_cost(systypes::work_order(), $woid, $date_, $bom_accounts["inventory_account"], 0, 0,
                        null, -$bom_cost);
-               alert("bokade bom- cost ".-$bom_cost);
                
                $total_cost += $bom_cost;
        }       
@@ -94,13 +93,11 @@ function work_order_quick_costs($woid, $stock_id, $units_reqd, $date_, $addition
        $item_accounts = get_stock_gl_code($stock_id);
        add_gl_trans_std_cost(systypes::work_order(), $woid, $date_, $item_accounts["assembly_account"], 
                $item_accounts["dimension_id"], $item_accounts["dimension2_id"], null, -$additional_costs);
-       alert("bokade additional cost ".-$additional_costs.", acc = ".$item_accounts["assembly_account"]);
        
        // debit total components + additional
        $total_cost += $additional_costs;       
        add_gl_trans_std_cost(systypes::work_order(), $woid, $date_, $item_accounts["inventory_account"], 
                0, 0, null, $total_cost);
-       alert("bokade total- cost ".$total_cost);
 } 
 
 //--------------------------------------------------------------------------------------