diff --git a/BeWo/ServiceProxy/Generated.cs b/BeWo/ServiceProxy/Generated.cs index 994b881b4..ec2dc6e31 100644 --- a/BeWo/ServiceProxy/Generated.cs +++ b/BeWo/ServiceProxy/Generated.cs @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 +// Dieser Code wurde von einem Tool generiert. +// Laufzeitversion:4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +// der Code erneut generiert wird. // //------------------------------------------------------------------------------ @@ -334,7 +334,7 @@ namespace BeWo.ServiceProxy [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IEmployeeService/CalculateUrlaubstage", ReplyAction="http://tempuri.org/IEmployeeService/CalculateUrlaubstageResponse")] [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IEmployeeService/CalculateUrlaubstageBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] - decimal CalculateUrlaubstage(System.DateTime entryDate, int anzahlArbeitstage, int restlicheTageImJahr, System.Nullable urlaubstageProJahr); + decimal CalculateUrlaubstage(System.DateTime entryDate, System.Nullable endDate, int anzahlArbeitstage, int restlicheTageImJahr, System.Nullable urlaubstageProJahr); [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IEmployeeService/GetGeschenkteUrlaubstageForEmployee", ReplyAction="http://tempuri.org/IEmployeeService/GetGeschenkteUrlaubstageForEmployeeResponse")] [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IEmployeeService/GetGeschenkteUrlaubstageForEmployeeBeWoFaultF" + @@ -854,9 +854,9 @@ namespace BeWo.ServiceProxy return base.Channel.GetActiveCustomersForEmployee(employeeOid, customerFilter); } - public decimal CalculateUrlaubstage(System.DateTime entryDate, int anzahlArbeitstage, int restlicheTageImJahr, System.Nullable urlaubstageProJahr) + public decimal CalculateUrlaubstage(System.DateTime entryDate, System.Nullable endDate, int anzahlArbeitstage, int restlicheTageImJahr, System.Nullable urlaubstageProJahr) { - return base.Channel.CalculateUrlaubstage(entryDate, anzahlArbeitstage, restlicheTageImJahr, urlaubstageProJahr); + return base.Channel.CalculateUrlaubstage(entryDate, endDate, anzahlArbeitstage, restlicheTageImJahr, urlaubstageProJahr); } public System.Collections.Generic.List GetGeschenkteUrlaubstageForEmployee(long empOid) @@ -3714,24 +3714,24 @@ namespace BeWo.ServiceProxy [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IStreamingService/UpdateBeWoFoldersBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] void UpdateBeWoFolders(System.Collections.Generic.List dcs); - // CODEGEN: Generating message contract since the wrapper name (UploadPackage) of message UploadPackage does not match the default value (UploadDocument) + // CODEGEN: Der Nachrichtenvertrag wird generiert, da der Wrappername (UploadPackage) von Nachricht "UploadPackage" nicht mit dem Standardwert (UploadDocument) übereinstimmt. [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStreamingService/UploadDocument", ReplyAction="http://tempuri.org/IStreamingService/UploadDocumentResponse")] [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IStreamingService/UploadDocumentBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] BeWo.ServiceProxy.UploadResult UploadDocument(BeWo.ServiceProxy.UploadPackage request); - // CODEGEN: Generating message contract since the wrapper name (UpdatePackage) of message UpdatePackage does not match the default value (UpdateDocument) + // CODEGEN: Der Nachrichtenvertrag wird generiert, da der Wrappername (UpdatePackage) von Nachricht "UpdatePackage" nicht mit dem Standardwert (UpdateDocument) übereinstimmt. [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStreamingService/UpdateDocument", ReplyAction="http://tempuri.org/IStreamingService/UpdateDocumentResponse")] [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IStreamingService/UpdateDocumentBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] BeWo.ServiceProxy.UploadResult UpdateDocument(BeWo.ServiceProxy.UpdatePackage request); - // CODEGEN: Generating message contract since the wrapper name (UploadChatPackage) of message UploadChatPackage does not match the default value (CreateNewSpeziallStreamChatMessagesDC) + // CODEGEN: Der Nachrichtenvertrag wird generiert, da der Wrappername (UploadChatPackage) von Nachricht "UploadChatPackage" nicht mit dem Standardwert (CreateNewSpeziallStreamChatMessagesDC) übereinstimmt. [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStreamingService/CreateNewSpeziallStreamChatMessagesDC", ReplyAction="http://tempuri.org/IStreamingService/CreateNewSpeziallStreamChatMessagesDCRespons" + "e")] [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IStreamingService/CreateNewSpeziallStreamChatMessagesDCBeWoFau" + "ltFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] BeWo.ServiceProxy.UploadChatResult CreateNewSpeziallStreamChatMessagesDC(BeWo.ServiceProxy.UploadChatPackage request); - // CODEGEN: Generating message contract since the wrapper name (UploadPackage) of message UploadPackage does not match the default value (UploadImportFile) + // CODEGEN: Der Nachrichtenvertrag wird generiert, da der Wrappername (UploadPackage) von Nachricht "UploadPackage" nicht mit dem Standardwert (UploadImportFile) übereinstimmt. [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStreamingService/UploadImportFile", ReplyAction="http://tempuri.org/IStreamingService/UploadImportFileResponse")] [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IStreamingService/UploadImportFileBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] BeWo.ServiceProxy.UploadImportFileResult UploadImportFile(BeWo.ServiceProxy.UploadPackage request); diff --git a/BeWo/View/Detail/EmployeeView.xaml.cs b/BeWo/View/Detail/EmployeeView.xaml.cs index f6eb363b3..fb34e23e0 100644 --- a/BeWo/View/Detail/EmployeeView.xaml.cs +++ b/BeWo/View/Detail/EmployeeView.xaml.cs @@ -263,34 +263,50 @@ namespace BeWo.View.Detail try { - //if (ViewModel.LastContract != null && ViewModel.LastContract.EmploymentType != null) + // if (ViewModel.LastContract != null && ViewModel.LastContract.EmploymentType != null) // { - // if (ViewModel.LastContract.EmploymentType.LeaveDays != null) - // { - // var originalEmploymentType = ServiceFacade.DoEmployeeServiceSync(s => s.GetEmploymentType((long)ViewModel.LastContract.EmploymentType.EmploymentTypeOid)); - - // if (originalEmploymentType.LeaveDays == ViewModel.LastContract.EmploymentType.LeaveDays) // Beschäftigungsart wurde feste Zahl Urlaubstage gegeben + // if (ViewModel.LastContract.EmploymentType.LeaveDays != null) // EmploymentType hat feste Urlaubstage + // { + // var originalEmploymentType = ServiceFacade.DoEmployeeServiceSync(s => s.GetEmploymentType((long)ViewModel.LastContract.EmploymentType.EmploymentTypeOid)); + + // if (originalEmploymentType.LeaveDays == ViewModel.LastContract.EmploymentType.LeaveDays) // { - // int arbeitstage = ViewModel.LastContract.WeeklyDays != null ? (int)ViewModel.LastContract.WeeklyDays : 0; - // decimal? urlaubstage = ViewModel.LastContract.EmploymentType.LeaveDays; - // ViewModel.LastContract.LeaveDays = urlaubstage; - // //if (ViewModel.LastContract.ContractEndDate.Value.Date >= new DateTime(ViewModel.LastContract.EntryDate.Value.Year, 12, 31)) - // //{ - // // int restlicheTageImJahr = Convert.ToInt32((new DateTime(ViewModel.LastContract.EntryDate.Value.Year, 12, 31) - ViewModel.LastContract.EntryDate.Value.Date).TotalDays); - // // urlaubstage = CalculateUrlaubstage((DateTime)ViewModel.LastContract.EntryDate, arbeitstage, restlicheTageImJahr, urlaubstage); + // int arbeitstage = ViewModel.LastContract.WeeklyDays != null ? (int)ViewModel.LastContract.WeeklyDays : 0; + // decimal? urlaubstage = ViewModel.LastContract.EmploymentType.LeaveDays; + // ViewModel.LastContract.LeaveDays = urlaubstage; + // if (ViewModel.LastContract.ContractEndDate.Value.Date >= new DateTime(ViewModel.LastContract.EntryDate.Value.Year, 12, 31)) + // { + // int restlicheTageImJahr = Convert.ToInt32((new DateTime(ViewModel.LastContract.EntryDate.Value.Year, 12, 31) - ViewModel.LastContract.EntryDate.Value.Date).TotalDays); + // urlaubstage = CalculateUrlaubstage((DateTime)ViewModel.LastContract.EntryDate, null, arbeitstage, restlicheTageImJahr, urlaubstage); + // } + // else // Wenn Ende des Vertrags im gleichen Jahr vor Ende des Jahres ist + // { + // int restlicheTageImJahr = Convert.ToInt32((ViewModel.LastContract.ContractEndDate.Value.Date - ViewModel.LastContract.EntryDate.Value.Date).TotalDays); + // urlaubstage = CalculateUrlaubstage((DateTime)ViewModel.LastContract.EntryDate, ViewModel.LastContract.ContractEndDate.Value.Date, arbeitstage, restlicheTageImJahr, urlaubstage); + // } - // // // Urlaubskonto: Verbleibende Tage hier auf Urlaubstage setzen.. - - // //} // } - // else // Beschäftigungsart sind keine festen Urlaubstage zugeordnet + // } + // else // Beschäftigungsart sind keine festen Urlaubstage zugeordnet + // { + // int arbeitstage = ViewModel.LastContract.WeeklyDays != null ? (int)ViewModel.LastContract.WeeklyDays : 0; + // decimal? urlaubstage = ViewModel.LastContract.LeaveDays; + + // if (ViewModel.LastContract.ContractEndDate.Value.Date >= new DateTime(ViewModel.LastContract.EntryDate.Value.Year, 12, 31)) // { - // ViewModel.LastContract.LeaveDays = ViewModel.LastContract.EmploymentType.LeaveDays; - - // } + // int restlicheTageImJahr = Convert.ToInt32((new DateTime(ViewModel.LastContract.EntryDate.Value.Year, 12, 31) - ViewModel.LastContract.EntryDate.Value.Date).TotalDays); + // urlaubstage = CalculateUrlaubstage((DateTime)ViewModel.LastContract.EntryDate, null, arbeitstage, restlicheTageImJahr, urlaubstage); + // } + // else // Wenn Ende des Vertrags im gleichen Jahr vor Ende des Jahres ist + // { + // int restlicheTageImJahr = Convert.ToInt32((ViewModel.LastContract.ContractEndDate.Value.Date - ViewModel.LastContract.EntryDate.Value.Date).TotalDays); + // urlaubstage = CalculateUrlaubstage((DateTime)ViewModel.LastContract.EntryDate, ViewModel.LastContract.ContractEndDate.Value.Date, arbeitstage, restlicheTageImJahr, urlaubstage); + // } + // // Urlaubskonto: Verbleibende Tage hier auf Urlaubstage setzen.. + // } //} - if(ViewModel.IsNew) + if (ViewModel.IsNew) { IsDoneWithInsertOrUpdate = false; ServiceFacade.DoEmployeeServiceAsync(s => s.InsertNewEmployee(lDataContract), ReloadViewModel); @@ -311,9 +327,9 @@ namespace BeWo.View.Detail } } - private decimal CalculateUrlaubstage(DateTime entryDate, int anzahlArbeitstage, int restlicheTageImJahr, decimal? urlaubstage) + private decimal CalculateUrlaubstage(DateTime entryDate, DateTime? endDate, int anzahlArbeitstage, int restlicheTageImJahr, decimal? urlaubstage) { - return ServiceFacade.DoEmployeeServiceSync(s => s.CalculateUrlaubstage(entryDate, anzahlArbeitstage, restlicheTageImJahr, urlaubstage)); + return ServiceFacade.DoEmployeeServiceSync(s => s.CalculateUrlaubstage(entryDate, endDate, anzahlArbeitstage, restlicheTageImJahr, urlaubstage)); //return 0; } private bool ValidateContracts() diff --git a/Service/Plugins/VacationService.cs b/Service/Plugins/VacationService.cs index 22310c174..9c0a4bece 100644 --- a/Service/Plugins/VacationService.cs +++ b/Service/Plugins/VacationService.cs @@ -117,7 +117,7 @@ namespace BeWo.Service.Plugins List list = new List(); if (bundesland.ToLower() == "nrw") - { + { list.Add(new FerienDC() { Name = "Sommerferien 2014", Start = new DateTime(2014, 7, 7), Ende = new DateTime(2014, 8, 19) }); list.Add(new FerienDC() { Name = "Herbstferien 2014", Start = new DateTime(2014, 10, 6), Ende = new DateTime(2014, 10, 18) }); list.Add(new FerienDC() { Name = "Weihnachtsferien 2014", Start = new DateTime(2014, 12, 22), Ende = new DateTime(2015, 1, 6) }); @@ -254,9 +254,35 @@ namespace BeWo.Service.Plugins anzGeschenkteTage += item.AnzahlTage; } } + if (contract.EmploymentType.LeaveDays != null) + contract.LeaveDays = contract.EmploymentType.LeaveDays; tmp.Urlaubsanspruch += contract.LeaveDays + anzGeschenkteTage ?? 0; tmp.Resturlaub = tmp.Urlaubsanspruch; + + int arbeitstage = contract.WeeklyDays != null ? (int)contract.WeeklyDays : 0; + DateTime? endDate = contract.ContractEndDate == null ? new DateTime(year, 12, 31) : contract.ContractEndDate; + + var t = emp; + + if (contract.EntryDate.Value.Year == i) + { + if (endDate >= new DateTime(contract.EntryDate.Value.Year, 12, 31)) + { + int restlicheTageImJahr = Convert.ToInt32((new DateTime(contract.EntryDate.Value.Year, 12, 31) - contract.EntryDate.Value.Date).TotalDays); + tmp.Resturlaub = CalcCorrectNumberOfLeaveDaysForSpecialContractSituation((DateTime)contract.EntryDate, null, arbeitstage, restlicheTageImJahr, contract.LeaveDays); + } + else // Wenn Ende des Vertrags im gleichen Jahr vor Ende des Jahres ist + { + int restlicheTageImJahr = Convert.ToInt32((contract.ContractEndDate.Value.Date - contract.EntryDate.Value.Date).TotalDays); + tmp.Resturlaub = CalcCorrectNumberOfLeaveDaysForSpecialContractSituation((DateTime)contract.EntryDate, contract.ContractEndDate.Value.Date, arbeitstage, restlicheTageImJahr, contract.LeaveDays); + } + } + if (endDate.Value.Year == i) + { + int restlicheTageImJahr = Convert.ToInt32(((DateTime)endDate - new DateTime(i, 1, 1)).TotalDays); + tmp.Resturlaub = CalcCorrectNumberOfLeaveDaysForSpecialContractSituation((DateTime)contract.EntryDate, endDate, arbeitstage, restlicheTageImJahr, contract.LeaveDays); + } } } } @@ -291,7 +317,7 @@ namespace BeWo.Service.Plugins yearFiller++; } - + var current = konten[absYear]; var start = DateTimeExtensions.GetMax(absence.Start, new DateTime(absYear, 1, 1)); @@ -306,7 +332,7 @@ namespace BeWo.Service.Plugins { var firstEnd = (DateTime)DateTimeExtensions.GetMin(end, expiration); var dauerVorjahr = (decimal)(firstEnd - absence.Start.Value).Days + 1; - + var bucheVorjahr = Math.Min(current.ResturlaubVorjahr, dauerVorjahr); current.ResturlaubVorjahr -= bucheVorjahr; @@ -329,6 +355,68 @@ namespace BeWo.Service.Plugins } } + private 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) + { + if (anzahlArbeitstage < 5) // weniger als 5 Tage + urlaubstage = (decimal)urlaubstageProJahr / 5m * anzahlArbeitstage; + else + { + if (anzahlArbeitstage == 5) // 5 Tage + urlaubstage = (decimal)urlaubstageProJahr; + else if (anzahlArbeitstage == 6) // 6 Tage + urlaubstage = (decimal)urlaubstageProJahr; + } + } + else + { + if (anzahlArbeitstage < 5) // weniger als 5 Tage + urlaubstage = (decimal)urlaubstageProJahr / 5m * anzahlArbeitstage; + else + { + if (anzahlArbeitstage == 5) // 5 Tage + urlaubstage = (decimal)urlaubstageProJahr / 365m * restlicheTageImJahr; + else if (anzahlArbeitstage == 6) // 6 Tage + urlaubstage = (decimal)urlaubstageProJahr / 365m * restlicheTageImJahr; + } + } + + } + else if (/*entryDate.Day > 1 && */anzahlArbeitstage < 5) // Mitten im Jahr, weniger als 5 Tage + { + urlaubstage = (decimal)urlaubstageProJahr / 5m * 3m / 365m * restlicheTageImJahr; + } + else if (/*entryDate.Day > 1 && */anzahlArbeitstage >= 5) // Mitten im Jahr, 5 oder 6 Tage + { + urlaubstage = (decimal)urlaubstageProJahr / 365m * restlicheTageImJahr; + } + + // Runden + if (urlaubstage - (int)urlaubstage <= 0.1m) + { + urlaubstage = Math.Round(urlaubstage, MidpointRounding.AwayFromZero); + } + else if (urlaubstage - (int)urlaubstage <= 0.5m) + { + decimal digits = urlaubstage - (int)urlaubstage; + urlaubstage = urlaubstage - digits + 0.5m; + } + else if (urlaubstage - (int)urlaubstage <= 1.0m) + { + urlaubstage = Math.Ceiling(urlaubstage); + } + + return urlaubstage; + } + private decimal BerechneAnzahlUrlaubstage(Employee emp, AbsenceTime absence, int year) { if (absence.Start.HasValue) @@ -348,7 +436,7 @@ namespace BeWo.Service.Plugins end = maxend; } - + while (start <= end) { if (start.DayOfWeek != DayOfWeek.Saturday && start.DayOfWeek != DayOfWeek.Sunday && !IstFeiertag(start)) diff --git a/Service/ServiceContracts/IEmployeeService.cs b/Service/ServiceContracts/IEmployeeService.cs index 363fa0e9a..6ab196800 100644 --- a/Service/ServiceContracts/IEmployeeService.cs +++ b/Service/ServiceContracts/IEmployeeService.cs @@ -422,7 +422,7 @@ namespace BeWo.Service.ServiceContracts [FaultContract(typeof(BeWoFault))] [OperationContract] - decimal CalculateUrlaubstage(DateTime entryDate, int anzahlArbeitstage, int restlicheTageImJahr, decimal? urlaubstageProJahr); + decimal CalculateUrlaubstage(DateTime entryDate, DateTime? endDate, int anzahlArbeitstage, int restlicheTageImJahr, decimal? urlaubstageProJahr); [FaultContract(typeof(BeWoFault))] [OperationContract] diff --git a/Service/ServiceImplementations/EmployeeServiceImp.cs b/Service/ServiceImplementations/EmployeeServiceImp.cs index dfa2790f5..85080f11f 100644 --- a/Service/ServiceImplementations/EmployeeServiceImp.cs +++ b/Service/ServiceImplementations/EmployeeServiceImp.cs @@ -1874,8 +1874,8 @@ namespace BeWo.Service.ServiceImplementations } } - public decimal CalculateUrlaubstage(DateTime entryDate, int anzahlArbeitstage, int restlicheTageImJahr, decimal? urlaubstageProJahr) - { + public decimal CalculateUrlaubstage(DateTime entryDate, DateTime? endDate, int anzahlArbeitstage, int restlicheTageImJahr, decimal? urlaubstageProJahr) // Enddatum in die Parameterliste + { try { decimal urlaubstage = 0; @@ -1884,21 +1884,38 @@ namespace BeWo.Service.ServiceImplementations if (entryDate.Day == 1 && entryDate.Month == 1 || entryDate.Day == 2 && entryDate.Month == 1) //Erster Tag im Jahr { - if (anzahlArbeitstage < 5) // weniger als 5 Tage - urlaubstage = (decimal)urlaubstageProJahr / 5m * anzahlArbeitstage; + //Prüfen, ob Enddatum Ende des Jahres oder früher ist + if(endDate == null) + { + if (anzahlArbeitstage < 5) // weniger als 5 Tage + urlaubstage = (decimal)urlaubstageProJahr / 5m * anzahlArbeitstage; + else + { + if (anzahlArbeitstage == 5) // 5 Tage + urlaubstage = (decimal)urlaubstageProJahr; + else if (anzahlArbeitstage == 6) // 6 Tage + urlaubstage = (decimal)urlaubstageProJahr; + } + } else { - if (anzahlArbeitstage == 5) // 5 Tage - urlaubstage = (decimal)urlaubstageProJahr; - else if (anzahlArbeitstage == 6) // 6 Tage - urlaubstage = (decimal)urlaubstageProJahr; + if (anzahlArbeitstage < 5) // weniger als 5 Tage + urlaubstage = (decimal)urlaubstageProJahr / 5m * anzahlArbeitstage; + else + { + if (anzahlArbeitstage == 5) // 5 Tage + urlaubstage = (decimal)urlaubstageProJahr / 365m * restlicheTageImJahr; + else if (anzahlArbeitstage == 6) // 6 Tage + urlaubstage = (decimal)urlaubstageProJahr / 365m * restlicheTageImJahr; + } } + } - else if (entryDate.Day > 1 && anzahlArbeitstage < 5) // Mitten im Monat, weniger als 5 Tage + else if (/*entryDate.Day > 1 && */anzahlArbeitstage < 5) // Mitten im Jahr, weniger als 5 Tage { urlaubstage = (decimal)urlaubstageProJahr / 5m * 3m / 365m * restlicheTageImJahr; } - else if (entryDate.Day > 1 && anzahlArbeitstage >= 5) // Mitten im Monat, 5 oder 6 Tage + else if (/*entryDate.Day > 1 && */anzahlArbeitstage >= 5) // Mitten im Jahr, 5 oder 6 Tage { urlaubstage = (decimal)urlaubstageProJahr / 365m * restlicheTageImJahr; }