MH: BAW Aachen Urlaubskonto <5 Tage Berechnung
This commit is contained in:
@@ -16,5 +16,29 @@ namespace BetreuungsserviceFuerAlltagUndWohnen.Service
|
||||
|
||||
return base.GetFeiertagsFaktor(start);
|
||||
}
|
||||
public override decimal CalcCorrectNumberOfLeaveDaysForSpecialContractSituation(DateTime entryDate, DateTime? endDate, int anzahlArbeitstage, int restlicheTageImJahr, decimal? urlaubstageProJahr)
|
||||
{
|
||||
decimal urlaubstage = 0;
|
||||
if (urlaubstageProJahr == null)
|
||||
urlaubstageProJahr = 0m;
|
||||
|
||||
if (entryDate.Day == 1 && entryDate.Month == 1 || entryDate.Day == 2 && entryDate.Month == 1) //Erster Tag im Jahr
|
||||
{
|
||||
//Prüfen, ob Enddatum Ende des Jahres oder früher ist
|
||||
if (endDate == null || (endDate.HasValue && endDate.Value.Day == 31 && endDate.Value.Month == 12))
|
||||
urlaubstage = (decimal)urlaubstageProJahr;
|
||||
else
|
||||
urlaubstage = (decimal)urlaubstageProJahr / 365m * restlicheTageImJahr;
|
||||
}
|
||||
else
|
||||
{
|
||||
urlaubstage = (decimal)urlaubstageProJahr / 365m * restlicheTageImJahr;
|
||||
}
|
||||
|
||||
// Runden
|
||||
urlaubstage = UrlaubstageRunden(urlaubstage);
|
||||
|
||||
return urlaubstage;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user