fix: .01 wrong value
This commit is contained in:
parent
feab90028a
commit
40ff4358a5
2 changed files with 12 additions and 2 deletions
|
|
@ -202,7 +202,12 @@ onMounted(async () => {
|
|||
const priceNoVat = c.product.vatIncluded
|
||||
? c.pricePerUnit / (1 + (config.value?.vat || 0.07))
|
||||
: c.pricePerUnit;
|
||||
const priceDiscountNoVat = priceNoVat * c.amount - c.discount;
|
||||
const adjustedPriceWithVat = precisionRound(
|
||||
priceNoVat * (1 + (config.value?.vat || 0.07)),
|
||||
);
|
||||
const adjustedPriceNoVat =
|
||||
adjustedPriceWithVat / (1 + (config.value?.vat || 0.07));
|
||||
const priceDiscountNoVat = adjustedPriceNoVat * c.amount - c.discount;
|
||||
|
||||
const rawVatTotal = priceDiscountNoVat * (config.value?.vat || 0.07);
|
||||
const rawVat = rawVatTotal / c.amount;
|
||||
|
|
|
|||
|
|
@ -138,7 +138,12 @@ function getPrice(
|
|||
const priceNoVat = c.product.vatIncluded
|
||||
? pricePerUnit / (1 + (config.value?.vat || 0.07))
|
||||
: pricePerUnit;
|
||||
const priceDiscountNoVat = priceNoVat * amount - discount;
|
||||
const adjustedPriceWithVat = precisionRound(
|
||||
priceNoVat * (1 + (config.value?.vat || 0.07)),
|
||||
);
|
||||
const adjustedPriceNoVat =
|
||||
adjustedPriceWithVat / (1 + (config.value?.vat || 0.07));
|
||||
const priceDiscountNoVat = adjustedPriceNoVat * amount - discount;
|
||||
|
||||
const rawVatTotal = priceDiscountNoVat * (config.value?.vat || 0.07);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue