KetteReports: Division durch Null (bei 0 Sollstunden) im Mitarbeiterstundenkonto abgefangen

SupportOID=166128
This commit is contained in:
2026-06-24 11:04:58 +02:00
parent b971f3f964
commit 56a2ed4b69

View File

@@ -275,7 +275,10 @@ namespace KetteReports
{
if (ed.StundenSollMax != 0)
{
ed.Custom1 = ed.FlsSoll / ed.StundenSollOhneUrlaubKrankheit * 100;
if (ed.StundenSollOhneUrlaubKrankheit > 0)
{
ed.Custom1 = ed.FlsSoll / ed.StundenSollOhneUrlaubKrankheit * 100;
}
ed.Custom2 = Math.Round(ed.Days.Sum(d => d.HoursSick), 2, MidpointRounding.AwayFromZero);
ed.Custom3 = Math.Round(ed.Days.Sum(d => d.HoursInVacation), 2, MidpointRounding.AwayFromZero);
ed.Custom4 = Math.Round(ed.Days.Sum(d => d.HoursOtherAbsenceTimes), 2, MidpointRounding.AwayFromZero);