fix คำสั่งแต่งตั้งลูกจ้างชั่วคราวเป็นลูกจ้างประจำ (ข้อมูลไม่ตำแหน่งเลขที่ไม่แสดง) #1442

This commit is contained in:
Bright 2025-04-24 16:50:46 +07:00
parent 3d1771f110
commit 38e1f62ca5

View file

@ -1741,12 +1741,17 @@ export class CommandController extends Controller {
return {
no: Extension.ToThaiNumber((idx + 1).toString()),
org:
(_child4 == null ? "" : _child4 + "\n") +
(_child3 == null ? "" : _child3 + "\n") +
(_child2 == null ? "" : _child2 + "\n") +
(_child1 == null ? "" : _child1 + "\n") +
(_root == null ? "" : _root),
org: commandCode != "C-PM-21"
? (_child4 == null ? "" : _child4 + "\n") +
(_child3 == null ? "" : _child3 + "\n") +
(_child2 == null ? "" : _child2 + "\n") +
(_child1 == null ? "" : _child1 + "\n") +
(_root == null ? "" : _root)
: (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),
fullName: `${x.prefix}${x.firstName} ${x.lastName}`,
citizenId: Extension.ToThaiNumber(x.citizenId),
position: profile?.position ? profile?.position : "-",
@ -1756,11 +1761,25 @@ export class CommandController extends Controller {
`${profile?.posType.posTypeShortName} ${profile?.posLevel.posLevelName}`,
)
: "-",
posNo: shortName ? Extension.ToThaiNumber(shortName) : "-",
amount: x.amount ? Extension.ToThaiNumber(x.amount.toString()) : "-",
dateRetire: profile?.dateRetire
? Extension.ToThaiNumber(Extension.ToThaiShortDate_monthYear(profile?.dateRetire))
: "-",
posNo: commandCode != "C-PM-21"
? shortName
? Extension.ToThaiNumber(shortName)
: "-"
: Extension.ToThaiNumber(`${profile?.rootShortNameTemp}${profile?.posMasterNoTemp}`) ,
amount: x.amount ? Extension.ToThaiNumber(x.amount.toLocaleString()) : "-",
dateRetire: profile?.dateRetire
? Extension.ToThaiNumber(
Extension.ToThaiShortDate_monthYear(profile?.dateRetire)
)
: profile?.birthDate && commandCode == "C-PM-21"
? Extension.ToThaiNumber(
Extension.ToThaiShortDate_monthYear(
new Date(
profile.birthDate.getFullYear() + 60, profile.birthDate.getMonth(), profile.birthDate.getDate()
)
)
)
: "-",
dateExecute: command.commandExcecuteDate
? Extension.ToThaiNumber(
Extension.ToThaiShortDate_monthYear(command.commandExcecuteDate),