From 8709a7dcc829a8e459fe58e9c4891b7e28f55e14 Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Thu, 20 Feb 2025 11:20:35 +0700 Subject: [PATCH] feat: only query specific status for debit note --- src/controllers/05-quotation-controller.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/controllers/05-quotation-controller.ts b/src/controllers/05-quotation-controller.ts index 8278e10..e37b4ca 100644 --- a/src/controllers/05-quotation-controller.ts +++ b/src/controllers/05-quotation-controller.ts @@ -219,7 +219,9 @@ export class QuotationController extends Controller { code, payCondition, registeredBranch: isSystem(req.user) ? undefined : { OR: permissionCond(req.user) }, - quotationStatus: forDebitNote ? { notIn: ["Issued", "Expired"] } : status, + quotationStatus: forDebitNote + ? { notIn: ["Issued", "Expired", "Accepted", "Canceled"] } + : status, requestData: hasCancel ? { some: {