From 4151fb06599c44e9e7048a3194cd046cc6c7df24 Mon Sep 17 00:00:00 2001 From: AdisakKanthawilang Date: Mon, 10 Feb 2025 15:47:10 +0700 Subject: [PATCH] fix --- 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 8e70846..ea7f5d0 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}`;