fix SalaryEmployee ลบไฟล์ รวมไฟล์ เพิ่ม field

This commit is contained in:
AnandaTon 2024-05-16 15:03:29 +07:00
parent 42bad7b302
commit 3b5096c005
7 changed files with 55 additions and 920 deletions

View file

@ -277,7 +277,7 @@ export class OrganizationUnauthorizeController extends Controller {
.leftJoinAndSelect("employeePosMaster.orgChild3", "orgChild3")
.leftJoinAndSelect("employeePosMaster.orgChild4", "orgChild4")
.leftJoinAndSelect("employeePosMaster.positions", "positions")
.leftJoinAndSelect("current_holder.profileSalary", "profileSalary")
.leftJoinAndSelect("current_holder.profileSalarys", "profileSalarys")
.leftJoinAndSelect("current_holder.profileDisciplines", "profileDisciplines")
.leftJoinAndSelect("current_holder.posLevel", "posLevel")
.leftJoinAndSelect("current_holder.posType", "posType")
@ -370,9 +370,9 @@ export class OrganizationUnauthorizeController extends Controller {
}
const amount =
item.current_holder == null || item.current_holder.profileSalary.length == 0
item.current_holder == null || item.current_holder.profileSalarys.length == 0
? null
: item.current_holder.profileSalary.sort((a: any, b: any) => b.date - a.date)[0].amount;
: item.current_holder.profileSalarys.sort((a: any, b: any) => b.date - a.date)[0].amount;
let datePeriodStart = new Date(
`${new Date().getFullYear()}-${String(new Date().getMonth() + 1).padStart(2, "0")}-${String(new Date().getDate() + 1).padStart(2, "0")}T00:00:00.000Z`,
);