begin_transaction();
- $sql = "UPDATE ".TB_PREF."stock_master SET material_cost=$material_cost,
- labour_cost=$labour_cost,
- overhead_cost=$overhead_cost,
- last_cost=$last_cost
- WHERE stock_id='$stock_id'";
+ $sql = "UPDATE ".TB_PREF."stock_master SET material_cost=".db_escape($material_cost).",
+ labour_cost=".db_escape($labour_cost).",
+ overhead_cost=".db_escape($overhead_cost).",
+ last_cost=".db_escape($last_cost)."
+ WHERE stock_id=".db_escape($stock_id);
db_query($sql,"The cost details for the inventory item could not be updated");
$qoh = get_qoh_on_date($_POST['stock_id']);