add comments
This commit is contained in:
parent
58b65564fb
commit
a1d6e0ff9b
@ -318,8 +318,10 @@ Public Class ImportZUGFeRDFiles
|
||||
End If
|
||||
Next
|
||||
|
||||
' check for rows that are empty in every column
|
||||
' this happens when a grouped row is not filled
|
||||
' e.g. a row in a invoice that is just a note
|
||||
_logger.Debug("Done Fetching Property values.")
|
||||
|
||||
Dim oIndexesToRemove As New List(Of Integer)
|
||||
|
||||
For oRowIndex = 0 To oRowCount - 1
|
||||
@ -327,10 +329,7 @@ Public Class ImportZUGFeRDFiles
|
||||
|
||||
For Each oRow In oPropertyList
|
||||
Dim oValue As List(Of Object) = oRow.Value.Item(oRowIndex)
|
||||
Dim oIsEmpty = oValue.Count = 0
|
||||
oColumnIsEmpty = oIsEmpty
|
||||
|
||||
Console.WriteLine($"Value is empty: {oValue.Count = 0}")
|
||||
oColumnIsEmpty = oValue.Count = 0
|
||||
Next
|
||||
|
||||
If oColumnIsEmpty Then
|
||||
@ -338,16 +337,24 @@ Public Class ImportZUGFeRDFiles
|
||||
End If
|
||||
Next
|
||||
|
||||
_logger.Debug("Removing {0} empty rows.", oIndexesToRemove)
|
||||
|
||||
|
||||
' order indexes to remove descending to avoid indexOutOfRange errors
|
||||
If oIndexesToRemove.Count > 0 Then
|
||||
oIndexesToRemove = oIndexesToRemove.
|
||||
OrderByDescending(Function(oIndex) oIndex).
|
||||
ToList()
|
||||
End If
|
||||
|
||||
' now remove all empty rows.
|
||||
For Each oIndex In oIndexesToRemove
|
||||
For Each oRow In oPropertyList
|
||||
oRow.Value.RemoveAt(oIndex)
|
||||
Next
|
||||
Next
|
||||
|
||||
' decrease row count by rows removed
|
||||
oRowCount -= oIndexesToRemove.Count
|
||||
|
||||
' Structure of oPropertyList
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user