Merge branch 'develop' into adiDev
This commit is contained in:
commit
8d3fa8f7a7
3 changed files with 91 additions and 36 deletions
|
|
@ -442,6 +442,7 @@ export class ReportController extends Controller {
|
|||
date: Extension.ToThaiNumber(
|
||||
Extension.ToThaiFullDate(new Date(`${salaryPeriod.year}-03-01`)),
|
||||
),
|
||||
year: Extension.ToThaiNumber((salaryPeriod.year + 543).toString()),
|
||||
dateNow: Extension.ToThaiNumber(Extension.ToThaiFullDate(new Date())),
|
||||
agency: agency,
|
||||
data1: formattedData1,
|
||||
|
|
@ -452,9 +453,22 @@ export class ReportController extends Controller {
|
|||
});
|
||||
} else {
|
||||
let data1 = _salaryPeriod.find((x) => x.group == "GROUP2");
|
||||
const _salaryPeriodAPR = await this.salaryOrgRepository.find({
|
||||
const _salaryPeriodAPR1 = await this.salaryOrgRepository.findOne({
|
||||
where: {
|
||||
snapshot: "SNAP1",
|
||||
group: "GROUP1",
|
||||
rootId: rootId,
|
||||
salaryPeriod: {
|
||||
period: "APR",
|
||||
year: salaryPeriod.year,
|
||||
},
|
||||
},
|
||||
order: { group: "ASC" },
|
||||
});
|
||||
const _salaryPeriodAPR2 = await this.salaryOrgRepository.findOne({
|
||||
where: {
|
||||
snapshot: "SNAP1",
|
||||
group: "GROUP2",
|
||||
rootId: rootId,
|
||||
salaryPeriod: {
|
||||
period: "APR",
|
||||
|
|
@ -470,7 +484,7 @@ export class ReportController extends Controller {
|
|||
.reduce((accumulator, object: any) => {
|
||||
return (
|
||||
accumulator +
|
||||
(object.amount == null ? 0 : object.amount) +
|
||||
(object.amountUse == null ? 0 : object.amountUse) +
|
||||
(object.amountSpecial == null ? 0 : object.amountSpecial)
|
||||
);
|
||||
}, 0);
|
||||
|
|
@ -480,16 +494,16 @@ export class ReportController extends Controller {
|
|||
.reduce((accumulator, object: any) => {
|
||||
return (
|
||||
accumulator +
|
||||
(object.amount == null ? 0 : object.amount) +
|
||||
(object.amountUse == null ? 0 : object.amountUse) +
|
||||
(object.amountSpecial == null ? 0 : object.amountSpecial)
|
||||
);
|
||||
}, 0);
|
||||
const fullHaftSalary = data1.salaryProfiles
|
||||
.filter((x) => x.type == "NONE")
|
||||
.filter((x) => x.type == "FULLHAFT")
|
||||
.reduce((accumulator, object: any) => {
|
||||
return (
|
||||
accumulator +
|
||||
(object.amount == null ? 0 : object.amount) +
|
||||
(object.amountUse == null ? 0 : object.amountUse) +
|
||||
(object.amountSpecial == null ? 0 : object.amountSpecial)
|
||||
);
|
||||
}, 0);
|
||||
|
|
@ -501,6 +515,12 @@ export class ReportController extends Controller {
|
|||
remainingAmount: Extension.ToThaiNumber(
|
||||
(data1.sixPercentAmount - data1.spentAmount).toString(),
|
||||
),
|
||||
fifteenPercentOld: Extension.ToThaiNumber(
|
||||
(_salaryPeriodAPR2 == null ? 0 : _salaryPeriodAPR2.fifteenPercent).toString(),
|
||||
),
|
||||
totalOld: Extension.ToThaiNumber(
|
||||
(_salaryPeriodAPR2 == null ? 0 : _salaryPeriodAPR2.total).toString(),
|
||||
),
|
||||
haft: Extension.ToThaiNumber(
|
||||
data1.salaryProfiles.filter((x) => x.type == "HAFT").length.toString(),
|
||||
),
|
||||
|
|
@ -508,7 +528,7 @@ export class ReportController extends Controller {
|
|||
data1.salaryProfiles.filter((x) => x.type == "FULL").length.toString(),
|
||||
),
|
||||
fullHaft: Extension.ToThaiNumber(
|
||||
data1.salaryProfiles.filter((x) => x.type == "HAFT").length.toString(),
|
||||
data1.salaryProfiles.filter((x) => x.type == "FULLHAFT").length.toString(),
|
||||
),
|
||||
notPromoted: Extension.ToThaiNumber(
|
||||
data1.salaryProfiles.filter((x) => x.type == "NONE").length.toString(),
|
||||
|
|
@ -543,7 +563,7 @@ export class ReportController extends Controller {
|
|||
.reduce((accumulator, object: any) => {
|
||||
return (
|
||||
accumulator +
|
||||
(object.amount == null ? 0 : object.amount) +
|
||||
(object.amountUse == null ? 0 : object.amountUse) +
|
||||
(object.amountSpecial == null ? 0 : object.amountSpecial)
|
||||
);
|
||||
}, 0);
|
||||
|
|
@ -559,12 +579,12 @@ export class ReportController extends Controller {
|
|||
.reduce((accumulator, object: any) => {
|
||||
return (
|
||||
accumulator +
|
||||
(object.amount == null ? 0 : object.amount) +
|
||||
(object.amountUse == null ? 0 : object.amountUse) +
|
||||
(object.amountSpecial == null ? 0 : object.amountSpecial)
|
||||
);
|
||||
}, 0);
|
||||
const fullHaftSalary = data2.salaryProfiles
|
||||
.filter((x) => x.type == "NONE")
|
||||
.filter((x) => x.type == "FULLHAFT")
|
||||
.filter(
|
||||
(x) =>
|
||||
x.posLevel == "อาวุโส" ||
|
||||
|
|
@ -574,7 +594,7 @@ export class ReportController extends Controller {
|
|||
.reduce((accumulator, object: any) => {
|
||||
return (
|
||||
accumulator +
|
||||
(object.amount == null ? 0 : object.amount) +
|
||||
(object.amountUse == null ? 0 : object.amountUse) +
|
||||
(object.amountSpecial == null ? 0 : object.amountSpecial)
|
||||
);
|
||||
}, 0);
|
||||
|
|
@ -587,6 +607,12 @@ export class ReportController extends Controller {
|
|||
remainingAmount: Extension.ToThaiNumber(
|
||||
(data2.sixPercentAmount - data2.spentAmount).toString(),
|
||||
),
|
||||
fifteenPercentOld: Extension.ToThaiNumber(
|
||||
(_salaryPeriodAPR1 == null ? 0 : _salaryPeriodAPR1.fifteenPercent).toString(),
|
||||
),
|
||||
totalOld: Extension.ToThaiNumber(
|
||||
(_salaryPeriodAPR1 == null ? 0 : _salaryPeriodAPR1.total).toString(),
|
||||
),
|
||||
haft: Extension.ToThaiNumber(
|
||||
data2.salaryProfiles
|
||||
.filter(
|
||||
|
|
@ -617,7 +643,7 @@ export class ReportController extends Controller {
|
|||
x.posLevel == "ชำนาญการพิเศษ" ||
|
||||
(x.posLevel == "ต้น" && x.posType == "อำนวยการ"),
|
||||
)
|
||||
.filter((x) => x.type == "HAFT")
|
||||
.filter((x) => x.type == "FULLHAFT")
|
||||
.length.toString(),
|
||||
),
|
||||
notPromoted: Extension.ToThaiNumber(
|
||||
|
|
@ -662,7 +688,7 @@ export class ReportController extends Controller {
|
|||
.reduce((accumulator, object: any) => {
|
||||
return (
|
||||
accumulator +
|
||||
(object.amount == null ? 0 : object.amount) +
|
||||
(object.amountUse == null ? 0 : object.amountUse) +
|
||||
(object.amountSpecial == null ? 0 : object.amountSpecial)
|
||||
);
|
||||
}, 0);
|
||||
|
|
@ -679,12 +705,12 @@ export class ReportController extends Controller {
|
|||
.reduce((accumulator, object: any) => {
|
||||
return (
|
||||
accumulator +
|
||||
(object.amount == null ? 0 : object.amount) +
|
||||
(object.amountUse == null ? 0 : object.amountUse) +
|
||||
(object.amountSpecial == null ? 0 : object.amountSpecial)
|
||||
);
|
||||
}, 0);
|
||||
const fullHaftSalary = data3.salaryProfiles
|
||||
.filter((x) => x.type == "NONE")
|
||||
.filter((x) => x.type == "FULLHAFT")
|
||||
.filter(
|
||||
(x) =>
|
||||
x.posLevel == "ปฏิบัติงาน" ||
|
||||
|
|
@ -695,7 +721,7 @@ export class ReportController extends Controller {
|
|||
.reduce((accumulator, object: any) => {
|
||||
return (
|
||||
accumulator +
|
||||
(object.amount == null ? 0 : object.amount) +
|
||||
(object.amountUse == null ? 0 : object.amountUse) +
|
||||
(object.amountSpecial == null ? 0 : object.amountSpecial)
|
||||
);
|
||||
}, 0);
|
||||
|
|
@ -707,6 +733,12 @@ export class ReportController extends Controller {
|
|||
remainingAmount: Extension.ToThaiNumber(
|
||||
(data3.sixPercentAmount - data3.spentAmount).toString(),
|
||||
),
|
||||
fifteenPercentOld: Extension.ToThaiNumber(
|
||||
(_salaryPeriodAPR1 == null ? 0 : _salaryPeriodAPR1.fifteenPercent).toString(),
|
||||
),
|
||||
totalOld: Extension.ToThaiNumber(
|
||||
(_salaryPeriodAPR1 == null ? 0 : _salaryPeriodAPR1.total).toString(),
|
||||
),
|
||||
haft: Extension.ToThaiNumber(
|
||||
data3.salaryProfiles
|
||||
.filter((x) => x.type == "HAFT")
|
||||
|
|
@ -733,7 +765,7 @@ export class ReportController extends Controller {
|
|||
),
|
||||
fullHaft: Extension.ToThaiNumber(
|
||||
data3.salaryProfiles
|
||||
.filter((x) => x.type == "HAFT")
|
||||
.filter((x) => x.type == "FULLHAFT")
|
||||
.filter(
|
||||
(x) =>
|
||||
x.posLevel == "ปฏิบัติงาน" ||
|
||||
|
|
@ -779,7 +811,7 @@ export class ReportController extends Controller {
|
|||
.reduce((accumulator, object: any) => {
|
||||
return (
|
||||
accumulator +
|
||||
(object.amount == null ? 0 : object.amount) +
|
||||
(object.amountUse == null ? 0 : object.amountUse) +
|
||||
(object.amountSpecial == null ? 0 : object.amountSpecial)
|
||||
);
|
||||
}, 0);
|
||||
|
|
@ -789,16 +821,16 @@ export class ReportController extends Controller {
|
|||
.reduce((accumulator, object: any) => {
|
||||
return (
|
||||
accumulator +
|
||||
(object.amount == null ? 0 : object.amount) +
|
||||
(object.amountUse == null ? 0 : object.amountUse) +
|
||||
(object.amountSpecial == null ? 0 : object.amountSpecial)
|
||||
);
|
||||
}, 0);
|
||||
const fullHaftSalary = data4.salaryProfiles
|
||||
.filter((x) => x.type == "NONE")
|
||||
.filter((x) => x.type == "FULLHAFT")
|
||||
.reduce((accumulator, object: any) => {
|
||||
return (
|
||||
accumulator +
|
||||
(object.amount == null ? 0 : object.amount) +
|
||||
(object.amountUse == null ? 0 : object.amountUse) +
|
||||
(object.amountSpecial == null ? 0 : object.amountSpecial)
|
||||
);
|
||||
}, 0);
|
||||
|
|
@ -810,6 +842,12 @@ export class ReportController extends Controller {
|
|||
remainingAmount: Extension.ToThaiNumber(
|
||||
(data4.sixPercentAmount - data4.spentAmount).toString(),
|
||||
),
|
||||
fifteenPercentOld: Extension.ToThaiNumber(
|
||||
(_salaryPeriodAPR1 == null ? 0 : _salaryPeriodAPR1.fifteenPercent).toString(),
|
||||
),
|
||||
totalOld: Extension.ToThaiNumber(
|
||||
(_salaryPeriodAPR1 == null ? 0 : _salaryPeriodAPR1.total).toString(),
|
||||
),
|
||||
haft: Extension.ToThaiNumber(
|
||||
data4.salaryProfiles.filter((x) => x.type == "HAFT").length.toString(),
|
||||
),
|
||||
|
|
@ -817,7 +855,7 @@ export class ReportController extends Controller {
|
|||
data4.salaryProfiles.filter((x) => x.type == "FULL").length.toString(),
|
||||
),
|
||||
fullHaft: Extension.ToThaiNumber(
|
||||
data4.salaryProfiles.filter((x) => x.type == "HAFT").length.toString(),
|
||||
data4.salaryProfiles.filter((x) => x.type == "FULLHAFT").length.toString(),
|
||||
),
|
||||
notPromoted: Extension.ToThaiNumber(
|
||||
data4.salaryProfiles.filter((x) => x.type == "NONE").length.toString(),
|
||||
|
|
@ -846,6 +884,7 @@ export class ReportController extends Controller {
|
|||
date: Extension.ToThaiNumber(
|
||||
Extension.ToThaiFullDate(new Date(`${salaryPeriod.year}-03-01`)),
|
||||
),
|
||||
year: Extension.ToThaiNumber((salaryPeriod.year + 543).toString()),
|
||||
dateNow: Extension.ToThaiNumber(Extension.ToThaiFullDate(new Date())),
|
||||
agency: agency,
|
||||
data1: formattedData1,
|
||||
|
|
@ -912,7 +951,7 @@ export class ReportController extends Controller {
|
|||
],
|
||||
});
|
||||
|
||||
//รอบปีก่อนๆ
|
||||
//รอบปีก่อนๆ
|
||||
const salaryPeriodIncrease1_APR = await this.salaryPeriodRepository.findOne({
|
||||
where: {
|
||||
period: "APR",
|
||||
|
|
@ -932,20 +971,20 @@ export class ReportController extends Controller {
|
|||
salaryPeriodId: salaryPeriodIncrease1_APR?.id,
|
||||
rootId: rootId,
|
||||
snapshot: "SNAP2",
|
||||
}
|
||||
},
|
||||
});
|
||||
const salaryOrg1_OCT = await this.salaryOrgRepository.findOne({
|
||||
where: {
|
||||
salaryPeriodId: salaryPeriodIncrease1_OCT?.id,
|
||||
rootId: rootId,
|
||||
snapshot: "SNAP2",
|
||||
}
|
||||
},
|
||||
});
|
||||
const salaryProfile1 = await this.salaryProfileRepository.find({
|
||||
where: {
|
||||
salaryOrgId: In([salaryOrg1_APR?.id, salaryOrg1_OCT?.id]),
|
||||
type: "FULL",
|
||||
}
|
||||
},
|
||||
});
|
||||
//รอบปีก่อนหน้า
|
||||
const salaryPeriodIncrease2_APR = await this.salaryPeriodRepository.findOne({
|
||||
|
|
@ -967,20 +1006,20 @@ export class ReportController extends Controller {
|
|||
salaryPeriodId: salaryPeriodIncrease2_APR?.id,
|
||||
rootId: rootId,
|
||||
snapshot: "SNAP2",
|
||||
}
|
||||
},
|
||||
});
|
||||
const salaryOrg2_OCT = await this.salaryOrgRepository.findOne({
|
||||
where: {
|
||||
salaryPeriodId: salaryPeriodIncrease2_OCT?.id,
|
||||
rootId: rootId,
|
||||
snapshot: "SNAP2",
|
||||
}
|
||||
},
|
||||
});
|
||||
const salaryProfile2 = await this.salaryProfileRepository.find({
|
||||
where: {
|
||||
salaryOrgId: In([salaryOrg2_APR?.id, salaryOrg2_OCT?.id]),
|
||||
type: "FULL",
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
return new HttpSuccess({
|
||||
|
|
@ -1008,15 +1047,17 @@ export class ReportController extends Controller {
|
|||
item.amount == undefined || item.amount == null
|
||||
? "๐"
|
||||
: Extension.ToThaiNumber(String(item.amount.toLocaleString())),
|
||||
salaryIncrease1: salaryProfile1.length > 0 ?
|
||||
salaryProfile1
|
||||
.filter(profile => profile.citizenId === item.citizenId)
|
||||
.map(profile => profile.amount)
|
||||
salaryIncrease1:
|
||||
salaryProfile1.length > 0
|
||||
? salaryProfile1
|
||||
.filter((profile) => profile.citizenId === item.citizenId)
|
||||
.map((profile) => profile.amount)
|
||||
: "๐", //การเลื่อนเงินเดือนปีก่อนๆหน้า
|
||||
salaryIncrease2: salaryProfile2.length > 0 ?
|
||||
salaryProfile2
|
||||
.filter(profile => profile.citizenId === item.citizenId)
|
||||
.map(profile => profile.amount)
|
||||
salaryIncrease2:
|
||||
salaryProfile2.length > 0
|
||||
? salaryProfile2
|
||||
.filter((profile) => profile.citizenId === item.citizenId)
|
||||
.map((profile) => profile.amount)
|
||||
: "๐", //การเลื่อนเงินเดือนปีก่อนหน้า
|
||||
score: null, //ผลการประเมินฯ
|
||||
remark: null, //หมายเหตุ
|
||||
|
|
|
|||
|
|
@ -1120,6 +1120,7 @@ export class SalaryPeriodController extends Controller {
|
|||
} else if (salaryOrg.salaryPeriod.period == "OCT") {
|
||||
const totalProfile = Extension.sumObjectValues(salaryOrg.salaryProfiles, "amount");
|
||||
_salaryOrg.currentAmount = totalProfile;
|
||||
_salaryOrg.total = salaryOrg.salaryProfiles.length;
|
||||
_salaryOrg.sixPercentAmount = totalProfile * 0.06;
|
||||
|
||||
const sumAmountUse = await AppDataSource.getRepository(SalaryProfile)
|
||||
|
|
@ -1743,11 +1744,13 @@ export class SalaryPeriodController extends Controller {
|
|||
if (salaryOrgSnap1 == null) {
|
||||
const totalProfile = Extension.sumObjectValues(_salaryOrg.salaryProfiles, "amount");
|
||||
_salaryOrg.currentAmount = totalProfile;
|
||||
_salaryOrg.total = _salaryOrg.salaryProfiles.length;
|
||||
_salaryOrg.sixPercentAmount = totalProfile * 0.06;
|
||||
_salaryOrg.spentAmount = totalAmount;
|
||||
_salaryOrg.remainingAmount = totalProfile * 0.06 - totalAmount;
|
||||
} else {
|
||||
_salaryOrg.currentAmount = salaryOrgSnap1.currentAmount;
|
||||
_salaryOrg.total = salaryOrgSnap1.total;
|
||||
_salaryOrg.sixPercentAmount = salaryOrgSnap1.sixPercentAmount;
|
||||
_salaryOrg.spentAmount = salaryOrgSnap1.spentAmount;
|
||||
_salaryOrg.useAmount = salaryOrgSnap1.useAmount;
|
||||
|
|
@ -1756,6 +1759,7 @@ export class SalaryPeriodController extends Controller {
|
|||
} else {
|
||||
const totalProfile = Extension.sumObjectValues(_salaryOrg.salaryProfiles, "amount");
|
||||
_salaryOrg.currentAmount = totalProfile;
|
||||
_salaryOrg.total = _salaryOrg.salaryProfiles.length;
|
||||
_salaryOrg.sixPercentAmount = totalProfile * 0.06;
|
||||
_salaryOrg.spentAmount = totalAmount;
|
||||
_salaryOrg.remainingAmount = totalProfile * 0.06 - totalAmount;
|
||||
|
|
@ -1795,11 +1799,13 @@ export class SalaryPeriodController extends Controller {
|
|||
if (salaryOrgSnap1 == null) {
|
||||
const totalProfile = Extension.sumObjectValues(_salaryOrg.salaryProfiles, "amount");
|
||||
_salaryOrg.currentAmount = totalProfile;
|
||||
_salaryOrg.total = _salaryOrg.salaryProfiles.length;
|
||||
_salaryOrg.sixPercentAmount = totalProfile * 0.06;
|
||||
_salaryOrg.spentAmount = totalAmount;
|
||||
_salaryOrg.remainingAmount = totalProfile * 0.06 - totalAmount;
|
||||
} else {
|
||||
_salaryOrg.currentAmount = salaryOrgSnap1.currentAmount;
|
||||
_salaryOrg.total = salaryOrgSnap1.total;
|
||||
_salaryOrg.sixPercentAmount = salaryOrgSnap1.sixPercentAmount;
|
||||
_salaryOrg.spentAmount = salaryOrgSnap1.spentAmount;
|
||||
_salaryOrg.useAmount = salaryOrgSnap1.useAmount;
|
||||
|
|
@ -1808,6 +1814,7 @@ export class SalaryPeriodController extends Controller {
|
|||
} else {
|
||||
const totalProfile = Extension.sumObjectValues(_salaryOrg.salaryProfiles, "amount");
|
||||
_salaryOrg.currentAmount = totalProfile;
|
||||
_salaryOrg.total = _salaryOrg.salaryProfiles.length;
|
||||
_salaryOrg.sixPercentAmount = totalProfile * 0.06;
|
||||
_salaryOrg.spentAmount = totalAmount;
|
||||
_salaryOrg.remainingAmount = totalProfile * 0.06 - totalAmount;
|
||||
|
|
@ -2212,11 +2219,13 @@ export class SalaryPeriodController extends Controller {
|
|||
if (salaryOrgSnap1 == null) {
|
||||
const totalProfile = Extension.sumObjectValues(_salaryOrg.salaryProfiles, "amount");
|
||||
_salaryOrg.currentAmount = totalProfile;
|
||||
_salaryOrg.total = _salaryOrg.salaryProfiles.length;
|
||||
_salaryOrg.sixPercentAmount = totalProfile * 0.06;
|
||||
_salaryOrg.spentAmount = totalAmount;
|
||||
_salaryOrg.remainingAmount = totalProfile * 0.06 - totalAmount;
|
||||
} else {
|
||||
_salaryOrg.currentAmount = salaryOrgSnap1.currentAmount;
|
||||
_salaryOrg.total = salaryOrgSnap1.total;
|
||||
_salaryOrg.sixPercentAmount = salaryOrgSnap1.sixPercentAmount;
|
||||
_salaryOrg.spentAmount = salaryOrgSnap1.spentAmount;
|
||||
_salaryOrg.useAmount = salaryOrgSnap1.useAmount;
|
||||
|
|
@ -2225,6 +2234,7 @@ export class SalaryPeriodController extends Controller {
|
|||
} else {
|
||||
const totalProfile = Extension.sumObjectValues(_salaryOrg.salaryProfiles, "amount");
|
||||
_salaryOrg.currentAmount = totalProfile;
|
||||
_salaryOrg.total = _salaryOrg.salaryProfiles.length;
|
||||
_salaryOrg.sixPercentAmount = totalProfile * 0.06;
|
||||
_salaryOrg.spentAmount = totalAmount;
|
||||
_salaryOrg.remainingAmount = totalProfile * 0.06 - totalAmount;
|
||||
|
|
@ -2264,11 +2274,13 @@ export class SalaryPeriodController extends Controller {
|
|||
if (salaryOrgSnap1 == null) {
|
||||
const totalProfile = Extension.sumObjectValues(_salaryOrg.salaryProfiles, "amount");
|
||||
_salaryOrg.currentAmount = totalProfile;
|
||||
_salaryOrg.total = _salaryOrg.salaryProfiles.length;
|
||||
_salaryOrg.sixPercentAmount = totalProfile * 0.06;
|
||||
_salaryOrg.spentAmount = totalAmount;
|
||||
_salaryOrg.remainingAmount = totalProfile * 0.06 - totalAmount;
|
||||
} else {
|
||||
_salaryOrg.currentAmount = salaryOrgSnap1.currentAmount;
|
||||
_salaryOrg.total = salaryOrgSnap1.total;
|
||||
_salaryOrg.sixPercentAmount = salaryOrgSnap1.sixPercentAmount;
|
||||
_salaryOrg.spentAmount = salaryOrgSnap1.spentAmount;
|
||||
_salaryOrg.useAmount = salaryOrgSnap1.useAmount;
|
||||
|
|
@ -2277,6 +2289,7 @@ export class SalaryPeriodController extends Controller {
|
|||
} else {
|
||||
const totalProfile = Extension.sumObjectValues(_salaryOrg.salaryProfiles, "amount");
|
||||
_salaryOrg.currentAmount = totalProfile;
|
||||
_salaryOrg.total = _salaryOrg.salaryProfiles.length;
|
||||
_salaryOrg.sixPercentAmount = totalProfile * 0.06;
|
||||
_salaryOrg.spentAmount = totalAmount;
|
||||
_salaryOrg.remainingAmount = totalProfile * 0.06 - totalAmount;
|
||||
|
|
|
|||
|
|
@ -1121,6 +1121,7 @@ export class SalaryPeriodEmployeeController extends Controller {
|
|||
} else if (salaryOrg.salaryPeriod.period == "OCT") {
|
||||
const totalProfile = Extension.sumObjectValues(salaryOrg.salaryProfiles, "amount");
|
||||
_salaryOrg.currentAmount = totalProfile;
|
||||
_salaryOrg.total = salaryOrg.salaryProfiles.length;
|
||||
_salaryOrg.sixPercentAmount = totalProfile * 0.06;
|
||||
|
||||
const sumAmountUse = await AppDataSource.getRepository(SalaryProfileEmployee)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue