diff --git a/ReportImp/Wabe/Invoicing/CollectiveInvoiceCreation.cs b/ReportImp/Wabe/Invoicing/CollectiveInvoiceCreation.cs index df8c230ec..3b85c2552 100644 --- a/ReportImp/Wabe/Invoicing/CollectiveInvoiceCreation.cs +++ b/ReportImp/Wabe/Invoicing/CollectiveInvoiceCreation.cs @@ -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); }