update script รันเกษียณ #169

This commit is contained in:
harid 2025-10-02 11:40:01 +07:00
parent 7ffb698252
commit 6b719049b0
3 changed files with 38 additions and 15 deletions

View file

@ -264,11 +264,15 @@ export class ProfileGovernmentEmployeeController extends Controller {
// profileSalary.length > 0 && profileSalary[0].orgRoot ? profileSalary[0].orgRoot : null,
// ];
if (record.leaveType == "RETIRE") {
_profileSalary = record?.profileSalary.length > 1
? record?.profileSalary[1]
: null;
_profileSalary = profileSalary.length > 1
? profileSalary[1]
: profileSalary.length > 0
? profileSalary[0]
: null;
} else {
_profileSalary = record?.profileSalary[0];
_profileSalary = profileSalary.length > 0
? profileSalary[0]
: null
}
if (_profileSalary) {
_OrgLeave = [
@ -435,11 +439,15 @@ export class ProfileGovernmentEmployeeController extends Controller {
// profileSalary.length > 0 && profileSalary[0].orgRoot ? profileSalary[0].orgRoot : null,
// ];
if (record.leaveType == "RETIRE") {
_profileSalary = record?.profileSalary.length > 1
? record?.profileSalary[1]
: null;
_profileSalary = profileSalary.length > 1
? profileSalary[1]
: profileSalary.length > 0
? profileSalary[0]
: null;
} else {
_profileSalary = record?.profileSalary[0];
_profileSalary = profileSalary.length > 0
? profileSalary[0]
: null;
}
if (_profileSalary) {
_OrgLeave = [