diff --git a/src/components/05_quotation/ProductItem.vue b/src/components/05_quotation/ProductItem.vue index 2abeeae4..a250b658 100644 --- a/src/components/05_quotation/ProductItem.vue +++ b/src/components/05_quotation/ProductItem.vue @@ -445,7 +445,9 @@ watch( {{ formatNumberDecimal( - props.row.product.calcVat + props.row.product[ + agentPrice ? 'agentPriceCalcVat' : 'calcVat' + ] ? precisionRound( (props.row.pricePerUnit * props.row.amount - props.row.discount) * diff --git a/src/pages/05_quotation/QuotationFormProductSelect.vue b/src/pages/05_quotation/QuotationFormProductSelect.vue index 702b315c..066f2acf 100644 --- a/src/pages/05_quotation/QuotationFormProductSelect.vue +++ b/src/pages/05_quotation/QuotationFormProductSelect.vue @@ -307,7 +307,11 @@ function mapNode() { const price = prop.agentPrice ? p.product.agentPrice : p.product.price; - const pricePerUnit = p.product.vatIncluded + const pricePerUnit = ( + prop.agentPrice + ? p.product.agentPriceVatIncluded + : p.product.vatIncluded + ) ? precisionRound(price / (1 + (config.value?.vat || 0.07))) : price; productCount.value++; diff --git a/src/pages/05_quotation/preview/ViewForm.vue b/src/pages/05_quotation/preview/ViewForm.vue index 255fbd6d..dc0128f0 100644 --- a/src/pages/05_quotation/preview/ViewForm.vue +++ b/src/pages/05_quotation/preview/ViewForm.vue @@ -398,7 +398,7 @@ function print() { {{ formatNumberDecimal( - v.product.calcVat + v.product[agentPrice ? 'agentPriceCalcVat' : 'calcVat'] ? precisionRound( (v.pricePerUnit * v.amount - v.discount) * (config?.vat || 0.07),