This commit is contained in:
AdisakKanthawilang 2025-01-24 10:21:39 +07:00
parent 6861515843
commit 2a524305bf

View file

@ -3261,7 +3261,8 @@ export class ReportController extends Controller {
template: "emp1-10",
reportName: "emp1-10",
data: {
year: Extension.ToThaiNumber(String(Extension.ToThaiYear(salaryPeriod.year))),
yearOld: salaryPeriod.year?Extension.ToThaiNumber(String(Extension.ToThaiYear(salaryPeriod.year - 1))):"",
year: salaryPeriod.year?Extension.ToThaiNumber(String(Extension.ToThaiYear(salaryPeriod.year))):"",
agency: agency,
data: formattedData,
},
@ -3561,14 +3562,14 @@ export class ReportController extends Controller {
no: Extension.ToThaiNumber((index + 1).toLocaleString()),
fullName: fullName,
affiliation: affiliation,
position: profile.position,
position: profile.position?? "-",
posLevel: profile.posLevel
? `${profile.posTypeShort} ${Extension.ToThaiNumber(profile.posLevel.toLocaleString())}`
: null,
posNumber:
: "-",
posNumber:profile.orgShortName || profile.posMasterNo ?
Extension.ToThaiNumber(profile.orgShortName) +
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString()),
amount: profile.amount ? Extension.ToThaiNumber(profile.amount.toLocaleString()) : null,
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString()):"-",
amount: profile.amount ? Extension.ToThaiNumber(profile.amount.toLocaleString()) : "-",
reason: null, // หมายเหตุ
};
});
@ -3638,24 +3639,24 @@ export class ReportController extends Controller {
no: Extension.ToThaiNumber((index + 1).toLocaleString()),
fullName: fullName,
affiliation: affiliation,
position: profile.position,
position: profile.position?? "-",
posLevel: profile.posLevel
? `${profile.posTypeShort} ${Extension.ToThaiNumber(profile.posLevel.toLocaleString())}`
: null,
posNumber:
: "-",
posNumber:profile.orgShortName || profile.posMasterNo ?
Extension.ToThaiNumber(profile.orgShortName) +
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString()),
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString()):"-",
amount: profile.positionSalaryAmount
? Extension.ToThaiNumber(profile.positionSalaryAmount.toLocaleString())
: null,
: "-",
precentTwo:
profile.positionSalaryAmountPer == 0.02
? profile.positionSalaryAmount * profile.positionSalaryAmountPer
: null, //ร้อยละ 2
? Extension.ToThaiNumber((profile.positionSalaryAmount * profile.positionSalaryAmountPer).toLocaleString())
: "-", //ร้อยละ 2
precentFour:
profile.positionSalaryAmountPer == 0.04
? profile.positionSalaryAmount * profile.positionSalaryAmountPer
: null, //ร้อยละ 4
? Extension.ToThaiNumber((profile.positionSalaryAmount * profile.positionSalaryAmountPer).toLocaleString())
: "-", //ร้อยละ 4
reason: null, // หมายเหตุ
};
});
@ -4680,29 +4681,35 @@ export class ReportController extends Controller {
const affiliation = fullNameParts
.filter((part) => part !== undefined && part !== null)
.join("/");
const positionParts = [
profile.position,
profile.child4,
profile.child3,
profile.child2,
profile.child1,
profile.root,
];
const position = positionParts
.filter((part) => part !== undefined && part !== null)
.join("/");
const fullName = `${profile.prefix}${profile.firstName} ${profile.lastName}`;
return {
no: Extension.ToThaiNumber((index + 1).toLocaleString()),
fullName: fullName,
affiliation: affiliation,
position:
profile.position +
"/" +
(profile.child4 == undefined && profile.child4 == null ? "" : profile.child4 + "/") +
(profile.child3 == undefined && profile.child3 == null ? "" : profile.child3 + "/") +
(profile.child2 == undefined && profile.child2 == null ? "" : profile.child2 + "/") +
(profile.child1 == undefined && profile.child1 == null ? "" : profile.child1 + "/") +
(profile.root == undefined && profile.root == null ? "" : profile.root),
posLevel: profile.posLevel,
posNumber:
position: position,
posLevel: profile.posLevel?Extension.ToThaiNumber(profile.posLevel.toLocaleString()) : "-",
posNumber:profile.orgShortName || profile.posMasterNo ?
Extension.ToThaiNumber(profile.orgShortName) +
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString()),
amount: profile.amount ? Extension.ToThaiNumber(profile.amount.toLocaleString()) : null,
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString()):"-",
amount: profile.amount ? Extension.ToThaiNumber(profile.amount.toLocaleString()) : "-",
positionSalaryAmount: profile.positionSalaryAmount
? Extension.ToThaiNumber(profile.positionSalaryAmount.toLocaleString())
: null,
score: profile.result,
: "-",
score: profile.result??"-",
reason: profile.remark,
remark: null,
};