[-] BO : Reinitialized H.T prices precision (decimals)

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11372 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
fGaillard
2011-12-19 15:58:03 +00:00
parent 7e82f7a9cc
commit 72db8c8f42
3 changed files with 4 additions and 4 deletions
@@ -139,7 +139,7 @@ jQuery(document).ready(Customer.init);
<tr>
<td class="col-left"><label>{l s='Pre-tax wholesale price:'}</label></td>
<td style="padding-bottom:5px;">
{$currency->prefix}<input size="11" maxlength="14" name="wholesale_price" type="text" value="{math format='%.2f' equation=$product->wholesale_price}" onchange="this.value = this.value.replace(/,/g, '.');" />{$currency->suffix}
{$currency->prefix}<input size="11" maxlength="14" name="wholesale_price" type="text" value="{$product->wholesale_price}" onchange="this.value = this.value.replace(/,/g, '.');" />{$currency->suffix}
<p class="preference_description">{l s='The wholesale price at which you bought this product'}</p>
</td>
</tr>
@@ -147,7 +147,7 @@ jQuery(document).ready(Customer.init);
<tr>
<td class="col-left"><label>{l s='Pre-tax retail price:'}</label></td>
<td style="padding-bottom:5px;">
{$currency->prefix}<input size="11" maxlength="14" id="priceTE" name="price" type="text" value="{math format='%.2f' equation=$product->price}" onchange="this.value = this.value.replace(/,/g, '.');" onkeyup="if (isArrowKey(event)) return; calcPriceTI();" />{$currency->suffix}<sup> *</sup>
{$currency->prefix}<input size="11" maxlength="14" id="priceTE" name="price" type="text" value="{equation=$product->price}" onchange="this.value = this.value.replace(/,/g, '.');" onkeyup="if (isArrowKey(event)) return; calcPriceTI();" />{$currency->suffix}<sup> *</sup>
<p class="preference_description">{l s='The pre-tax retail price to sell this product'}</p>
</td>
</tr>
+1 -1
View File
@@ -53,7 +53,7 @@ virtual_product_nb_days, is_shareable)
getE('attribute_upc').value = upc;
getE('submitProductAttribute').value = modifyattributegroup;
getE('attribute_wholesale_price').value = Math.abs(wholesale_price);
getE('attribute_price').value = Math.round(Math.abs(price_impact)*100)/100;
getE('attribute_price').value = Math.abs(price_impact);
getE('attribute_weight').value = Math.abs(weight_impact);
getE('attribute_unity').value = Math.abs(unit_impact);
if ($('#attribute_ecotax').length != 0)
+1 -1
View File
@@ -83,7 +83,7 @@ function calcImpactPriceTI()
{
var tax = getTax();
var priceTE = parseFloat(document.getElementById('attribute_price').value.replace(/,/g, '.'));
var newPrice = Math.round(priceTE * ((tax / 100) + 1)*100)/100;
var newPrice = priceTE * ((tax / 100) + 1);
$('#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)