From 7fae767be5865c2a4ac612aee044a943196af82e Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Fri, 20 Dec 2024 09:31:00 +0700 Subject: [PATCH] feat: add filter pay invoice --- src/controllers/04-invoice-controller.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/controllers/04-invoice-controller.ts b/src/controllers/04-invoice-controller.ts index 177f27a..b4a4753 100644 --- a/src/controllers/04-invoice-controller.ts +++ b/src/controllers/04-invoice-controller.ts @@ -49,6 +49,7 @@ export class InvoiceController extends Controller { @Query() pageSize: number = 30, @Query() query: string = "", @Query() quotationId?: string, + @Query() pay?: boolean, ) { const where: Prisma.InvoiceWhereInput = { OR: [ @@ -71,6 +72,7 @@ export class InvoiceController extends Controller { }, }, ], + payment: pay === undefined ? undefined : pay ? { isNot: null } : null, quotationId, quotation: { registeredBranch: {