diff --git a/src/controllers/ReportController.ts b/src/controllers/ReportController.ts index 3ac005c..e357d3b 100644 --- a/src/controllers/ReportController.ts +++ b/src/controllers/ReportController.ts @@ -1079,18 +1079,18 @@ export class ReportController extends Controller { body: { refIds: { refId: string - commandAffectDate: Date | null commandNo: string | null + commandYear: number | null commandId: string | null - commandYear: number - templateDoc: string | null + remark: string | null amount: Double | null amountSpecial?: Double | null positionSalaryAmount: Double | null mouthSalaryAmount: Double | null - mpCee?: string | null - refCommandCode?: string | null - refCommandName?: string | null + commandCode?: string | null + commandName?: string | null + commandDateAffect: Date | null + commandDateSign: Date | null }[] } ) { @@ -1099,15 +1099,17 @@ export class ReportController extends Controller { data: body.refIds.map(v => ({ profileId: v.refId, commandId: v.commandId, - date: v.commandAffectDate, - refCommandNo: `${v.commandNo}/${Extension.ToThaiYear(v.commandYear)}`, - salaryRef: v.templateDoc, amount: v.amount, amountSpecial: v.amountSpecial, positionSalaryAmount: v.positionSalaryAmount, mouthSalaryAmount: v.mouthSalaryAmount, - refCommandCode: v.refCommandCode, - refCommandName: v.refCommandName, + commandNo: v.commandNo, + commandYear: v.commandYear, + commandDateAffect: v.commandDateAffect, + commandDateSign: v.commandDateSign, + commandCode: v.commandCode, + commandName: v.commandName, + remark: v.remark, })), }) .then(async res => { @@ -1172,18 +1174,18 @@ export class ReportController extends Controller { body: { refIds: { refId: string - commandAffectDate: Date | null commandNo: string | null + commandYear: number | null commandId: string | null - commandYear: number - templateDoc: string | null + remark: string | null amount: Double | null amountSpecial?: Double | null positionSalaryAmount: Double | null mouthSalaryAmount: Double | null - mpCee?: string | null - refCommandCode?: string | null - refCommandName?: string | null + commandCode?: string | null + commandName?: string | null + commandDateAffect: Date | null + commandDateSign: Date | null }[] } ) { @@ -1192,15 +1194,18 @@ export class ReportController extends Controller { data: body.refIds.map(v => ({ profileId: v.refId, commandId: v.commandId, - date: v.commandAffectDate, - refCommandNo: `${v.commandNo}/${Extension.ToThaiYear(v.commandYear)}`, - salaryRef: v.templateDoc, amount: v.amount, + amountSpecial: v.amountSpecial, positionSalaryAmount: v.positionSalaryAmount, mouthSalaryAmount: v.mouthSalaryAmount, isGovernment: false, - refCommandCode: v.refCommandCode, - refCommandName: v.refCommandName, + commandNo: v.commandNo, + commandYear: v.commandYear, + commandDateAffect: v.commandDateAffect, + commandDateSign: v.commandDateSign, + commandCode: v.commandCode, + commandName: v.commandName, + remark: v.remark, })), }) .then(async res => {