From 9fd309bc7e32efd83abc28f44f20d4ef1ad2bdb6 Mon Sep 17 00:00:00 2001 From: HirschleM Date: Wed, 7 Jan 2026 12:44:15 +0100 Subject: [PATCH] MH: DiakonischesWerkMuelheimTwg PflegeInvoiceCreation Bugfix (wegen Bug Finanzauswertung) --- .../Invoicing/CustomInvoiceFactory.cs | 2 +- .../Invoicing/PflegeInvoiceCreation.cs | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ReportImp/DiakonischesWerkMuelheimTwg/Invoicing/CustomInvoiceFactory.cs b/ReportImp/DiakonischesWerkMuelheimTwg/Invoicing/CustomInvoiceFactory.cs index 99be5d1b8..66da61b6e 100644 --- a/ReportImp/DiakonischesWerkMuelheimTwg/Invoicing/CustomInvoiceFactory.cs +++ b/ReportImp/DiakonischesWerkMuelheimTwg/Invoicing/CustomInvoiceFactory.cs @@ -22,7 +22,7 @@ namespace DiakonischesWerkMuelheimTwg.Invoicing var c2s = DAOFactory.GenericDAO.LoadByID(sc.CostBearerRelOids[0]); // Wenn es nur die Bewilligung für Barbetragsabrechnung gibt, einfach die entsprechende Erstellung starten - if (c2s.ApprovalPeriodList.Any(a => a.ServiceCategory.Name.Contains("Bar")) && c2s.ApprovalPeriodList.Count == 1) + if (c2s.ApprovalPeriodList.Any(a => a.ServiceCategory != null && a.ServiceCategory.Name.Contains("Bar")) && c2s.ApprovalPeriodList.Count == 1) { return new BarbetragInvoiceCreation(); } diff --git a/ReportImp/DiakonischesWerkMuelheimTwg/Invoicing/PflegeInvoiceCreation.cs b/ReportImp/DiakonischesWerkMuelheimTwg/Invoicing/PflegeInvoiceCreation.cs index cc153bef9..b402256db 100644 --- a/ReportImp/DiakonischesWerkMuelheimTwg/Invoicing/PflegeInvoiceCreation.cs +++ b/ReportImp/DiakonischesWerkMuelheimTwg/Invoicing/PflegeInvoiceCreation.cs @@ -56,8 +56,11 @@ namespace DiakonischesWerkMuelheimTwg.Invoicing { var barInvoiceCreation = new BarbetragInvoiceCreation(); var inv = barInvoiceCreation.CreateSingleInvoice(invoiceCounter, costBearer, invoicePeriod, sc.Key, sc.Value); - invoiceList.Add(inv); - invoiceCounter++; + if (inv != null) + { + invoiceList.Add(inv); + invoiceCounter++; + } } }