From 79cad24b3f244e7073bcb550131e2b7289a7e7d4 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Wed, 21 Dec 2022 10:16:50 +0100 Subject: [PATCH] Interfaces/zugferd: fix parameter error which leads to falsely allowing mails with two zugferd invoices --- Interfaces/ZUGFeRDInterface.vb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Interfaces/ZUGFeRDInterface.vb b/Interfaces/ZUGFeRDInterface.vb index 190f11b9..0c04fed8 100644 --- a/Interfaces/ZUGFeRDInterface.vb +++ b/Interfaces/ZUGFeRDInterface.vb @@ -220,7 +220,7 @@ Public Class ZUGFeRDInterface Try Dim oNavigator As XPathNavigator = pDocument.Item2.CreateNavigator() Dim oReader As XmlReader - Dim oResult = Nothing + Dim oObject As Object = Nothing Dim oAllowedTypes As New List(Of Type) @@ -242,7 +242,7 @@ Public Class ZUGFeRDInterface Try oReader = oNavigator.ReadSubtree() - oResult = oSerializer.Deserialize(oReader) + oObject = oSerializer.Deserialize(oReader) _logger.Debug("Serializing with type [{0}] succeeded", oType.FullName) Exit For Catch ex As Exception @@ -252,11 +252,11 @@ Public Class ZUGFeRDInterface End Try Next - If oResult Is Nothing Then + If oObject Is Nothing Then Throw New ApplicationException("No Types matched the given document. Document could not be serialized.") End If - Return oResult + Return New Tuple(Of String, Object)(pDocument.Item1, oObject) Catch ex As Exception _logger.Error(ex)