Wabe/Invoicing/CollectiveInvoiceCreation.cs - Korrektur für Eintritt/Austritt unterhalb des Quartals

This commit is contained in:
2025-01-14 16:12:45 +01:00
parent 5b976385ed
commit 50a244b44e

View File

@@ -137,8 +137,9 @@ namespace Wabe.Invoicing
while (start <= ende)
{
DateTime monatStart = start; //new DateTime(start.Year, start.Month, 1);
DateTime monatEnde = monatStart.AddMonths(1); //ende.AddDays(1);
if (ende.AddDays(2) < monatStart.AddMonths(1))
DateTime monatEnde = monatStart.AddMonths(1); //new DateTime(start.Year, start.AddMonths(1).Month, 1); //ende.AddDays(1);
monatEnde = new DateTime(monatEnde.Year, monatEnde.Month, 1);
if (ende.AddDays(1) < monatStart.AddMonths(1))
{
monatEnde = ende.AddDays(1);
}