5 Commits

Author SHA1 Message Date
82a95faaaf Modules.Jobs: Version 2.9.7.0 2025-07-01 10:11:38 +02:00
af7534df48 Modules.Interfaces: Version 2.3.2.0 2025-07-01 10:11:05 +02:00
fa2c2a6417 Modules.Jobs: Keine Hochkomma-Ersetzung mehr bei Bulk-Insert 2025-07-01 10:09:32 +02:00
390a524736 Modules.Interfaces: Belegarten in ZUGFeRD 2.3.x korrigiert und fehlende nachgetragen.
Vorbereitung BT-Felder-Anzeige
2025-06-27 10:48:48 +02:00
0ed996100d Leere Strings (item_type = 0) nicht mehr in die DB schreiben
Kommentare korrigiert
2025-06-26 14:47:30 +02:00
9 changed files with 2332 additions and 2486 deletions

View File

@@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices
<Assembly: AssemblyCompany("Digital Data")> <Assembly: AssemblyCompany("Digital Data")>
<Assembly: AssemblyProduct("Modules.Interfaces")> <Assembly: AssemblyProduct("Modules.Interfaces")>
<Assembly: AssemblyCopyright("Copyright © 2025")> <Assembly: AssemblyCopyright("Copyright © 2025")>
<Assembly: AssemblyTrademark("2.3.1.0")> <Assembly: AssemblyTrademark("2.3.2.0")>
<Assembly: ComVisible(False)> <Assembly: ComVisible(False)>
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben: ' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.3.1.0")> <Assembly: AssemblyVersion("2.3.2.0")>
<Assembly: AssemblyFileVersion("2.3.1.0")> <Assembly: AssemblyFileVersion("2.3.2.0")>

View File

@@ -3,5 +3,6 @@
DateType '1 DateType '1
MoneyType '2 MoneyType '2
FileType '3 FileType '3
ListType '4
End Enum End Enum

View File

