diff --git a/BeWo/BeWo.csproj.user b/BeWo/BeWo.csproj.user index 3eff8c8d2..060d57d23 100644 --- a/BeWo/BeWo.csproj.user +++ b/BeWo/BeWo.csproj.user @@ -9,7 +9,7 @@ de-DE false - ProjectFiles + ShowAllFiles false diff --git a/BeWo/BeWoApp.xaml.cs b/BeWo/BeWoApp.xaml.cs index 276268816..8af6f0257 100644 --- a/BeWo/BeWoApp.xaml.cs +++ b/BeWo/BeWoApp.xaml.cs @@ -1021,7 +1021,12 @@ namespace BeWo showStackTrace = true; showSupportForm = false; } - + //else if (stacktrace.IndexOf("GenericADOException") >= 0 && stacktrace.IndexOf("could not insert") >= 0 && stacktrace.IndexOf("Data too long for column") >= 0) + //{ + // displayMessage = "Eine Eingabe enthält zu viele Zeichen."; + // showStackTrace = true; + // showSupportForm = false; + //} BeWoApp.ShowError(displayMessage, e, showSupportForm, showStackTrace); } diff --git a/BeWo/DebugConfig.cs b/BeWo/DebugConfig.cs index 036d37d9a..8e3ab56a5 100644 --- a/BeWo/DebugConfig.cs +++ b/BeWo/DebugConfig.cs @@ -10,7 +10,8 @@ namespace BeWo { SimpleAutoLogin, FeatureCustomerWohnhilfe, - FeatureWohnheimWohneinheit + FeatureWohnheimWohneinheit, + FeatureAuswertungenQuittierungsbelege } public class DebugConfig @@ -22,7 +23,7 @@ namespace BeWo { #if DEBUG - return _CurrentConfig ?? (_CurrentConfig = FeatureWohnheimWohneinheit); + return _CurrentConfig ?? (_CurrentConfig = SimpleAutoLogin); #endif @@ -55,5 +56,12 @@ namespace BeWo AutoLogin = true, SelectView = UIContext.Wohnheim }; + + public static DebugConfig FeatureAuswertungenQuittierungsbelege => new DebugConfig() + { + DebugConfigMode = DebugConfigMode.FeatureAuswertungenQuittierungsbelege, + AutoLogin = true, + SelectView = UIContext.Report + }; } } diff --git a/BeWo/View/Master/ReportView.xaml.cs b/BeWo/View/Master/ReportView.xaml.cs index 8250930e0..89b5713ab 100644 --- a/BeWo/View/Master/ReportView.xaml.cs +++ b/BeWo/View/Master/ReportView.xaml.cs @@ -27,7 +27,7 @@ namespace BeWo.View.Master { InitializeComponent(); initRights = true; - //InitRights(); + } public override bool IsDirty => OpenViews.ContainsKey(root.SelectedItem as TabItem) && OpenViews[root.SelectedItem as TabItem].IsDirty; @@ -753,7 +753,19 @@ namespace BeWo.View.Master private void ReportView_OnLoaded(object sender, RoutedEventArgs e) { + +#if DEBUG + if (DebugConfig.CurrentConfig is object && DebugConfig.CurrentConfig.DebugConfigMode == DebugConfigMode.FeatureAuswertungenQuittierungsbelege) + { + SelectServiceOverviewTabItem(); + } + else + { + InitRights(); + } +#else InitRights(); +#endif } } } \ No newline at end of file diff --git a/BeWo/View/Navigation/WohnheimNavigationView.xaml.cs b/BeWo/View/Navigation/WohnheimNavigationView.xaml.cs index be3a74482..3c8b9e587 100644 --- a/BeWo/View/Navigation/WohnheimNavigationView.xaml.cs +++ b/BeWo/View/Navigation/WohnheimNavigationView.xaml.cs @@ -165,7 +165,7 @@ namespace BeWo.View.Navigation #if DEBUG if (DebugConfig.CurrentConfig is object && DebugConfig.CurrentConfig.DebugConfigMode == DebugConfigMode.FeatureWohnheimWohneinheit) { - wohnheimNavigationView_OpenObject(recentList?.FirstOrDefault() ?? objectList.FirstOrDefault()); + wohnheimNavigationView_OpenObject(recentList?.FirstOrDefault() ?? objectList?.FirstOrDefault()); } #endif })); diff --git a/Data/Access/SearchDAO.cs b/Data/Access/SearchDAO.cs index 6250e8f13..515685497 100644 --- a/Data/Access/SearchDAO.cs +++ b/Data/Access/SearchDAO.cs @@ -4382,7 +4382,7 @@ namespace BeWo.Data.Access return lCriteria.List().ToList(); } - var customerOids = user.Employee.Employee2CustomerList.Where(employee2Customer => employee2Customer.Customer.Oid.HasValue).Select(employee2Customer => employee2Customer.Customer.Oid.Value).Distinct().ToList(); + var customerOids = user.Employee.Employee2CustomerList.Where(employee2Customer => employee2Customer.Customer.Oid.HasValue && (!employee2Customer.StartDate.HasValue || employee2Customer.StartDate <= DateTime.Now.Date) && (!employee2Customer.EndDate.HasValue || employee2Customer.EndDate >= DateTime.Now.Date)).Select(employee2Customer => employee2Customer.Customer.Oid.Value).Distinct().ToList(); // Wählt man "Nur Klienten meiner Teams anzeigen", sollen nicht die Hilfepläne der eigenen Klienten angezeigt werden. if (supportConceptFilter == CustomerFilterEnum.TeamCustomer) diff --git a/Host/Host.csproj.user b/Host/Host.csproj.user index f8b116048..5ee002517 100644 --- a/Host/Host.csproj.user +++ b/Host/Host.csproj.user @@ -3,7 +3,7 @@ BeWo2.0 true - Debug|Any CPU + Release|Any CPU false diff --git a/Model/Changes_alle_fuer_neue_db.txt b/Model/Changes_alle_fuer_neue_db.txt index 947941e80..42ace5517 100644 --- a/Model/Changes_alle_fuer_neue_db.txt +++ b/Model/Changes_alle_fuer_neue_db.txt @@ -1227,4 +1227,7 @@ ADD CONSTRAINT `FK_IMAGE_WOHNEINHEIT` ALTER TABLE `image` ADD COLUMN `Filename` VARCHAR(1024) NULL DEFAULT NULL AFTER `SystemEntryID`, -ADD COLUMN `Fullname` VARCHAR(1024) NULL DEFAULT NULL AFTER `Filename`; \ No newline at end of file +ADD COLUMN `Fullname` VARCHAR(1024) NULL DEFAULT NULL AFTER `Filename`; + +ALTER TABLE `organisation` +ADD COLUMN `BusinessPartnerId` VARCHAR(256) NULL DEFAULT NULL AFTER `Leistungserbringergruppe`; diff --git a/ReportImp/AkggMid/LeistungsnachweisHelper.cs b/ReportImp/AkggMid/LeistungsnachweisHelper.cs index 6ba939949..4668e6a0d 100644 --- a/ReportImp/AkggMid/LeistungsnachweisHelper.cs +++ b/ReportImp/AkggMid/LeistungsnachweisHelper.cs @@ -51,6 +51,59 @@ namespace AkggMid } + + internal DateTimeSpan BerechneSchuljahr(ServicesOverviewRO ro) + { + var span = new DateTimeSpan(); + span.StartDate = DateTime.MinValue; + span.EndDate = DateTime.MinValue; + + //Berechne Schuljahrstart + var vs = new CustomVacationService(); + var ferien = vs.GetFerien(vs.Bundesland); + FerienDC sommerFerienVorjahr = null; + FerienDC sommerFerienAktuellesJahr = null; + FerienDC sommerFerienNaechstesJahr = null; + foreach (var f in ferien) + { + if (f.Name.Contains(String.Format("Sommerferien {0}", ro.StartDate.Year - 1))) + { + sommerFerienVorjahr = f; + } + else if (f.Name.Contains(String.Format("Sommerferien {0}", ro.StartDate.Year))) + { + sommerFerienAktuellesJahr = f; + } + else if (f.Name.Contains(String.Format("Sommerferien {0}", ro.StartDate.Year + 1))) + { + sommerFerienNaechstesJahr = f; + } + } + + if (sommerFerienAktuellesJahr != null) + { + if (ro.EndDate <= sommerFerienAktuellesJahr.Ende) + { + span.EndDate = sommerFerienAktuellesJahr.Start.AddDays(-1); + if (sommerFerienVorjahr != null) + { + span.StartDate = sommerFerienVorjahr.Ende.AddDays(1); + } + } + else + { + span.StartDate = sommerFerienAktuellesJahr.Ende.AddDays(1); + if (sommerFerienNaechstesJahr != null) + { + span.EndDate = sommerFerienNaechstesJahr.Start.AddDays(-1); + } + } + } + + return span; + + } + public List ErstelleDummyRecords(ServicesOverviewRO pRO) { Dictionary day2Detail = new Dictionary(); @@ -504,51 +557,6 @@ where scap2e.EmployeeOid = {0} and scap.Start <= '{1:yyyy-MM-dd}' and scap.EndDa } - DateTime startSchuljahr = DateTime.MinValue; - DateTime endeSchuljahr = DateTime.MinValue; - - //Berechne Schuljahrstart - var vs = new CustomVacationService(); - var ferien = vs.GetFerien(vs.Bundesland); - FerienDC sommerFerienVorjahr = null; - FerienDC sommerFerienAktuellesJahr = null; - FerienDC sommerFerienNaechstesJahr = null; - foreach (var f in ferien) - { - if (f.Name.Contains(String.Format("Sommerferien {0}", ro.StartDate.Year - 1))) - { - sommerFerienVorjahr = f; - } - else if (f.Name.Contains(String.Format("Sommerferien {0}", ro.StartDate.Year))) - { - sommerFerienAktuellesJahr = f; - } - else if (f.Name.Contains(String.Format("Sommerferien {0}", ro.StartDate.Year + 1))) - { - sommerFerienNaechstesJahr = f; - } - } - - if (sommerFerienAktuellesJahr != null) - { - if (ro.EndDate <= sommerFerienAktuellesJahr.Ende) - { - endeSchuljahr = sommerFerienAktuellesJahr.Start.AddDays(-1); - if (sommerFerienVorjahr != null) - { - startSchuljahr = sommerFerienVorjahr.Ende.AddDays(1); - } - } - else - { - startSchuljahr = sommerFerienAktuellesJahr.Ende.AddDays(1); - if (sommerFerienNaechstesJahr != null) - { - endeSchuljahr = sommerFerienNaechstesJahr.Start.AddDays(-1); - } - } - } - int maxAnzahl = 6; //Sonderregelung @@ -575,13 +583,17 @@ where scap2e.EmployeeOid = {0} and scap.Start <= '{1:yyyy-MM-dd}' and scap.EndDa tandemAbsenceTimes = tc.AbsenceTimes.OrderBy(a => a.Start).ToList(); } - + + var vs = new CustomVacationService(); + + var schuljahr = BerechneSchuljahr(ro); + foreach (AbsenceTime at in c.AbsenceTimes.OrderBy(a => a.Start)) { if (at.AbsenceReason.Description.Contains("<24h") || at.AbsenceReason.Description.Contains(">24h") || at.AbsenceReason.Description.Contains("Abwesenheit nicht abrechenbar") || at.AbsenceReason.Description.StartsWith("S_JA") || at.AbsenceReason.Description.StartsWith("SozA") || at.AbsenceReason.Description.StartsWith("S_Abwesenheit nicht abrechenbar") || at.AbsenceReason.Description.StartsWith("JugA")) { - if (at.Start >= startSchuljahr && at.Start <= endeSchuljahr && (at.End == null || at.End >= startSchuljahr)) + if (at.Start >= schuljahr.StartDate && at.Start <= schuljahr.EndDate && (at.End == null || at.End >= schuljahr.StartDate)) { var maxAnzahlIntern = maxAnzahl; @@ -595,7 +607,7 @@ where scap2e.EmployeeOid = {0} and scap.Start <= '{1:yyyy-MM-dd}' and scap.EndDa } DateTime dtIterator = at.Start.Value; - DateTime end = endeSchuljahr; + DateTime end = schuljahr.EndDate; if (at.End.HasValue) { end = at.End.Value; diff --git a/ReportImp/AkggMid/LeistungsnachweisSozialamt.cs b/ReportImp/AkggMid/LeistungsnachweisSozialamt.cs index 6cb6a8146..8f9a5f7d7 100644 --- a/ReportImp/AkggMid/LeistungsnachweisSozialamt.cs +++ b/ReportImp/AkggMid/LeistungsnachweisSozialamt.cs @@ -25,18 +25,9 @@ namespace AkggMid { var helper = new LeistungsnachweisHelper(pRO, true); - String schuljahr = ""; - if (pRO.StartDate < new DateTime(2023, 8, 1)) - { - schuljahr = String.Format("{0}-{1}", pRO.StartDate.Year - 1, pRO.StartDate.Year); - } - else - { - schuljahr = String.Format("{0}-{1}", pRO.StartDate.Year, pRO.StartDate.Year + 1); - } - - lblMonat.Text = String.Format("Monat {0:MMMM} Schuljahr {1}", pRO.StartDate, schuljahr); + var schuljahr = helper.BerechneSchuljahr(pRO); + lblMonat.Text = String.Format("Monat {0:MMMM} - Schuljahr {1:yyyy}-{2:yyyy}", pRO.StartDate, schuljahr.StartDate, schuljahr.EndDate); pRO.Services = helper.ErstelleDummyRecords(pRO); diff --git a/ReportImp/AkggMid/LeistungsnachweisSozialamt.designer.cs b/ReportImp/AkggMid/LeistungsnachweisSozialamt.designer.cs index 96bd87cf8..df97ff52d 100644 --- a/ReportImp/AkggMid/LeistungsnachweisSozialamt.designer.cs +++ b/ReportImp/AkggMid/LeistungsnachweisSozialamt.designer.cs @@ -76,6 +76,8 @@ namespace AkggMid this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); this.fieldStd = new DevExpress.XtraReports.UI.CalculatedField(); this.fieldTotalStd = new DevExpress.XtraReports.UI.CalculatedField(); + this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel(); + this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel(); ((System.ComponentModel.ISupportInitialize)(this.xrTableDetail)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit(); @@ -255,7 +257,8 @@ namespace AkggMid this.xrLabel4.StylePriority.UseBorders = false; this.xrLabel4.StylePriority.UseFont = false; this.xrLabel4.StylePriority.UseTextAlignment = false; - this.xrLabel4.Text = "Leistungsnachweis Schulassistenz [CustomerFirstName] [CustomerLastName]"; + this.xrLabel4.Text = "Leistungsnachweis Schulassistenz / Teilhabeassistenz für [CustomerFirstName] [Cus" + + "tomerLastName]"; this.xrLabel4.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; // // bottomMarginBand1 @@ -266,11 +269,13 @@ namespace AkggMid // ReportHeader // this.ReportHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrLabel3, + this.xrLabel2, this.xrLabel9, this.lblWegbegleitung, this.lblMonat, this.xrLabel4}); - this.ReportHeader.HeightF = 108.3333F; + this.ReportHeader.HeightF = 162.5F; this.ReportHeader.Name = "ReportHeader"; // // xrLabel9 @@ -278,14 +283,14 @@ namespace AkggMid this.xrLabel9.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) | DevExpress.XtraPrinting.BorderSide.Right))); this.xrLabel9.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold); - this.xrLabel9.LocationFloat = new DevExpress.Utils.PointFloat(0F, 81.25F); + this.xrLabel9.LocationFloat = new DevExpress.Utils.PointFloat(0F, 108.3333F); this.xrLabel9.Name = "xrLabel9"; this.xrLabel9.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrLabel9.SizeF = new System.Drawing.SizeF(737F, 27.08334F); this.xrLabel9.StylePriority.UseBorders = false; this.xrLabel9.StylePriority.UseFont = false; this.xrLabel9.StylePriority.UseTextAlignment = false; - this.xrLabel9.Text = "[Costbearer] / Bewilligungszeitraum [ApprovedStartDate]-[ApprovedEndDate]"; + this.xrLabel9.Text = "[Costbearer] // Az.: [ReferenceNumber]"; this.xrLabel9.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; // // lblWegbegleitung @@ -293,7 +298,7 @@ namespace AkggMid this.lblWegbegleitung.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) | DevExpress.XtraPrinting.BorderSide.Right))); this.lblWegbegleitung.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold); - this.lblWegbegleitung.LocationFloat = new DevExpress.Utils.PointFloat(0F, 54.16667F); + this.lblWegbegleitung.LocationFloat = new DevExpress.Utils.PointFloat(0F, 81.25F); this.lblWegbegleitung.Name = "lblWegbegleitung"; this.lblWegbegleitung.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.lblWegbegleitung.SizeF = new System.Drawing.SizeF(737F, 27.08334F); @@ -315,7 +320,7 @@ namespace AkggMid this.lblMonat.StylePriority.UseBorders = false; this.lblMonat.StylePriority.UseFont = false; this.lblMonat.StylePriority.UseTextAlignment = false; - this.lblMonat.Text = "Monat [StartDate!MMMM] Schuljahr [StartDate!yyyy]"; + this.lblMonat.Text = "Monat [StartDate!MMMM] - Schuljahr [StartDate!yyyy]"; this.lblMonat.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; // // DetailReport2 @@ -591,6 +596,36 @@ namespace AkggMid this.fieldTotalStd.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal; this.fieldTotalStd.Name = "fieldTotalStd"; // + // xrLabel2 + // + this.xrLabel2.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) + | DevExpress.XtraPrinting.BorderSide.Right))); + this.xrLabel2.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold); + this.xrLabel2.LocationFloat = new DevExpress.Utils.PointFloat(0F, 54.16667F); + this.xrLabel2.Name = "xrLabel2"; + this.xrLabel2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel2.SizeF = new System.Drawing.SizeF(737F, 27.08334F); + this.xrLabel2.StylePriority.UseBorders = false; + this.xrLabel2.StylePriority.UseFont = false; + this.xrLabel2.StylePriority.UseTextAlignment = false; + this.xrLabel2.Text = "Bewilligungszeitraum: [ApprovedStartDate]-[ApprovedEndDate]"; + this.xrLabel2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + // + // xrLabel3 + // + this.xrLabel3.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) + | DevExpress.XtraPrinting.BorderSide.Right))); + this.xrLabel3.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold); + this.xrLabel3.LocationFloat = new DevExpress.Utils.PointFloat(0F, 135.4167F); + this.xrLabel3.Name = "xrLabel3"; + this.xrLabel3.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel3.SizeF = new System.Drawing.SizeF(737F, 27.08334F); + this.xrLabel3.StylePriority.UseBorders = false; + this.xrLabel3.StylePriority.UseFont = false; + this.xrLabel3.StylePriority.UseTextAlignment = false; + this.xrLabel3.Text = "Teilhabeassistenz: [MainAttendant]"; + this.xrLabel3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + // // LeistungsnachweisSozialamt // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { @@ -676,5 +711,7 @@ namespace AkggMid private DevExpress.XtraReports.UI.FormattingRule ruleIstWochensumme; private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox1; private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox2; + private DevExpress.XtraReports.UI.XRLabel xrLabel2; + private DevExpress.XtraReports.UI.XRLabel xrLabel3; } } diff --git a/ReportImp/AkggMid/LeistungsnachweisSozialamtMitBlutzucker.cs b/ReportImp/AkggMid/LeistungsnachweisSozialamtMitBlutzucker.cs index 9a25436e2..ca828510d 100644 --- a/ReportImp/AkggMid/LeistungsnachweisSozialamtMitBlutzucker.cs +++ b/ReportImp/AkggMid/LeistungsnachweisSozialamtMitBlutzucker.cs @@ -25,19 +25,9 @@ namespace AkggMid { var helper = new LeistungsnachweisHelper(pRO, true); - String schuljahr = ""; - if (pRO.StartDate < new DateTime(2023, 8, 1)) - { - schuljahr = String.Format("{0}-{1}", pRO.StartDate.Year - 1, pRO.StartDate.Year); - } - else - { - schuljahr = String.Format("{0}-{1}", pRO.StartDate.Year, pRO.StartDate.Year + 1); - } - - lblMonat.Text = String.Format("Monat {0:MMMM} Schuljahr {1}", pRO.StartDate, schuljahr); - + var schuljahr = helper.BerechneSchuljahr(pRO); + lblMonat.Text = String.Format("Monat {0:MMMM} - Schuljahr {1:yyyy}-{2:yyyy}", pRO.StartDate, schuljahr.StartDate, schuljahr.EndDate); pRO.Services = helper.ErstelleDummyRecords(pRO); diff --git a/ReportImp/AkggMid/LeistungsnachweisSozialamtMitBlutzucker.designer.cs b/ReportImp/AkggMid/LeistungsnachweisSozialamtMitBlutzucker.designer.cs index 1cd30f1c9..bb0d42474 100644 --- a/ReportImp/AkggMid/LeistungsnachweisSozialamtMitBlutzucker.designer.cs +++ b/ReportImp/AkggMid/LeistungsnachweisSozialamtMitBlutzucker.designer.cs @@ -49,7 +49,6 @@ namespace AkggMid this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel(); this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand(); this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand(); - this.xrLabel9 = new DevExpress.XtraReports.UI.XRLabel(); this.lblWegbegleitung = new DevExpress.XtraReports.UI.XRLabel(); this.lblMonat = new DevExpress.XtraReports.UI.XRLabel(); this.DetailReport2 = new DevExpress.XtraReports.UI.DetailReportBand(); @@ -78,6 +77,9 @@ namespace AkggMid this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); this.fieldStd = new DevExpress.XtraReports.UI.CalculatedField(); this.fieldTotalStd = new DevExpress.XtraReports.UI.CalculatedField(); + this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel(); + this.xrLabel9 = new DevExpress.XtraReports.UI.XRLabel(); + this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel(); ((System.ComponentModel.ISupportInitialize)(this.xrTableDetail)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit(); @@ -273,7 +275,8 @@ namespace AkggMid this.xrLabel4.StylePriority.UseBorders = false; this.xrLabel4.StylePriority.UseFont = false; this.xrLabel4.StylePriority.UseTextAlignment = false; - this.xrLabel4.Text = "Leistungsnachweis Schulassistenz [CustomerFirstName] [CustomerLastName]"; + this.xrLabel4.Text = "Leistungsnachweis Schulassistenz / Teilhabeassistenz für [CustomerFirstName] [Cus" + + "tomerLastName]"; this.xrLabel4.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; // // bottomMarginBand1 @@ -285,33 +288,20 @@ namespace AkggMid // this.ReportHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.xrLabel9, + this.xrLabel3, + this.xrLabel2, this.lblWegbegleitung, this.lblMonat, this.xrLabel4}); - this.ReportHeader.HeightF = 108.3333F; + this.ReportHeader.HeightF = 162.5F; this.ReportHeader.Name = "ReportHeader"; // - // xrLabel9 - // - this.xrLabel9.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) - | DevExpress.XtraPrinting.BorderSide.Right))); - this.xrLabel9.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold); - this.xrLabel9.LocationFloat = new DevExpress.Utils.PointFloat(0F, 81.25F); - this.xrLabel9.Name = "xrLabel9"; - this.xrLabel9.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); - this.xrLabel9.SizeF = new System.Drawing.SizeF(737F, 27.08334F); - this.xrLabel9.StylePriority.UseBorders = false; - this.xrLabel9.StylePriority.UseFont = false; - this.xrLabel9.StylePriority.UseTextAlignment = false; - this.xrLabel9.Text = "[Costbearer] / Bewilligungszeitraum [ApprovedStartDate]-[ApprovedEndDate]"; - this.xrLabel9.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; - // // lblWegbegleitung // this.lblWegbegleitung.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) | DevExpress.XtraPrinting.BorderSide.Right))); this.lblWegbegleitung.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold); - this.lblWegbegleitung.LocationFloat = new DevExpress.Utils.PointFloat(0F, 54.16667F); + this.lblWegbegleitung.LocationFloat = new DevExpress.Utils.PointFloat(0F, 81.25F); this.lblWegbegleitung.Name = "lblWegbegleitung"; this.lblWegbegleitung.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.lblWegbegleitung.SizeF = new System.Drawing.SizeF(737F, 27.08334F); @@ -333,7 +323,7 @@ namespace AkggMid this.lblMonat.StylePriority.UseBorders = false; this.lblMonat.StylePriority.UseFont = false; this.lblMonat.StylePriority.UseTextAlignment = false; - this.lblMonat.Text = "Monat [StartDate!MMMM] Schuljahr [StartDate!yyyy]"; + this.lblMonat.Text = "Monat [StartDate!MMMM] - Schuljahr [StartDate!yyyy]"; this.lblMonat.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; // // DetailReport2 @@ -618,6 +608,51 @@ namespace AkggMid this.fieldTotalStd.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal; this.fieldTotalStd.Name = "fieldTotalStd"; // + // xrLabel2 + // + this.xrLabel2.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) + | DevExpress.XtraPrinting.BorderSide.Right))); + this.xrLabel2.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold); + this.xrLabel2.LocationFloat = new DevExpress.Utils.PointFloat(0F, 54.16667F); + this.xrLabel2.Name = "xrLabel2"; + this.xrLabel2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel2.SizeF = new System.Drawing.SizeF(737F, 27.08334F); + this.xrLabel2.StylePriority.UseBorders = false; + this.xrLabel2.StylePriority.UseFont = false; + this.xrLabel2.StylePriority.UseTextAlignment = false; + this.xrLabel2.Text = "Bewilligungszeitraum: [ApprovedStartDate]-[ApprovedEndDate]"; + this.xrLabel2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + // + // xrLabel9 + // + this.xrLabel9.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) + | DevExpress.XtraPrinting.BorderSide.Right))); + this.xrLabel9.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold); + this.xrLabel9.LocationFloat = new DevExpress.Utils.PointFloat(0F, 108.3333F); + this.xrLabel9.Name = "xrLabel9"; + this.xrLabel9.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel9.SizeF = new System.Drawing.SizeF(737F, 27.08334F); + this.xrLabel9.StylePriority.UseBorders = false; + this.xrLabel9.StylePriority.UseFont = false; + this.xrLabel9.StylePriority.UseTextAlignment = false; + this.xrLabel9.Text = "[Costbearer] // Az.: [ReferenceNumber]"; + this.xrLabel9.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + // + // xrLabel3 + // + this.xrLabel3.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) + | DevExpress.XtraPrinting.BorderSide.Right))); + this.xrLabel3.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold); + this.xrLabel3.LocationFloat = new DevExpress.Utils.PointFloat(0F, 135.4167F); + this.xrLabel3.Name = "xrLabel3"; + this.xrLabel3.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel3.SizeF = new System.Drawing.SizeF(737F, 27.08334F); + this.xrLabel3.StylePriority.UseBorders = false; + this.xrLabel3.StylePriority.UseFont = false; + this.xrLabel3.StylePriority.UseTextAlignment = false; + this.xrLabel3.Text = "Teilhabeassistenz: [MainAttendant]"; + this.xrLabel3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + // // LeistungsnachweisSozialamtMitBlutzucker // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { @@ -691,7 +726,6 @@ namespace AkggMid private DevExpress.XtraReports.UI.XRTableCell xrTableCell11; private DevExpress.XtraReports.UI.XRLabel lblMonat; private DevExpress.XtraReports.UI.XRLabel lblWegbegleitung; - private DevExpress.XtraReports.UI.XRLabel xrLabel9; private DevExpress.XtraReports.UI.XRTable xrTable2; private DevExpress.XtraReports.UI.XRTableRow xrTableRow2; private DevExpress.XtraReports.UI.XRTableCell xrTableCell1; @@ -705,5 +739,8 @@ namespace AkggMid private DevExpress.XtraReports.UI.FormattingRule ruleIstWochensumme; private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox1; private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox2; + private DevExpress.XtraReports.UI.XRLabel xrLabel2; + private DevExpress.XtraReports.UI.XRLabel xrLabel9; + private DevExpress.XtraReports.UI.XRLabel xrLabel3; } } diff --git a/ReportImp/AkggMid/LeistungsnachweisSozialamtMitBlutzuckerPumpe.cs b/ReportImp/AkggMid/LeistungsnachweisSozialamtMitBlutzuckerPumpe.cs index 992bfa8b7..d50f3ddd7 100644 --- a/ReportImp/AkggMid/LeistungsnachweisSozialamtMitBlutzuckerPumpe.cs +++ b/ReportImp/AkggMid/LeistungsnachweisSozialamtMitBlutzuckerPumpe.cs @@ -24,18 +24,10 @@ namespace AkggMid public void SetReportDataSource(ServicesOverviewRO pRO) { var helper = new LeistungsnachweisHelper(pRO, true); - - String schuljahr = ""; - if (pRO.StartDate < new DateTime(2023, 8, 1)) - { - schuljahr = String.Format("{0}-{1}", pRO.StartDate.Year - 1, pRO.StartDate.Year); - } - else - { - schuljahr = String.Format("{0}-{1}", pRO.StartDate.Year, pRO.StartDate.Year + 1); - } + + var schuljahr = helper.BerechneSchuljahr(pRO); - lblMonat.Text = String.Format("Monat {0:MMMM} Schuljahr {1}", pRO.StartDate, schuljahr); + lblMonat.Text = String.Format("Monat {0:MMMM} - Schuljahr {1:yyyy}-{2:yyyy}", pRO.StartDate, schuljahr.StartDate, schuljahr.EndDate); @@ -44,6 +36,14 @@ namespace AkggMid foreach (var record in pRO.Services) { ServicesOverviewRO.CreateSignatureString(record); + if (record.ServiceRecordOid > 0) + { + ServicesOverviewRO.CreateGoalList(record); + if (!String.IsNullOrEmpty(record.GoalList)) + { + + } + } } //helper.PruefeWochenBudget(pRO); diff --git a/ReportImp/AkggMid/LeistungsnachweisSozialamtMitBlutzuckerPumpe.designer.cs b/ReportImp/AkggMid/LeistungsnachweisSozialamtMitBlutzuckerPumpe.designer.cs index 6f1068678..995824763 100644 --- a/ReportImp/AkggMid/LeistungsnachweisSozialamtMitBlutzuckerPumpe.designer.cs +++ b/ReportImp/AkggMid/LeistungsnachweisSozialamtMitBlutzuckerPumpe.designer.cs @@ -50,7 +50,6 @@ namespace AkggMid this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel(); this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand(); this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand(); - this.xrLabel9 = new DevExpress.XtraReports.UI.XRLabel(); this.lblWegbegleitung = new DevExpress.XtraReports.UI.XRLabel(); this.lblMonat = new DevExpress.XtraReports.UI.XRLabel(); this.DetailReport2 = new DevExpress.XtraReports.UI.DetailReportBand(); @@ -80,6 +79,9 @@ namespace AkggMid this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); this.fieldStd = new DevExpress.XtraReports.UI.CalculatedField(); this.fieldTotalStd = new DevExpress.XtraReports.UI.CalculatedField(); + this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel(); + this.xrLabel9 = new DevExpress.XtraReports.UI.XRLabel(); + this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel(); ((System.ComponentModel.ISupportInitialize)(this.xrTableDetail)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit(); @@ -289,7 +291,8 @@ namespace AkggMid this.xrLabel4.StylePriority.UseBorders = false; this.xrLabel4.StylePriority.UseFont = false; this.xrLabel4.StylePriority.UseTextAlignment = false; - this.xrLabel4.Text = "Leistungsnachweis Schulassistenz [CustomerFirstName] [CustomerLastName]"; + this.xrLabel4.Text = "Leistungsnachweis Schulassistenz / Teilhabeassistenz für [CustomerFirstName] [Cus" + + "tomerLastName]"; this.xrLabel4.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; // // bottomMarginBand1 @@ -301,33 +304,20 @@ namespace AkggMid // this.ReportHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.xrLabel9, + this.xrLabel3, + this.xrLabel2, this.lblWegbegleitung, this.lblMonat, this.xrLabel4}); - this.ReportHeader.HeightF = 108.3333F; + this.ReportHeader.HeightF = 162.5F; this.ReportHeader.Name = "ReportHeader"; // - // xrLabel9 - // - this.xrLabel9.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) - | DevExpress.XtraPrinting.BorderSide.Right))); - this.xrLabel9.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold); - this.xrLabel9.LocationFloat = new DevExpress.Utils.PointFloat(0F, 81.25F); - this.xrLabel9.Name = "xrLabel9"; - this.xrLabel9.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); - this.xrLabel9.SizeF = new System.Drawing.SizeF(737F, 27.08334F); - this.xrLabel9.StylePriority.UseBorders = false; - this.xrLabel9.StylePriority.UseFont = false; - this.xrLabel9.StylePriority.UseTextAlignment = false; - this.xrLabel9.Text = "[Costbearer] / Bewilligungszeitraum [ApprovedStartDate]-[ApprovedEndDate]"; - this.xrLabel9.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; - // // lblWegbegleitung // this.lblWegbegleitung.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) | DevExpress.XtraPrinting.BorderSide.Right))); this.lblWegbegleitung.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold); - this.lblWegbegleitung.LocationFloat = new DevExpress.Utils.PointFloat(0F, 54.16667F); + this.lblWegbegleitung.LocationFloat = new DevExpress.Utils.PointFloat(0F, 81.25F); this.lblWegbegleitung.Name = "lblWegbegleitung"; this.lblWegbegleitung.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.lblWegbegleitung.SizeF = new System.Drawing.SizeF(737F, 27.08334F); @@ -349,7 +339,7 @@ namespace AkggMid this.lblMonat.StylePriority.UseBorders = false; this.lblMonat.StylePriority.UseFont = false; this.lblMonat.StylePriority.UseTextAlignment = false; - this.lblMonat.Text = "Monat [StartDate!MMMM] Schuljahr [StartDate!yyyy]"; + this.lblMonat.Text = "Monat [StartDate!MMMM] - Schuljahr [StartDate!yyyy]"; this.lblMonat.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; // // DetailReport2 @@ -643,6 +633,51 @@ namespace AkggMid this.fieldTotalStd.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal; this.fieldTotalStd.Name = "fieldTotalStd"; // + // xrLabel2 + // + this.xrLabel2.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) + | DevExpress.XtraPrinting.BorderSide.Right))); + this.xrLabel2.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold); + this.xrLabel2.LocationFloat = new DevExpress.Utils.PointFloat(0F, 54.16667F); + this.xrLabel2.Name = "xrLabel2"; + this.xrLabel2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel2.SizeF = new System.Drawing.SizeF(737F, 27.08334F); + this.xrLabel2.StylePriority.UseBorders = false; + this.xrLabel2.StylePriority.UseFont = false; + this.xrLabel2.StylePriority.UseTextAlignment = false; + this.xrLabel2.Text = "Bewilligungszeitraum: [ApprovedStartDate]-[ApprovedEndDate]"; + this.xrLabel2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + // + // xrLabel9 + // + this.xrLabel9.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) + | DevExpress.XtraPrinting.BorderSide.Right))); + this.xrLabel9.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold); + this.xrLabel9.LocationFloat = new DevExpress.Utils.PointFloat(0F, 108.3333F); + this.xrLabel9.Name = "xrLabel9"; + this.xrLabel9.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel9.SizeF = new System.Drawing.SizeF(737F, 27.08334F); + this.xrLabel9.StylePriority.UseBorders = false; + this.xrLabel9.StylePriority.UseFont = false; + this.xrLabel9.StylePriority.UseTextAlignment = false; + this.xrLabel9.Text = "[Costbearer] // Az.: [ReferenceNumber]"; + this.xrLabel9.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + // + // xrLabel3 + // + this.xrLabel3.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) + | DevExpress.XtraPrinting.BorderSide.Right))); + this.xrLabel3.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold); + this.xrLabel3.LocationFloat = new DevExpress.Utils.PointFloat(0F, 135.4167F); + this.xrLabel3.Name = "xrLabel3"; + this.xrLabel3.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel3.SizeF = new System.Drawing.SizeF(737F, 27.08334F); + this.xrLabel3.StylePriority.UseBorders = false; + this.xrLabel3.StylePriority.UseFont = false; + this.xrLabel3.StylePriority.UseTextAlignment = false; + this.xrLabel3.Text = "Teilhabeassistenz: [MainAttendant]"; + this.xrLabel3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + // // LeistungsnachweisSozialamtMitBlutzuckerPumpe // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { @@ -718,7 +753,6 @@ namespace AkggMid private DevExpress.XtraReports.UI.XRTableCell xrTableCell11; private DevExpress.XtraReports.UI.XRLabel lblMonat; private DevExpress.XtraReports.UI.XRLabel lblWegbegleitung; - private DevExpress.XtraReports.UI.XRLabel xrLabel9; private DevExpress.XtraReports.UI.XRTable xrTable2; private DevExpress.XtraReports.UI.XRTableRow xrTableRow2; private DevExpress.XtraReports.UI.XRTableCell xrTableCell1; @@ -732,5 +766,8 @@ namespace AkggMid private DevExpress.XtraReports.UI.FormattingRule ruleIstWochensumme; private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox1; private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox2; + private DevExpress.XtraReports.UI.XRLabel xrLabel2; + private DevExpress.XtraReports.UI.XRLabel xrLabel9; + private DevExpress.XtraReports.UI.XRLabel xrLabel3; } } diff --git a/Service/Plugins/CustomerService.cs b/Service/Plugins/CustomerService.cs index a874856b9..de08adaf1 100644 --- a/Service/Plugins/CustomerService.cs +++ b/Service/Plugins/CustomerService.cs @@ -526,6 +526,10 @@ namespace BeWo.Service.Plugins } foreach (var person in persons) { + if (!String.IsNullOrEmpty(person.FirstName) && person.FirstName.Contains("Test")) + { + + } List list = null; if (person2CustomerOidDict.ContainsKey(person.Oid.Value)) { @@ -558,9 +562,12 @@ namespace BeWo.Service.Plugins dc.Organisation = o2p.Organisation.Name; if (o2p.Organisation.Address != null) { - dc.Street = o2p.Organisation.Address.Street; - dc.PostalCode = o2p.Organisation.Address.PostalCode; - dc.Town = o2p.Organisation.Address.Town; + if (String.IsNullOrEmpty(dc.Street) && String.IsNullOrEmpty(dc.PostalCode) && String.IsNullOrEmpty(dc.Town)) + { + dc.Street = o2p.Organisation.Address.Street; + dc.PostalCode = o2p.Organisation.Address.PostalCode; + dc.Town = o2p.Organisation.Address.Town; + } } } } @@ -620,20 +627,52 @@ namespace BeWo.Service.Plugins public static void AddContacts(CompactPersonDC dc, Person person, Organisation2Person o2p) { + + if (person.Contacts != null) + { + foreach (Contact contact in person.Contacts) + { + if (contact.Type == ContactType.private_Phone) + { + dc.Communication1 = contact.Value; + } + if (contact.Type == ContactType.private_MobilePhone) + { + dc.Communication2 = contact.Value; + } + if (contact.Type == ContactType.private_Mail) + { + dc.Communication3 = contact.Value; + } + } + } + if (o2p != null) { if (o2p.Contacts != null) { foreach (Contact contact in o2p.Contacts) { - if (contact.Type == ContactType.business_Phone) + if (String.IsNullOrEmpty(dc.Communication1)) { - dc.Communication1 = contact.Value; + if (contact.Type == ContactType.business_Phone) + { + dc.Communication1 = contact.Value; + } } - - if (contact.Type == ContactType.business_Mail) + if (String.IsNullOrEmpty(dc.Communication2)) { - dc.Communication3 = contact.Value; + if (contact.Type == ContactType.business_MobilePhone) + { + dc.Communication2 = contact.Value; + } + } + if (String.IsNullOrEmpty(dc.Communication3)) + { + if (contact.Type == ContactType.business_Mail) + { + dc.Communication3 = contact.Value; + } } } } @@ -674,45 +713,7 @@ namespace BeWo.Service.Plugins } - if (String.IsNullOrEmpty(dc.Communication1)) - { - if (person.Contacts != null) - { - foreach (Contact contact in person.Contacts) - { - if (contact.Type == ContactType.private_Phone) - { - dc.Communication1 = contact.Value; - } - } - } - } - if (String.IsNullOrEmpty(dc.Communication2)) - { - if (person.Contacts != null) - { - foreach (Contact contact in person.Contacts) - { - if (contact.Type == ContactType.private_MobilePhone) - { - dc.Communication2 = contact.Value; - } - } - } - } - if (String.IsNullOrEmpty(dc.Communication3)) - { - if (person.Contacts != null) - { - foreach (Contact contact in person.Contacts) - { - if (contact.Type == ContactType.private_Mail) - { - dc.Communication3 = contact.Value; - } - } - } - } + } private ApplicationUser GetLoggedInUser() @@ -888,7 +889,7 @@ namespace BeWo.Service.Plugins { foreach (Employee2Customer e2c in customer.Employee2CustomerList) { - if (employeeOid == e2c.EmployeeOid.Value) + if (employeeOid == e2c.EmployeeOid.Value && (!e2c.StartDate.HasValue || e2c.StartDate <= DateTime.Now.Date) && (!e2c.EndDate.HasValue || e2c.EndDate >= DateTime.Now.Date)) { customerDc.IsRelatedToEmployee = true; } @@ -931,10 +932,14 @@ namespace BeWo.Service.Plugins foreach (Employee2Customer item in e2cList) { - if (!customerOIDs.ContainsKey(item.Customer.Oid.Value)) + if ((!item.StartDate.HasValue || item.StartDate <= DateTime.Now.Date) && (!item.EndDate.HasValue || item.EndDate >= DateTime.Now.Date)) { - customerOIDs.Add(item.Customer.Oid.Value, item.Customer.Oid.Value); + if (!customerOIDs.ContainsKey(item.Customer.Oid.Value)) + { + customerOIDs.Add(item.Customer.Oid.Value, item.Customer.Oid.Value); + } } + } //if (FetchTeamsForSupportConcepts()) diff --git a/Service/Plugins/PluginLoader.cs b/Service/Plugins/PluginLoader.cs index 459fe0f9c..76a0afdfc 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 diff --git a/Service/Plugins/SupportConceptAnalysisCreator.cs b/Service/Plugins/SupportConceptAnalysisCreator.cs index 2e7f647c1..325a12025 100644 --- a/Service/Plugins/SupportConceptAnalysisCreator.cs +++ b/Service/Plugins/SupportConceptAnalysisCreator.cs @@ -485,7 +485,10 @@ namespace BeWo.Service.Plugins { if (employeeOid.Value == e2c.EmployeeOid.Value) { - isRelatedToEmployee = true; + if ((!e2c.StartDate.HasValue || e2c.StartDate <= DateTime.Now.Date) && (!e2c.EndDate.HasValue || e2c.EndDate >= DateTime.Now.Date)) + { + isRelatedToEmployee = true; + } } } } diff --git a/Service/ServiceImplementations/CustomerServiceImp.cs b/Service/ServiceImplementations/CustomerServiceImp.cs index 4b4d080f4..a0d501c8b 100644 --- a/Service/ServiceImplementations/CustomerServiceImp.cs +++ b/Service/ServiceImplementations/CustomerServiceImp.cs @@ -716,7 +716,10 @@ namespace BeWo.Service.ServiceImplementations { if(rel.Employee.Equals(user.Employee) && rel.CustomerOid.HasValue) { - relatedCustomerOids.AddIfNotIn(rel.CustomerOid.Value); + if ((!rel.StartDate.HasValue || rel.StartDate <= DateTime.Now.Date) && (!rel.EndDate.HasValue || rel.EndDate >= DateTime.Now.Date)) + { + relatedCustomerOids.AddIfNotIn(rel.CustomerOid.Value); + } } } }