34 lines
1.1 KiB
C#
34 lines
1.1 KiB
C#
using BeWo.Data.Entities;
|
|
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(Employee emp, int year, DateTime? endeDerBerechnung = null)
|
|
{
|
|
var konto = base.BerechneUrlaubskontoZurDarstellung(emp, year);
|
|
if (konto != null)
|
|
{
|
|
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;
|
|
}
|
|
}
|
|
}
|