MH: Christopherushaus Resturlaub deaktiviert
This commit is contained in:
@@ -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>
|
||||
|
||||
29
ReportImp/ChristopherusHaus/Service/CustomVacationService.cs
Normal file
29
ReportImp/ChristopherusHaus/Service/CustomVacationService.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user