MH: Schubkraft QB Bewilligungsdaten

This commit is contained in:
2024-04-24 12:14:17 +02:00
parent bd921a805b
commit deaf03d8fb
2 changed files with 19 additions and 15 deletions

View File

@@ -861,7 +861,7 @@ namespace ABCBetreuungenReports
this.xrLabel25.StylePriority.UseForeColor = false;
this.xrLabel25.StylePriority.UsePadding = false;
this.xrLabel25.StylePriority.UseTextAlignment = false;
this.xrLabel25.Text = "Beginn 6 Monatszeitraum (\"flexible Leistungserbringung\")";
this.xrLabel25.Text = "Beginn 12 Monatszeitraum (\"flexible Leistungserbringung\")";
this.xrLabel25.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
//
// lblBewilligtFls

View File

@@ -116,24 +116,28 @@ namespace ABCBetreuungenReports
decimal gesamtBewilligtProWoche = 0;
foreach (var scap in dc.ApprovalPeriodList)
{
if (scap.ApprovedBEPerInterval.HasValue && scap.ApprovedBEInterval.HasValue)
if (scap.StartDate.Value >= pRO.StartDate && scap.StartDate.Value <= pRO.EndDate || scap.EndDate.Value >= pRO.StartDate && scap.EndDate.Value <= pRO.EndDate ||
scap.StartDate.Value <= pRO.StartDate && scap.EndDate.Value >= pRO.EndDate)
{
if (scap.ApprovedBEInterval == SupportConceptApprovalInterval.Weekly)
gesamtBewilligtProWoche += scap.ApprovedBEPerInterval.Value;
else if (scap.ApprovedBEInterval == SupportConceptApprovalInterval.Monthly)
gesamtBewilligtProWoche += scap.ApprovedBEPerInterval.Value / DateTime.DaysInMonth(pRO.StartDate.Year, pRO.StartDate.Month) * 7;
else if (scap.ApprovedBEInterval == SupportConceptApprovalInterval.HalfYearly)
gesamtBewilligtProWoche += scap.ApprovedBEPerInterval.Value / 26;
else if (scap.ApprovedBEInterval == SupportConceptApprovalInterval.Yearly)
gesamtBewilligtProWoche += scap.ApprovedBEPerInterval.Value / 52;
if (scap.ApprovedBEPerInterval.HasValue && scap.ApprovedBEInterval.HasValue)
{
if (scap.ApprovedBEInterval == SupportConceptApprovalInterval.Weekly)
gesamtBewilligtProWoche += scap.ApprovedBEPerInterval.Value;
else if (scap.ApprovedBEInterval == SupportConceptApprovalInterval.Monthly)
gesamtBewilligtProWoche += scap.ApprovedBEPerInterval.Value / DateTime.DaysInMonth(pRO.StartDate.Year, pRO.StartDate.Month) * 7;
else if (scap.ApprovedBEInterval == SupportConceptApprovalInterval.HalfYearly)
gesamtBewilligtProWoche += scap.ApprovedBEPerInterval.Value / 26;
else if (scap.ApprovedBEInterval == SupportConceptApprovalInterval.Yearly)
gesamtBewilligtProWoche += scap.ApprovedBEPerInterval.Value / 52;
lblBewilligtFls.Text = String.Format("{0:0.00}", scap.ApprovedBEPerInterval.Value);
pRO.ApprovedFLSTotal = Convert.ToDecimal((scap.EndDate.Value - scap.StartDate.Value).TotalDays / 7) * scap.ApprovedBEPerInterval.Value;
lblBewilligtFls.Text = String.Format("{0:0.00}", scap.ApprovedBEPerInterval.Value);
}
else
lblBewilligtFls.Text = string.Format("{0:0.00}", pRO.ApprovedFLSPerWeekTotal);
}
else
lblBewilligtFls.Text = string.Format("{0:0.00}", pRO.ApprovedFLSPerWeekTotal);
//if (scap.EndDate.HasValue && scap.StartDate.HasValue && scap.ApprovedBEPerInterval.HasValue && scap.ApprovedBEInterval.HasValue)
//pRO.ApprovedFLSTotal += Convert.ToDecimal((scap.EndDate.Value - scap.StartDate.Value).TotalDays / 7) * scap.ApprovedBEPerInterval.Value;
}
if (gesamtBewilligtProWoche != 0)
lblBewilligtFls.Text = string.Format("{0:0.00}", gesamtBewilligtProWoche);