refactor: edit value price

This commit is contained in:
Thanaphon Frappet 2025-01-24 11:56:07 +07:00
parent ca9264d758
commit 21452b6a9f
2 changed files with 2 additions and 2 deletions

View file

@ -225,7 +225,7 @@ onMounted(async () => {
a.vat = c.product.calcVat ? a.vat + rawVatTotal : a.vat;
a.vatExcluded = c.product.calcVat
? a.vatExcluded
: precisionRound(a.vatExcluded + priceNoVat);
: precisionRound(a.vatExcluded + priceDiscountNoVat);
a.finalPrice = a.totalPrice - a.totalDiscount + a.vat;
return a;
},

View file

@ -147,7 +147,7 @@ function getPrice(
a.vat = c.product.calcVat ? a.vat + rawVatTotal : a.vat;
a.vatExcluded = c.product.calcVat
? a.vatExcluded
: precisionRound(a.vatExcluded + priceNoVat);
: precisionRound(a.vatExcluded + priceDiscountNoVat);
a.finalPrice = a.totalPrice - a.totalDiscount + a.vat;
return a;
},