Änderung Bew FLS ohne Assistenz

This commit is contained in:
2022-11-14 16:39:26 +01:00
parent 8ee030f8fa
commit 1f52097741
4 changed files with 106 additions and 34 deletions

View File

@@ -52,5 +52,23 @@ namespace RatPlusTat.Invoicing
return true;
}
}
public override void CalculateSettlementInvoiceApprovedAmounts(Settlement2DC si, SupportConceptCostBearerRelDC relDC, Calculations calc)
{
si.ApprovedFLSWeekly = 0;
si.ApprovedFLS = 0;
foreach (var sp in relDC.ApprovalPeriodList)
{
if (sp.ServiceCategory == null || !sp.ServiceCategory.Name.Contains("Assistenz"))
{
si.ApprovedFLSWeekly += calc.GetApprovedHoursPerWeek(sp, relDC.CostBearer.CostRatePeriods) ?? 0m;
decimal flsTotal = calc.GetApprovedHoursTotal(sp, relDC.CostBearer.CostRatePeriods) ?? 0m;
flsTotal = Math.Round(flsTotal, 2, MidpointRounding.AwayFromZero);
si.ApprovedFLS += flsTotal;
}
}
}
}
}