diff --git a/src/components/05_quotation/ProductItem.vue b/src/components/05_quotation/ProductItem.vue index 81e85fa6..65abb484 100644 --- a/src/components/05_quotation/ProductItem.vue +++ b/src/components/05_quotation/ProductItem.vue @@ -63,7 +63,7 @@ function calcPrice(c: (typeof rows.value)[number]) { ); const finalPriceNoVat = finalPriceWithVat / (1 + (config.value?.vat || 0.07)); - const price = finalPriceNoVat * c.amount; + const price = finalPriceNoVat * c.amount - c.discount; const vat = c.product.calcVat ? (finalPriceNoVat * c.amount - c.discount) * (config.value?.vat || 0.07) : 0; @@ -434,7 +434,8 @@ watch( {{ formatNumberDecimal( - props.row.pricePerUnit * props.row.amount, + props.row.pricePerUnit * props.row.amount - + props.row.discount, 2, ) }} diff --git a/src/pages/05_quotation/preview/ViewForm.vue b/src/pages/05_quotation/preview/ViewForm.vue index 2131535e..e12cd19f 100644 --- a/src/pages/05_quotation/preview/ViewForm.vue +++ b/src/pages/05_quotation/preview/ViewForm.vue @@ -237,7 +237,7 @@ onMounted(async () => { const finalPriceNoVat = finalPriceWithVat / (1 + (config.value?.vat || 0.07)); - const price = finalPriceNoVat * v.amount; + const price = finalPriceNoVat * v.amount - v.discount; const vat = (finalPriceNoVat * v.amount - v.discount) * (config.value?.vat || 0.07);