[-] BO : #PSTEST-8 : Javascript - Rounded prices (2 digits only)

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11362 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
fGaillard
2011-12-19 14:42:23 +00:00
parent 4d8db42292
commit 8dff8f9969
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -83,8 +83,8 @@ function calcImpactPriceTI()
{
var tax = getTax();
var priceTE = parseFloat(document.getElementById('attribute_price').value.replace(/,/g, '.'));
var newPrice = priceTE * ((tax / 100) + 1);
$('#attribute_priceTI').val((isNaN(newPrice) == true || newPrice < 0) ? '' :ps_round(newPrice.toFixed(6), 6));
var newPrice = Math.round(priceTE * ((tax / 100) + 1)*100)/100;
$('#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)
$('#attribute_new_total_price').html('0.00');