From 72db8c8f42f58e7ecc2ad4aa7e9f6ebe8fdf3429 Mon Sep 17 00:00:00 2001 From: fGaillard Date: Mon, 19 Dec 2011 15:58:03 +0000 Subject: [PATCH] [-] BO : Reinitialized H.T prices precision (decimals) git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11372 b9a71923-0436-4b27-9f14-aed3839534dd --- admin-dev/themes/template/products/prices.tpl | 4 ++-- js/attributesBack.js | 2 +- js/price.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/admin-dev/themes/template/products/prices.tpl b/admin-dev/themes/template/products/prices.tpl index 61511c3f9..8c2c4a6f3 100644 --- a/admin-dev/themes/template/products/prices.tpl +++ b/admin-dev/themes/template/products/prices.tpl @@ -139,7 +139,7 @@ jQuery(document).ready(Customer.init); - {$currency->prefix}{$currency->suffix} + {$currency->prefix}{$currency->suffix}

{l s='The wholesale price at which you bought this product'}

@@ -147,7 +147,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'}

diff --git a/js/attributesBack.js b/js/attributesBack.js index 1d36f0752..adbf8dacf 100644 --- a/js/attributesBack.js +++ b/js/attributesBack.js @@ -53,7 +53,7 @@ virtual_product_nb_days, is_shareable) getE('attribute_upc').value = upc; getE('submitProductAttribute').value = modifyattributegroup; getE('attribute_wholesale_price').value = Math.abs(wholesale_price); - getE('attribute_price').value = Math.round(Math.abs(price_impact)*100)/100; + getE('attribute_price').value = Math.abs(price_impact); getE('attribute_weight').value = Math.abs(weight_impact); getE('attribute_unity').value = Math.abs(unit_impact); if ($('#attribute_ecotax').length != 0) diff --git a/js/price.js b/js/price.js index 05d6ea604..40aae7405 100644 --- a/js/price.js +++ b/js/price.js @@ -83,7 +83,7 @@ function calcImpactPriceTI() { var tax = getTax(); var priceTE = parseFloat(document.getElementById('attribute_price').value.replace(/,/g, '.')); - var newPrice = Math.round(priceTE * ((tax / 100) + 1)*100)/100; + var newPrice = priceTE * ((tax / 100) + 1); $('#attribute_priceTI').val((isNaN(newPrice) == true || newPrice < 0) ? '' : ps_round(newPrice.toFixed(6), 6)); var total = ps_round((parseFloat($('#attribute_priceTI').val())*parseInt($('#attribute_price_impact').val())+parseFloat($('#finalPrice').html())), 2); if (isNaN(total) || total < 0)