From 2cf36d157fb6fee1fa4829f5afbbd70beea996dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Mon, 7 Dec 2015 14:15:00 +0100 Subject: [PATCH] FIX #3953 Don't round supplier price The price is already rounded when inserted on the product page. It's also rounded at display. There's no need to round it here. Rounding it leads to serious calculation errors. --- htdocs/core/tpl/objectline_create.tpl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index d7949fa1d52..25668b2876d 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -594,7 +594,7 @@ jQuery(document).ready(function() { /* Define default price at loading */ var defaultprice = $("#fournprice_predef").find('option:selected').attr("price"); - $("#buying_price").val(Math.round(defaultprice,global->MAIN_MAX_DECIMALS_UNIT ? $conf->global->MAIN_MAX_DECIMALS_UNIT : 5); ?>)); + $("#buying_price").val(defaultprice); $("#fournprice_predef").change(function() { console.log("change on fournprice_predef");