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

@ -249,9 +249,13 @@ export class ProfileGovernmentHistoryController extends Controller {
if (record.leaveType == "RETIRE") {
_profileSalary = record?.profileSalary.length > 1
? record?.profileSalary[1]
: null;
: record?.profileSalary.length > 0
? record?.profileSalary[0]
: null;
} else {
_profileSalary = record?.profileSalary[0];
_profileSalary = record?.profileSalary.length > 0
? record?.profileSalary[0]
: null;
}
if (_profileSalary) {
_OrgLeave = [
@ -404,9 +408,13 @@ export class ProfileGovernmentHistoryController extends Controller {
if (record.leaveType == "RETIRE") {
_profileSalary = record?.profileSalary.length > 1
? record?.profileSalary[1]
: null;
: record?.profileSalary.length > 0
? record?.profileSalary[0]
: null;
} else {
_profileSalary = record?.profileSalary[0];
_profileSalary = record?.profileSalary.length > 0
? record?.profileSalary[0]
: null;
}
if (_profileSalary) {
_OrgLeave = [