소스 검색

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

feature/souke
Guillaume Bourgeois 1 년 전
부모
커밋
58c0924b3e
3개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  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 파일 보기

@@ -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 파일 보기

@@ -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 파일 보기

@@ -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…
취소
저장