fix bug
This commit is contained in:
parent
43a8c8c8f0
commit
8b81afe00d
1 changed files with 5 additions and 5 deletions
|
|
@ -150,7 +150,7 @@ export class SalaryPeriodController extends Controller {
|
|||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลการขอเงินเดือนผู้ใช้งานนี้ในระบบ");
|
||||
}
|
||||
|
||||
await this.salaryProfileRepository.remove(salaryProfile);
|
||||
// await this.salaryProfileRepository.remove(salaryProfile);
|
||||
|
||||
// หาจำนวน Quota คงเหลือ
|
||||
if (salaryProfile.salaryOrg.snapshot == "SNAP1") {
|
||||
|
|
@ -175,7 +175,7 @@ export class SalaryPeriodController extends Controller {
|
|||
})
|
||||
.getRawOne();
|
||||
const calRemainAmount = salaryProfile?.salaryOrg.sixPercentAmount - sumAmountUse.totalAmount;
|
||||
salaryProfile.salaryOrg.useAmount = sumAmountUse;
|
||||
salaryProfile.salaryOrg.useAmount = sumAmountUse.totalAmount;
|
||||
salaryProfile.salaryOrg.remainingAmount = calRemainAmount;
|
||||
await this.salaryOrgRepository.save(salaryProfile?.salaryOrg);
|
||||
}
|
||||
|
|
@ -309,7 +309,7 @@ export class SalaryPeriodController extends Controller {
|
|||
})
|
||||
.getRawOne();
|
||||
const calRemainAmount = salaryProfile?.salaryOrg.sixPercentAmount - sumAmountUse.totalAmount;
|
||||
salaryProfile.salaryOrg.useAmount = sumAmountUse;
|
||||
salaryProfile.salaryOrg.useAmount = sumAmountUse.totalAmount;
|
||||
salaryProfile.salaryOrg.remainingAmount = calRemainAmount;
|
||||
await this.salaryOrgRepository.save(salaryProfile?.salaryOrg);
|
||||
}
|
||||
|
|
@ -366,7 +366,7 @@ export class SalaryPeriodController extends Controller {
|
|||
})
|
||||
.getRawOne();
|
||||
const calRemainAmount = salaryOrg.sixPercentAmount - sumAmountUse.totalAmount;
|
||||
salaryOrg.useAmount = sumAmountUse;
|
||||
salaryOrg.useAmount = sumAmountUse.totalAmount;
|
||||
salaryOrg.remainingAmount = calRemainAmount;
|
||||
await this.salaryOrgRepository.save(salaryOrg);
|
||||
}
|
||||
|
|
@ -711,7 +711,7 @@ export class SalaryPeriodController extends Controller {
|
|||
})
|
||||
.getRawOne();
|
||||
const calRemainAmount = salaryOrg.sixPercentAmount - sumAmountUse.totalAmount;
|
||||
salaryOrg.useAmount = sumAmountUse;
|
||||
salaryOrg.useAmount = sumAmountUse.totalAmount;
|
||||
salaryOrg.remainingAmount = calRemainAmount;
|
||||
await this.salaryOrgRepository.save(salaryOrg);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue