ZUGFeRDImporter: Fix index out of range error

This commit is contained in:
Jonathan Jenne 2019-06-28 10:54:25 +02:00
parent 6ab1cf669c
commit a57f0c6b9b

View File

@ -345,9 +345,11 @@ Public Class ImportZUGFeRDFiles
For Each oColumn As KeyValuePair(Of XmlItemProperty, List(Of Object)) In oPropertyList
Dim oTableName As String = oColumn.Key.TableName
Dim oPropertyDescription As String = oColumn.Key.Description
Dim oPropertyValue = oColumn.Value.Item(oRowIndex)
Dim oRowCounter = oRowIndex + oGlobalGroupCounter + 1
' Returns nothing if oColumn.Value contains an empty list
Dim oPropertyValue = oColumn.Value.ElementAtOrDefault(oRowIndex)
_logger.Debug("Processing property {0}.", oPropertyDescription)
If IsNothing(oPropertyValue) OrElse String.IsNullOrEmpty(oPropertyValue) Then