diff --git a/src/controllers/SalaryPeriodController.ts b/src/controllers/SalaryPeriodController.ts index 2d790c2..4b2307b 100644 --- a/src/controllers/SalaryPeriodController.ts +++ b/src/controllers/SalaryPeriodController.ts @@ -1056,7 +1056,7 @@ export class SalaryPeriodController extends Controller { const amountFullType = await this.salaryProfileRepository.count({ where: { - salaryOrgId: salaryOrg.id, + salaryOrgId: salaryOrg?.id, type: "FULL", }, }); @@ -1073,7 +1073,7 @@ export class SalaryPeriodController extends Controller { .createQueryBuilder("salaryProfile") .select("SUM(salaryProfile.amountUse)", "totalAmount") .where({ - salaryOrgId: salaryOrg.id, + salaryOrgId: salaryOrg?.id, type: In(["HAFT", "FULL", "FULLHAFT"]), }) .getRawOne();