From 8656970673e32f4f929b88c9050178bef21625f4 Mon Sep 17 00:00:00 2001 From: Alexandra Date: Wed, 22 Oct 2025 12:57:23 +0200 Subject: [PATCH] =?UTF-8?q?PerspektivenEV/Invoicing/CustomPfkInvoiceCreati?= =?UTF-8?q?on=20-=20Einf=C3=BCgen=20von=20%=20Abrechenbarkeit=20bei=20Qual?= =?UTF-8?q?ifikationsabh=C3=A4ngigen=20S=C3=A4tzen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Invoicing/CustomPfkInvoiceCreation.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ReportImp/PerspektivenEV/Invoicing/CustomPfkInvoiceCreation.cs b/ReportImp/PerspektivenEV/Invoicing/CustomPfkInvoiceCreation.cs index f5e5e4ed4..8a7dee79c 100644 --- a/ReportImp/PerspektivenEV/Invoicing/CustomPfkInvoiceCreation.cs +++ b/ReportImp/PerspektivenEV/Invoicing/CustomPfkInvoiceCreation.cs @@ -87,18 +87,25 @@ namespace PerspektivenEV.Invoicing if (stundensatz != 0) { invoiceItem.AmountPerUnit = stundensatz; - invoiceItem.AmountTotal = stundensatz * bd.UnitCount; - invoiceItem.GrossAmountTotal = stundensatz * bd.UnitCount; + var prozent = iServiceRecord.ServiceDescription.Category.Percentage; + if (iServiceRecord.ServiceDescription.ProzentAbrechnung.HasValue) + { + prozent = iServiceRecord.ServiceDescription.ProzentAbrechnung.Value; + } + invoiceItem.UnitCount = bd.UnitCount * prozent / 100; + invoiceItem.AmountTotal = stundensatz * invoiceItem.UnitCount; + invoiceItem.GrossAmountTotal = stundensatz * invoiceItem.UnitCount; } else { + invoiceItem.UnitCount = bd.UnitCount; invoiceItem.AmountPerUnit = bd.AmountPerUnit; invoiceItem.AmountTotal = bd.AmountTotal; invoiceItem.GrossAmountTotal = bd.GrossAmountTotal; invoiceItem.ItemDescription = iServiceRecord.ServiceDescription.Name; } - invoiceItem.UnitCount = bd.UnitCount; + invoiceItem.ItemPeriodStart = bd.BillingPeriodStart; invoiceItem.ItemPeriodEnd = bd.BillingPeriodEnd; invoiceItem.RateFactor = bd.RateFactor;