47 lines
1.3 KiB
C#
47 lines
1.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Runtime.Remoting.Metadata.W3cXsd2001;
|
|
using BeWo.Data.Entities;
|
|
using BeWo.Report.ReportObjects;
|
|
|
|
|
|
namespace BeWoMobilReports
|
|
{
|
|
public class CustomMitarbeiterstundenkontoBerechnung : MitarbeiterstundenkontoBerechnung
|
|
{
|
|
public override bool ShouldCreateDayDetails()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public override decimal GetFeiertagsFaktor(DateTime start)
|
|
{
|
|
//CB 26.02.2024: Darf nicht über den VacationService gehen, sonst werden die im CustomMitarbeiterstundenkontoBerechnung hinterlegten Feiertage ignoriert
|
|
//return vacationService.GetFeiertagsFaktor(start);
|
|
if (start.Year > 2024)
|
|
{
|
|
DateTime osterSonntag = GetOsterSonntag(start.Year);
|
|
if (start.Month == 12 && (start.Day == 24 || start.Day == 31))
|
|
{
|
|
return 0.5m;
|
|
}
|
|
|
|
if (start.Date == osterSonntag.AddDays(-52).Date)
|
|
{
|
|
return 0.5m;
|
|
}
|
|
if (start.Date == osterSonntag.AddDays(-47).Date)
|
|
{
|
|
return 0.5m;
|
|
}
|
|
}
|
|
|
|
if (IstFeiertag(start))
|
|
{
|
|
return 1;
|
|
}
|
|
return 0;
|
|
}
|
|
}
|
|
}
|