From 5a2a854406064947bd1aa74ae7aaa1a6ea111328 Mon Sep 17 00:00:00 2001 From: Methapon Metanipat Date: Fri, 18 Oct 2024 09:59:17 +0700 Subject: [PATCH] fix: wrong calc --- src/components/05_quotation/ProductItem.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/05_quotation/ProductItem.vue b/src/components/05_quotation/ProductItem.vue index 9cd13bdd..29754d24 100644 --- a/src/components/05_quotation/ProductItem.vue +++ b/src/components/05_quotation/ProductItem.vue @@ -45,7 +45,9 @@ function calcPrice(c: (typeof rows.value)[number]) { return precisionRound( c.pricePerUnit * c.amount - c.discount + - (c.pricePerUnit * c.amount - c.discount) * (config.value?.vat || 0.07), + (c.product.calcVat + ? (c.pricePerUnit * c.amount - c.discount) * (config.value?.vat || 0.07) + : 0), ); }