MH: Ruhrstern halbe Feiertage

This commit is contained in:
2025-12-11 14:03:27 +01:00
parent e8fa3846a7
commit 47bc2796b8
3 changed files with 65 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Runtime.Remoting.Metadata.W3cXsd2001;
using BeWo.Data.Entities;
using BeWo.Report.ReportObjects;
namespace Ruhrstern
{
public class CustomMitarbeiterstundenkontoBerechnung : MitarbeiterstundenkontoBerechnung
{
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

@@ -66,6 +66,7 @@
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Reporting\CustomMitarbeiterstundenkontoBerechnung.cs" />
<Compile Include="Reporting\CustomReportCreator.cs" />
<Compile Include="Reporting\Quittierungsbeleg.cs">
<SubType>Component</SubType>
@@ -86,6 +87,7 @@
<DependentUpon>SettlementReport2.cs</DependentUpon>
</Compile>
<Compile Include="Service\CustomAccountingService.cs" />
<Compile Include="Service\CustomVacationService.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Data\Data.csproj">

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 Ruhrstern.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);
}
}
}