MH: Christopherushaus Resturlaub deaktiviert

This commit is contained in:
2023-09-05 16:14:50 +02:00
parent c1ba3026c5
commit bd3afab769
2 changed files with 30 additions and 0 deletions

View File

@@ -90,6 +90,7 @@
<Compile Include="ServicesOverviewReport.Designer.cs">
<DependentUpon>ServicesOverviewReport.cs</DependentUpon>
</Compile>
<Compile Include="Service\CustomVacationService.cs" />
<Compile Include="SettlementReport.cs">
<SubType>Component</SubType>
</Compile>

View File

@@ -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<UrlaubskontoDarstellungDC> 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;
}
}
}