[-] BO: Fix ecotax product backoffice management && rounding issue
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17804 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
+5
-4
@@ -35,12 +35,12 @@ function getTax()
|
||||
|
||||
function getEcotaxTaxIncluded()
|
||||
{
|
||||
return ($('#ecotax').length && $('#ecotax').val() != '') ? parseFloat($('#ecotax').val()) : 0;
|
||||
return ps_round(ecotax_tax_excl * (1 + ecotaxTaxRate), 2);
|
||||
}
|
||||
|
||||
function getEcotaxTaxExcluded()
|
||||
{
|
||||
return getEcotaxTaxIncluded() / (1 + ecotaxTaxRate);
|
||||
return ecotax_tax_excl;
|
||||
}
|
||||
|
||||
function formatPrice(price)
|
||||
@@ -70,12 +70,13 @@ function calcPriceTI()
|
||||
document.getElementById('finalPriceWithoutTax').innerHTML = (isNaN(priceTE) == true || priceTE < 0) ? '' :
|
||||
(ps_round(priceTE, 2) + getEcotaxTaxExcluded()).toFixed(2);
|
||||
calcReduction();
|
||||
$('#priceTI').value = (parseFloat($('#priceTI').val()) + getEcotaxTaxIncluded()).toFixed(2);
|
||||
$('#finalPrice').innerHTML = parseFloat($('#priceTI').val()).toFixed(2);
|
||||
$('#priceTI').val((parseFloat($('#priceTI').val()) + getEcotaxTaxIncluded()).toFixed(2));
|
||||
$('#finalPrice').html(parseFloat($('#priceTI').val()).toFixed(2));
|
||||
}
|
||||
|
||||
function calcPriceTE()
|
||||
{
|
||||
ecotax_tax_excl = $('#ecotax').val() / (1 + ecotaxTaxRate);
|
||||
var tax = getTax();
|
||||
var priceTI = parseFloat(document.getElementById('priceTI').value.replace(/,/g, '.'));
|
||||
var newPrice = ps_round(priceTI - getEcotaxTaxIncluded(), 2) / ((tax / 100) + 1);
|
||||
|
||||
Reference in New Issue
Block a user