From 5fe6ce1d5caf16c0a887aefe451ac18dad306375 Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Mon, 20 Jan 2025 13:27:44 +0700 Subject: [PATCH] fix: filter not work --- src/controllers/04-invoice-controller.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/controllers/04-invoice-controller.ts b/src/controllers/04-invoice-controller.ts index 94794c3..5fbe720 100644 --- a/src/controllers/04-invoice-controller.ts +++ b/src/controllers/04-invoice-controller.ts @@ -107,7 +107,14 @@ export class InvoiceController extends Controller { }, }, ], - payment: pay === undefined ? undefined : pay ? { isNot: null } : null, + payment: + pay !== undefined + ? { + paymentStatus: pay + ? PaymentStatus.PaymentSuccess + : { not: PaymentStatus.PaymentSuccess }, + } + : undefined, quotationId, quotation: { registeredBranch: {