From c500ff4b7ad9d1d6232de60c212fe0935a65fcfd Mon Sep 17 00:00:00 2001 From: harid Date: Thu, 9 Oct 2025 14:49:55 +0700 Subject: [PATCH] =?UTF-8?q?fix=20#1836=20=E0=B8=9B=E0=B8=A3=E0=B8=B1?= =?UTF-8?q?=E0=B8=9A=E0=B9=83=E0=B8=AB=E0=B9=89=E0=B9=81=E0=B8=AA=E0=B8=94?= =?UTF-8?q?=E0=B8=87=E0=B8=95=E0=B8=B2=E0=B8=A1=E0=B8=95=E0=B8=B3=E0=B9=81?= =?UTF-8?q?=E0=B8=AB=E0=B8=99=E0=B9=88=E0=B8=87=E0=B8=97=E0=B8=B5=E0=B9=88?= =?UTF-8?q?=E0=B8=9A=E0=B8=A3=E0=B8=A3=E0=B8=88=E0=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/CommandController.ts | 32 +++++++++------------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/src/controllers/CommandController.ts b/src/controllers/CommandController.ts index 22ebd41d..2c18fd52 100644 --- a/src/controllers/CommandController.ts +++ b/src/controllers/CommandController.ts @@ -1954,20 +1954,13 @@ export class CommandController extends Controller { const orgLeave = _OrgLeave.filter((x: any) => x !== undefined && x !== null).join("\n"); return { no: Extension.ToThaiNumber((idx + 1).toString()), - org: - commandCode != "C-PM-21" - ? profile?.isLeave == false - ? (_child4 == null ? "" : _child4 + "\n") + - (_child3 == null ? "" : _child3 + "\n") + - (_child2 == null ? "" : _child2 + "\n") + - (_child1 == null ? "" : _child1 + "\n") + - (_root == null ? "" : _root) - : orgLeave - : (profile?.child4Temp == null ? "" : profile?.child4Temp + "\n") + - (profile?.child3Temp == null ? "" : profile?.child3Temp + "\n") + - (profile?.child2Temp == null ? "" : profile?.child2Temp + "\n") + - (profile?.child1Temp == null ? "" : profile?.child1Temp + "\n") + - (profile?.rootTemp == null ? "" : profile?.rootTemp), + org: profile?.isLeave == false + ? (_child4 == null ? "" : _child4 + "\n") + + (_child3 == null ? "" : _child3 + "\n") + + (_child2 == null ? "" : _child2 + "\n") + + (_child1 == null ? "" : _child1 + "\n") + + (_root == null ? "" : _root) + : orgLeave, fullName: `${x.prefix}${x.firstName} ${x.lastName}`, citizenId: Extension.ToThaiNumber(x.citizenId), position: profile?.position ? profile?.position : "-", @@ -1977,14 +1970,9 @@ export class CommandController extends Controller { `${profile?.posType.posTypeShortName} ${profile?.posLevel.posLevelName}`, ) : "-", - posNo: - commandCode != "C-PM-21" - ? shortName - ? Extension.ToThaiNumber(shortName) - : "-" - : Extension.ToThaiNumber( - `${profile?.rootShortNameTemp} ${profile?.posMasterNoTemp}`, - ), + posNo: shortName + ? Extension.ToThaiNumber(shortName) + : "-", amount: x.amount ? Extension.ToThaiNumber(x.amount.toLocaleString()) : "-", dateRetire: profile?.dateRetire ? Extension.ToThaiNumber(Extension.ToThaiShortDate_monthYear(profile?.dateRetire))