MH: Ruhrstern halbe Feiertage
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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">
|
||||
|
||||
40
ReportImp/Ruhrstern/Service/CustomVacationService.cs
Normal file
40
ReportImp/Ruhrstern/Service/CustomVacationService.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user