Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace:

Diff

538
 
733
 
733
 
currencies.php
_> 11 <?php
  22 /*
<> 3 -  $Id: currencies.php 538 2006-04-27 16:53:59Z hpdl $
   3+  $Id: currencies.php 733 2006-08-20 15:32:32Z hpdl $
44 
  55   osCommerce, Open Source E-Commerce Solutions
  66   http://www.oscommerce.com
     
 !
4646         $currency_value = $this->currencies[$currency_code]['value'];
  4747       }
  4848 
<> 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'];
   49+      return $this->currencies[$currency_code]['symbol_left'] . number_format(osc_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 
  5252     function formatRaw($number, $currency_code = '', $currency_value = '') {
     
 !
5858         $currency_value = $this->currencies[$currency_code]['value'];
  5959       }
  6060 
<> 61 -      return number_format(tep_round($number * $currency_value, $this->currencies[$currency_code]['decimal_places']), $this->currencies[$currency_code]['decimal_places'], '.', '');
   61+      return number_format(osc_round($number * $currency_value, $this->currencies[$currency_code]['decimal_places']), $this->currencies[$currency_code]['decimal_places'], '.', '');
6262     }
  6363 
<> 64 -    function displayPrice($price, $tax_class_id, $quantity = 1) {
   64+    function formatRawWithTaxRate($price, $tax_rate, $quantity = 1, $currency_code = '', $currency_value = '') {
6565       global $osC_Tax;
  6666 
<> 67 -      $price = tep_round($price, $this->currencies[DEFAULT_CURRENCY]['decimal_places']);
   67+      $price = osc_round($price, $this->currencies[DEFAULT_CURRENCY]['decimal_places']);
6868 
<>  69+      if ( (DISPLAY_PRICE_WITH_TAX == '1') && ($tax_rate > 0) ) {
   70+        $price += osc_round($price * ($tax_rate / 100), $this->currencies[DEFAULT_CURRENCY]['decimal_places']);
   71+      }
   72+
   73+      return $this->formatRaw($price * $quantity, $currency_code, $currency_value);
   74+    }
   75+
   76+    function displayPrice($price, $tax_class_id, $quantity = 1, $currency_code = null, $currency_value = null) {
   77+      global $osC_Tax;
   78+
   79+      $price = osc_round($price, $this->currencies[DEFAULT_CURRENCY]['decimal_places']);
   80+
6981       if ( (DISPLAY_PRICE_WITH_TAX == '1') && ($tax_class_id > 0) ) {
<> 70 -        $price += tep_round($price * ($osC_Tax->getTaxRate($tax_class_id) / 100), $this->currencies[DEFAULT_CURRENCY]['decimal_places']);
   82+        $price += osc_round($price * ($osC_Tax->getTaxRate($tax_class_id) / 100), $this->currencies[DEFAULT_CURRENCY]['decimal_places']);
7183       }
  7284 
<> 73 -      return $this->format($price * $quantity);
   85+      return $this->format($price * $quantity, $currency_code, $currency_value);
7486     }
  7587 
  7688     function displayPriceWithTaxRate($price, $tax_rate, $quantity = 1, $currency_code = '', $currency_value = '') {
  7789       global $osC_Tax;
  7890 
<> 79 -      $price = tep_round($price, $this->currencies[DEFAULT_CURRENCY]['decimal_places']);
   91+      $price = osc_round($price, $this->currencies[DEFAULT_CURRENCY]['decimal_places']);
8092 
  8193       if ( (DISPLAY_PRICE_WITH_TAX == '1') && ($tax_rate > 0) ) {
<> 82 -        $price += tep_round($price * ($tax_rate / 100), $this->currencies[DEFAULT_CURRENCY]['decimal_places']);
   94+        $price += osc_round($price * ($tax_rate / 100), $this->currencies[DEFAULT_CURRENCY]['decimal_places']);
<_ 8395       }
  8496 
  8597       return $this->format($price * $quantity, $currency_code, $currency_value);