Merge pull request #1845 from amitsharma322/gli-3133
Fixed: Resolve issue where retail price shows as "NaN" after entering the pre-tax retail price in the back office
This commit is contained in:
@@ -97,7 +97,7 @@ function removeTaxes(price)
|
||||
|
||||
function getEcotaxTaxIncluded()
|
||||
{
|
||||
return ps_round(ecotax_tax_excl * (1 + ecotaxTaxRate), 2);
|
||||
return ps_round((isNaN(ecotax_tax_excl) ? 0 : ecotax_tax_excl) * (1 + ecotaxTaxRate), 2);
|
||||
}
|
||||
|
||||
|
||||
@@ -187,7 +187,9 @@ function calcPriceTI()
|
||||
|
||||
function calcPriceTE()
|
||||
{
|
||||
ecotax_tax_excl = $('#ecotax').val() / (1 + ecotaxTaxRate);
|
||||
if ($('#ecotax').length) {
|
||||
ecotax_tax_excl = $('#ecotax').val() / (1 + ecotaxTaxRate);
|
||||
}
|
||||
var priceTI = parseFloat($('#priceTI').val().replace(/,/g, '.'));
|
||||
var newPrice = removeTaxes(ps_round(priceTI - getEcotaxTaxIncluded(), priceDisplayPrecision));
|
||||
var tourismTaxIncluded = getTourismTaxIncluded(newPrice);
|
||||
|
||||
Reference in New Issue
Block a user