diff --git a/src/controllers/05-quotation-controller.ts b/src/controllers/05-quotation-controller.ts index 3e8ee6e..2c9b317 100644 --- a/src/controllers/05-quotation-controller.ts +++ b/src/controllers/05-quotation-controller.ts @@ -170,14 +170,14 @@ export class QuotationController extends Controller { async getProductStats(@Request() req: RequestWithUser) { const result = await prisma.quotation.groupBy({ _count: true, - by: "payCondition", + by: "quotationStatus", where: { registeredBranch: isSystem(req.user) ? undefined : { OR: permissionCond(req.user) }, }, }); return result.reduce>((a, c) => { - a[c.payCondition.charAt(0).toLowerCase() + c.payCondition.slice(1)] = c._count; + a[c.quotationStatus.charAt(0).toLowerCase() + c.quotationStatus.slice(1)] = c._count; return a; }, {}); }