HausDuelken/CustomMitarbeiterstundenkontoBerechnung - Nullpointer gefixt

This commit is contained in:
2025-09-16 17:00:43 +02:00
parent bce3b0a955
commit d8662cdde2

View File

@@ -92,7 +92,7 @@ namespace HausDuelken
{
arbeitszeit += duration;
}
else if (item.ServiceDescription.ServiceCategory.IsBillable || item.ServiceDescription.ServiceCategory.Abbreviation.ToLower() == "lt24")
else if (item.ServiceDescription.ServiceCategory.IsBillable || (item.ServiceDescription.ServiceCategory.Abbreviation != null && item.ServiceDescription.ServiceCategory.Abbreviation.ToLower() == "lt24"))
{
flsGesamt += duration;
}
@@ -129,7 +129,11 @@ namespace HausDuelken
decimal totalDuration = 0;
decimal duration = 0;
String cat = item.ServiceDescription.ServiceCategory.Name.ToLower();
String kurz = item.ServiceDescription.ServiceCategory.Abbreviation.ToLower();
String kurz = "";
if (item.ServiceDescription.ServiceCategory.Abbreviation != null)
{
kurz = item.ServiceDescription.ServiceCategory.Abbreviation.ToLower();
}
if (item.GroupRoundedDuration.HasValue)
{