no message
This commit is contained in:
parent
e8abc29fdc
commit
69df428a4a
2 changed files with 91 additions and 1 deletions
|
|
@ -887,6 +887,26 @@ export class SalaryPeriodController extends Controller {
|
|||
return new HttpSuccess(salaryProfile.id);
|
||||
}
|
||||
|
||||
/**
|
||||
* API ปิดรอบเงินเดือน
|
||||
*
|
||||
* @summary SLR_032 - ปิดรอบเงินเดือน #31
|
||||
*
|
||||
* @param {string} id Guid, *Id รอบเงินเดือน
|
||||
*/
|
||||
@Get("close/{id}")
|
||||
async closeSalaryPeriod_ById(@Path() id: string) {
|
||||
const salaryPeriod = await this.salaryPeriodRepository.findOne({
|
||||
where: { id: id },
|
||||
});
|
||||
if (!salaryPeriod) {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลรอบผังเงินเดือนนี้");
|
||||
}
|
||||
salaryPeriod.isClose = !salaryPeriod.isClose;
|
||||
await this.salaryPeriodRepository.save(salaryPeriod);
|
||||
return new HttpSuccess();
|
||||
}
|
||||
|
||||
/**
|
||||
* API สร้างรอบเงินเดือน
|
||||
*
|
||||
|
|
@ -1017,7 +1037,7 @@ export class SalaryPeriodController extends Controller {
|
|||
"period",
|
||||
"isActive",
|
||||
"effectiveDate",
|
||||
"isActive",
|
||||
"isClose",
|
||||
"status",
|
||||
"year",
|
||||
"revisionId",
|
||||
|
|
@ -1051,6 +1071,7 @@ export class SalaryPeriodController extends Controller {
|
|||
"salaryPeriod.id",
|
||||
"salaryPeriod.period",
|
||||
"salaryPeriod.isActive",
|
||||
"salaryPeriod.isClose",
|
||||
"salaryPeriod.effectiveDate",
|
||||
"salaryPeriod.status",
|
||||
"salaryPeriod.year",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue