From c9c79a52be2f4bb72e373408402b482f0c0313df Mon Sep 17 00:00:00 2001 From: Bright Date: Fri, 5 Apr 2024 15:01:48 +0700 Subject: [PATCH] no message --- src/controllers/ReportController.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/controllers/ReportController.ts b/src/controllers/ReportController.ts index 388b2af..40cebc6 100644 --- a/src/controllers/ReportController.ts +++ b/src/controllers/ReportController.ts @@ -2008,9 +2008,6 @@ export class ReportController extends Controller { snapshot: "SNAP2", group: "GROUP1" }, - order: { - group: "ASC", - }, relations: ["salaryProfiles"], }); const salaryOrgGroup2 = await this.salaryOrgRepository.findOne({ @@ -2020,13 +2017,11 @@ export class ReportController extends Controller { snapshot: "SNAP2", group: "GROUP2" }, - order: { - group: "ASC", - }, relations: ["salaryProfiles"], }); const salaryProfileSpecial = await this.salaryProfileRepository.find({ + relations: ["salaryOrg"], where: { salaryOrgId: In([salaryOrgGroup1?.id, salaryOrgGroup2?.id,]), amountSpecial: MoreThan(1), @@ -2046,11 +2041,15 @@ export class ReportController extends Controller { "amountSpecial", ], order: { + salaryOrg: { + group: "ASC" + }, posMasterNo: "ASC", }, }); const salaryProfileNoAmount = await this.salaryProfileRepository.find({ + relations: ["salaryOrg"], where: { salaryOrgId: In([salaryOrgGroup1?.id, salaryOrgGroup2?.id,]), // amountUse: IsNull() || 0, @@ -2071,6 +2070,9 @@ export class ReportController extends Controller { "amount", ], order: { + salaryOrg: { + group: "ASC" + }, posMasterNo: "ASC", }, }); @@ -2105,7 +2107,7 @@ export class ReportController extends Controller { amount: item.amount == undefined || item.amount == null ? "๐" - : Extension.ToThaiNumber(String(item.amount)), + : Extension.ToThaiNumber(String(item.amount.toLocaleString())), remark: null, }));