Selaa lähdekoodia

[Administration] Distribution > commandes : total TTC avec centimes en trop #1039

feature/souke
Guillaume Bourgeois 1 vuosi sitten
vanhempi
commit
58c0924b3e
3 muutettua tiedostoa jossa 5 lisäystä ja 5 poistoa
  1. +2
    -2
      backend/controllers/DistributionController.php
  2. +2
    -2
      backend/web/js/backend.js
  3. +1
    -1
      common/web/js/utils.js

+ 2
- 2
backend/controllers/DistributionController.php Näytä tiedosto

@@ -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),
];
}

+ 2
- 2
backend/web/js/backend.js Näytä tiedosto

@@ -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));
}
}


+ 1
- 1
common/web/js/utils.js Näytä tiedosto

@@ -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);
}

/**

Loading…
Peruuta
Tallenna