4 Commits

Author SHA1 Message Date
Jonathan Jenne
902231ff86 Base: Version 1.3.2.0 2023-06-26 16:33:55 +02:00
Jonathan Jenne
e5b5c259d7 Base: Add ToURLQueryString function for dictionay 2023-06-26 16:33:36 +02:00
Jonathan Jenne
c5b6498f1b Jobs: Version 1.15.1.0 2023-06-26 16:32:09 +02:00
Jonathan Jenne
39a406bfaf Fix incorrect error message with more than one valid zugferd invoice 2023-06-26 14:50:07 +02:00
5 changed files with 31 additions and 14 deletions

View File

@@ -57,6 +57,7 @@
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Transactions" />
<Reference Include="System.Web" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />

View File

@@ -1,4 +1,5 @@
Imports System.Runtime.CompilerServices
Imports System.Web
Public Module ModuleExtensions
Const UnixEraStartTicks As Long = 621355968000000000
@@ -55,6 +56,21 @@ Public Module ModuleExtensions
Return (pString.Trim().ToLower() = "true") OrElse (pString.Trim() = "1")
End Function
' ======================================================
' === DICTIONARY
' ======================================================
<Extension()>
Public Function ToURLQueryString(pDictionary As IDictionary(Of String, String)) As String
Dim oQueryString = HttpUtility.ParseQueryString(String.Empty)
For Each oItem As KeyValuePair(Of String, String) In pDictionary
oQueryString.Add(oItem.Key, oItem.Value)
Next
Return oQueryString.ToString()
End Function
' ======================================================
' === DATATABLE
' ======================================================

View File

@@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("Base")>
<Assembly: AssemblyCopyright("Copyright © 2023")>
<Assembly: AssemblyTrademark("1.3.1.0")>
<Assembly: AssemblyTrademark("1.3.2.0")>
<Assembly: ComVisible(False)>
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' indem Sie "*" wie unten gezeigt eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.3.1.0")>
<Assembly: AssemblyFileVersion("1.3.1.0")>
<Assembly: AssemblyVersion("1.3.2.0")>
<Assembly: AssemblyFileVersion("1.3.2.0")>

View File

@@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices
<Assembly: AssemblyCompany("Digital Data")>
<Assembly: AssemblyProduct("Modules.Jobs")>
<Assembly: AssemblyCopyright("Copyright © 2023")>
<Assembly: AssemblyTrademark("1.15.0.0")>
<Assembly: AssemblyTrademark("1.15.1.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.15.0.0")>
<Assembly: AssemblyFileVersion("1.15.0.0")>
<Assembly: AssemblyVersion("1.15.1.0")>
<Assembly: AssemblyFileVersion("1.15.1.0")>

View File

@@ -279,6 +279,14 @@ Public Class ImportZUGFeRDFiles
End Select
End Try
' Check if there are more than one ZUGFeRD files
If oZUGFeRDCount = 1 Then
Throw New TooMuchFerdsException()
End If
' Since extraction went well, increase the amount of ZUGFeRD files
oZUGFeRDCount += 1
' Extract all attachments with the extensions specified in `AllowedExtensions`.
' If you need to extract and use embedded xml files, you need to filter out the zugferd-invoice.xml yourself.
' Right now the zugferd-invoice.xml is filtered out because `AllowedExtensions` does not contain `xml`.
@@ -292,14 +300,6 @@ Public Class ImportZUGFeRDFiles
' Check the Checksum and rejection status
oMD5CheckSum = GenerateAndCheck_MD5Sum(oFile.FullName, oArgs.IgnoreRejectionStatus)
' Check if there are more than one ZUGFeRD files
If oZUGFeRDCount = 1 Then
Throw New TooMuchFerdsException()
End If
' Since extraction went well, increase the amount of ZUGFeRD files
oZUGFeRDCount += 1
' Check the document against the configured property map and return:
' - a List of valid properties
' - a List of missing properties