fix
This commit is contained in:
parent
3b32e38e53
commit
c2b7df9146
1 changed files with 28 additions and 25 deletions
|
|
@ -5915,33 +5915,36 @@ export class ReportController extends Controller {
|
|||
});
|
||||
|
||||
//ปีก่อนหน้า
|
||||
salaryProfilePerviousAPR = await this.salaryProfileEmployeeRepository.find({
|
||||
relations: ["salaryOrg", "salaryOrg.salaryPeriod"],
|
||||
where: {
|
||||
salaryOrg: {
|
||||
snapshot: "SNAP2",
|
||||
salaryPeriodId: perviousYearAPR.id,
|
||||
if(perviousYearAPR){
|
||||
salaryProfilePerviousAPR = await this.salaryProfileEmployeeRepository.find({
|
||||
relations: ["salaryOrg", "salaryOrg.salaryPeriod"],
|
||||
where: {
|
||||
salaryOrg: {
|
||||
snapshot: "SNAP2",
|
||||
salaryPeriodId: perviousYearAPR.id,
|
||||
},
|
||||
},
|
||||
},
|
||||
order: {
|
||||
orgShortName: "ASC",
|
||||
posMasterNo: "ASC",
|
||||
},
|
||||
});
|
||||
|
||||
salaryProfilePerviousOCT = await this.salaryProfileEmployeeRepository.find({
|
||||
relations: ["salaryOrg", "salaryOrg.salaryPeriod"],
|
||||
where: {
|
||||
salaryOrg: {
|
||||
snapshot: "SNAP2",
|
||||
salaryPeriodId: perviousYearOCT.id,
|
||||
order: {
|
||||
orgShortName: "ASC",
|
||||
posMasterNo: "ASC",
|
||||
},
|
||||
},
|
||||
order: {
|
||||
orgShortName: "ASC",
|
||||
posMasterNo: "ASC",
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
if(perviousYearOCT){
|
||||
salaryProfilePerviousOCT = await this.salaryProfileEmployeeRepository.find({
|
||||
relations: ["salaryOrg", "salaryOrg.salaryPeriod"],
|
||||
where: {
|
||||
salaryOrg: {
|
||||
snapshot: "SNAP2",
|
||||
salaryPeriodId: perviousYearOCT.id,
|
||||
},
|
||||
},
|
||||
order: {
|
||||
orgShortName: "ASC",
|
||||
posMasterNo: "ASC",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
//ปีปัจุบัน
|
||||
const salaryProfileCurrentAPR = await this.salaryProfileEmployeeRepository.find({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue