ZukunftLeben: Wegen NPE in Sozio-InvoiceCreation jetzt alles in CreateHausbesuchspauschale auf Null prüfen
This commit is contained in:
@@ -130,11 +130,14 @@ namespace ZukunftLeben.Invoicing
|
||||
{
|
||||
IList<InvoiceItem> items = new List<InvoiceItem>();
|
||||
decimal hausbesuchspauschale = 8.53m;
|
||||
hausbesuchspauschale = GetHausbesuchspauschale(scap.CostBearer2SupportConcept, invoicePeriod.StartDate);
|
||||
if (scap != null && invoicePeriod != null)
|
||||
{
|
||||
hausbesuchspauschale = GetHausbesuchspauschale(scap.CostBearer2SupportConcept, invoicePeriod.StartDate);
|
||||
}
|
||||
int countHausbesuch = 0;
|
||||
foreach (var sr in serviceRecordsInPeriod)
|
||||
{
|
||||
if (sr.ServiceDescription.Name.ToLower().Contains("aufsuchend"))
|
||||
if (sr.ServiceDescription != null && sr.ServiceDescription.Name != null && sr.ServiceDescription.Name.ToLower().Contains("aufsuchend"))
|
||||
{
|
||||
countHausbesuch++;
|
||||
}
|
||||
@@ -149,8 +152,11 @@ namespace ZukunftLeben.Invoicing
|
||||
invoiceItem.AmountPerUnit = hausbesuchspauschale;
|
||||
invoiceItem.UnitCount = anzahlHausbesuche;
|
||||
invoiceItem.AmountTotal = anzahlHausbesuche * hausbesuchspauschale;
|
||||
invoiceItem.ItemPeriodStart = invoicePeriod.StartDate;
|
||||
invoiceItem.ItemPeriodEnd = invoicePeriod.EndDate;
|
||||
if (invoicePeriod != null)
|
||||
{
|
||||
invoiceItem.ItemPeriodStart = invoicePeriod.StartDate;
|
||||
invoiceItem.ItemPeriodEnd = invoicePeriod.EndDate;
|
||||
}
|
||||
invoiceItem.RateFactor = null;
|
||||
invoiceItem.GrossAmountTotal = invoiceItem.AmountTotal;
|
||||
invoiceItem.ItemDescription = "Hausbesuchspauschale";
|
||||
|
||||
Reference in New Issue
Block a user