From cbffa0260029e8cf6e9ee281506996d92fa85653 Mon Sep 17 00:00:00 2001 From: Kojo Date: Mon, 3 Jun 2024 20:24:22 +0200 Subject: [PATCH] =?UTF-8?q?Fehlkontakt-Erkennung=20f=C3=BCr=20Spitzabrechu?= =?UTF-8?q?ng=20funktioniert=20jetzt=20auch=20richtig,=20wenn=20KT=20keine?= =?UTF-8?q?n=20pauschalen=20Faktor=20hat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Service/Invoicing/SettlementInvoiceCreation.cs | 8 ++++---- Shared/Services/AccountingPeriod.cs | 3 ++- Shared/Services/Calculations.cs | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Service/Invoicing/SettlementInvoiceCreation.cs b/Service/Invoicing/SettlementInvoiceCreation.cs index b6a7ad04f..32927cc23 100644 --- a/Service/Invoicing/SettlementInvoiceCreation.cs +++ b/Service/Invoicing/SettlementInvoiceCreation.cs @@ -908,10 +908,10 @@ namespace BeWo.Service.Invoicing maxApprovedFls -= unitCountBudget; - if (unitCountBudget < ii.UnitCount) - { - ii.UnitCount = unitCountBudget; - } + //if (unitCountBudget < ii.UnitCount) + //{ + // ii.UnitCount = unitCountBudget; + //} if (ii.AmountPerUnit.HasValue) { if (!String.IsNullOrEmpty(ii.ItemDescription) && ii.ItemDescription == "Fehlkontakte" && ii.ProzentAbrechenbar.HasValue) diff --git a/Shared/Services/AccountingPeriod.cs b/Shared/Services/AccountingPeriod.cs index c9c0d2713..4c2a0a1c2 100644 --- a/Shared/Services/AccountingPeriod.cs +++ b/Shared/Services/AccountingPeriod.cs @@ -55,7 +55,8 @@ namespace BS.Shared.Services ap.PeriodEnd == this.PeriodEnd && ap.Amount == this.Amount && ap.RateFactor == this.RateFactor && - ap.AccountingInterval == this.AccountingInterval) + ap.AccountingInterval == this.AccountingInterval && + ap.Notice == this.Notice) { if (ap.ServiceCategory == null && this.ServiceCategory == null) return true; diff --git a/Shared/Services/Calculations.cs b/Shared/Services/Calculations.cs index 1947ba851..fd4c6e238 100644 --- a/Shared/Services/Calculations.cs +++ b/Shared/Services/Calculations.cs @@ -1787,7 +1787,7 @@ namespace BS.Shared.Services } CalculateApprovedAmounts(ap, scap); - if (sr.ServiceDescription.Name.ToLower().Contains("fehlkontakt") || (sr.ServiceDescription.ProzentAbrechnung.HasValue && sr.ServiceDescription.ProzentAbrechnung.Value < 100)) + if (sr.ServiceDescription.Category.Name.ToLower().Contains("fehlkontakt") || sr.ServiceDescription.Name.ToLower().Contains("fehlkontakt") || (sr.ServiceDescription.ProzentAbrechnung.HasValue && sr.ServiceDescription.ProzentAbrechnung.Value < 100)) { ap.Notice = "Fehlkontakte"; ap.RateFactor = 0;