FeidPartnerReports/Invoicing/CollectiveInvoiceCreation - Berücksichtigung falls Bew nicht voller Monat

This commit is contained in:
2025-10-09 14:22:43 +02:00
parent 5955d52d21
commit cb8ce79311

View File

@@ -67,6 +67,14 @@ namespace FeidPartnerReports.Invoicing
if (supportConceptApprovalPeriod.ServiceCategory != null && data != null && data.Count > 0)
{
if (supportConceptApprovalPeriod.StartDate.HasValue && supportConceptApprovalPeriod.StartDate.Value > start)
{
start = supportConceptApprovalPeriod.StartDate.Value;
}
if (supportConceptApprovalPeriod.EndDate.HasValue && supportConceptApprovalPeriod.EndDate.Value < end)
{
end = supportConceptApprovalPeriod.EndDate.Value;
}
decimal preis = (decimal)Math.Round((double)data[0].AmountTotal, 2, MidpointRounding.AwayFromZero);
decimal days = (decimal)(end - start).TotalDays + 1;