Compare commits

...

3 Commits

8 changed files with 76 additions and 41 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.4.0")> <Assembly: AssemblyTrademark("2.3.5.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.4.0")> <Assembly: AssemblyVersion("2.3.5.0")>
<Assembly: AssemblyFileVersion("2.3.4.0")> <Assembly: AssemblyFileVersion("2.3.5.0")>

View File

@ -19,6 +19,7 @@ Public Class ZUGFeRDInterface
Public Const ZUGFERD_SPEC_DEFAULT = "DEFAULT" Public Const ZUGFERD_SPEC_DEFAULT = "DEFAULT"
Public Const ZUGFERD_SPEC_10 = "ZUGFERD_10" Public Const ZUGFERD_SPEC_10 = "ZUGFERD_10"
Public Const ZUGFERD_SPEC_2x = "ZUGFERD_2x" Public Const ZUGFERD_SPEC_2x = "ZUGFERD_2x"
Public Const ZUGFERD_SPEC_2_3x = "ZUGFERD_2_3x"
Public Const UBL_SPEC_21 = "UBL_21" Public Const UBL_SPEC_21 = "UBL_21"
@ -60,6 +61,7 @@ Public Class ZUGFeRDInterface
Public Property AllowXRechnung_Filename As Boolean = True Public Property AllowXRechnung_Filename As Boolean = True
Public Property AllowZugferd_1_0_Schema As Boolean = True Public Property AllowZugferd_1_0_Schema As Boolean = True
Public Property AllowZugferd_2_x_Schema As Boolean = True Public Property AllowZugferd_2_x_Schema As Boolean = True
Public Property AllowZugferd_2_3_x_Schema As Boolean = True
Public Property AllowPeppol_3_x_Schema As Boolean = False Public Property AllowPeppol_3_x_Schema As Boolean = False
End Class End Class
@ -130,19 +132,19 @@ Public Class ZUGFeRDInterface
AllowedFilenames = oAllowedFilenames AllowedFilenames = oAllowedFilenames
End Sub End Sub
Public Function FilterPropertyMap(pPropertyMap As Dictionary(Of String, XmlItemProperty), pSpecification As String) As Dictionary(Of String, XmlItemProperty) Public Function FilterPropertyMap(pPropertyMapList As List(Of XmlItemProperty), pSpecification As String) As Dictionary(Of String, XmlItemProperty)
_logger.Debug("Filtering Property map for Specification [{0}]", pSpecification) _logger.Debug("Filtering Property map for Specification [{0}]", pSpecification)
If pSpecification = ZUGFERD_SPEC_10 Then If pSpecification = ZUGFERD_SPEC_10 Then
_logger.Debug("Special Case [{0}], including [{1}]", ZUGFERD_SPEC_10, ZUGFERD_SPEC_DEFAULT) _logger.Debug("Special Case [{0}], including [{1}]", ZUGFERD_SPEC_10, ZUGFERD_SPEC_DEFAULT)
Return pPropertyMap. Return pPropertyMapList.
Where(Function(kv) kv.Value.Specification = pSpecification Or kv.Value.Specification = ZUGFERD_SPEC_DEFAULT). Where(Function(kv) kv.Specification = pSpecification Or kv.Specification = ZUGFERD_SPEC_DEFAULT).
ToDictionary(Function(kv) kv.Key, Function(kv) kv.Value) ToDictionary(Function(kv) kv.XMLPath, Function(kv) kv)
Else Else
_logger.Debug("Using Specification [{0}]", pSpecification) _logger.Debug("Using Specification [{0}]", pSpecification)
Return pPropertyMap. Return pPropertyMapList.
Where(Function(kv) kv.Value.Specification = pSpecification). Where(Function(kv) kv.Specification = pSpecification).
ToDictionary(Function(kv) kv.Key, Function(kv) kv.Value) ToDictionary(Function(kv) kv.XMLPath, Function(kv) kv)
End If End If
End Function End Function
@ -358,6 +360,7 @@ Public Class ZUGFeRDInterface
}) })
End If End If
'' Reihenfolge 2.0 muss unverändert bleiben. Älteste Version immer zuerst!
If _Options.AllowZugferd_2_x_Schema Then If _Options.AllowZugferd_2_x_Schema Then
oAllowedTypes.AddRange(New List(Of AllowedType) From { oAllowedTypes.AddRange(New List(Of AllowedType) From {
New AllowedType With { New AllowedType With {
@ -374,16 +377,22 @@ Public Class ZUGFeRDInterface
.SchemaType = GetType(Version2_2_FacturX.CrossIndustryInvoiceType), .SchemaType = GetType(Version2_2_FacturX.CrossIndustryInvoiceType),
.Specification = ZUGFERD_SPEC_2x, .Specification = ZUGFERD_SPEC_2x,
.XMLSchema = XMLSCHEMA_ZUGFERD_22 .XMLSchema = XMLSCHEMA_ZUGFERD_22
}
})
End If
'' Reihenfolge ab 2.3 geändert. Neuste Version immer zuerst
If _Options.AllowZugferd_2_3_x_Schema Then
oAllowedTypes.AddRange(New List(Of AllowedType) From {
New AllowedType With {
.SchemaType = GetType(Version2_3_3_FacturX.CrossIndustryInvoiceType),
.Specification = ZUGFERD_SPEC_2_3x,
.XMLSchema = XMLSCHEMA_ZUGFERD_233
}, },
New AllowedType With { New AllowedType With {
.SchemaType = GetType(Version2_3_FacturX.CrossIndustryInvoiceType), .SchemaType = GetType(Version2_3_FacturX.CrossIndustryInvoiceType),
.Specification = ZUGFERD_SPEC_2x, .Specification = ZUGFERD_SPEC_2_3x,
.XMLSchema = XMLSCHEMA_ZUGFERD_23 .XMLSchema = XMLSCHEMA_ZUGFERD_23
},
New AllowedType With {
.SchemaType = GetType(Version2_3_3_FacturX.CrossIndustryInvoiceType),
.Specification = ZUGFERD_SPEC_2x,
.XMLSchema = XMLSCHEMA_ZUGFERD_233
} }
}) })
End If End If

