thai number

This commit is contained in:
Bright 2024-03-07 09:35:24 +07:00
parent a8b09b356d
commit 81f31d454e

View file

@ -92,7 +92,7 @@ export class Report_1_Controller extends Controller {
effectiveDate : salaryPeriod?.effectiveDate,
root: salaryProfile[0]?.root,
profile: salaryProfile.map((item, index) => ({
no: index+1,
no: Extension.ToThaiNumber(String(index+1)),
fullname: item.prefix + item.firstName +" "+ item.lastName,
position: item.position + "/" +
(item.child4==undefined && item.child4==null ? "" : item.child4+"/")+
@ -102,8 +102,8 @@ export class Report_1_Controller extends Controller {
(item.root==undefined && item.root==null ? "" : item.root),
posLevel: item.posLevel,
orgShortName: item.orgShortName+item.posMasterNo,
amount: item.amount == null ? 0 : item.amount,
amountSpecial: item.amountSpecial == null ? 0 : item.amountSpecial,
amount: item.amount == undefined || item.amount == null ? "" : Extension.ToThaiNumber(String(item.amount)),
amountSpecial: item.amountSpecial == undefined || item.amountSpecial == null ? "" : Extension.ToThaiNumber(String(item.amountSpecial)),
score: null, //สรุปผลการประเมินฯ ระดับและคะแนน
remark: null //หมายเหตุ
}))
@ -167,14 +167,14 @@ export class Report_1_Controller extends Controller {
});
const mapData = salaryProfile.map((item, index) => ({
no: index+1,
no: Extension.ToThaiNumber(String(index+1)),
fullname: item.prefix + item.firstName +" "+ item.lastName,
position: item.position,
posType: item.posType,
posLevel: item.posLevel,
posMasterNo: item.posMasterNo,
amount: item.amount,
positionSalaryAmount: item.positionSalaryAmount,
posMasterNo: Extension.ToThaiNumber(String(item.posMasterNo)),
amount: item.amount == undefined || item.amount == null ? "" : Extension.ToThaiNumber(String(item.amount)),
positionSalaryAmount: item.positionSalaryAmount == undefined || item.positionSalaryAmount == null ? "" : Extension.ToThaiNumber(String(item.positionSalaryAmount)),
remark: null
}));
@ -253,25 +253,25 @@ export class Report_1_Controller extends Controller {
const profileSpecial = salaryProfileSpecial.map((item, index) => ({
no: index+1,
no: Extension.ToThaiNumber(String(index+1)),
fullname: item.prefix + item.firstName +" "+ item.lastName,
position: item.position,
posType: item.posType,
posLevel: item.posLevel,
posMasterNo: item.posMasterNo,
amount: item.amount,
amountSpecial: item.amountSpecial,
posMasterNo: Extension.ToThaiNumber(String(item.posMasterNo)),
amount: item.amount == undefined || item.amount == null ? "" : Extension.ToThaiNumber(String(item.amount)),
amountSpecial: item.amountSpecial == undefined || item.amountSpecial == null ? "" : Extension.ToThaiNumber(String(item.amountSpecial)),
remark: null
}));
const profileNoAmount = salaryProfileNoAmount.map((item, index) => ({
no: index+1,
no: Extension.ToThaiNumber(String(index+1)),
fullname: item.prefix + item.firstName +" "+ item.lastName,
position: item.position,
posType: item.posType,
posLevel: item.posLevel,
posMasterNo: item.posMasterNo,
amount: item.amount,
posMasterNo: Extension.ToThaiNumber(String(item.posMasterNo)),
amount: item.amount == undefined || item.amount == null ? "" : Extension.ToThaiNumber(String(item.amount)),
remark: null
}));