Quellcode durchsuchen

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

feature/souke
Guillaume Bourgeois vor 1 Jahr
Ursprung
Commit
58c0924b3e
3 geänderte Dateien mit 5 neuen und 5 gelöschten Zeilen
  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 Datei anzeigen

@@ -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 Datei anzeigen

@@ -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 Datei anzeigen

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

/**

Laden…
Abbrechen
Speichern