MH: VacationService Resturlaub Vorjahr auch einblenden ohne Nutzung

This commit is contained in:
2025-01-27 14:19:12 +01:00
parent fcbae62bf3
commit 32d82107c1

View File

@@ -547,7 +547,22 @@ namespace BeWo.Service.Plugins
Herkunft = string.Format("EmpOid:{0} Urlaubskonto:{1}", emp.EmployeeOid, year),
Tooltip = null,
IsDeletable = false
}) ;
});
}
else if (urlaubskonten.ContainsKey(year - 1) && urlaubskonten[year - 1].Resturlaub > 0)
{
var vorherigesKonto = urlaubskonten[year - 1];
aktuellesKonto.Value.ResturlaubVorjahrTotal += vorherigesKonto.Resturlaub;
aktuellesKonto.Value.ResturlaubVorjahr += vorherigesKonto.Resturlaub;
dcs.Add(new UrlaubskontoDarstellungDC()
{
Erlaeuterung = "Resturlaub aus " + (year - 1) + " :",
AnzahlTage = string.Format("+{0:0.00}", aktuellesKonto.Value.ResturlaubVorjahrTotal),
Herkunft = string.Format("EmpOid:{0} Urlaubskonto:{1}", emp.EmployeeOid, year),
Tooltip = null,
IsDeletable = false
});
}
var expDate = GetExpirationDate(year);
if (expDate != null)