- $round_to = get_company_pref('round_to');
- $home_curr = get_company_currency();
-
- if (db_num_rows($result) != 0)
- {
- $myrow = db_fetch_row($result);
- return $myrow[0];
- }
- elseif ($add_pct != -1)
- {
- $price = get_calculated_price($stock_id, $add_pct);
- if ($currency == $home_curr)
- return round_to_nearest($price, $round_to);
- }
- if ($factor == 0) return false; // auto price calculations off
-