MH: AWO Münsterland Recklinghausen KannAllesWeissAllesRO Bewilligungen korrigiert
This commit is contained in:
@@ -620,19 +620,28 @@ namespace AWOMuensterlandRecklinghausen.Reporting
|
||||
// 6.2 Für jeden Kostenträger alle Bewilligungen raussuchen
|
||||
List<SupportConceptApprovalPeriod> apList = new List<SupportConceptApprovalPeriod>();
|
||||
cr.Bewilligungsbezeichnungen = hp.Notice;
|
||||
foreach (var ap in hp.ApprovalPeriodList)
|
||||
|
||||
if (hp.ApprovalPeriodList != null && hp.ApprovalPeriodList.Count > 0)
|
||||
{
|
||||
cr.ApprovedTotal += ap.ApprovedBEPerInterval ?? 0;
|
||||
apList.Add(ap);
|
||||
if (!cr.Bewilligungen.ContainsKey(cr.cb2sc))
|
||||
var berichtsdatum = DateTime.Now;
|
||||
var aktuelleBewilligungen = hp.ApprovalPeriodList.Where(ap => ap.StartDate.HasValue && berichtsdatum >= ap.StartDate && ap.EndDate.HasValue && berichtsdatum <= ap.EndDate ||
|
||||
ap.StartDate.HasValue && berichtsdatum >= ap.StartDate && !ap.EndDate.HasValue).ToList();
|
||||
|
||||
foreach (var ap in aktuelleBewilligungen)
|
||||
{
|
||||
cr.Bewilligungen.Add(cr.cb2sc, apList);
|
||||
}
|
||||
else
|
||||
{
|
||||
cr.Bewilligungen[cr.cb2sc].Add(ap);
|
||||
cr.ApprovedTotal += ap.ApprovedBEPerInterval ?? 0;
|
||||
apList.Add(ap);
|
||||
if (!cr.Bewilligungen.ContainsKey(cr.cb2sc))
|
||||
{
|
||||
cr.Bewilligungen.Add(cr.cb2sc, apList);
|
||||
}
|
||||
else
|
||||
{
|
||||
cr.Bewilligungen[cr.cb2sc].Add(ap);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ro.AllCustomerRelations.Add(cr);
|
||||
|
||||
Reference in New Issue
Block a user