From f2def1b9623cbb7987f449aa814883895b0b746b Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Mon, 15 Sep 2025 16:43:01 +0700 Subject: [PATCH] fix: wrong calc vat condition --- src/controllers/08-credit-note-controller.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/controllers/08-credit-note-controller.ts b/src/controllers/08-credit-note-controller.ts index 1b3c75d..7cd029e 100644 --- a/src/controllers/08-credit-note-controller.ts +++ b/src/controllers/08-credit-note-controller.ts @@ -348,8 +348,7 @@ export class CreditNoteController extends Controller { ).length; const price = - c.productService.pricePerUnit * - (1 + (c.productService.product.serviceChargeCalcVat ? VAT_DEFAULT : 0)) - + c.productService.pricePerUnit * (1 + (c.productService.vat > 0 ? VAT_DEFAULT : 0)) - c.productService.discount; if (serviceChargeStepCount && successCount) { @@ -542,8 +541,7 @@ export class CreditNoteController extends Controller { ).length; const price = - c.productService.pricePerUnit * - (1 + (c.productService.product.serviceChargeCalcVat ? VAT_DEFAULT : 0)) - + c.productService.pricePerUnit * (1 + (c.productService.vat > 0 ? VAT_DEFAULT : 0)) - c.productService.discount; if (serviceChargeStepCount && successCount) {