fix: .01 error
This commit is contained in:
parent
b9cfb6274b
commit
0e57a3daf6
1 changed files with 3 additions and 1 deletions
|
|
@ -284,8 +284,10 @@ onMounted(async () => {
|
||||||
(a, c) => {
|
(a, c) => {
|
||||||
const calcVat = c.vat > 0;
|
const calcVat = c.vat > 0;
|
||||||
const vatFactor = calcVat ? (config.value?.vat ?? 0.07) : 0;
|
const vatFactor = calcVat ? (config.value?.vat ?? 0.07) : 0;
|
||||||
|
const pricePerUnit =
|
||||||
|
precisionRound(c.pricePerUnit * (1 + vatFactor)) / (1 + vatFactor);
|
||||||
const price =
|
const price =
|
||||||
(c.pricePerUnit * c.amount * (1 + vatFactor) - c.discount) /
|
(pricePerUnit * c.amount * (1 + vatFactor) - c.discount) /
|
||||||
(1 + vatFactor);
|
(1 + 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