From 0fa3cd3d2e82330245c04520be3f08f2c3de0615 Mon Sep 17 00:00:00 2001 From: HirschleM Date: Thu, 30 Jan 2025 11:07:28 +0100 Subject: [PATCH] MH: LyvieKupfer in Rechnung Items nach Leistung aufteilen --- .../Invoicing/CustomInvoiceCreation.cs | 24 +++++++++++++++++++ .../Invoicing/CustomInvoiceFactory.cs | 2 +- ReportImp/LyvieKupfer/LyvieKupfer.csproj | 1 + 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 ReportImp/LyvieKupfer/Invoicing/CustomInvoiceCreation.cs diff --git a/ReportImp/LyvieKupfer/Invoicing/CustomInvoiceCreation.cs b/ReportImp/LyvieKupfer/Invoicing/CustomInvoiceCreation.cs new file mode 100644 index 000000000..83e02e429 --- /dev/null +++ b/ReportImp/LyvieKupfer/Invoicing/CustomInvoiceCreation.cs @@ -0,0 +1,24 @@ +using BeWo.Data.Entities; +using BeWo.Service.Invoicing; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace LyvieKupfer.Invoicing +{ + public class CustomInvoiceCreation : InvoiceCreation + { + public override string GetSummaryItemKey(SupportConceptApprovalPeriod scap, InvoiceItem iitem, bool summaryPerMonth) + { + String key = String.Format("{0:0.0000}_{1}_{2}", iitem.AmountPerUnit, iitem.RateFactor, iitem.ItemDescription); + if (summaryPerMonth) + { + key = String.Format("{0:0.0000}_{1}_{2:yyyyMM}_{3}", iitem.AmountPerUnit, iitem.RateFactor, iitem.ItemPeriodStart, iitem.ItemDescription); + } + + return key; + } + } +} diff --git a/ReportImp/LyvieKupfer/Invoicing/CustomInvoiceFactory.cs b/ReportImp/LyvieKupfer/Invoicing/CustomInvoiceFactory.cs index 594ad83ae..ee5585373 100644 --- a/ReportImp/LyvieKupfer/Invoicing/CustomInvoiceFactory.cs +++ b/ReportImp/LyvieKupfer/Invoicing/CustomInvoiceFactory.cs @@ -17,7 +17,7 @@ namespace LyvieKupfer.Invoicing return new CollectiveInvoiceCreation(); } } - return new InvoiceCreation(); + return new CustomInvoiceCreation(); } } } diff --git a/ReportImp/LyvieKupfer/LyvieKupfer.csproj b/ReportImp/LyvieKupfer/LyvieKupfer.csproj index a5ab8481c..30b219163 100644 --- a/ReportImp/LyvieKupfer/LyvieKupfer.csproj +++ b/ReportImp/LyvieKupfer/LyvieKupfer.csproj @@ -57,6 +57,7 @@ +