แก้report ลูกจ้างเลื่อนขั้นเงินเดือนพิเศษ

This commit is contained in:
Kittapath 2024-03-22 12:32:17 +07:00
parent f4c6831c0b
commit bacac6c931

View file

@ -2276,7 +2276,7 @@ export class ReportController extends Controller {
const _salaryPeriod = await this.salaryProfileEmployeeRepository.find({
relations: ["salaryOrg", "salaryOrg.salaryPeriod"],
where: {
type: In(["NONE"]),
isNext: false,
salaryOrg: {
snapshot: "SNAP2",
rootId: rootId,
@ -2532,6 +2532,7 @@ export class ReportController extends Controller {
relations: ["salaryOrg", "salaryOrg.salaryPeriod"],
where: {
type: In(["HAFT", "FULL", "FULLHAFT"]),
isNext: false,
salaryOrg: {
snapshot: "SNAP2",
rootId: rootId,
@ -2767,7 +2768,7 @@ export class ReportController extends Controller {
const _salaryPeriod = await this.salaryProfileEmployeeRepository.find({
relations: ["salaryOrg", "salaryOrg.salaryPeriod"],
where: {
type: In(["HAFT", "FULL", "FULLHAFT"]),
isNext: true,
salaryOrg: {
snapshot: "SNAP2",
rootId: rootId,
@ -2806,9 +2807,17 @@ export class ReportController extends Controller {
posLevel: `${profile.posTypeShort} ${profile.posLevel}`,
posNumber:
profile.orgShortName + Extension.ToThaiNumber(profile.posMasterNo.toLocaleString()),
amount: profile.amount ? Extension.ToThaiNumber(profile.amount.toLocaleString()) : null,
precentTwo: null, //ร้อยละ 2
precentFour: null, //ร้อยละ 4
amount: profile.positionSalaryAmount
? Extension.ToThaiNumber(profile.positionSalaryAmount.toLocaleString())
: null,
precentTwo:
profile.positionSalaryAmountPer == 0.2
? profile.positionSalaryAmount * profile.positionSalaryAmountPer
: null, //ร้อยละ 2
precentFour:
profile.positionSalaryAmountPer == 0.4
? profile.positionSalaryAmount * profile.positionSalaryAmountPer
: null, //ร้อยละ 4
reason: null, // หมายเหตุ
};
});
@ -2842,7 +2851,7 @@ export class ReportController extends Controller {
const _salaryPeriod = await this.salaryProfileEmployeeRepository.find({
relations: ["salaryOrg", "salaryOrg.salaryPeriod"],
where: {
type: In(["NONE"]),
isNext: false,
salaryOrg: {
snapshot: "SNAP2",
rootId: rootId,