From 10d75ff397530042f6b24bdd48a81f32e5cc9caa Mon Sep 17 00:00:00 2001 From: Alexandra Date: Tue, 3 Sep 2024 10:57:46 +0200 Subject: [PATCH] =?UTF-8?q?SHKService/Invoicing/CollectiveInvoiceCreation?= =?UTF-8?q?=20-=20LG=20auf=20f=C3=BCr=20KA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Invoicing/CollectiveInvoiceCreation.cs | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/ReportImp/SHKService/Invoicing/CollectiveInvoiceCreation.cs b/ReportImp/SHKService/Invoicing/CollectiveInvoiceCreation.cs index 86886f6ad..8895e422c 100644 --- a/ReportImp/SHKService/Invoicing/CollectiveInvoiceCreation.cs +++ b/ReportImp/SHKService/Invoicing/CollectiveInvoiceCreation.cs @@ -110,18 +110,18 @@ namespace SHKService.Invoicing } else { - ii.AmountPerUnit = supportConceptApprovalPeriod.ApprovedBEPerInterval * (decimal)Math.Round((double)data[0].AmountTotal / 60, 4, MidpointRounding.AwayFromZero); - if (!cb2sc.SupportConcept.Customer.Person.LastNameFirstName.ToLower().Contains("(ka")) + // ursprünglich Eingabe der LG-Minuten vereinbart. Kommt vielleicht für KA wieder + //ii.AmountPerUnit = supportConceptApprovalPeriod.ApprovedBEPerInterval * (decimal)Math.Round((double)data[0].AmountTotal / 60, 4, MidpointRounding.AwayFromZero); + + var LG = (decimal)GetLeistungsgruppe(supportConceptApprovalPeriod.ApprovedBEPerInterval); + if (data.Count > 0 && data[0].AmountTotal != null) { - var LG = (decimal)GetLeistungsgruppe(supportConceptApprovalPeriod.ApprovedBEPerInterval); - if (data.Count > 0 && data[0].AmountTotal != null) - { - ii.AmountPerUnit = (decimal)Math.Round((double)data[0].AmountTotal * Math.Round((double)LG / 60, 2, MidpointRounding.AwayFromZero), 2, MidpointRounding.AwayFromZero); - //ii.AmountPerUnit = LG * (decimal)Math.Round((double)data[0].AmountTotal / 60, 4, MidpointRounding.AwayFromZero); - } - ii.ItemDescription = "Qualifizierte Assistenz"; - ii.Notice = LG.ToString(); + ii.AmountPerUnit = (decimal)Math.Round((double)data[0].AmountTotal * Math.Round((double)LG / 60, 2, MidpointRounding.AwayFromZero), 2, MidpointRounding.AwayFromZero); + //ii.AmountPerUnit = LG * (decimal)Math.Round((double)data[0].AmountTotal / 60, 4, MidpointRounding.AwayFromZero); } + ii.ItemDescription = "Qualifizierte Assistenz"; + ii.Notice = LG.ToString(); + if (cb2sc.SupportConcept.Customer.Person.LastNameFirstName.ToLower().Contains("(ka")) { ii.ItemDescription = "Kompensatorische Assistenz"; @@ -157,7 +157,7 @@ namespace SHKService.Invoicing private object GetLeistungsgruppe(decimal? approvedBEPerInterval) { // alle Leistungen werden in Stufen - sogenannten Leistungsgruppen abgerechnet - - // bei der QA tragen sie die tatsächlich bewilligten Minuten ein, um zu wissen wie viel sie leisten müssen - Abrechnung braucht aber LG + // bei der QA/KA tragen sie die tatsächlich bewilligten Minuten ein, um zu wissen wie viel sie leisten müssen - Abrechnung braucht aber LG decimal lg = 60; if (approvedBEPerInterval == null || approvedBEPerInterval.Value < 91) {