fix: margin error .01
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 5s
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 5s
This commit is contained in:
parent
7591ccb984
commit
9228373cc9
1 changed files with 5 additions and 4 deletions
|
|
@ -252,10 +252,11 @@ function getPrice(
|
||||||
c.product[agentPrice.value ? 'agentPriceCalcVat' : 'calcVat'];
|
c.product[agentPrice.value ? 'agentPriceCalcVat' : 'calcVat'];
|
||||||
const vatFactor = calcVat ? (config.value?.vat ?? 0.07) : 0;
|
const vatFactor = calcVat ? (config.value?.vat ?? 0.07) : 0;
|
||||||
|
|
||||||
const price = precisionRound(
|
const pricePerUnit =
|
||||||
(c.pricePerUnit * c.amount * (1 + vatFactor) - c.discount) /
|
precisionRound(c.pricePerUnit * (1 + vatFactor)) / (1 + vatFactor);
|
||||||
(1 + vatFactor),
|
const price =
|
||||||
);
|
(pricePerUnit * c.amount * (1 + vatFactor) - c.discount) /
|
||||||
|
(1 + vatFactor);
|
||||||
const vat = price * vatFactor;
|
const vat = price * vatFactor;
|
||||||
|
|
||||||
a.totalPrice = precisionRound(a.totalPrice + price + c.discount);
|
a.totalPrice = precisionRound(a.totalPrice + price + c.discount);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue