[-] BO : #PSTEST-166 : Digits precision on product prices changed
This commit is contained in:
@@ -205,7 +205,7 @@ jQuery(document).ready(Customer.init);
|
|||||||
<tr id="tr_unit_price">
|
<tr id="tr_unit_price">
|
||||||
<td class="col-left"><label>{l s='Unit price:'}</label></td>
|
<td class="col-left"><label>{l s='Unit price:'}</label></td>
|
||||||
<td style="padding-bottom:5px;">
|
<td style="padding-bottom:5px;">
|
||||||
{$currency->prefix} <input size="11" maxlength="14" id="unit_price" name="unit_price" type="text" value="{$unit_price}"
|
{$currency->prefix} <input size="11" maxlength="14" id="unit_price" name="unit_price" type="text" value="{$unit_price|number_format:6}"
|
||||||
onkeyup="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.'); unitPriceWithTax('unit');"/>{$currency->suffix}
|
onkeyup="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.'); unitPriceWithTax('unit');"/>{$currency->suffix}
|
||||||
{l s='/'} <!--<input size="6" maxlength="10" id="unity" name="unity" type="text" value="{$product->unity|htmlentitiesUTF8}" onkeyup="if (isArrowKey(event)) return ;unitySecond();" onchange="unitySecond();"/> -->
|
{l s='/'} <!--<input size="6" maxlength="10" id="unity" name="unity" type="text" value="{$product->unity|htmlentitiesUTF8}" onkeyup="if (isArrowKey(event)) return ;unitySecond();" onchange="unitySecond();"/> -->
|
||||||
<select onchange="unitySecond();" name="unity" id="unity">
|
<select onchange="unitySecond();" name="unity" id="unity">
|
||||||
|
|||||||
+3
-3
@@ -61,8 +61,8 @@ function calcPriceTI()
|
|||||||
document.getElementById('finalPriceWithoutTax').innerHTML = (isNaN(priceTE) == true || priceTE < 0) ? '' :
|
document.getElementById('finalPriceWithoutTax').innerHTML = (isNaN(priceTE) == true || priceTE < 0) ? '' :
|
||||||
(ps_round(priceTE, 2) + getEcotaxTaxExcluded()).toFixed(2);
|
(ps_round(priceTE, 2) + getEcotaxTaxExcluded()).toFixed(2);
|
||||||
calcReduction();
|
calcReduction();
|
||||||
document.getElementById('priceTI').value = parseFloat(document.getElementById('priceTI').value) + getEcotaxTaxIncluded();
|
document.getElementById('priceTI').value = (parseFloat(document.getElementById('priceTI').value) + getEcotaxTaxIncluded()).toFixed(2);
|
||||||
document.getElementById('finalPrice').innerHTML = parseFloat(document.getElementById('priceTI').value);
|
document.getElementById('finalPrice').innerHTML = parseFloat(document.getElementById('priceTI').value.toFixed(2));
|
||||||
}
|
}
|
||||||
|
|
||||||
function calcPriceTE()
|
function calcPriceTE()
|
||||||
@@ -84,7 +84,7 @@ function calcImpactPriceTI()
|
|||||||
var tax = getTax();
|
var tax = getTax();
|
||||||
var priceTE = parseFloat(document.getElementById('attribute_price').value.replace(/,/g, '.'));
|
var priceTE = parseFloat(document.getElementById('attribute_price').value.replace(/,/g, '.'));
|
||||||
var newPrice = priceTE * ((tax / 100) + 1);
|
var newPrice = priceTE * ((tax / 100) + 1);
|
||||||
$('#attribute_priceTI').val((isNaN(newPrice) == true || newPrice < 0) ? '' : ps_round(newPrice.toFixed(6), 6));
|
$('#attribute_priceTI').val((isNaN(newPrice) == true || newPrice < 0) ? '' : ps_round(newPrice.toFixed(6), 6).toFixed(2));
|
||||||
var total = ps_round((parseFloat($('#attribute_priceTI').val())*parseInt($('#attribute_price_impact').val())+parseFloat($('#finalPrice').html())), 2);
|
var total = ps_round((parseFloat($('#attribute_priceTI').val())*parseInt($('#attribute_price_impact').val())+parseFloat($('#finalPrice').html())), 2);
|
||||||
if (isNaN(total) || total < 0)
|
if (isNaN(total) || total < 0)
|
||||||
$('#attribute_new_total_price').html('0.00');
|
$('#attribute_new_total_price').html('0.00');
|
||||||
|
|||||||
Reference in New Issue
Block a user