This commit is contained in:
harid 2025-10-01 16:31:40 +07:00
parent 08af004d4a
commit 18aa974c3d
4 changed files with 114 additions and 38 deletions

View file

@ -2786,7 +2786,7 @@ export class ProfileEmployeeController extends Controller {
)
// .andWhere("profileEmployee.leaveCommandId Is NOT NULL")
.andWhere(
"profileSalary.order = (SELECT MAX(ps.order) FROM profileSalary ps WHERE ps.profileEmployeeId = profileEmployee.id)",
"profileSalary.order = (SELECT MAX(ps.order) FROM profileSalary ps WHERE ps.profileEmployeeId = profileEmployee.id and profileSalary.positionName != 'เกษียณอายุราชการ')",
)
// .andWhere(