refactor: edit calc vat
This commit is contained in:
parent
42575eb5ba
commit
ca9264d758
8 changed files with 33 additions and 11 deletions
|
|
@ -86,7 +86,9 @@ function calcPrice(
|
|||
: pricePerUnit;
|
||||
const priceDiscountNoVat = priceNoVat * amount - discount;
|
||||
|
||||
const rawVatTotal = priceDiscountNoVat * (config.value?.vat || 0.07);
|
||||
const rawVatTotal = product.calcVat
|
||||
? priceDiscountNoVat * (config.value?.vat || 0.07)
|
||||
: 0;
|
||||
|
||||
return precisionRound(priceNoVat * amount + rawVatTotal);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue