[-] BO : #PSTEST-166 : Digits precision on product prices changed

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11765 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
fGaillard
2011-12-26 13:58:09 +00:00
parent f6659f13a0
commit af36d06a26
2 changed files with 4 additions and 4 deletions
@@ -205,7 +205,7 @@ jQuery(document).ready(Customer.init);
<tr id="tr_unit_price">
<td class="col-left"><label>{l s='Unit price:'}</label></td>
<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}
{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">
+3 -3
View File
@@ -61,8 +61,8 @@ function calcPriceTI()
document.getElementById('finalPriceWithoutTax').innerHTML = (isNaN(priceTE) == true || priceTE < 0) ? '' :
(ps_round(priceTE, 2) + getEcotaxTaxExcluded()).toFixed(2);
calcReduction();
document.getElementById('priceTI').value = parseFloat(document.getElementById('priceTI').value) + getEcotaxTaxIncluded();
document.getElementById('finalPrice').innerHTML = parseFloat(document.getElementById('priceTI').value);
document.getElementById('priceTI').value = (parseFloat(document.getElementById('priceTI').value) + getEcotaxTaxIncluded()).toFixed(2);
document.getElementById('finalPrice').innerHTML = parseFloat(document.getElementById('priceTI').value.toFixed(2));
}
function calcPriceTE()
@@ -84,7 +84,7 @@ 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));
$('#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);
if (isNaN(total) || total < 0)
$('#attribute_new_total_price').html('0.00');