MH: Schubkraft Gesamtstunden in Bewilligung richtig berechnet
This commit is contained in:
@@ -12,12 +12,16 @@ namespace ABCBetreuungenReports.Calculation
|
||||
public override decimal? GetApprovedHoursForPeriod(SupportConceptApprovalPeriodDC scap, List<CostRatePeriodDC> costRatePeriods, DateTime? pStart,
|
||||
DateTime? pEnd)
|
||||
{
|
||||
|
||||
var scapEnt =
|
||||
DAOFactory.GenericDAO.LoadByID<SupportConceptApprovalPeriod>(scap.SupportConceptApprovalPeriodOid.Value);
|
||||
var org = scapEnt.CostBearer2SupportConcept.CostBearer.Organisation;
|
||||
|
||||
decimal weeksPerMonth = 4.3m;
|
||||
|
||||
if (scap.ApprovedBETotal.HasValue)
|
||||
{
|
||||
if (org.Name.ToLower().Contains("neu"))
|
||||
return scap.ApprovedBETotal / 60 * 50;
|
||||
return scap.ApprovedBETotal;
|
||||
}
|
||||
|
||||
@@ -59,15 +63,12 @@ namespace ABCBetreuungenReports.Calculation
|
||||
start = start.AddMonths(1);
|
||||
}
|
||||
|
||||
var scapEnt =
|
||||
DAOFactory.GenericDAO.LoadByID<SupportConceptApprovalPeriod>(scap.SupportConceptApprovalPeriodOid.Value);
|
||||
var org = scapEnt.CostBearer2SupportConcept.CostBearer.Organisation;
|
||||
|
||||
if (org.Name.ToLower().Contains("neu") && scap.ApprovedBEPerInterval.HasValue)
|
||||
{
|
||||
var month = Math.Round(Convert.ToDecimal(((pEnd.Value.Date - pStart.Value.Date).TotalDays + 1) / 7), 2);
|
||||
month /= 4.35m;
|
||||
return scap.ApprovedBEPerInterval.Value * 4.35m * Math.Round(month, 2);
|
||||
var weeksInAP = Math.Round(Convert.ToDecimal(((pEnd.Value.Date - pStart.Value.Date).TotalDays + 1) / 7), 2); // Anzahl Wochen im Bewilligungszeitraum
|
||||
var months = weeksInAP / 4.35m; // 1 Monat hat bei denen Pauschal 4.35 Wochen, also Wochen im Bewilligungszeitraum / Wochen pro Monat
|
||||
return (scap.ApprovedBEPerInterval.Value / 60 * 50) * 4.35m * Math.Round(months, 2); // Bew. Stunden pro Woche * Wochen pro Monat = Stunden pro Monat, dann Stunden pro Monat * Anzahl Monate
|
||||
}
|
||||
|
||||
if (org.Name != "Landkreis Osnabrück")
|
||||
|
||||
Reference in New Issue
Block a user