Compare commits
3 Commits
0b66b80591
...
b534c4c799
| Author | SHA1 | Date | |
|---|---|---|---|
| b534c4c799 | |||
| dc80138311 | |||
| 477bb511c4 |
@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices
|
||||
<Assembly: AssemblyCompany("Digital Data")>
|
||||
<Assembly: AssemblyProduct("Modules.Interfaces")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2025")>
|
||||
<Assembly: AssemblyTrademark("2.3.4.0")>
|
||||
<Assembly: AssemblyTrademark("2.3.5.0")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.3.4.0")>
|
||||
<Assembly: AssemblyFileVersion("2.3.4.0")>
|
||||
<Assembly: AssemblyVersion("2.3.5.0")>
|
||||
<Assembly: AssemblyFileVersion("2.3.5.0")>
|
||||
|
||||
@ -19,6 +19,7 @@ Public Class ZUGFeRDInterface
|
||||
Public Const ZUGFERD_SPEC_DEFAULT = "DEFAULT"
|
||||
Public Const ZUGFERD_SPEC_10 = "ZUGFERD_10"
|
||||
Public Const ZUGFERD_SPEC_2x = "ZUGFERD_2x"
|
||||
Public Const ZUGFERD_SPEC_2_3x = "ZUGFERD_2_3x"
|
||||
|
||||
Public Const UBL_SPEC_21 = "UBL_21"
|
||||
|
||||
@ -60,6 +61,7 @@ Public Class ZUGFeRDInterface
|
||||
Public Property AllowXRechnung_Filename 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_3_x_Schema As Boolean = True
|
||||
Public Property AllowPeppol_3_x_Schema As Boolean = False
|
||||
End Class
|
||||
|
||||
@ -130,19 +132,19 @@ Public Class ZUGFeRDInterface
|
||||
AllowedFilenames = oAllowedFilenames
|
||||
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)
|
||||
|
||||
If pSpecification = ZUGFERD_SPEC_10 Then
|
||||
_logger.Debug("Special Case [{0}], including [{1}]", ZUGFERD_SPEC_10, ZUGFERD_SPEC_DEFAULT)
|
||||
Return pPropertyMap.
|
||||
Where(Function(kv) kv.Value.Specification = pSpecification Or kv.Value.Specification = ZUGFERD_SPEC_DEFAULT).
|
||||
ToDictionary(Function(kv) kv.Key, Function(kv) kv.Value)
|
||||
Return pPropertyMapList.
|
||||
Where(Function(kv) kv.Specification = pSpecification Or kv.Specification = ZUGFERD_SPEC_DEFAULT).
|
||||
ToDictionary(Function(kv) kv.XMLPath, Function(kv) kv)
|
||||
Else
|
||||
_logger.Debug("Using Specification [{0}]", pSpecification)
|
||||
Return pPropertyMap.
|
||||
Where(Function(kv) kv.Value.Specification = pSpecification).
|
||||
ToDictionary(Function(kv) kv.Key, Function(kv) kv.Value)
|
||||
Return pPropertyMapList.
|
||||
Where(Function(kv) kv.Specification = pSpecification).
|
||||
ToDictionary(Function(kv) kv.XMLPath, Function(kv) kv)
|
||||
End If
|
||||
End Function
|
||||
|
||||
@ -358,6 +360,7 @@ Public Class ZUGFeRDInterface
|
||||
})
|
||||
End If
|
||||
|
||||
'' Reihenfolge 2.0 muss unverändert bleiben. Älteste Version immer zuerst!
|
||||
If _Options.AllowZugferd_2_x_Schema Then
|
||||
oAllowedTypes.AddRange(New List(Of AllowedType) From {
|
||||
New AllowedType With {
|
||||
@ -374,16 +377,22 @@ Public Class ZUGFeRDInterface
|
||||
.SchemaType = GetType(Version2_2_FacturX.CrossIndustryInvoiceType),
|
||||
.Specification = ZUGFERD_SPEC_2x,
|
||||
.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 {
|
||||
.SchemaType = GetType(Version2_3_FacturX.CrossIndustryInvoiceType),
|
||||
.Specification = ZUGFERD_SPEC_2x,
|
||||
.Specification = ZUGFERD_SPEC_2_3x,
|
||||
.XMLSchema = XMLSCHEMA_ZUGFERD_23
|
||||
},
|
||||
New AllowedType With {
|
||||
.SchemaType = GetType(Version2_3_3_FacturX.CrossIndustryInvoiceType),
|
||||
.Specification = ZUGFERD_SPEC_2x,
|
||||
.XMLSchema = XMLSCHEMA_ZUGFERD_233
|
||||
}
|
||||
})
|
||||
End If
|
||||
|
||||
@ -220,7 +220,7 @@ Public Class PropertyValues
|
||||
|
||||
If IsNothing(oPropertyValue) OrElse String.IsNullOrEmpty(oPropertyValue) 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
|
||||
{
|
||||
.Description = oPropertyDescription,
|
||||
@ -229,7 +229,7 @@ Public Class PropertyValues
|
||||
oResult.MissingProperties.Add(oMissingProperty)
|
||||
Continue For
|
||||
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
|
||||
End If
|
||||
@ -333,7 +333,7 @@ Public Class PropertyValues
|
||||
|
||||
s = Convert.ToString(Obj)
|
||||
|
||||
If IsDate(s) Then
|
||||
If IsDate(s) = True Then
|
||||
' Hier wird das DEFAULT-Format auf yyyyMMdd gesetzt
|
||||
Dim dtfi As DateTimeFormatInfo = CultureInfo.CreateSpecificCulture(CultureInfo.InvariantCulture.Name).DateTimeFormat
|
||||
dtfi.DateSeparator = ""
|
||||
@ -354,7 +354,7 @@ Public Class PropertyValues
|
||||
|
||||
Dim oResult As String
|
||||
|
||||
If IsNumeric(Obj) Then
|
||||
If IsNumeric(Obj) = True Then
|
||||
Dim decValue As Decimal = CDec(Obj)
|
||||
' Es wird immer ein . als Dezimaltrenner verwendet, falls nötig
|
||||
oResult = decValue.ToString(CultureInfo.InvariantCulture)
|
||||
@ -370,7 +370,6 @@ Public Class PropertyValues
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
Return New List(Of Object) From {Obj}
|
||||
|
||||
@ -567,17 +567,30 @@ Namespace ZUGFeRD.Version2_3_3_FacturX
|
||||
System.Xml.Serialization.XmlTypeAttribute([Namespace]:="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100")> _
|
||||
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/>
|
||||
<System.Xml.Serialization.XmlElementAttribute("DateTime", GetType(Date)), _
|
||||
System.Xml.Serialization.XmlElementAttribute("DateTimeString", GetType(DateTimeTypeDateTimeString))> _
|
||||
Public Property Item() As Object
|
||||
<System.Xml.Serialization.XmlElementAttribute("DateTimeString")>
|
||||
Public Property DateTimeString() As DateTimeTypeDateTimeString
|
||||
Get
|
||||
Return Me.itemField
|
||||
End Get
|
||||
Set
|
||||
Me.itemField = value
|
||||
Me.itemField = Value
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
|
||||
@ -567,17 +567,30 @@ Namespace ZUGFeRD.Version2_3_FacturX
|
||||
System.Xml.Serialization.XmlTypeAttribute([Namespace]:="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100")> _
|
||||
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/>
|
||||
<System.Xml.Serialization.XmlElementAttribute("DateTime", GetType(Date)), _
|
||||
System.Xml.Serialization.XmlElementAttribute("DateTimeString", GetType(DateTimeTypeDateTimeString))> _
|
||||
Public Property Item() As Object
|
||||
<System.Xml.Serialization.XmlElementAttribute("DateTimeString")>
|
||||
Public Property DateTimeString() As DateTimeTypeDateTimeString
|
||||
Get
|
||||
Return Me.itemField
|
||||
End Get
|
||||
Set
|
||||
Me.itemField = value
|
||||
Me.itemField = Value
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
|
||||
@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices
|
||||
<Assembly: AssemblyCompany("Digital Data")>
|
||||
<Assembly: AssemblyProduct("Modules.Jobs")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2025")>
|
||||
<Assembly: AssemblyTrademark("2.9.8.0")>
|
||||
<Assembly: AssemblyTrademark("2.9.9.0")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
@ -30,5 +30,5 @@ Imports System.Runtime.InteropServices
|
||||
' Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
|
||||
<Assembly: AssemblyVersion("2.9.8.0")>
|
||||
<Assembly: AssemblyFileVersion("2.9.8.0")>
|
||||
<Assembly: AssemblyVersion("2.9.9.0")>
|
||||
<Assembly: AssemblyFileVersion("2.9.9.0")>
|
||||
|
||||
@ -699,7 +699,7 @@ Public Class ImportZUGFeRDFiles
|
||||
' - a List of valid 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)
|
||||
|
||||
_logger.Info("Properties checked: [{0}] missing properties / [{1}] valid properties found.", oCheckResult.MissingProperties.Count, oCheckResult.ValidProperties.Count)
|
||||
|
||||
@ -12,7 +12,7 @@ Public Class WorkerArgs
|
||||
Public NonZugferdDirectory As String = Nothing
|
||||
|
||||
' Property Parameter
|
||||
Public PropertyMap As New Dictionary(Of String, XmlItemProperty)
|
||||
Public PropertyMapList As New List(Of XmlItemProperty)
|
||||
|
||||
' Email Parameter
|
||||
Public EmailOutProfileId As Integer = 0
|
||||
@ -31,6 +31,7 @@ Public Class WorkerArgs
|
||||
Public AllowXRechnung As Boolean = True
|
||||
Public AllowZugferd10 As Boolean = True
|
||||
Public AllowZugferd2x As Boolean = True
|
||||
Public AllowZugferd23x As Boolean = True
|
||||
Public AllowPeppolBISBill3x As Boolean = False
|
||||
|
||||
End Class
|
||||
Loading…
x
Reference in New Issue
Block a user