return $myrow[0];
}
+//--------------------------------------------------------------------------------------
+
+function get_purchase_cost($stock_id)
+{
+ $sql = "SELECT purchase_cost
+ FROM ".TB_PREF."stock_master
+ WHERE stock_id=".db_escape($stock_id);
+ $result = db_query($sql, "The purchase cost cannot be retrieved");
+
+ $myrow = db_fetch_row($result);
+
+ return $myrow[0];
+}
+
//--------------------------------------------------------------------------------------
function is_inventory_item($stock_id)
{
/*Gets the GL Codes relevant to the item account */
$sql = "SELECT mb_flag, inventory_account, cogs_account,
- adjustment_account, sales_account, assembly_account, dimension_id, dimension2_id FROM
+ adjustment_account, sales_account, wip_account, dimension_id, dimension2_id FROM
".TB_PREF."stock_master WHERE stock_id = ".db_escape($stock_id);
$get = db_query($sql,"retreive stock gl code");