BeWoRichter: Heiligabend und Silvester (ab 2025) als halbe Arbeitstage behandeln
This commit is contained in:
@@ -92,6 +92,14 @@ namespace BeWoRichter
|
||||
|
||||
|
||||
return sum;
|
||||
}
|
||||
|
||||
public override decimal GetFeiertagsFaktor(DateTime start)
|
||||
{
|
||||
if (start.Month == 12 && (start.Day == 24 || start.Day == 31))
|
||||
return 0.5m;
|
||||
|
||||
return base.GetFeiertagsFaktor(start);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
using BS.Shared.DataContracts;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using System.Linq;
|
||||
|
||||
namespace BeWoRichter.Service
|
||||
{
|
||||
public class CustomVacationService : VacationService
|
||||
@@ -15,6 +16,14 @@ namespace BeWoRichter.Service
|
||||
DateTime osterSonntag = GetOsterSonntag(year);
|
||||
feiertage.Add(new FeiertagDC { Datum = osterSonntag.AddDays(-48), Name = "Rosenmontag" });
|
||||
}
|
||||
|
||||
if (year >= 2025)
|
||||
{
|
||||
var weihnachten = feiertage.FirstOrDefault(f => f.Name == "Heilig Abend");
|
||||
if (weihnachten != null)
|
||||
feiertage.Remove(weihnachten);
|
||||
}
|
||||
|
||||
return feiertage;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user