From 83c2374b903849edbf6c80d351af77be56de90a9 Mon Sep 17 00:00:00 2001 From: pitzm Date: Tue, 11 Feb 2025 11:09:04 +0100 Subject: [PATCH 1/4] =?UTF-8?q?Modules.Jobs:=20Letztes=20Commit=20ist=20ev?= =?UTF-8?q?tl.=20=C3=BCberfl=C3=BCssig?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jobs/ZUGFeRD/ImportZUGFeRDFiles.vb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jobs/ZUGFeRD/ImportZUGFeRDFiles.vb b/Jobs/ZUGFeRD/ImportZUGFeRDFiles.vb index 7b993cec..3de68633 100644 --- a/Jobs/ZUGFeRD/ImportZUGFeRDFiles.vb +++ b/Jobs/ZUGFeRD/ImportZUGFeRDFiles.vb @@ -406,8 +406,8 @@ Public Class ImportZUGFeRDFiles End If Finally + Dim oxRechnungHandle As Boolean = False Try - Dim oxRechnungHandle As Boolean = False Dim oRegularMove As Boolean = False ' If an application error occurred, dont move files so they will be processed again later If oMoveDirectory = DIRECTORY_DONT_MOVE Then @@ -426,7 +426,7 @@ Public Class ImportZUGFeRDFiles MyTemplateValues_xInvDT = _mssql.GetDatatable(oSQL_MsgIDReplace) If Not IsNothing(MyTemplateValues_xInvDT) Then - If MyTemplateValues_xInvDT.rows.count > 0 Then + If MyTemplateValues_xInvDT.Rows.Count > 0 Then Dim oViewReceiptFileInfo As FileInfo = _xRechnungCreator.Create_PDFfromXML(oEInvoiceFileGroup.Item(0), MyTemplateValues_xInvDT) If Not IsNothing(oViewReceiptFileInfo) Then oEInvoiceFileGroup.Item(0) = oViewReceiptFileInfo @@ -463,7 +463,7 @@ Public Class ImportZUGFeRDFiles ' finally commit all changes To the Database ' ================================================================== If oIsSuccess Or oExpectedError Then - If oSQLTransaction IsNot Nothing Then + If oxRechnungHandle = False AndAlso oSQLTransaction IsNot Nothing Then ' Commit Transaction oSQLTransaction.Commit() End If From 5290d442f94a12eeb43a94121b07d2bd54486c41 Mon Sep 17 00:00:00 2001 From: pitzm Date: Tue, 11 Feb 2025 15:34:13 +0100 Subject: [PATCH 2/4] Modules: Speichern des Dateityps des Belegs in den EDMI_ITEM_DATA --- Interfaces/ZUGFeRDInterface.vb | 7 +++++++ Jobs/ZUGFeRD/ImportZUGFeRDFiles.vb | 26 ++++++++++++++++++++------ 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/Interfaces/ZUGFeRDInterface.vb b/Interfaces/ZUGFeRDInterface.vb index 7da0e288..e7917500 100644 --- a/Interfaces/ZUGFeRDInterface.vb +++ b/Interfaces/ZUGFeRDInterface.vb @@ -32,6 +32,9 @@ Public Class ZUGFeRDInterface Public Const XMLSCHEMA_PEPPOL_3017_INVOICE = "Version3017_INVOICE" Public Const XMLSCHEMA_PEPPOL_3017_CREDITNOTE = "Version3017_CREDITNOTE" + Public Const RECEIPT_TYPE_XML = "XML" + Public Const RECEIPT_TYPE_PDF = "PDF" + Private ReadOnly ValidFilenames As New List(Of String) From { PDFEmbeds.ZUGFERD_XML_FILENAME.ToUpper, PDFEmbeds.FACTUR_X_XML_FILENAME_DE.ToUpper, @@ -67,6 +70,10 @@ Public Class ZUGFeRDInterface Public Property SchemaObject As Object Public Property Specification As String Public Property UsedXMLSchema As String + ''' + ''' Dateityp des Belegs: PDF oder XML + ''' + Public Property ReceiptFileType As String Public Property ValidationErrors As New List(Of ZugferdValidationError) End Class diff --git a/Jobs/ZUGFeRD/ImportZUGFeRDFiles.vb b/Jobs/ZUGFeRD/ImportZUGFeRDFiles.vb index 3de68633..d572f28f 100644 --- a/Jobs/ZUGFeRD/ImportZUGFeRDFiles.vb +++ b/Jobs/ZUGFeRD/ImportZUGFeRDFiles.vb @@ -551,6 +551,7 @@ Public Class ImportZUGFeRDFiles End Try Try + oDocument.ReceiptFileType = ZUGFeRDInterface.RECEIPT_TYPE_XML Dim sqlResult As Boolean = StoreXMLItemsInDatabase(pMessageId, oDocument, pFile, pConnections, pArgs) Catch ex As Exception Throw ex @@ -640,6 +641,7 @@ Public Class ImportZUGFeRDFiles End If Try + oDocument.ReceiptFileType = ZUGFeRDInterface.RECEIPT_TYPE_PDF Dim sqlResult As Boolean = StoreXMLItemsInDatabase(pMessageId, oDocument, pFile, pConnections, pArgs) Catch ex As Exception Throw ex @@ -679,7 +681,7 @@ Public Class ImportZUGFeRDFiles End If ' DataTable vorbereiten - Dim oDataTable As DataTable = FillDataTable(pMessageId, oCheckResult, pDocument.Specification, pDocument.UsedXMLSchema) + Dim oDataTable As DataTable = FillDataTable(pMessageId, oCheckResult, pDocument) ' ColumnList initialisieren Dim oColumnNames As List(Of String) = New List(Of String) From { @@ -702,7 +704,7 @@ Public Class ImportZUGFeRDFiles Return True End Function - Private Function FillDataTable(pMessageId As String, pCheckResult As PropertyValues.CheckPropertyValuesResult, pSpecification As String, pUsedXMLSchema As String) As DataTable + Private Function FillDataTable(pMessageId As String, pCheckResult As PropertyValues.CheckPropertyValuesResult, pDocument As ZUGFeRDInterface.ZugferdResult) As DataTable Dim oDataTable As DataTable = New DataTable() oDataTable.Columns.Add(New DataColumn("REFERENCE_GUID", GetType(String))) @@ -716,26 +718,38 @@ Public Class ImportZUGFeRDFiles Dim oFirstRow As DataRow = oDataTable.NewRow() oFirstRow("REFERENCE_GUID") = pMessageId oFirstRow("ITEM_DESCRIPTION") = "ZUGFeRDSpezifikation" - oFirstRow("ITEM_VALUE") = pSpecification + oFirstRow("ITEM_VALUE") = pDocument.Specification oFirstRow("GROUP_COUNTER") = 0 oFirstRow("SPEC_NAME") = "ZUGFERD_SPECIFICATION" oFirstRow("IS_REQUIRED") = False - _logger.Debug("Mapping Property [ZUGFERD_SPECIFICATION] with value [{0}]", pSpecification) + _logger.Debug("Mapping Property [ZUGFERD_SPECIFICATION] with value [{0}]", pDocument.Specification) oDataTable.Rows.Add(oFirstRow) ' Zweite Zeile enthält das verwendete XML Schema Dim oSecondRow As DataRow = oDataTable.NewRow() oSecondRow("REFERENCE_GUID") = pMessageId oSecondRow("ITEM_DESCRIPTION") = "ZUGFeRDXMLSchema" - oSecondRow("ITEM_VALUE") = pUsedXMLSchema + oSecondRow("ITEM_VALUE") = pDocument.UsedXMLSchema oSecondRow("GROUP_COUNTER") = 0 oSecondRow("SPEC_NAME") = "ZUGFERD_XML_SCHEMA" oSecondRow("IS_REQUIRED") = False - _logger.Debug("Mapping Property [ZUGFERD_XML_SCHEMA] with value [{0}]", pUsedXMLSchema) + _logger.Debug("Mapping Property [ZUGFERD_XML_SCHEMA] with value [{0}]", pDocument.UsedXMLSchema) oDataTable.Rows.Add(oSecondRow) + ' Dritte Zeile enthält das verwendete Datei-Format des Belegs (PDF/XML) + Dim oThirdRow As DataRow = oDataTable.NewRow() + oThirdRow("REFERENCE_GUID") = pMessageId + oThirdRow("ITEM_DESCRIPTION") = "ReceiptFileType" + oThirdRow("ITEM_VALUE") = pDocument.ReceiptFileType + oThirdRow("GROUP_COUNTER") = 0 + oThirdRow("SPEC_NAME") = "RECEIPT_FILE_TYPE" + oThirdRow("IS_REQUIRED") = False + + _logger.Debug("Mapping Property [RECEIPT_FILE_TYPE] with value [{0}]", pDocument.ReceiptFileType) + oDataTable.Rows.Add(oThirdRow) + For Each oProperty In pCheckResult.ValidProperties ' If GroupCounter is -1, it means this is a default property that can only occur once. From 47b54562c8a9e3f33bab01cf5137cf0b96ac9a65 Mon Sep 17 00:00:00 2001 From: pitzm Date: Tue, 11 Feb 2025 15:35:03 +0100 Subject: [PATCH 3/4] Modules.Interfaces: Version 2.2.2.0 --- Interfaces/My Project/AssemblyInfo.vb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Interfaces/My Project/AssemblyInfo.vb b/Interfaces/My Project/AssemblyInfo.vb index 4f20931a..a1222a46 100644 --- a/Interfaces/My Project/AssemblyInfo.vb +++ b/Interfaces/My Project/AssemblyInfo.vb @@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices - + @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + + From c803b4532d558dd715931da5f26cb67fa5b66bde Mon Sep 17 00:00:00 2001 From: pitzm Date: Tue, 11 Feb 2025 15:35:38 +0100 Subject: [PATCH 4/4] Modules.Jobs: Version 2.6.5.0 --- Jobs/My Project/AssemblyInfo.vb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jobs/My Project/AssemblyInfo.vb b/Jobs/My Project/AssemblyInfo.vb index ca52d2ce..9838d2dc 100644 --- a/Jobs/My Project/AssemblyInfo.vb +++ b/Jobs/My Project/AssemblyInfo.vb @@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices - + @@ -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: - - + +