3 Commits

Author SHA1 Message Date
Jonathan Jenne
0ed5a164e8 Interfaces: Version 1.10.0.0 2022-12-16 09:30:52 +01:00
Jonathan Jenne
36dd27b26c Jobs: Version 1.12.0.0 2022-12-16 09:30:10 +01:00
Jonathan Jenne
3df54fa62c Jobs/Interfaces: add options for enabling / disabling zugferd schemas 2022-12-16 09:29:34 +01:00
4 changed files with 26 additions and 14 deletions

View File

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

View File

@@ -35,6 +35,8 @@ Public Class ZUGFeRDInterface
Public Class ZugferdOptions
Public Property AllowFacturX_Filename As Boolean = True
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
End Class
''' <summary>
@@ -220,14 +222,21 @@ Public Class ZUGFeRDInterface
Dim oReader As XmlReader
Dim oResult = Nothing
Dim oTypes As New List(Of Type) From {
GetType(ZUGFeRD.Version1_0.CrossIndustryDocumentType),
GetType(ZUGFeRD.Version2_0.CrossIndustryInvoiceType),
GetType(ZUGFeRD.Version2_1_1.CrossIndustryInvoiceType),
GetType(ZUGFeRD.Version2_2_FacturX.CrossIndustryInvoiceType)
}
Dim oAllowedTypes As New List(Of Type)
For Each oType In oTypes
If _Options.AllowZugferd_1_0_Schema Then
oAllowedTypes.Add(GetType(ZUGFeRD.Version1_0.CrossIndustryDocumentType))
End If
If _Options.AllowZugferd_2_x_Schema Then
oAllowedTypes.AddRange(New List(Of Type) From {
GetType(ZUGFeRD.Version2_0.CrossIndustryInvoiceType),
GetType(ZUGFeRD.Version2_1_1.CrossIndustryInvoiceType),
GetType(ZUGFeRD.Version2_2_FacturX.CrossIndustryInvoiceType)
})
End If
For Each oType In oAllowedTypes
_logger.Debug("Trying Type [{0}]", oType.FullName)
Dim oSerializer As New XmlSerializer(oType)
@@ -251,7 +260,8 @@ Public Class ZUGFeRDInterface
Catch ex As Exception
_logger.Error(ex)
Throw New ZUGFeRDExecption(ErrorType.NoValidZugferd, "Datei ist eine ungültige ZUGFeRD Datei.")
Dim oMessage = "Datei ist eine ungültige ZUGFeRD Datei oder das Format wird nicht unterstüzt, oder das Format ist deaktiviert."
Throw New ZUGFeRDExecption(ErrorType.NoValidZugferd, oMessage)
End Try
End Function

View File

@@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices
<Assembly: AssemblyCompany("Digital Data")>
<Assembly: AssemblyProduct("Modules.Jobs")>
<Assembly: AssemblyCopyright("Copyright © 2022")>
<Assembly: AssemblyTrademark("1.11.0.0")>
<Assembly: AssemblyTrademark("1.12.0.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("1.11.0.0")>
<Assembly: AssemblyFileVersion("1.11.0.0")>
<Assembly: AssemblyVersion("1.12.0.0")>
<Assembly: AssemblyFileVersion("1.12.0.0")>

View File

@@ -26,4 +26,6 @@ Public Class WorkerArgs
Public AllowFacturX As Boolean = True
Public AllowXRechnung As Boolean = True
Public AllowZugferd10 As Boolean = True
Public AllowZugferd2x As Boolean = True
End Class