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++; } }