@@ -27,6 +27,7 @@ Public Class PropertyValues
Public IsRequired As Boolean Public IsRequired As Boolean
Public GroupCounter As Integer = -1 Public GroupCounter As Integer = -1
Public EN16931_ID As String
Public Description As String Public Description As String
Public Value As String Public Value As String
Public XMLPath As String Public XMLPath As String
@@ -35,6 +36,7 @@ Public Class PropertyValues
End Class End Class
Public Class MissingProperty Public Class MissingProperty
Public EN16931_ID As String
Public Description As String Public Description As String
Public XMLPath As String Public XMLPath As String
@@ -112,6 +114,7 @@ Public Class PropertyValues
Dim oPropertyDescription As String = oColumn.Key.Description Dim oPropertyDescription As String = oColumn.Key.Description
Dim oPropertyPath As String = oColumn.Key.XMLPath Dim oPropertyPath As String = oColumn.Key.XMLPath
Dim oItemType As Integer = oColumn.Key.ItemType Dim oItemType As Integer = oColumn.Key.ItemType
Dim oEN16931Value As String = oColumn.Key.EN16931_ID
Dim oRowCounter = oRowIndex + oGlobalGroupCounter + 1 Dim oRowCounter = oRowIndex + oGlobalGroupCounter + 1
@@ -128,6 +131,7 @@ Public Class PropertyValues
If oColumn.Key.IsRequired Then If oColumn.Key.IsRequired Then
_logger.Warn($"{MessageId} # oPropertyValue for column [{oTableColumn}] is empty or not found but is required. Continuing with Empty String.") _logger.Warn($"{MessageId} # oPropertyValue for column [{oTableColumn}] is empty or not found but is required. Continuing with Empty String.")
Dim oMissingProperty = New MissingProperty() With { Dim oMissingProperty = New MissingProperty() With {
.EN16931_ID = oEN16931Value,
.Description = oPropertyDescription, .Description = oPropertyDescription,
.XMLPath = oPropertyPath .XMLPath = oPropertyPath
} }
@@ -158,7 +162,8 @@ Public Class PropertyValues
.TableColumn = oTableColumn, .TableColumn = oTableColumn,
.IsRequired = oIsRequired, .IsRequired = oIsRequired,
.XMLPath = oPropertyPath, .XMLPath = oPropertyPath,
.ItemType = oItemType .ItemType = oItemType,
.EN16931_ID = oEN16931Value
}) })
Next Next
Next Next
@@ -181,7 +186,7 @@ Public Class PropertyValues
Try Try
oPropertyValueList = GetPropValue(pDocument, oItem.Key) oPropertyValueList = GetPropValue(pDocument, oItem.Key)
Catch ex As Exception Catch ex As Exception
_logger.Warn("{2} # Unknown error occurred while fetching specification [{0}] in group [{1}]:", oPropertyDescription, oItem.Value.GroupScope, MessageId) _logger.Warn("{2} # Unknown error occurred while fetching specification [{0}] in group [{1}]:", oTableColumn, oItem.Value.GroupScope, MessageId)
_logger.Warn("ERROR-MESSAGE [{0}]", ex.Message) _logger.Warn("ERROR-MESSAGE [{0}]", ex.Message)
_logger.Error(ex) _logger.Error(ex)
oPropertyValueList = New List(Of Object) oPropertyValueList = New List(Of Object)
@@ -200,20 +205,20 @@ Public Class PropertyValues
' This should hopefully show config errors ' This should hopefully show config errors
If TypeOf oPropertyValue Is List(Of Object) Then If TypeOf oPropertyValue Is List(Of Object) Then
_logger.Warn("Item with specification [{0}] may be configured incorrectly", oPropertyDescription) _logger.Warn("Item with specification [{0}] may be configured incorrectly", oTableColumn)
oPropertyValue = Nothing oPropertyValue = Nothing
End If End If
End Select End Select
End If End If
Catch ex As Exception Catch ex As Exception
_logger.Warn("Unknown error occurred while processing specification [{0}]:", oPropertyDescription) _logger.Warn("Unknown error occurred while processing specification [{0}]:", oTableColumn)
_logger.Error(ex) _logger.Error(ex)
oPropertyValue = Nothing oPropertyValue = Nothing
End Try End Try
If IsNothing(oPropertyValue) OrElse String.IsNullOrEmpty(oPropertyValue) Then If IsNothing(oPropertyValue) OrElse String.IsNullOrEmpty(oPropertyValue) Then
If oItem.Value.IsRequired Then If oItem.Value.IsRequired Then
_logger.Warn("{0} # Specification [{1}] is empty, but marked as required! Skipping.", MessageId, oPropertyDescription) _logger.Warn("{0} # Specification [{1}] is empty, but marked as required! Skipping.", MessageId, oTableColumn)
Dim oMissingProperty = New MissingProperty With Dim oMissingProperty = New MissingProperty With
{ {
.Description = oPropertyDescription, .Description = oPropertyDescription,
@@ -222,7 +227,7 @@ Public Class PropertyValues
oResult.MissingProperties.Add(oMissingProperty) oResult.MissingProperties.Add(oMissingProperty)
Continue For Continue For
Else Else
_logger.Debug("{0} # oPropertyValue for specification [{1}] is empty or not found. Skipping.", MessageId, oPropertyDescription) _logger.Debug("{0} # oPropertyValue for specification [{1}] is empty or not found. Skipping.", MessageId, oTableColumn)
Continue For Continue For
End If End If

View File

@@ -14,6 +14,7 @@ Public Class Validator
ValidateDecimalNodes(pResult) ValidateDecimalNodes(pResult)
ValidateCurrencyNodes(pResult) ValidateCurrencyNodes(pResult)
'TODO Validate Datumsfelder
Return pResult Return pResult
End Function End Function

View File

@@ -9418,6 +9418,18 @@ Namespace ZUGFeRD.Version2_3_FacturX
<System.Xml.Serialization.XmlEnumAttribute("870")> <System.Xml.Serialization.XmlEnumAttribute("870")>
Item870 = 870 Item870 = 870
'''<remarks/>
<System.Xml.Serialization.XmlEnumAttribute("875")>
Item875 = 875
'''<remarks/>
<System.Xml.Serialization.XmlEnumAttribute("876")>
Item876 = 876
'''<remarks/>
<System.Xml.Serialization.XmlEnumAttribute("877")>
Item877 = 877
'''<remarks/> '''<remarks/>
<System.Xml.Serialization.XmlEnumAttribute("890")> <System.Xml.Serialization.XmlEnumAttribute("890")>
Item890 = 890 Item890 = 890

View File

@@ -22,7 +22,14 @@
''' 0 = Default / Text ''' 0 = Default / Text
''' 1 = Datum ''' 1 = Datum
''' 2 = Gleitkomma ''' 2 = Gleitkomma
''' 3 = Memo-Feld ''' 3 = Attachment-Felder
''' 4 = Elemente einer Liste, vgl Currency
''' </summary> ''' </summary>
Public ItemType As Integer Public ItemType As Integer
''' <summary>
''' BT-Feld-Bezeichnung
''' </summary>
Public EN16931_ID As String
End Class End Class

View File

@@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices
<Assembly: AssemblyCompany("Digital Data")> <Assembly: AssemblyCompany("Digital Data")>
<Assembly: AssemblyProduct("Modules.Jobs")> <Assembly: AssemblyProduct("Modules.Jobs")>
<Assembly: AssemblyCopyright("Copyright © 2025")> <Assembly: AssemblyCopyright("Copyright © 2025")>
<Assembly: AssemblyTrademark("2.9.6.0")> <Assembly: AssemblyTrademark("2.9.7.0")>
<Assembly: ComVisible(False)> <Assembly: ComVisible(False)>
@@ -30,5 +30,5 @@ Imports System.Runtime.InteropServices
' Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern ' Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
' übernehmen, indem Sie "*" eingeben: ' übernehmen, indem Sie "*" eingeben:
<Assembly: AssemblyVersion("2.9.6.0")> <Assembly: AssemblyVersion("2.9.7.0")>
<Assembly: AssemblyFileVersion("2.9.6.0")> <Assembly: AssemblyFileVersion("2.9.7.0")>

View File

@@ -1157,6 +1157,12 @@ Public Class ImportZUGFeRDFiles
Continue For Continue For
End If End If
' ItemType = 0 (normale texte) dürfen nicht leer sein
If oProperty.ItemType = 0 And oProperty.Value.IsNullOrEmpty Then
_logger.Debug("No Mapping for Property [{0}] with empty value, because of ItemType = 0.", oProperty.TableColumn)
Continue For
End If
' If GroupCounter is -1, it means this is a default property that can only occur once. ' If GroupCounter is -1, it means this is a default property that can only occur once.
' Set the actual inserted value to 0 ' Set the actual inserted value to 0
Dim oGroupCounterValue As Integer = oProperty.GroupCounter Dim oGroupCounterValue As Integer = oProperty.GroupCounter
@@ -1171,12 +1177,13 @@ Public Class ImportZUGFeRDFiles
Dim oNewRow As DataRow = oDataTable.NewRow() Dim oNewRow As DataRow = oDataTable.NewRow()
oNewRow("REFERENCE_GUID") = pMessageId oNewRow("REFERENCE_GUID") = pMessageId
oNewRow("ITEM_DESCRIPTION") = oProperty.Description oNewRow("ITEM_DESCRIPTION") = oProperty.Description
oNewRow("ITEM_VALUE") = oProperty.Value.Truncate(900).Replace("'", "''") 'oNewRow("ITEM_VALUE") = oProperty.Value.Truncate(900).Replace("'", "''")
oNewRow("ITEM_VALUE") = oProperty.Value.Truncate(900)
oNewRow("GROUP_COUNTER") = oGroupCounterValue oNewRow("GROUP_COUNTER") = oGroupCounterValue
oNewRow("SPEC_NAME") = oProperty.TableColumn oNewRow("SPEC_NAME") = oProperty.TableColumn
oNewRow("IS_REQUIRED") = oProperty.IsRequired oNewRow("IS_REQUIRED") = oProperty.IsRequired
_logger.Debug("Mapping Property [{0}] with value [{1}]", oProperty.TableColumn, oProperty.Value.Replace("'", "''")) _logger.Debug("Mapping Property [{0}] with value [{1}]", oProperty.TableColumn, oProperty.Value)
oDataTable.Rows.Add(oNewRow) oDataTable.Rows.Add(oNewRow)
Next Next