คำสั่งค่าตอบแทนพิเศษ และผู้ไม่ได้เลื่อนเงินเดือน รอบตุลาคม (gov2-09)

This commit is contained in:
Bright 2024-04-10 12:12:36 +07:00
parent 0168c58b73
commit d3dd633dff

View file

@ -2271,9 +2271,9 @@ export class ReportController extends Controller {
}
/**
* APIคำสั่งค่าตอบแทนพิเศษ
* APIคำสั่งค่าตอบแทนพิเศษ
*
* @summary
* @summary
*
* @param {string} rootId Guid, *Id Root
* @param {string} salaryPeriodId Guid, *Id Period
@ -2283,7 +2283,7 @@ export class ReportController extends Controller {
const salaryPeriod = await this.salaryPeriodRepository.findOne({
where: {
id: salaryPeriodId,
period: "APR",
// period: "APR",
isActive: true,
},
});
@ -2405,13 +2405,18 @@ export class ReportController extends Controller {
}));
return new HttpSuccess({
template: "gov1-08",
reportName: "gov1-08",
template: salaryPeriod.period === "APR" ? "gov1-08" : "gov2-09",
reportName: salaryPeriod.period === "APR" ? "gov1-08" : "gov2-09",
data: {
year: Extension.ToThaiNumber(String(Extension.ToThaiYear(salaryPeriod.year))),
date: Extension.ToThaiNumber(
date: salaryPeriod.period === "APR"
? Extension.ToThaiNumber(
Extension.ToThaiFullDate(new Date(`${salaryPeriod.year}-04-01`)),
)
: Extension.ToThaiNumber(
Extension.ToThaiFullDate(new Date(`${salaryPeriod.year}-10-01`)),
),
agency: salaryOrgGroup1?.root,
profileSpecial: profileSpecial,
profileNoAmount: profileNoAmount,
},