From bc3261e0b75948e231dbcb8ab5e9e56fa44b60a3 Mon Sep 17 00:00:00 2001 From: lLefevre Date: Wed, 28 Dec 2011 09:24:47 +0000 Subject: [PATCH] [-] BO : #PSTEST-165 : calculate price without or with tax git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11818 b9a71923-0436-4b27-9f14-aed3839534dd --- admin-dev/themes/template/products/prices.tpl | 21 ++++++++++--------- js/admin.js | 2 +- js/price.js | 9 ++++++++ 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/admin-dev/themes/template/products/prices.tpl b/admin-dev/themes/template/products/prices.tpl index 54e1352dd..d173042ec 100644 --- a/admin-dev/themes/template/products/prices.tpl +++ b/admin-dev/themes/template/products/prices.tpl @@ -131,7 +131,7 @@ jQuery(document).ready(Customer.init); - {$currency->prefix}{$currency->suffix} * + {$currency->prefix}{$currency->suffix} *

{l s='The pre-tax retail price to sell this product'}

@@ -153,13 +153,13 @@ jQuery(document).ready(Customer.init); - + + {foreach from=$tax_rules_groups item=tax_rules_group} + + {/foreach} {l s='Create'} {l s='Create'} @@ -175,7 +175,7 @@ jQuery(document).ready(Customer.init); - {$currency->prefix}{$currency->suffix} + {$currency->prefix}{$currency->suffix} ({l s='already included in price'}) @@ -183,7 +183,8 @@ jQuery(document).ready(Customer.init); - {$currency->prefix}{$currency->suffix} + {$currency->prefix}{$currency->suffix} + diff --git a/js/admin.js b/js/admin.js index 4f32403d0..3664f437f 100644 --- a/js/admin.js +++ b/js/admin.js @@ -371,7 +371,7 @@ function formSubmit(e, button) getE(button).click(); } } -function noComma(elem) +function noComma(elem) { getE(elem).value = getE(elem).value.replace(new RegExp(',', 'g'), '.'); } diff --git a/js/price.js b/js/price.js index 365df8987..91dfdec4b 100644 --- a/js/price.js +++ b/js/price.js @@ -49,6 +49,15 @@ function formatPrice(price) return (Math.round(fixedToSix) == fixedToSix + 0.000001 ? fixedToSix + 0.000001 : fixedToSix); } +function calcPrice() +{ + var priceType = $('#priceType').val(); + if (priceType == 'TE') + calcPriceTI(); + else + calcPriceTE(); +} + function calcPriceTI() { var tax = getTax();