[prev in list] [next in list] [prev in thread] [next in thread]
List: tep-commits
Subject: [TEP-COMMIT] CVS: catalog/catalog/includes/functions general.php,1.232,1.233
From: Harald Ponce de Leon <hpdl () users ! sourceforge ! net>
Date: 2003-12-18 23:52:17
[Download RAW message or body]
Update of /cvsroot/tep/catalog/catalog/includes/functions
In directory sc8-pr-cvs1:/tmp/cvs-serv10016/catalog/includes/functions
Modified Files:
general.php
Log Message:
update the currencies class
* $currencies -> $osC_Currencies
* $currencies->display_price() -> $osC_Currencies->displayPrice()
+-- now passes the product tax class id as a parameter instead of the
product tax rate value (saves queries when DISPLAY_PRICES_WITH_TAX
is disabled)
* $currencies->is_set()
+-- removed due to $osC_Currencies->exists()
* $currencies->get_decimal_places() -> $osC_Currencies->decimalPlaces()
* $currencies->get_value() -> $osC_Currencies->value()
* $osC_Currencies->format()
+-- removed $calculate_currency_value (second) parameter due to
redundancy - if the number should not be calculated with the currency
rate, a value of '1' should be passed as the currency rate value
Index: general.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/includes/functions/general.php,v
retrieving revision 1.232
retrieving revision 1.233
diff -u -d -r1.232 -r1.233
--- general.php 17 Nov 2003 18:55:17 -0000 1.232
+++ general.php 18 Dec 2003 23:52:14 -0000 1.233
@@ -314,20 +314,20 @@
////
// Add tax to a products price
function tep_add_tax($price, $tax) {
- global $currencies;
+ global $osC_Currencies;
if ( (DISPLAY_PRICE_WITH_TAX == 'true') && ($tax > 0) ) {
- return tep_round($price, \
$currencies->currencies[DEFAULT_CURRENCY]['decimal_places']) + \
tep_calculate_tax($price, $tax); + return tep_round($price, \
$osC_Currencies->currencies[DEFAULT_CURRENCY]['decimal_places']) + \
tep_calculate_tax($price, $tax); } else {
- return tep_round($price, \
$currencies->currencies[DEFAULT_CURRENCY]['decimal_places']); + return \
tep_round($price, $osC_Currencies->currencies[DEFAULT_CURRENCY]['decimal_places']); \
} }
// Calculates Tax rounding the result
function tep_calculate_tax($price, $tax) {
- global $currencies;
+ global $osC_Currencies;
- return tep_round($price * $tax / 100, \
$currencies->currencies[DEFAULT_CURRENCY]['decimal_places']); + return \
tep_round($price * $tax / 100, \
$osC_Currencies->currencies[DEFAULT_CURRENCY]['decimal_places']); }
////
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Tep-commits mailing list
Tep-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tep-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic