diff --git a/src/controllers/ProfileEmployeeController.ts b/src/controllers/ProfileEmployeeController.ts index 10ff5e45..3ef9e1bd 100644 --- a/src/controllers/ProfileEmployeeController.ts +++ b/src/controllers/ProfileEmployeeController.ts @@ -316,17 +316,13 @@ export class ProfileEmployeeController extends Controller { ? Extension.ToThaiNumber(Extension.ToThaiShortDate_monthYear(profile.dateRetire)) : "", salaryAmount: - profile.profileSalary.length > 0 && profile.profileSalary[0].amount != null - ? Extension.ToThaiNumber(profile.profileSalary[0].amount.toLocaleString()) - : "", + profile.amount != null ? Extension.ToThaiNumber(profile.amount.toLocaleString()) : "", registrationAddress: Extension.ToThaiNumber( `${_regisAddres}${_subDistrict}${_district}${_province}${registrationZipCode}`, ), - salaryDate: - profile.profileSalary.length > 0 && profile.profileSalary[0].date != null - ? Extension.ToThaiNumber( - Extension.ToThaiShortDate_monthYear(profile.profileSalary[0].date), - ) + date: + salary_raw.length > 0 && salary_raw[0].date != null + ? Extension.ToThaiNumber(Extension.ToThaiShortDate(salary_raw[0].date)) : "", positionName: profile.position != null ? profile.position : "", appointText: diff --git a/src/controllers/ProfileEmployeeTempController.ts b/src/controllers/ProfileEmployeeTempController.ts index 74ec8626..f1c0bb87 100644 --- a/src/controllers/ProfileEmployeeTempController.ts +++ b/src/controllers/ProfileEmployeeTempController.ts @@ -311,17 +311,13 @@ export class ProfileEmployeeTempController extends Controller { ? Extension.ToThaiNumber(Extension.ToThaiShortDate_monthYear(profile.dateRetire)) : "", salaryAmount: - profile.profileSalary.length > 0 && profile.profileSalary[0].amount != null - ? Extension.ToThaiNumber(profile.profileSalary[0].amount.toLocaleString()) - : "", + profile.amount != null ? Extension.ToThaiNumber(profile.amount.toLocaleString()) : "", registrationAddress: Extension.ToThaiNumber( `${_regisAddres}${_subDistrict}${_district}${_province}${registrationZipCode}`, ), - salaryDate: - profile.profileSalary.length > 0 && profile.profileSalary[0].date != null - ? Extension.ToThaiNumber( - Extension.ToThaiShortDate_monthYear(profile.profileSalary[0].date), - ) + date: + salary_raw.length > 0 && salary_raw[0].date != null + ? Extension.ToThaiNumber(Extension.ToThaiShortDate(salary_raw[0].date)) : "", positionName: profile.position != null ? profile.position : "", appointText: