From 9559182236b0cbdbff367de4a2f2d648087e690c Mon Sep 17 00:00:00 2001 From: HirschleM Date: Thu, 9 Jan 2025 10:12:36 +0100 Subject: [PATCH] MH: Pflege Wessel Rechnungserstellung Fix --- .../Invoicing/CustomInvoiceCreation.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ReportImp/PflegedienstWessel/Invoicing/CustomInvoiceCreation.cs b/ReportImp/PflegedienstWessel/Invoicing/CustomInvoiceCreation.cs index 111d3d4c2..c97f461cb 100644 --- a/ReportImp/PflegedienstWessel/Invoicing/CustomInvoiceCreation.cs +++ b/ReportImp/PflegedienstWessel/Invoicing/CustomInvoiceCreation.cs @@ -39,7 +39,7 @@ namespace PflegedienstWessel.Invoicing // Prüfen, ob es Hintergrunddienste (HD) für Hilfepläne gibt. Diese benötigen nämlich eine eigene Rechnung mit Pauschalbetrag pro Tag foreach (var rel in scdc.CostBearerRelations) { - if (rel.ApprovalPeriodList.Any(ap => ap.ServiceCategory != null && ap.ServiceCategory.Name.Contains("HD"))) + if (rel.ApprovalPeriodList.Any(ap => ap.ServiceCategory != null && ap.ServiceCategory.Name.Contains("HD")) || rel.CostBearer.Function != null && rel.CostBearer.Function == "HD WG für Rechnung") { // Wenn es eine HD-Kategorie in der Bewilligung gibt, zu scsMitHD hinzufügen und dann am Ende eine Rechung für alle HP in der Liste erstellen scsMitHD.Add(rel.SupportConcept); @@ -98,6 +98,13 @@ namespace PflegedienstWessel.Invoicing var result = invoiceList.Select(item => MapperFactory.ServiceInvoiceDC_ServiceInvoice.MapToNewDC(item)).ToList(); + foreach (var inv in result) + { + if (inv.InvoiceBase.RecipientOrganisation.ToLower().Contains("lvr") && inv.InvoiceBase.RecipientOrganisation.ToLower().Contains("-")) + { + inv.InvoiceBase.RecipientOrganisation = inv.InvoiceBase.RecipientOrganisation.Remove(inv.InvoiceBase.RecipientOrganisation.IndexOf("-"), inv.InvoiceBase.RecipientOrganisation.Length - inv.InvoiceBase.RecipientOrganisation.IndexOf("-")); + } + } return result; }