feat: add filter pay invoice

This commit is contained in:
Methapon2001 2024-12-20 09:31:00 +07:00
parent 52284c791c
commit 7fae767be5

View file

@ -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: {