MH: VSD Hamm Kürzung von Spitzabrechnungen Bugfix

SupportOID=166466
This commit is contained in:
2026-06-29 14:38:06 +02:00
parent 0a0c9cc1c1
commit 5d8de2db55

View File

@@ -264,10 +264,12 @@ namespace VSDHammReports
{
//Christian wars:-)
var dauerBudgetMitRf = dauerBudget * ((ap.RateFactor ?? 0) + 100) / 100;
var scap = c2s.ApprovalPeriodList.FirstOrDefault(a => ap.PeriodStartDate >= a.StartDate && ap.PeriodStartDate <= a.EndDate);
if (SchneideBeiErreichenDesBudgetsAb)
{
// Claude: Bei Wochen-/Monatsbewilligung auf Intervall-Ebene kappen statt auf Gesamtebene.
if (ap.ApprovalUnit == AccountingIntervalType.Weekly || ap.ApprovalUnit == AccountingIntervalType.Monthly)
if (scap != null && !scap.IsApprovedBEShifting && ap.ApprovalUnit == AccountingIntervalType.Weekly || ap.ApprovalUnit == AccountingIntervalType.Monthly)
{
// Claude: Bewilligte Minuten pro Intervall (ApprovedPerUnit ist die Menge je Woche bzw. Monat).
DateTime intervalKey = ap.ApprovalUnit == AccountingIntervalType.Weekly