Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace:

Diff

410
 
554
 
554
 
currencies.php
_> 11 <?php
  22 /*
<> 3 -  $Id: currencies.php 410 2006-01-26 09:17:09Z hpdl $
   3+  $Id: currencies.php 554 2006-04-29 16:26:53Z hpdl $
44 
  55   osCommerce, Open Source E-Commerce Solutions
  66   http://www.oscommerce.com
     
 !
4949       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'];
  5050     }
  5151 
<>  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+
5264     function displayPrice($price, $tax_class_id, $quantity = 1) {
  5365       global $osC_Tax;
  5466 
  5567       $price = tep_round($price, $this->currencies[DEFAULT_CURRENCY]['decimal_places']);
  5668 
<> 57 -      if ( (DISPLAY_PRICE_WITH_TAX == 'true') && ($tax_class_id > 0) ) {
   69+      if ( (DISPLAY_PRICE_WITH_TAX == '1') && ($tax_class_id > 0) ) {
5870         $price += tep_round($price * ($osC_Tax->getTaxRate($tax_class_id) / 100), $this->currencies[DEFAULT_CURRENCY]['decimal_places']);
  5971       }
  6072 
  6173       return $this->format($price * $quantity);
  6274     }
  6375 
<>  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+
<_ 6488     function exists($code) {
  6589       if (isset($this->currencies[$code])) {
  6690         return true;