@@ -262,8 +262,8 @@ class DistributionController extends BackendController | |||
$productOrderArray[$productOrder->id_product] = [ | |||
'quantity' => $productOrder->quantity * Product::$unitsArray[$productOrder->unit]['coefficient'], | |||
'unit' => $productOrder->unit, | |||
'price' => number_format($productOrder->price, 3), | |||
'invoice_price' => number_format($productOrder->invoice_price, 3), | |||
'price' => number_format($productOrder->price, 5), | |||
'invoice_price' => number_format($productOrder->invoice_price, 5), | |||
'price_with_tax' => Price::getPriceWithTax($productOrder->price, $productOrder->taxRate->value), | |||
]; | |||
} |
@@ -151,7 +151,7 @@ function opendistrib_products_event_price_with_tax() { | |||
if (price) { | |||
$('#product-price-with-tax').val(getPriceWithTax(price, taxRateSelected)); | |||
// formattage | |||
$('#product-price').val(parseFloat(price).toFixed(3)); | |||
$('#product-price').val(parseFloat(price).toFixed(5)); | |||
} | |||
} | |||
} | |||
@@ -224,7 +224,7 @@ function opendistrib_product_prices_event_price_with_tax() { | |||
if (price) { | |||
$('#productprice-price-with-tax').val(getPriceWithTax(price, taxRateValue)); | |||
// formattage | |||
$('#productprice-price').val(parseFloat(price).toFixed(3)); | |||
$('#productprice-price').val(parseFloat(price).toFixed(5)); | |||
} | |||
} | |||
@@ -10,7 +10,7 @@ | |||
* @returns {string} | |||
*/ | |||
function getPrice(priceWithTax, taxRate) { | |||
return numberDecimals(parseFloat(parseFloat(priceWithTax) / (taxRate + 1)), 3); | |||
return numberDecimals(parseFloat(parseFloat(priceWithTax) / (taxRate + 1)), 5); | |||
} | |||
/** |