  |
1 | 1 | | <?php |
| |
2 | 2 | | /* |
  |
3 | | - | $Id: currencies.php 500 2006-04-18 06:27:10Z hpdl $ |
| |
| 3 | + | $Id: currencies.php 538 2006-04-27 16:53:59Z hpdl $ |
|
4 | 4 | | |
| |
5 | 5 | | osCommerce, Open Source E-Commerce Solutions |
| |
6 | 6 | | http://www.oscommerce.com |
| |
|
|
 |
… |
|
73 | 73 | | return $this->format($price * $quantity); |
| |
74 | 74 | | } |
| |
75 | 75 | | |
  |
| 76 | + | function displayPriceWithTaxRate($price, $tax_rate, $quantity = 1, $currency_code = '', $currency_value = '') { |
| |
| 77 | + | global $osC_Tax; |
| |
| 78 | + | |
| |
| 79 | + | $price = tep_round($price, $this->currencies[DEFAULT_CURRENCY]['decimal_places']); |
| |
| 80 | + | |
| |
| 81 | + | if ( (DISPLAY_PRICE_WITH_TAX == '1') && ($tax_rate > 0) ) { |
| |
| 82 | + | $price += tep_round($price * ($tax_rate / 100), $this->currencies[DEFAULT_CURRENCY]['decimal_places']); |
| |
| 83 | + | } |
| |
| 84 | + | |
| |
| 85 | + | return $this->format($price * $quantity, $currency_code, $currency_value); |
| |
| 86 | + | } |
| |
| 87 | + | |
  |
76 | 88 | | function exists($code) { |
| |
77 | 89 | | if (isset($this->currencies[$code])) { |
| |
78 | 90 | | return true; |