MH: DiakonischesWerkMuelheimTwg PflegeInvoiceCreation Bugfix (wegen Bug Finanzauswertung)

This commit is contained in:
2026-01-07 12:44:15 +01:00
parent c8b44968d9
commit 9fd309bc7e
2 changed files with 6 additions and 3 deletions

View File

@@ -22,7 +22,7 @@ namespace DiakonischesWerkMuelheimTwg.Invoicing
var c2s = DAOFactory.GenericDAO.LoadByID<CostBearer2SupportConcept>(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();
}

View File

@@ -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++;
}
}
}