MuellestumpeReports (mlg-Wohnen): Silvester und Rosenmontag ab 2025/26 als Feiertage behandeln

This commit is contained in:
2026-01-12 18:52:50 +01:00
parent bad64fd5b5
commit 8d7a9cb995
2 changed files with 33 additions and 0 deletions

View File

@@ -108,6 +108,7 @@
<Compile Include="ServicesOverviewReport.designer.cs">
<DependentUpon>ServicesOverviewReport.cs</DependentUpon>
</Compile>
<Compile Include="Service\CustomVacationService.cs" />
<Compile Include="SettlementReport.cs">
<SubType>Component</SubType>
</Compile>
@@ -163,6 +164,10 @@
<Project>{40D8B312-EA64-49E3-A31A-5E57ED4D5654}</Project>
<Name>Report</Name>
</ProjectReference>
<ProjectReference Include="..\..\Service\Service.csproj">
<Project>{094331c3-ecee-4c89-bbfd-4c9ded89f0ef}</Project>
<Name>Service</Name>
</ProjectReference>
<ProjectReference Include="..\..\Shared\Shared.csproj">
<Project>{2F50B83D-A3F0-4EC4-979A-3F9B7E3D8ED4}</Project>
<Name>Shared</Name>

View File

@@ -0,0 +1,28 @@
using BeWo.Service.Plugins;
using BS.Shared.DataContracts;
using System;
using System.Collections.Generic;
namespace MuellestumpeReports.Service
{
public class CustomVacationService : VacationService
{
public override List<FeiertagDC> GetFeiertage(int year, string bundesland)
{
var feiertage = base.GetFeiertage(year, bundesland);
if (year >= 2025)
{
feiertage.Add(new FeiertagDC() { Datum = new DateTime(year, 12, 31), Name = "Silvester" });
}
if (year >= 2026)
{
DateTime osterSonntag = GetOsterSonntag(year);
feiertage.Add(new FeiertagDC { Datum = osterSonntag.AddDays(-48), Name = "Rosenmontag" });
}
return feiertage;
}
}
}