X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=inventory%2Fincludes%2Fdb%2Fitems_prices_db.inc;h=bcf734b8baa1342632bcfc826ab3f653eecc3c08;hb=fbf51ab0febfd0885620abcab8738339d156ff45;hp=9b670d2499fb55dbf7ed68ceb5df4a6515bcb48c;hpb=8ea6c4dd0d9b31b3456d012b0c94339b801bee0c;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