MH: UebergangshilfeUnnaEV Silvester und Heilig Abend Halbe Tage

This commit is contained in:
2025-12-11 08:52:57 +01:00
parent 9b198ecdfa
commit 29584f1802
3 changed files with 52 additions and 0 deletions

View File

@@ -89,5 +89,16 @@ namespace UebergangshilfeUnnaEV
return sum;
}
public override decimal GetFeiertagsFaktor(DateTime start)
{
if (start.Year >= 2025)
{
if (start.Month == 12 && (start.Day == 24 || start.Day == 31))
return 0.5m;
}
return base.GetFeiertagsFaktor(start);
}
}
}

View File

@@ -0,0 +1,40 @@
using BeWo.Service.Plugins;
using BS.Shared.DataContracts;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace UebergangshilfeUnnaEV.Service
{
public class CustomVacationService : VacationService
{
public override List<FeiertagDC> GetFeiertage(int year, string bundesland)
{
var list = base.GetFeiertage(year, bundesland);
if (year >= 2025)
{
list.Add(new FeiertagDC()
{
Datum = new DateTime(year, 12, 31),
Name = "Silvester"
});
}
return list;
}
public override decimal GetFeiertagsFaktor(DateTime start)
{
if (start.Year >= 2025)
{
if (start.Month == 12 && (start.Day == 24 || start.Day == 31))
return 0.5m;
}
return base.GetFeiertagsFaktor(start);
}
}
}

View File

@@ -123,6 +123,7 @@
<Compile Include="ServicesOverviewReport.Designer.cs">
<DependentUpon>ServicesOverviewReport.cs</DependentUpon>
</Compile>
<Compile Include="Service\CustomVacationService.cs" />
<Compile Include="SettlementReport.cs">
<SubType>Component</SubType>
</Compile>