fix แต่งตั้ง-เลื่อน-ย้าย ไม่ส่งเงินเดือนปัจจุบัน

This commit is contained in:
Bright 2024-10-15 13:56:29 +07:00
parent cd9f17867a
commit 5dc3e25aca
2 changed files with 14 additions and 2 deletions

View file

@ -3978,7 +3978,12 @@ export class ProfileController extends Controller {
// await new permission().PermissionOrgUserGet(request, "SYS_REGISTRY_OFFICER", id);//ไม่แน่ใจOFFปิดไว้ก่อน
const profile = await this.profileRepo.findOne({
where: { id: id },
relations: ["posLevel", "posType", "current_holders", "current_holders.orgRoot"],
relations: ["posLevel", "posType", "current_holders", "current_holders.orgRoot", "profileSalary"],
order: {
profileSalary: {
order: "DESC",
}
}
});
if (!profile) {
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูลบุคคลนี้ในระบบ");
@ -4155,6 +4160,7 @@ export class ProfileController extends Controller {
posNo: shortName,
isPosmasterAct: data.length > 0,
posmasterAct: data,
salary: profile && profile.profileSalary.length > 0 ? profile.profileSalary[0].amount : null,
};
if (_profile.child4Id != null) {