Altersgrenze
This commit is contained in:
parent
bd13a775c4
commit
32c5776fe8
1 changed files with 24 additions and 5 deletions
|
@ -241,11 +241,11 @@ router.get("/", async (req, res) => {
|
|||
nn = nn.substring(0, nn.length - 6);
|
||||
}
|
||||
|
||||
// before 1.7.2003: Altersobergrenze für Aktive: 60
|
||||
const limit60 = moment('2003-07-01');
|
||||
// 1.7.2003 bis 10.12.2011: 63
|
||||
const limit63 = moment('2011-12-10');
|
||||
// from 10.12.2011: 65
|
||||
// before 1.1.2009: Altersobergrenze für Aktive: 60
|
||||
const limit60 = moment('2009-01-01');
|
||||
// before 1.7.2017: 63
|
||||
const limit63 = moment('2017-07-01');
|
||||
// from 1.7.2017: 65
|
||||
|
||||
const alter60 = moment(queryResultElement.Geboren).add(60, 'years');
|
||||
const alter63 = moment(queryResultElement.Geboren).add(63, 'years');
|
||||
|
@ -426,6 +426,25 @@ router.get("/", async (req, res) => {
|
|||
await MembershipCommandHandler.update(updateMembership);
|
||||
}
|
||||
|
||||
if (!queryResultElement.Ausgetreten && !queryResultElement.verstorben && queryResultElement.verzogen) {
|
||||
let end = new Date('2024-12-31');
|
||||
if (queryResultElement.verzogenDatum) {
|
||||
end = queryResultElement.verzogenDatum;
|
||||
} else {
|
||||
if (queryResultElement["Übergang Passiv"]) {
|
||||
end = queryResultElement["Übergang Passiv"];
|
||||
}
|
||||
}
|
||||
let updateMembership: UpdateMembershipCommand = {
|
||||
end: end,
|
||||
id: ms1,
|
||||
memberId: memberId,
|
||||
start: start,
|
||||
statusId: stateId,
|
||||
terminationReason: "verzogen",
|
||||
};
|
||||
await MembershipCommandHandler.update(updateMembership);
|
||||
}
|
||||
|
||||
// add member's awards
|
||||
for (const awardId in sAwardsById) {
|
||||
|
|
Loading…
Reference in a new issue