fix update salary preriod
This commit is contained in:
parent
aaaf4f548c
commit
2cef1f1b76
1 changed files with 2 additions and 1 deletions
|
|
@ -101,12 +101,13 @@ export class SalaryPeriodController extends Controller {
|
|||
const chk_period = await this.salaryPeriodRepository.findOne({
|
||||
where: {
|
||||
period: requestBody.period,
|
||||
id: Not(id),
|
||||
effectiveDate: Between(startOfYear, endOfYear)
|
||||
},
|
||||
});
|
||||
|
||||
if (chk_period) {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ประเภทผังปี "+ requestBody.effectiveDate.getFullYear() +" ซ้ำ");
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ประเภทผังปี "+ (requestBody.effectiveDate.getFullYear()+543) +" ซ้ำ");
|
||||
}
|
||||
|
||||
chk_SalaryPeriod.period = requestBody.period.toUpperCase();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue