diff --git a/ReportImp/ChristopherusHaus/ChristopherusHaus.csproj b/ReportImp/ChristopherusHaus/ChristopherusHaus.csproj index e2764020e..52cea5249 100644 --- a/ReportImp/ChristopherusHaus/ChristopherusHaus.csproj +++ b/ReportImp/ChristopherusHaus/ChristopherusHaus.csproj @@ -90,6 +90,7 @@ ServicesOverviewReport.cs + Component diff --git a/ReportImp/ChristopherusHaus/Service/CustomVacationService.cs b/ReportImp/ChristopherusHaus/Service/CustomVacationService.cs new file mode 100644 index 000000000..2e1624fe7 --- /dev/null +++ b/ReportImp/ChristopherusHaus/Service/CustomVacationService.cs @@ -0,0 +1,29 @@ +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 ChristopherusHaus.Service +{ + public class CustomVacationService : VacationService + { + public override DateTime GetExpirationDate(int year) + { + return new DateTime(year, 1, 1, 0, 0, 0); + } + public override List BerechneUrlaubskontoZurDarstellung(EmployeeDC emp, int year) + { + var konto = base.BerechneUrlaubskontoZurDarstellung(emp, year); + for (int i = konto.Count - 1; i >= 0; i--) + { + var zeile = konto[i]; + if (zeile.Erlaeuterung.Contains("Resturlaub aus") || zeile.Erlaeuterung.Contains("verfallen")) + konto.RemoveAt(i); + } + return konto; + } + } +}