diff --git a/ReportImp/VSDHammReports/CustomSettlementInvoiceCreation.cs b/ReportImp/VSDHammReports/CustomSettlementInvoiceCreation.cs index 53c618103..3cda37c9e 100644 --- a/ReportImp/VSDHammReports/CustomSettlementInvoiceCreation.cs +++ b/ReportImp/VSDHammReports/CustomSettlementInvoiceCreation.cs @@ -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