View File

@ -220,7 +220,7 @@ Public Class PropertyValues
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("Specification [{1}] is empty, but marked as required! Skipping.", oTableColumn) _logger.Warn("Specification [{0}] is empty, but marked as required! Skipping.", oTableColumn)
Dim oMissingProperty = New MissingProperty With Dim oMissingProperty = New MissingProperty With
{ {
.Description = oPropertyDescription, .Description = oPropertyDescription,
@ -229,7 +229,7 @@ Public Class PropertyValues
oResult.MissingProperties.Add(oMissingProperty) oResult.MissingProperties.Add(oMissingProperty)
Continue For Continue For
Else Else
_logger.Debug("oPropertyValue for specification [{1}] is empty or not found. Skipping.", oTableColumn) _logger.Debug("oPropertyValue for specification [{0}] is empty or not found. Skipping.", oTableColumn)
Continue For Continue For
End If End If
@ -333,7 +333,7 @@ Public Class PropertyValues
s = Convert.ToString(Obj) s = Convert.ToString(Obj)
If IsDate(s) Then If IsDate(s) = True Then
' Hier wird das DEFAULT-Format auf yyyyMMdd gesetzt ' Hier wird das DEFAULT-Format auf yyyyMMdd gesetzt
Dim dtfi As DateTimeFormatInfo = CultureInfo.CreateSpecificCulture(CultureInfo.InvariantCulture.Name).DateTimeFormat Dim dtfi As DateTimeFormatInfo = CultureInfo.CreateSpecificCulture(CultureInfo.InvariantCulture.Name).DateTimeFormat
dtfi.DateSeparator = "" dtfi.DateSeparator = ""
@ -354,7 +354,7 @@ Public Class PropertyValues
Dim oResult As String Dim oResult As String
If IsNumeric(Obj) Then If IsNumeric(Obj) = True Then
Dim decValue As Decimal = CDec(Obj) Dim decValue As Decimal = CDec(Obj)
' Es wird immer ein . als Dezimaltrenner verwendet, falls nötig ' Es wird immer ein . als Dezimaltrenner verwendet, falls nötig
oResult = decValue.ToString(CultureInfo.InvariantCulture) oResult = decValue.ToString(CultureInfo.InvariantCulture)
@ -370,7 +370,6 @@ Public Class PropertyValues
End If End If
End If End If
End If End If
Next Next
Return New List(Of Object) From {Obj} Return New List(Of Object) From {Obj}

View File

@ -566,18 +566,31 @@ Namespace ZUGFeRD.Version2_3_3_FacturX
System.ComponentModel.DesignerCategoryAttribute("code"), _ System.ComponentModel.DesignerCategoryAttribute("code"), _
System.Xml.Serialization.XmlTypeAttribute([Namespace]:="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100")> _ System.Xml.Serialization.XmlTypeAttribute([Namespace]:="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100")> _
Partial Public Class DateTimeType Partial Public Class DateTimeType
Private itemField As Object 'Private itemField As Object
''''<remarks/>
'<System.Xml.Serialization.XmlElementAttribute("DateTime", GetType(Date)), _
' System.Xml.Serialization.XmlElementAttribute("DateTimeString", GetType(DateTimeTypeDateTimeString))> _
'Public Property Item() As Object
' Get
' Return Me.itemField
' End Get
' Set
' Me.itemField = value
' End Set
'End Property
Private itemField As DateTimeTypeDateTimeString
'''<remarks/> '''<remarks/>
<System.Xml.Serialization.XmlElementAttribute("DateTime", GetType(Date)), _ <System.Xml.Serialization.XmlElementAttribute("DateTimeString")>
System.Xml.Serialization.XmlElementAttribute("DateTimeString", GetType(DateTimeTypeDateTimeString))> _ Public Property DateTimeString() As DateTimeTypeDateTimeString
Public Property Item() As Object
Get Get
Return Me.itemField Return Me.itemField
End Get End Get
Set Set
Me.itemField = value Me.itemField = Value
End Set End Set
End Property End Property
End Class End Class

View File

@ -558,7 +558,7 @@ Namespace ZUGFeRD.Version2_3_FacturX
End Set End Set
End Property End Property
End Class End Class
'''<remarks/> '''<remarks/>
<System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0"), _ <System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0"), _
System.SerializableAttribute(), _ System.SerializableAttribute(), _
@ -566,18 +566,31 @@ Namespace ZUGFeRD.Version2_3_FacturX
System.ComponentModel.DesignerCategoryAttribute("code"), _ System.ComponentModel.DesignerCategoryAttribute("code"), _
System.Xml.Serialization.XmlTypeAttribute([Namespace]:="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100")> _ System.Xml.Serialization.XmlTypeAttribute([Namespace]:="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100")> _
Partial Public Class DateTimeType Partial Public Class DateTimeType
Private itemField As Object 'Private itemField As Object
''''<remarks/>
'<System.Xml.Serialization.XmlElementAttribute("DateTime", GetType(Date)), _
' System.Xml.Serialization.XmlElementAttribute("DateTimeString", GetType(DateTimeTypeDateTimeString))> _
'Public Property Item() As Object
' Get
' Return Me.itemField
' End Get
' Set
' Me.itemField = value
' End Set
'End Property
Private itemField As DateTimeTypeDateTimeString
'''<remarks/> '''<remarks/>
<System.Xml.Serialization.XmlElementAttribute("DateTime", GetType(Date)), _ <System.Xml.Serialization.XmlElementAttribute("DateTimeString")>
System.Xml.Serialization.XmlElementAttribute("DateTimeString", GetType(DateTimeTypeDateTimeString))> _ Public Property DateTimeString() As DateTimeTypeDateTimeString
Public Property Item() As Object
Get Get
Return Me.itemField Return Me.itemField
End Get End Get
Set Set
Me.itemField = value Me.itemField = Value
End Set End Set
End Property End Property
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.8.0")> <Assembly: AssemblyTrademark("2.9.9.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.8.0")> <Assembly: AssemblyVersion("2.9.9.0")>
<Assembly: AssemblyFileVersion("2.9.8.0")> <Assembly: AssemblyFileVersion("2.9.9.0")>

View File

@ -699,7 +699,7 @@ Public Class ImportZUGFeRDFiles
' - a List of valid properties ' - a List of valid properties
' - a List of missing properties ' - a List of missing properties
Dim oPropertyMap = _zugferd.FilterPropertyMap(pArgs.PropertyMap, pDocument.Specification) Dim oPropertyMap As Dictionary(Of String, XmlItemProperty) = _zugferd.FilterPropertyMap(pArgs.PropertyMapList, pDocument.Specification)
Dim oCheckResult = _zugferd.PropertyValues.CheckPropertyValues(pDocument.SchemaObject, oPropertyMap, pMessageId) Dim oCheckResult = _zugferd.PropertyValues.CheckPropertyValues(pDocument.SchemaObject, oPropertyMap, pMessageId)
_logger.Info("Properties checked: [{0}] missing properties / [{1}] valid properties found.", oCheckResult.MissingProperties.Count, oCheckResult.ValidProperties.Count) _logger.Info("Properties checked: [{0}] missing properties / [{1}] valid properties found.", oCheckResult.MissingProperties.Count, oCheckResult.ValidProperties.Count)

View File

@ -12,7 +12,7 @@ Public Class WorkerArgs
Public NonZugferdDirectory As String = Nothing Public NonZugferdDirectory As String = Nothing
' Property Parameter ' Property Parameter
Public PropertyMap As New Dictionary(Of String, XmlItemProperty) Public PropertyMapList As New List(Of XmlItemProperty)
' Email Parameter ' Email Parameter
Public EmailOutProfileId As Integer = 0 Public EmailOutProfileId As Integer = 0
@ -31,6 +31,7 @@ Public Class WorkerArgs
Public AllowXRechnung As Boolean = True Public AllowXRechnung As Boolean = True
Public AllowZugferd10 As Boolean = True Public AllowZugferd10 As Boolean = True
Public AllowZugferd2x As Boolean = True Public AllowZugferd2x As Boolean = True
Public AllowZugferd23x As Boolean = True
Public AllowPeppolBISBill3x As Boolean = False Public AllowPeppolBISBill3x As Boolean = False
End Class End Class