DomizielAnsbach/Invoicing/InvoiceHelper.cs - Bugfix Datum Jahreswechsel

This commit is contained in:
2025-01-10 15:23:08 +01:00
parent 11266af877
commit f68c06f29a

View File

@@ -39,7 +39,8 @@ namespace DomizielAnsbach.Invoicing
while (start <= ende)
{
DateTime monatStart = start; //new DateTime(start.Year, start.Month, 1);
DateTime monatEnde = new DateTime(start.Year, start.AddMonths(1).Month, 1); //ende.AddDays(1); // 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(2) < monatStart.AddMonths(1))
{
monatEnde = ende.AddDays(1);