Merge branch 'develop' into adiDev

This commit is contained in:
AdisakKanthawilang 2024-04-10 14:11:54 +07:00
commit 36bcf2fc07

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,
},