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 @@ +