diff --git a/src/controllers/05-quotation-controller.ts b/src/controllers/05-quotation-controller.ts index 65e2c3b..e140ccb 100644 --- a/src/controllers/05-quotation-controller.ts +++ b/src/controllers/05-quotation-controller.ts @@ -419,7 +419,7 @@ export class QuotationController extends Controller { const price = body.agentPrice ? p.agentPrice : p.price; const pricePerUnit = p.vatIncluded ? precisionRound(price / (1 + VAT_DEFAULT)) : price; const vat = p.calcVat - ? precisionRound((pricePerUnit * v.amount - (v.discount || 0)) * VAT_DEFAULT) + ? precisionRound((pricePerUnit - (v.discount || 0)) * VAT_DEFAULT) * v.amount : 0; return { @@ -667,7 +667,7 @@ export class QuotationController extends Controller { const price = record.agentPrice ? p.agentPrice : p.price; const pricePerUnit = p.vatIncluded ? precisionRound(price / (1 + VAT_DEFAULT)) : price; const vat = p.calcVat - ? precisionRound((pricePerUnit * v.amount - (v.discount || 0)) * VAT_DEFAULT) + ? precisionRound((pricePerUnit - (v.discount || 0)) * VAT_DEFAULT) * v.amount : 0; return { order: i + 1,