From f9df262319e746943458adf8ed0b0c9befcfb291 Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 15 Jan 2026 10:52:18 +0100 Subject: [PATCH] =?UTF-8?q?Autismus=20K=C3=B6ln/Bonn=20kleiner=20Bugfix=20?= =?UTF-8?q?bei=20Spitzabrechnung,=20wenn=20keine=20Rechnungsadresse=20beim?= =?UTF-8?q?=20KT=20hinterlegt=20ist?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CustomSettlementInvoiceCreation.cs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/ReportImp/AutismusKoelnBonn/Invoicing/CustomSettlementInvoiceCreation.cs b/ReportImp/AutismusKoelnBonn/Invoicing/CustomSettlementInvoiceCreation.cs index 0defd2399..dee566518 100644 --- a/ReportImp/AutismusKoelnBonn/Invoicing/CustomSettlementInvoiceCreation.cs +++ b/ReportImp/AutismusKoelnBonn/Invoicing/CustomSettlementInvoiceCreation.cs @@ -73,14 +73,19 @@ namespace AutismusKoelnBonn.Invoicing var invoiceAdress = c2s.CostBearer.Organisation.InvoiceAddress; - if (!invoiceAdress.AddressLine1.IsNullOrEmpty()) - settlementInvoice.RecipientDivision = invoiceAdress.AddressLine1; + if (invoiceAdress != null) + { + if (!invoiceAdress.AddressLine1.IsNullOrEmpty()) + settlementInvoice.RecipientDivision = invoiceAdress.AddressLine1; + if (!invoiceAdress.PostalCode.IsNullOrEmpty()) + settlementInvoice.RecipientPostCode = invoiceAdress.PostalCode; + if (!invoiceAdress.Town.IsNullOrEmpty()) + settlementInvoice.RecipientTown = invoiceAdress.Town; + } + if (!c2s.CostBearer.Organisation.Name2.IsNullOrEmpty()) settlementInvoice.RecipientStreet = c2s.CostBearer.Organisation.Name2; - if (!invoiceAdress.PostalCode.IsNullOrEmpty()) - settlementInvoice.RecipientPostCode = invoiceAdress.PostalCode; - if (!invoiceAdress.Town.IsNullOrEmpty()) - settlementInvoice.RecipientTown = invoiceAdress.Town; + if (c2s.CostBearer.Organisation.Contacts.Count > 0) { foreach (var i in c2s.CostBearer.Organisation.Contacts)