From 3fc27af7c5de6acf1d3801d51efbd2c79341352c Mon Sep 17 00:00:00 2001 From: AdisakKanthawilang Date: Mon, 10 Feb 2025 15:40:22 +0700 Subject: [PATCH] fix report --- src/controllers/ReportController.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/controllers/ReportController.ts b/src/controllers/ReportController.ts index 8f66e49..8e70846 100644 --- a/src/controllers/ReportController.ts +++ b/src/controllers/ReportController.ts @@ -2662,13 +2662,13 @@ export class ReportController extends Controller { const agency = _salaryPeriod[0] == null ? "" : _salaryPeriod[0].root; const fifteenPercent = - (_salaryPeriod[0].salaryOrg == null || _salaryPeriod[0].salaryOrg.fifteenPercent == null + (_salaryPeriod[0].salaryOrg == null || _salaryPeriod[0].salaryOrg?.fifteenPercent == null ? "" - : _salaryPeriod[0].salaryOrg.fifteenPercent.toString()) + + : _salaryPeriod[0].salaryOrg?.fifteenPercent.toString()) + "." + - (_salaryPeriod[0].salaryOrg == null || _salaryPeriod[0].salaryOrg.fifteenPoint == null + (_salaryPeriod[0].salaryOrg == null || _salaryPeriod[0].salaryOrg?.fifteenPoint == null ? "๐๐" - : _salaryPeriod[0].salaryOrg.fifteenPoint.toString()); + : _salaryPeriod[0].salaryOrg?.fifteenPoint.toString()); const formattedData = _salaryPeriod.map((profile, index) => { const fullName = `${profile.prefix}${profile.firstName} ${profile.lastName}`;