From f5537b590bef7a6264dc3fbb71e5845d46320d5f Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Mon, 24 Feb 2025 13:57:50 +0700 Subject: [PATCH] feat: paramter to include debit note if query for cancel --- src/controllers/05-quotation-controller.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/controllers/05-quotation-controller.ts b/src/controllers/05-quotation-controller.ts index e37b4ca..08c0c3b 100644 --- a/src/controllers/05-quotation-controller.ts +++ b/src/controllers/05-quotation-controller.ts @@ -194,6 +194,7 @@ export class QuotationController extends Controller { @Query() urgentFirst?: boolean, @Query() includeRegisteredBranch?: boolean, @Query() hasCancel?: boolean, + @Query() cancelIncludeDebitNote?: boolean, @Query() forDebitNote?: boolean, @Query() code?: string, @Query() query = "", @@ -215,7 +216,7 @@ export class QuotationController extends Controller { }, }, ]), - isDebitNote: false, + isDebitNote: hasCancel && cancelIncludeDebitNote ? true : false, code, payCondition, registeredBranch: isSystem(req.user) ? undefined : { OR: permissionCond(req.user) },