From caf4581f95006f7d8d4e0e80ef5aa28c4833f63d Mon Sep 17 00:00:00 2001 From: HirschleM Date: Wed, 27 Nov 2024 16:54:35 +0100 Subject: [PATCH] =?UTF-8?q?MH:=20Caritas=20J=C3=BClich=20Rechnung=20Betreu?= =?UTF-8?q?ung=20+=20Art?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ServiceInvoiceReport.cs | 54 +++++++++---------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/ReportImp/CaritasverbandDuerenJuelichEV/ServiceInvoiceReport.cs b/ReportImp/CaritasverbandDuerenJuelichEV/ServiceInvoiceReport.cs index 935b4e9f4..c53ae272e 100644 --- a/ReportImp/CaritasverbandDuerenJuelichEV/ServiceInvoiceReport.cs +++ b/ReportImp/CaritasverbandDuerenJuelichEV/ServiceInvoiceReport.cs @@ -63,8 +63,8 @@ namespace CaritasverbandDuerenJuelichEV e2c => e2c.ValueList.Any(ve => ve.Entry.SystemEntryID.HasValue && ve.Entry.SystemEntryID.Value == SystemEntryID.EmployeeRoleMainAttendant)); var vertretung = c.Employee2CustomerList.FirstOrDefault( - e2c => e2c.ValueList.Any(ve => ve.Entry.SystemEntryID.HasValue - && ve.Entry.Value == "Ergänzende Betreuung")); + e2c => e2c.ValueList.Any(ve => ve.Entry.Type == ValueListEntryType.StaffRoleType + && ve.Entry.Value != null && ve.Entry.Value == "Ergänzende Betreuung")); if (hauptbetreuer != null && hauptbetreuer.Employee.Person != null) @@ -86,34 +86,34 @@ namespace CaritasverbandDuerenJuelichEV } } - if (pRO.ServiceInvoicePeriods[0].SupportConceptApprovalPeriod != null && - pRO.ServiceInvoicePeriods[0].SupportConceptApprovalPeriod.ServiceCategory != null) - { - var name = pRO.ServiceInvoicePeriods[0].SupportConceptApprovalPeriod.ServiceCategory.Name; - name = name.Replace("Fachleistungsstunde", "").Trim(); - name = name.Replace("(", ""); - name = name.Replace(")", ""); + //if (pRO.ServiceInvoicePeriods[0].SupportConceptApprovalPeriod != null && + // pRO.ServiceInvoicePeriods[0].SupportConceptApprovalPeriod.ServiceCategory != null) + //{ + // var name = pRO.ServiceInvoicePeriods[0].SupportConceptApprovalPeriod.ServiceCategory.Name; + // name = name.Replace("Fachleistungsstunde", "").Trim(); + // name = name.Replace("(", ""); + // name = name.Replace(")", ""); - lblBetreuungsart.Text = name; - } + // lblBetreuungsart.Text = name; + //} } - if (pRO.CustomerOid.HasValue) - { - var c = DAOFactory.GenericDAO.LoadByID(pRO.CustomerOid.Value); - var hauptbetreuer = c.Employee2CustomerList.FirstOrDefault( - e2c => e2c.ValueList.Any(ve => ve.Entry.SystemEntryID.HasValue - && ve.Entry.SystemEntryID.Value == SystemEntryID.EmployeeRoleMainAttendant)); - if (hauptbetreuer != null && hauptbetreuer.Employee.Person != null) - { - lblBetreuungskraft.Text = hauptbetreuer.Employee.Person.FirstNameLastName; - } - var betreuungsart = c.ValueList.FirstOrDefault(v2o => v2o.Entry.Type == ValueListEntryType.CustomerCareType); - if (betreuungsart != null) - { - lblBetreuungsart.Text = betreuungsart.Entry.Value; - } - } + //if (pRO.CustomerOid.HasValue) + //{ + // var c = DAOFactory.GenericDAO.LoadByID(pRO.CustomerOid.Value); + // var hauptbetreuer = c.Employee2CustomerList.FirstOrDefault( + // e2c => e2c.ValueList.Any(ve => ve.Entry.SystemEntryID.HasValue + // && ve.Entry.SystemEntryID.Value == SystemEntryID.EmployeeRoleMainAttendant)); + // if (hauptbetreuer != null && hauptbetreuer.Employee.Person != null) + // { + // lblBetreuungskraft.Text = hauptbetreuer.Employee.Person.FirstNameLastName; + // } + // var betreuungsart = c.ValueList.FirstOrDefault(v2o => v2o.Entry.Type == ValueListEntryType.CustomerCareType); + // if (betreuungsart != null) + // { + // lblBetreuungsart.Text = betreuungsart.Entry.Value; + // } + //} } } } \ No newline at end of file