From 2b60eb62c32188ddb2ad18b2da786f3905509393 Mon Sep 17 00:00:00 2001 From: Alexandra Date: Tue, 7 Jul 2026 12:26:55 +0200 Subject: [PATCH] HshCologne/CustomReportCreator.cs - Bornheim kriegt zwei QBs an Rechnung SupportOID=166717 --- ReportImp/HshCologne/CustomReportCreator.cs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/ReportImp/HshCologne/CustomReportCreator.cs b/ReportImp/HshCologne/CustomReportCreator.cs index e98fb2d38..fc080b054 100644 --- a/ReportImp/HshCologne/CustomReportCreator.cs +++ b/ReportImp/HshCologne/CustomReportCreator.cs @@ -60,12 +60,23 @@ namespace HshCologne long cOid = iDC.InvoiceBase.SupportConceptCostBearerRelDc.SupportConcept.Customer.CustomerOid; long oOid = iDC.InvoiceBase.RecipientOrganisationOid ?? 0; + // Bornheim möchte den Leistungsnachweis in zweifacher Ausfertigung + var costBearer = iDC.InvoiceBase.SupportConceptCostBearerRelDc.CostBearer; + int anzahlAusfertigungen = 1; + if (costBearer != null && costBearer.Name != null && costBearer.Name.Contains("Bornheim")) + { + anzahlAusfertigungen = 2; + } + while (month <= iDC.InvoiceBase.AccountingPeriodEnd.Value.Month) { - var qb = CreateServiceOverviewSingleCustomerReport(cOid, month, year, oOid, 0, null, 1, DateTime.DaysInMonth(year, month)); - qb.CreateDocument(); + for (int i = 0; i < anzahlAusfertigungen; i++) + { + var qb = CreateServiceOverviewSingleCustomerReport(cOid, month, year, oOid, 0, null, 1, DateTime.DaysInMonth(year, month)); + qb.CreateDocument(); - invoiceReport.Pages.AddRange(qb.Pages); + invoiceReport.Pages.AddRange(qb.Pages); + } month++; } }