diff --git a/ReportImp/VkmRietberg/BudgetnachweisAnhang.cs b/ReportImp/VkmRietberg/BudgetnachweisAnhang.cs index 61997c34d..a30c03763 100644 --- a/ReportImp/VkmRietberg/BudgetnachweisAnhang.cs +++ b/ReportImp/VkmRietberg/BudgetnachweisAnhang.cs @@ -1,4 +1,6 @@ using System; +using BeWo.Data.Access; +using BeWo.Data.Entities; using BeWo.Report; using BeWo.Report.ReportObjects; using DevExpress.XtraReports.UI; @@ -14,7 +16,8 @@ namespace VkmRietberg public void SetReportDataSource(BudgetnachweisAnhangRO pRO) { - if (pRO.SettlementDC.RecipientOrganisation.ToLower().Contains("ass")) + var organisation = DAOFactory.GenericDAO.LoadByID(pRO.Costbearer2SupportConceptDC.CostBearer.OrganisationOid); + if (organisation != null && organisation.Name.ToLower().Contains("ass")) { xrLabel1.Text = xrLabel1.Text.Replace("FL", "ASS"); xrLabel1.Text = xrLabel1.Text.Replace("Fachleistungs", "Assistenz"); diff --git a/ReportImp/VkmRietberg/SettlementReport.cs b/ReportImp/VkmRietberg/SettlementReport.cs index 726856d8d..fe2400f0d 100644 --- a/ReportImp/VkmRietberg/SettlementReport.cs +++ b/ReportImp/VkmRietberg/SettlementReport.cs @@ -19,7 +19,8 @@ namespace VkmRietberg.Alt { bool isDefaultSpitzabrechnung = false; bool assistenzRechnung = false; - if (pRO.RecipientOrganisation.ToLower().Contains("ass")) + var cb2sc = DAOFactory.GenericDAO.LoadByID(pRO.CostBearer2SupportConceptOid); + if (cb2sc.CostBearer.Organisation != null && cb2sc.CostBearer.Organisation.Name.ToLower().Contains("ass")) { assistenzRechnung = true; } diff --git a/ReportImp/VkmRietberg/SettlementReport2.cs b/ReportImp/VkmRietberg/SettlementReport2.cs index 1943b9554..66c573bd4 100644 --- a/ReportImp/VkmRietberg/SettlementReport2.cs +++ b/ReportImp/VkmRietberg/SettlementReport2.cs @@ -7,6 +7,8 @@ using BeWo.Report.ReportObjects; using BeWo.Report; using System.Text.RegularExpressions; using BS.Shared.Extensions; +using BeWo.Data.Access; +using BeWo.Data.Entities; namespace VkmRietberg { @@ -26,9 +28,11 @@ namespace VkmRietberg decimal rateFactor = 1; bool assistenzRechnung = false; - if (pRO.RecipientOrganisation.ToLower().Contains("ass")) - { - assistenzRechnung = true; + var ib = DAOFactory.GenericDAO.LoadByID(pRO.InvoiceBaseOid.Value); + var cb = ib.CostBearer2SupportConcept.CostBearer; + if (cb.Organisation != null && cb.Organisation.Name.ToLower().Contains("ass")) + { + assistenzRechnung = true; } foreach (var ii in pRO.InvoiceItems)