diff --git a/ReportImp/ahaEV/CustomMitarbeiterstundenkontoBerechnung.cs b/ReportImp/ahaEV/CustomMitarbeiterstundenkontoBerechnung.cs index 9195aadb0..a99b62cc2 100644 --- a/ReportImp/ahaEV/CustomMitarbeiterstundenkontoBerechnung.cs +++ b/ReportImp/ahaEV/CustomMitarbeiterstundenkontoBerechnung.cs @@ -8,11 +8,22 @@ namespace ahaEV { public class CustomMitarbeiterstundenkontoBerechnung : MitarbeiterstundenkontoBerechnung { + public override decimal GetFeiertagsFaktor(DateTime start) + { + + if (start.Month == 12 && start.Day == 24 || start.Month == 12 && start.Day == 31) + return 0.5m; + else if (IstFeiertag(start)) + { + return 1; + } + return 0; + } + public override List GetFeiertage(int year) { var list = base.GetFeiertage(year); - - + list.Add(new DateTime(year, 12, 31)); return list; } diff --git a/ReportImp/ahaEV/CustomVacationService.cs b/ReportImp/ahaEV/CustomVacationService.cs index 07fb14724..34d62e2d4 100644 --- a/ReportImp/ahaEV/CustomVacationService.cs +++ b/ReportImp/ahaEV/CustomVacationService.cs @@ -1,4 +1,5 @@ using BeWo.Service.Plugins; +using BS.Shared.DataContracts; using System; using System.Collections.Generic; using System.Linq; @@ -11,16 +12,30 @@ namespace ahaEV { public override string Bundesland { get => "Hessen"; } + public override List GetFeiertage(int year, string bundesland) + { + var list = base.GetFeiertage(year, bundesland); + list.Add(new FeiertagDC() { Datum = new DateTime(year, 12, 31), Name = "Silvester" }); + + return list; + } + public override decimal GetFeiertagsFaktor(DateTime start) { - if (IstFeiertag(start)) + + if (start.Month == 12 && start.Day == 24 || start.Month == 12 && start.Day == 31) + return 0.5m; + else if (IstFeiertag(start)) { return 1; } - else if (start.Month == 12 && start.Day == 24 || start.Month == 12 && start.Day == 31) - return 0.5m; - return 0; } + + public override decimal UrlaubstageRunden(decimal urlaubstage) + { + urlaubstage = Math.Round(urlaubstage * 2, MidpointRounding.AwayFromZero) / 2; + return urlaubstage; + } } } diff --git a/ReportImp/ahaEV/ahaEV.csproj b/ReportImp/ahaEV/ahaEV.csproj index d7fc90aa9..806c3d11d 100644 --- a/ReportImp/ahaEV/ahaEV.csproj +++ b/ReportImp/ahaEV/ahaEV.csproj @@ -31,6 +31,7 @@ 4 + @@ -39,6 +40,7 @@ +