From 381f399f450dd538dc7d7c882033dbda58d73163 Mon Sep 17 00:00:00 2001 From: lLefevre Date: Thu, 12 Jan 2012 14:01:07 +0000 Subject: [PATCH] [-] BO : fix #PSTEST-388 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12389 b9a71923-0436-4b27-9f14-aed3839534dd --- .../default/template/controllers/products/prices.tpl | 8 ++++---- admin-dev/themes/default/template/helper/form/form.tpl | 6 ++++-- controllers/admin/AdminRangePriceController.php | 2 ++ js/price.js | 2 +- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/admin-dev/themes/default/template/controllers/products/prices.tpl b/admin-dev/themes/default/template/controllers/products/prices.tpl index f48b609e5..2dce874fb 100644 --- a/admin-dev/themes/default/template/controllers/products/prices.tpl +++ b/admin-dev/themes/default/template/controllers/products/prices.tpl @@ -126,7 +126,7 @@ jQuery(document).ready(Customer.init); - {$currency->prefix}{$currency->suffix} + {$currency->prefix}{$currency->suffix}

{l s='The wholesale price at which you bought this product'}

@@ -134,7 +134,7 @@ jQuery(document).ready(Customer.init); - {$currency->prefix}{$currency->suffix} + {$currency->prefix}{$currency->suffix}

{l s='The pre-tax retail price to sell this product'}

@@ -178,7 +178,7 @@ jQuery(document).ready(Customer.init); - {$currency->prefix}{$currency->suffix} + {$currency->prefix}{$currency->suffix} ({l s='already included in price'}) @@ -193,7 +193,7 @@ jQuery(document).ready(Customer.init); - {$currency->prefix} prefix} {$currency->suffix} {l s='/'} {/literal} {/if} + {assign var='value_text' value=$fields_value[$input.name]} true, 'suffix' => $currency->getSign('right'), 'desc' => $this->l('Range start (included)'), + 'string_format' => '%.2f' ), array( 'type' => 'text', @@ -95,6 +96,7 @@ class AdminRangePriceControllerCore extends AdminController 'required' => true, 'suffix' => $currency->getSign('right'), 'desc' => $this->l('Range end (excluded)'), + 'string_format' => '%.2f' ), ), 'submit' => array( diff --git a/js/price.js b/js/price.js index a87620db5..afedbd288 100644 --- a/js/price.js +++ b/js/price.js @@ -80,7 +80,7 @@ function calcPriceTE() var priceTI = parseFloat(document.getElementById('priceTI').value.replace(/,/g, '.')); var newPrice = ps_round(priceTI - getEcotaxTaxIncluded(), 2) / ((tax / 100) + 1); document.getElementById('priceTE').value = (isNaN(newPrice) == true || newPrice < 0) ? '' : - ps_round(newPrice.toFixed(6), 6); + ps_round(newPrice.toFixed(2), 2); document.getElementById('finalPrice').innerHTML = (isNaN(newPrice) == true || newPrice < 0) ? '' : ps_round(priceTI.toFixed(2), 2); document.getElementById('finalPriceWithoutTax').innerHTML = (isNaN(newPrice) == true || newPrice < 0) ? '' :