diff --git a/src/controllers/05-quotation-controller.ts b/src/controllers/05-quotation-controller.ts index 63a0b17..4e6dc05 100644 --- a/src/controllers/05-quotation-controller.ts +++ b/src/controllers/05-quotation-controller.ts @@ -84,6 +84,8 @@ type QuotationCreate = { installmentNo?: number; workerIndex?: number[]; }[]; + + sellerId?: string; }; type QuotationUpdate = { @@ -142,6 +144,8 @@ type QuotationUpdate = { installmentNo?: number; workerIndex?: number[]; }[]; + + sellerId?: string; }; const VAT_DEFAULT = config.vat; @@ -211,6 +215,7 @@ export class QuotationController extends Controller { @Query() query = "", @Query() startDate?: Date, @Query() endDate?: Date, + @Query() sellerId?: string, ) { const where = { OR: queryOrNot(query, [ @@ -259,6 +264,7 @@ export class QuotationController extends Controller { } : undefined, ...whereDateQuery(startDate, endDate), + sellerId: sellerId ? sellerId : null, } satisfies Prisma.QuotationWhereInput; const [result, total] = await prisma.$transaction([