  |
1 | 1 | | <?php |
| |
2 | 2 | | /* |
  |
3 | | - | $Id: currencies.php 399 2006-01-25 06:08:03Z hpdl $ |
| |
| 3 | + | $Id: currencies.php 484 2006-04-17 23:32:41Z hpdl $ |
|
4 | 4 | | |
| |
5 | 5 | | osCommerce, Open Source E-Commerce Solutions |
| |
6 | 6 | | http://www.oscommerce.com |
| |
|
|
 |
… |
|
49 | 49 | | return $this->currencies[$currency_code]['symbol_left'] . number_format(tep_round($number * $currency_value, $this->currencies[$currency_code]['decimal_places']), $this->currencies[$currency_code]['decimal_places'], $osC_Language->getNumericDecimalSeparator(), $osC_Language->getNumericThousandsSeparator()) . $this->currencies[$currency_code]['symbol_right']; |
| |
50 | 50 | | } |
| |
51 | 51 | | |
  |
| 52 | + | function formatRaw($number, $currency_code = '', $currency_value = '') { |
| |
| 53 | + | if (empty($currency_code) || ($this->exists($currency_code) == false)) { |
| |
| 54 | + | $currency_code = (isset($_SESSION['currency']) ? $_SESSION['currency'] : DEFAULT_CURRENCY); |
| |
| 55 | + | } |
| |
| 56 | + | |
| |
| 57 | + | if (empty($currency_value) || (is_numeric($currency_value) == false)) { |
| |
| 58 | + | $currency_value = $this->currencies[$currency_code]['value']; |
| |
| 59 | + | } |
| |
| 60 | + | |
| |
| 61 | + | return number_format(tep_round($number * $currency_value, $this->currencies[$currency_code]['decimal_places']), $this->currencies[$currency_code]['decimal_places'], '.', ''); |
| |
| 62 | + | } |
| |
| 63 | + | |
  |
52 | 64 | | function displayPrice($price, $tax_class_id, $quantity = 1) { |
| |
53 | 65 | | global $osC_Tax; |
| |
54 | 66 | | |