From 44e2139fb4f152229ca2c61172584a2217bed3c5 Mon Sep 17 00:00:00 2001 From: Marcel Hirschle Date: Tue, 4 Jun 2024 12:12:56 +0200 Subject: [PATCH] MH: Lebenswert neue Pauschale --- .../LebensWert/Invoicing/CustomInvoiceCreationHA.cs | 11 +++++++---- .../LebensWert/Invoicing/CustomInvoiceCreationHI.cs | 10 +++++++--- .../LebensWert/Invoicing/CustomInvoiceCreationNI.cs | 10 +++++++--- .../Invoicing/CustomSettlementInvoiceCreation.cs | 2 ++ ReportImp/LebensWert/Invoicing/PauschalenHelper.cs | 2 ++ 5 files changed, 25 insertions(+), 10 deletions(-) diff --git a/ReportImp/LebensWert/Invoicing/CustomInvoiceCreationHA.cs b/ReportImp/LebensWert/Invoicing/CustomInvoiceCreationHA.cs index b825f15bf..0007c171d 100644 --- a/ReportImp/LebensWert/Invoicing/CustomInvoiceCreationHA.cs +++ b/ReportImp/LebensWert/Invoicing/CustomInvoiceCreationHA.cs @@ -100,14 +100,17 @@ namespace LebensWert.Invoicing private InvoiceItem CreateKontaktpauschalenItem(decimal? unitCount, DateTime? itemPeriodStart, DateTime? itemPeriodEnd) { - return new InvoiceItem() + var pauschale = itemPeriodStart.Value.Year < 2023 ? PauschalenHelper.HANNOVER_AMOUNT_BEFORE_2023 : PauschalenHelper.HANNOVER_AMOUNT_SINCE_2023; + if (itemPeriodStart >= new DateTime(2024, 03, 01)) + pauschale = PauschalenHelper.AMOUNT_FOR_ALL_SINCE_03_2024; + return new InvoiceItem() { UnitCount = unitCount, ItemDescription = "Kontaktpauschale", UnitDescription = "Pauschale pro direktem Kontakt", - AmountPerUnit = itemPeriodStart.Value.Year < 2023 ? PauschalenHelper.HANNOVER_AMOUNT_BEFORE_2023 : PauschalenHelper.HANNOVER_AMOUNT_SINCE_2023, - AmountTotal = itemPeriodStart.Value.Year < 2023 ? PauschalenHelper.HANNOVER_AMOUNT_BEFORE_2023 * unitCount : PauschalenHelper.HANNOVER_AMOUNT_SINCE_2023 * unitCount, - GrossAmountTotal = itemPeriodStart.Value.Year < 2023 ? PauschalenHelper.HANNOVER_AMOUNT_BEFORE_2023 * unitCount : PauschalenHelper.HANNOVER_AMOUNT_SINCE_2023 * unitCount, + AmountPerUnit = pauschale, + AmountTotal = pauschale * unitCount, + GrossAmountTotal = pauschale * unitCount, ItemPeriodStart = itemPeriodStart, ItemPeriodEnd = itemPeriodEnd }; diff --git a/ReportImp/LebensWert/Invoicing/CustomInvoiceCreationHI.cs b/ReportImp/LebensWert/Invoicing/CustomInvoiceCreationHI.cs index 242e5d35e..339820e4a 100644 --- a/ReportImp/LebensWert/Invoicing/CustomInvoiceCreationHI.cs +++ b/ReportImp/LebensWert/Invoicing/CustomInvoiceCreationHI.cs @@ -231,14 +231,18 @@ namespace LebensWert.Invoicing } private InvoiceItem CreateKontaktpauschalenItem(decimal? unitCount, DateTime? itemPeriodStart, DateTime? itemPeriodEnd) { + var pauschale = PauschalenHelper.HILDESHEIM_AMOUNT_SINCE_2023; + if (itemPeriodStart >= new DateTime(2024, 03, 01)) + pauschale = PauschalenHelper.AMOUNT_FOR_ALL_SINCE_03_2024; + var ii = new InvoiceItem() { UnitCount = unitCount, ItemDescription = "Kontaktpauschale", UnitDescription = "Pauschale pro direktem Kontakt", - AmountPerUnit = PauschalenHelper.HILDESHEIM_AMOUNT_SINCE_2023, - AmountTotal = PauschalenHelper.HILDESHEIM_AMOUNT_SINCE_2023 * unitCount, - GrossAmountTotal = PauschalenHelper.HILDESHEIM_AMOUNT_SINCE_2023 * unitCount, + AmountPerUnit = pauschale, + AmountTotal = pauschale * unitCount, + GrossAmountTotal = pauschale * unitCount, ItemPeriodStart = itemPeriodStart, ItemPeriodEnd = itemPeriodEnd }; diff --git a/ReportImp/LebensWert/Invoicing/CustomInvoiceCreationNI.cs b/ReportImp/LebensWert/Invoicing/CustomInvoiceCreationNI.cs index 6bbc1dd33..8d8fc952f 100644 --- a/ReportImp/LebensWert/Invoicing/CustomInvoiceCreationNI.cs +++ b/ReportImp/LebensWert/Invoicing/CustomInvoiceCreationNI.cs @@ -125,14 +125,18 @@ namespace LebensWert.Invoicing private InvoiceItem CreateKontaktpauschalenItem(decimal? unitCount, DateTime? itemPeriodStart, DateTime? itemPeriodEnd) { + var pauschale = PauschalenHelper.NIENBURG_AMOUNT_SINCE_2023; + if (itemPeriodStart >= new DateTime(2024, 03, 01)) + pauschale = PauschalenHelper.AMOUNT_FOR_ALL_SINCE_03_2024; + var ii = new InvoiceItem() { UnitCount = unitCount, ItemDescription = "Kontaktpauschale", UnitDescription = "Pauschale pro direktem Kontakt", - AmountPerUnit = PauschalenHelper.NIENBURG_AMOUNT_SINCE_2023, - AmountTotal = PauschalenHelper.NIENBURG_AMOUNT_SINCE_2023 * unitCount, - GrossAmountTotal = PauschalenHelper.NIENBURG_AMOUNT_SINCE_2023 * unitCount, + AmountPerUnit = pauschale, + AmountTotal = pauschale * unitCount, + GrossAmountTotal = pauschale * unitCount, ItemPeriodStart = itemPeriodStart, ItemPeriodEnd = itemPeriodEnd }; diff --git a/ReportImp/LebensWert/Invoicing/CustomSettlementInvoiceCreation.cs b/ReportImp/LebensWert/Invoicing/CustomSettlementInvoiceCreation.cs index fe7340eb5..cb15a3359 100644 --- a/ReportImp/LebensWert/Invoicing/CustomSettlementInvoiceCreation.cs +++ b/ReportImp/LebensWert/Invoicing/CustomSettlementInvoiceCreation.cs @@ -118,6 +118,8 @@ namespace LebensWert.Invoicing if (unitCount > 0) { decimal pauschale = 0; + if (accountingPeriod.PeriodStart >= new DateTime(2024, 03, 01)) + pauschale = PauschalenHelper.AMOUNT_FOR_ALL_SINCE_03_2024; if (recipientOrganisation.ToLower().Contains("hannover")) pauschale = PauschalenHelper.HANNOVER_AMOUNT_SINCE_2023; else if (recipientOrganisation.ToLower().Contains("hildesheim")) diff --git a/ReportImp/LebensWert/Invoicing/PauschalenHelper.cs b/ReportImp/LebensWert/Invoicing/PauschalenHelper.cs index 2d08aee82..2a27321b7 100644 --- a/ReportImp/LebensWert/Invoicing/PauschalenHelper.cs +++ b/ReportImp/LebensWert/Invoicing/PauschalenHelper.cs @@ -14,5 +14,7 @@ namespace LebensWert.Invoicing public const decimal NIENBURG_AMOUNT_SINCE_2023 = 15.56m; public const decimal HILDESHEIM_AMOUNT_SINCE_2023 = 16.14m; + + public const decimal AMOUNT_FOR_ALL_SINCE_03_2024 = 17.11m; } }