diff --git a/src/controllers/SalaryPeriodController.ts b/src/controllers/SalaryPeriodController.ts index a211e49..e63ea12 100644 --- a/src/controllers/SalaryPeriodController.ts +++ b/src/controllers/SalaryPeriodController.ts @@ -425,7 +425,7 @@ export class SalaryPeriodController extends Controller { const checkPreviousType = await this.salaryProfileRepository.findOne({ relations: ["salaryOrg", "salaryOrg.salaryPeriod"], where: { - id: body.profileId, + citizenId: salaryProfile?.citizenId, salaryOrg: { salaryPeriod: { period: "APR", @@ -696,7 +696,7 @@ export class SalaryPeriodController extends Controller { if (salaryProfileAll != null) { throw new HttpError( HttpStatusCode.INTERNAL_SERVER_ERROR, - "ไม่สามารถเพิ่มรายชื่อนี้ได้ เนื่องจากมีการยื่นของเลื่อนเงินเดือนแล้ว", + "ไม่สามารถเพิ่มรายชื่อนี้ได้ เนื่องจากมีการยื่นขอเลื่อนเงินเดือนแล้ว", ); }