X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=inventory%2Fincludes%2Fdb%2Fitems_prices_db.inc;h=bcf734b8baa1342632bcfc826ab3f653eecc3c08;hb=1466764d49233238c6097c95341875be552d7487;hp=9b670d2499fb55dbf7ed68ceb5df4a6515bcb48c;hpb=54d84ff9a67620ab38c676cdbcf87853632724f0;p=fa-stable.git diff --git a/inventory/includes/db/items_prices_db.inc b/inventory/includes/db/items_prices_db.inc index 9b670d24..bcf734b8 100644 --- a/inventory/includes/db/items_prices_db.inc +++ b/inventory/includes/db/items_prices_db.inc @@ -53,4 +53,14 @@ function get_stock_price($price_id) return db_fetch($result); } +function get_stock_price_type_currency($stock_id, $type, $currency) +{ + $sql = "SELECT * FROM ".TB_PREF."prices WHERE stock_id=".db_escape($stock_id)." + AND sales_type_id=".db_escape($type)." + AND curr_abrev=".db_escape($currency); + + $result = db_query($sql,"price could not be retreived"); + + return db_fetch($result); +} ?> \ No newline at end of file