From 5226a4e9ceeebc4a4388569f8e6a4388fcce6deb Mon Sep 17 00:00:00 2001 From: Rene Evertz Date: Wed, 26 Nov 2025 15:26:56 +0100 Subject: [PATCH] GkvAbrechning InvoiceBases Hotfix --- .../InvoiceBaseDC_InvoiceBase.cs | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/Service/DCEntityMapper/InvoiceBaseDC_InvoiceBase.cs b/Service/DCEntityMapper/InvoiceBaseDC_InvoiceBase.cs index 186ee1148..20f275717 100644 --- a/Service/DCEntityMapper/InvoiceBaseDC_InvoiceBase.cs +++ b/Service/DCEntityMapper/InvoiceBaseDC_InvoiceBase.cs @@ -143,16 +143,24 @@ namespace BeWo.Service.DCEntityMapper if(customer is object) { - pDataContract.CustomerOid = customer.Oid.Value; - pDataContract.CustomerFirstName = customer.Person.FirstName; - pDataContract.CustomerLastName = customer.Person.LastName; + try + { + pDataContract.CustomerOid = customer.Oid.Value; + pDataContract.CustomerFirstName = customer.Person.FirstName; + pDataContract.CustomerLastName = customer.Person.LastName; - var error = GkvValidator.ValidateCustomer(customer.InsuranceNumber, customer.VersichertenStatus); - if (error is null) - error = GkvValidator.ValidateInvoiceBase(pDataContract); + var error = GkvValidator.ValidateCustomer(customer.InsuranceNumber, customer.VersichertenStatus); + if (error is null) + error = GkvValidator.ValidateInvoiceBase(pDataContract); - pDataContract.IsGkvValidError = error; - pDataContract.IsGkvValid = error is null; + pDataContract.IsGkvValidError = error; + pDataContract.IsGkvValid = error is null; + } + catch (Exception e) + { + pDataContract.IsGkvValidError = e.ToString(); + pDataContract.IsGkvValid = false; + } } pDataContract.XRechnungStoredFile = MapperFactory.StoredFile.CreateOrMapToNewDC(pEntity.XRechnungStoredFile, true);