diff --git a/ReportImp/Ruhrstern/Reporting/CustomMitarbeiterstundenkontoBerechnung.cs b/ReportImp/Ruhrstern/Reporting/CustomMitarbeiterstundenkontoBerechnung.cs new file mode 100644 index 000000000..12c769c35 --- /dev/null +++ b/ReportImp/Ruhrstern/Reporting/CustomMitarbeiterstundenkontoBerechnung.cs @@ -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); + } + } +} diff --git a/ReportImp/Ruhrstern/Ruhrstern.csproj b/ReportImp/Ruhrstern/Ruhrstern.csproj index a7bc3908f..71f0ae3cc 100644 --- a/ReportImp/Ruhrstern/Ruhrstern.csproj +++ b/ReportImp/Ruhrstern/Ruhrstern.csproj @@ -66,6 +66,7 @@ True Resources.resx + Component @@ -86,6 +87,7 @@ SettlementReport2.cs + diff --git a/ReportImp/Ruhrstern/Service/CustomVacationService.cs b/ReportImp/Ruhrstern/Service/CustomVacationService.cs new file mode 100644 index 000000000..9ca472f98 --- /dev/null +++ b/ReportImp/Ruhrstern/Service/CustomVacationService.cs @@ -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 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); + } + } +}