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