diff --git a/Report/ReportObjects/MitarbeiterstundenkontoBerechnung.cs b/Report/ReportObjects/MitarbeiterstundenkontoBerechnung.cs index c16fac6ca..4a949ffcc 100644 --- a/Report/ReportObjects/MitarbeiterstundenkontoBerechnung.cs +++ b/Report/ReportObjects/MitarbeiterstundenkontoBerechnung.cs @@ -1641,7 +1641,10 @@ namespace BeWo.Report.ReportObjects dd.BreakMinutes = 30; CalculateAbsenceTimesForDay(dd, ed); - + if (date.Year == 2023 && date.Month == 10 && date.Day == 2) + { + int test = 0; + } dd.Feiertag = vacationService.GetFeiertag(date); BerechneSollStundenFuerDayDetail(ed, dd); diff --git a/ReportImp/AkggMid/CustomMitarbeiterstundenkontoBerechnung.cs b/ReportImp/AkggMid/CustomMitarbeiterstundenkontoBerechnung.cs index f223271f4..7b993df04 100644 --- a/ReportImp/AkggMid/CustomMitarbeiterstundenkontoBerechnung.cs +++ b/ReportImp/AkggMid/CustomMitarbeiterstundenkontoBerechnung.cs @@ -91,6 +91,11 @@ namespace AkggMid return base.IstAnrechenbareAbsenceTime(item); } + public override bool IsKrankheitAbsenceTime(AbsenceTime absenceTime) + { + return !IsUrlaubAbsenceTime(absenceTime); + } + public override decimal GetFeiertagsFaktor(DateTime start) { if (BerechneFerienTage && start < new DateTime(2023, 9, 4)) diff --git a/ReportImp/AkggMid/Mitarbeiterarbeitszeitkonto.cs b/ReportImp/AkggMid/Mitarbeiterarbeitszeitkonto.cs index 32ff91df5..764757a05 100644 --- a/ReportImp/AkggMid/Mitarbeiterarbeitszeitkonto.cs +++ b/ReportImp/AkggMid/Mitarbeiterarbeitszeitkonto.cs @@ -55,7 +55,6 @@ namespace AkggMid if (day.AbsenceTimes != null && day.AbsenceTimes.Count > 0) { var hours = day.HoursSick + day.HoursInVacation; - empDetail.StundenGesamtIst += hours; } @@ -89,65 +88,36 @@ namespace AkggMid if (day.AbsenceTimes != null && day.AbsenceTimes.Count > 0) { var hours = day.HoursSick + day.HoursInVacation; - custom7 = day.AbsenceTimes[0].AbsenceReason.Description; - custom9 += string.Format("{0:0.00}", hours); + + custom7 = AddText(custom7, day.AbsenceTimes[0].AbsenceReason.Description); + custom9 = AddText(custom9, string.Format("{0:0.00}", hours)); } if (day.IstFeiertag) { custom6 = "keine*r"; - if (custom7.Length > 0) - { - custom7 += "\n"; - } - custom7 += day.Feiertag.Name; + custom7 = AddText(custom7, day.Feiertag.Name); custom8 = "-"; } if (day.ServiceRecords != null && day.ServiceRecords.Count > 0) { foreach (var sr in day.ServiceRecords) { - if (custom7.Length > 0) - { - custom7 += "\n"; - } - custom7 += sr.ServiceDescription.ServiceCategory.Name + "\n"; - - if (custom8.Length > 0) - { - custom8 += "\n"; - } - custom8 += sr.ServiceDescription.Name + "\n"; + custom7 = AddText(custom7, sr.ServiceDescription.ServiceCategory.Name); + custom8 = AddText(custom8, sr.ServiceDescription.Name); if (sr.Group != null && sr.GroupRoundedDuration.HasValue && sr.GroupPersonCount.HasValue && sr.GroupPersonCount.Value > 1) { foreach (var gsr in sr.Group.ServiceRecordList) { - if (custom6.Length > 0) - { - custom6 += "\n"; - } - custom6 += gsr.SupportConcept != null ? gsr.SupportConcept.Customer.Person.FirstNameLastName + "\n" : ""; + custom6 = AddText(custom6, gsr.SupportConcept != null ? gsr.SupportConcept.Customer.Person.FirstNameLastName : ""); } - if (custom9.Length > 0) - { - custom9 += "\n"; - } - custom9 += string.Format("{0:0.00}\n", sr.GroupRoundedDuration / 60); + custom9 = AddText(custom9, string.Format("{0:0.00}", sr.GroupRoundedDuration / 60)); } else { - if (custom6.Length > 0) - { - custom6 += "\n"; - } - custom6 += sr.SupportConcept != null ? sr.SupportConcept.Customer.Person.FirstNameLastName + "\n" : "keine*r\n"; - - if (custom9.Length > 0) - { - custom9 += "\n"; - } - custom9 += string.Format("{0:0.00}\n", sr.RoundedDuration / 60); + custom6 = AddText(custom6, sr.SupportConcept != null ? sr.SupportConcept.Customer.Person.FirstNameLastName : "keine*r"); + custom9 = AddText(custom9, string.Format("{0:0.00}", sr.RoundedDuration / 60)); } } } @@ -161,6 +131,16 @@ namespace AkggMid this.bindingSource1.DataSource = pRO; } - + + private string AddText(string text, string description) + { + if (text.Length > 0) + { + text += "\n"; + } + text += description; + + return text; + } } } diff --git a/ReportImp/AkggMid/Mitarbeiterarbeitszeitkonto.designer.cs b/ReportImp/AkggMid/Mitarbeiterarbeitszeitkonto.designer.cs index e5514b023..dbc98e53b 100644 --- a/ReportImp/AkggMid/Mitarbeiterarbeitszeitkonto.designer.cs +++ b/ReportImp/AkggMid/Mitarbeiterarbeitszeitkonto.designer.cs @@ -234,13 +234,13 @@ namespace AkggMid // xrTableCell27 // this.xrTableCell27.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { - new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeDetailList.Days.Custom9", "{0:0.00}")}); + new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeDetailList.Days.Custom9")}); this.xrTableCell27.Multiline = true; this.xrTableCell27.Name = "xrTableCell27"; this.xrTableCell27.StylePriority.UseTextAlignment = false; - this.xrTableCell27.Text = "xrTableCell27"; this.xrTableCell27.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; this.xrTableCell27.Weight = 0.0813860458733718D; + this.xrTableCell27.XlsxFormatString = "0.00"; // // GroupHeader2 // diff --git a/ReportImp/AkggMid/Service/CustomVacationService.cs b/ReportImp/AkggMid/Service/CustomVacationService.cs index 3c596b7df..d36633d52 100644 --- a/ReportImp/AkggMid/Service/CustomVacationService.cs +++ b/ReportImp/AkggMid/Service/CustomVacationService.cs @@ -10,7 +10,13 @@ namespace AkggMid.Service { public class CustomVacationService : VacationService { - public bool UseDbFeiertage { get; set; } + + private bool _useDbFeiertag = true; + + public bool UseDbFeiertage { + get { return _useDbFeiertag; } + set { _useDbFeiertag = value; } + } public override string Bundesland { get => "Hessen"; } diff --git a/Service/Plugins/PluginLoader.cs b/Service/Plugins/PluginLoader.cs index 4f72314ea..529b3689d 100644 --- a/Service/Plugins/PluginLoader.cs +++ b/Service/Plugins/PluginLoader.cs @@ -302,7 +302,7 @@ namespace BeWo.Service.Plugins //t = "8251343124"; // Rat Plus Tat //t = "6819347851"; // Awo Kreisverband Plön //t = "2385915144"; // AKGG GmbHd - //t = "8002913382"; // AKGG GmbH (MID) + t = "8002913382"; // AKGG GmbH (MID) //t = "5155880294"; // BHV Bergische Hauspflege //t = "8366649557"; // Münchner Aids-Hilfe e.V. //t = "2976949196"; // WHB Refrath gGmbH @@ -349,7 +349,7 @@ namespace BeWo.Service.Plugins //t = "3226307161"; // Roman Roger Puth //t = "3522103738"; // AWO Münsterland-Recklinghausen //t = "5592509446"; // Kontakt Verein für psychosoziale Hilfen e.V - t = "5344902949"; // SHK Service GmbH SBD + //t = "5344902949"; // SHK Service GmbH SBD //t = "1422963536"; // Malteser-Johanniter-Johanneshaus gGmbH //t = "5433105975"; // aha e.V. //t = "1701920223"; // SKFM Monheim diff --git a/Service/Plugins/SchulbegleitenderDienstService.cs b/Service/Plugins/SchulbegleitenderDienstService.cs index 7137cfafe..24bafc673 100644 --- a/Service/Plugins/SchulbegleitenderDienstService.cs +++ b/Service/Plugins/SchulbegleitenderDienstService.cs @@ -45,6 +45,7 @@ namespace BeWo.Service.Plugins public virtual List ErstelleDefaultFeiertage(int year) { var vs = PluginLoader.FindClass(); + var list = vs.GetFeiertage(year, vs.Bundesland); diff --git a/Service/Plugins/VacationService.cs b/Service/Plugins/VacationService.cs index 68f85a624..d8c36455d 100644 --- a/Service/Plugins/VacationService.cs +++ b/Service/Plugins/VacationService.cs @@ -130,12 +130,12 @@ namespace BeWo.Service.Plugins { var feiertage = DAOFactory.GenericDAO.GetAllActive(); - databaseFeiertage = MapperFactory.FeiertagDC_Feiertag.MapToNewDCs(feiertage.Where(f => !f.OrganisationOid.HasValue && f.Datum >= new DateTime(year, 1, 1) && f.Datum < new DateTime(year + 1, 1, 1))); + databaseFeiertage = MapperFactory.FeiertagDC_Feiertag.MapToNewDCs(feiertage.Where(f => !f.OrganisationOid.HasValue)); } - - return databaseFeiertage; + + return databaseFeiertage.Where(f => f.Datum >= new DateTime(year, 1, 1) && f.Datum < new DateTime(year + 1, 1, 1)).ToList(); } public static DateTime GetOsterSonntag(int year)