MS MergeCommit
This commit is contained in:
commit
54ee51b0de
@ -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.2.1.0")>
|
<Assembly: AssemblyTrademark("2.2.2.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.2.1.0")>
|
<Assembly: AssemblyVersion("2.2.2.0")>
|
||||||
<Assembly: AssemblyFileVersion("2.2.1.0")>
|
<Assembly: AssemblyFileVersion("2.2.2.0")>
|
||||||
|
|||||||
@ -32,6 +32,9 @@ Public Class ZUGFeRDInterface
|
|||||||
Public Const XMLSCHEMA_PEPPOL_3017_INVOICE = "Version3017_INVOICE"
|
Public Const XMLSCHEMA_PEPPOL_3017_INVOICE = "Version3017_INVOICE"
|
||||||
Public Const XMLSCHEMA_PEPPOL_3017_CREDITNOTE = "Version3017_CREDITNOTE"
|
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 {
|
Private ReadOnly ValidFilenames As New List(Of String) From {
|
||||||
PDFEmbeds.ZUGFERD_XML_FILENAME.ToUpper,
|
PDFEmbeds.ZUGFERD_XML_FILENAME.ToUpper,
|
||||||
PDFEmbeds.FACTUR_X_XML_FILENAME_DE.ToUpper,
|
PDFEmbeds.FACTUR_X_XML_FILENAME_DE.ToUpper,
|
||||||
@ -67,6 +70,10 @@ Public Class ZUGFeRDInterface
|
|||||||
Public Property SchemaObject As Object
|
Public Property SchemaObject As Object
|
||||||
Public Property Specification As String
|
Public Property Specification As String
|
||||||
Public Property UsedXMLSchema As String
|
Public Property UsedXMLSchema As String
|
||||||
|
''' <summary>
|
||||||
|
''' Dateityp des Belegs: PDF oder XML
|
||||||
|
''' </summary>
|
||||||
|
Public Property ReceiptFileType As String
|
||||||
Public Property ValidationErrors As New List(Of ZugferdValidationError)
|
Public Property ValidationErrors As New List(Of ZugferdValidationError)
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|||||||
@ -406,8 +406,8 @@ Public Class ImportZUGFeRDFiles
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Finally
|
Finally
|
||||||
|
Dim oxRechnungHandle As Boolean = False
|
||||||
Try
|
Try
|
||||||
Dim oxRechnungHandle As Boolean = False
|
|
||||||
Dim oRegularMove As Boolean = False
|
Dim oRegularMove As Boolean = False
|
||||||
' If an application error occurred, dont move files so they will be processed again later
|
' If an application error occurred, dont move files so they will be processed again later
|
||||||
If oMoveDirectory = DIRECTORY_DONT_MOVE Then
|
If oMoveDirectory = DIRECTORY_DONT_MOVE Then
|
||||||
@ -426,7 +426,7 @@ Public Class ImportZUGFeRDFiles
|
|||||||
MyTemplateValues_xInvDT = _mssql.GetDatatable(oSQL_MsgIDReplace)
|
MyTemplateValues_xInvDT = _mssql.GetDatatable(oSQL_MsgIDReplace)
|
||||||
|
|
||||||
If Not IsNothing(MyTemplateValues_xInvDT) Then
|
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)
|
Dim oViewReceiptFileInfo As FileInfo = _xRechnungCreator.Create_PDFfromXML(oEInvoiceFileGroup.Item(0), MyTemplateValues_xInvDT)
|
||||||
If Not IsNothing(oViewReceiptFileInfo) Then
|
If Not IsNothing(oViewReceiptFileInfo) Then
|
||||||
oEInvoiceFileGroup.Item(0) = oViewReceiptFileInfo
|
oEInvoiceFileGroup.Item(0) = oViewReceiptFileInfo
|
||||||
@ -463,7 +463,7 @@ Public Class ImportZUGFeRDFiles
|
|||||||
' finally commit all changes To the Database
|
' finally commit all changes To the Database
|
||||||
' ==================================================================
|
' ==================================================================
|
||||||
If oIsSuccess Or oExpectedError Then
|
If oIsSuccess Or oExpectedError Then
|
||||||
If oSQLTransaction IsNot Nothing Then
|
If oxRechnungHandle = False AndAlso oSQLTransaction IsNot Nothing Then
|
||||||
' Commit Transaction
|
' Commit Transaction
|
||||||
oSQLTransaction.Commit()
|
oSQLTransaction.Commit()
|
||||||
End If
|
End If
|
||||||
@ -551,6 +551,7 @@ Public Class ImportZUGFeRDFiles
|
|||||||
End Try
|
End Try
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
oDocument.ReceiptFileType = ZUGFeRDInterface.RECEIPT_TYPE_XML
|
||||||
Dim sqlResult As Boolean = StoreXMLItemsInDatabase(pMessageId, oDocument, pFile, pConnections, pArgs)
|
Dim sqlResult As Boolean = StoreXMLItemsInDatabase(pMessageId, oDocument, pFile, pConnections, pArgs)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Throw ex
|
Throw ex
|
||||||
@ -640,6 +641,7 @@ Public Class ImportZUGFeRDFiles
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
oDocument.ReceiptFileType = ZUGFeRDInterface.RECEIPT_TYPE_PDF
|
||||||
Dim sqlResult As Boolean = StoreXMLItemsInDatabase(pMessageId, oDocument, pFile, pConnections, pArgs)
|
Dim sqlResult As Boolean = StoreXMLItemsInDatabase(pMessageId, oDocument, pFile, pConnections, pArgs)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Throw ex
|
Throw ex
|
||||||
@ -679,7 +681,7 @@ Public Class ImportZUGFeRDFiles
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
' DataTable vorbereiten
|
' DataTable vorbereiten
|
||||||
Dim oDataTable As DataTable = FillDataTable(pMessageId, oCheckResult, pDocument.Specification, pDocument.UsedXMLSchema)
|
Dim oDataTable As DataTable = FillDataTable(pMessageId, oCheckResult, pDocument)
|
||||||
|
|
||||||
' ColumnList initialisieren
|
' ColumnList initialisieren
|
||||||
Dim oColumnNames As List(Of String) = New List(Of String) From {
|
Dim oColumnNames As List(Of String) = New List(Of String) From {
|
||||||
@ -702,7 +704,7 @@ Public Class ImportZUGFeRDFiles
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
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()
|
Dim oDataTable As DataTable = New DataTable()
|
||||||
oDataTable.Columns.Add(New DataColumn("REFERENCE_GUID", GetType(String)))
|
oDataTable.Columns.Add(New DataColumn("REFERENCE_GUID", GetType(String)))
|
||||||
@ -716,26 +718,38 @@ Public Class ImportZUGFeRDFiles
|
|||||||
Dim oFirstRow As DataRow = oDataTable.NewRow()
|
Dim oFirstRow As DataRow = oDataTable.NewRow()
|
||||||
oFirstRow("REFERENCE_GUID") = pMessageId
|
oFirstRow("REFERENCE_GUID") = pMessageId
|
||||||
oFirstRow("ITEM_DESCRIPTION") = "ZUGFeRDSpezifikation"
|
oFirstRow("ITEM_DESCRIPTION") = "ZUGFeRDSpezifikation"
|
||||||
oFirstRow("ITEM_VALUE") = pSpecification
|
oFirstRow("ITEM_VALUE") = pDocument.Specification
|
||||||
oFirstRow("GROUP_COUNTER") = 0
|
oFirstRow("GROUP_COUNTER") = 0
|
||||||
oFirstRow("SPEC_NAME") = "ZUGFERD_SPECIFICATION"
|
oFirstRow("SPEC_NAME") = "ZUGFERD_SPECIFICATION"
|
||||||
oFirstRow("IS_REQUIRED") = False
|
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)
|
oDataTable.Rows.Add(oFirstRow)
|
||||||
|
|
||||||
' Zweite Zeile enthält das verwendete XML Schema
|
' Zweite Zeile enthält das verwendete XML Schema
|
||||||
Dim oSecondRow As DataRow = oDataTable.NewRow()
|
Dim oSecondRow As DataRow = oDataTable.NewRow()
|
||||||
oSecondRow("REFERENCE_GUID") = pMessageId
|
oSecondRow("REFERENCE_GUID") = pMessageId
|
||||||
oSecondRow("ITEM_DESCRIPTION") = "ZUGFeRDXMLSchema"
|
oSecondRow("ITEM_DESCRIPTION") = "ZUGFeRDXMLSchema"
|
||||||
oSecondRow("ITEM_VALUE") = pUsedXMLSchema
|
oSecondRow("ITEM_VALUE") = pDocument.UsedXMLSchema
|
||||||
oSecondRow("GROUP_COUNTER") = 0
|
oSecondRow("GROUP_COUNTER") = 0
|
||||||
oSecondRow("SPEC_NAME") = "ZUGFERD_XML_SCHEMA"
|
oSecondRow("SPEC_NAME") = "ZUGFERD_XML_SCHEMA"
|
||||||
oSecondRow("IS_REQUIRED") = False
|
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)
|
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
|
For Each oProperty In pCheckResult.ValidProperties
|
||||||
|
|
||||||
' If GroupCounter is -1, it means this is a default property that can only occur once.
|
' If GroupCounter is -1, it means this is a default property that can only occur once.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user