-
- $sql = "INSERT INTO ".TB_PREF."purch_data (supplier_id, stock_id, price, suppliers_uom,
- conversion_factor, supplier_description) VALUES (";
- $sql .= "'".$_POST['supplier_id']."', '" . $_POST['stock_id'] . "', " .
- input_num('price',0) . ", '" . $_POST['suppliers_uom'] . "', " .
- input_num('conversion_factor') . ", " . db_escape($_POST['supplier_description']) . ")";
-
- db_query($sql,"The supplier purchasing details could not be added");
+ add_item_purchasing_data($_POST['supplier_id'], $_POST['stock_id'], input_num('price',0),
+ $_POST['suppliers_uom'], input_num('conversion_factor'), $_POST['supplier_description']);