MS Jobs 2.7.0 xRechnung Sichtbeleg

This commit is contained in:
Developer01
2025-02-11 10:15:26 +01:00
parent 6515e1811b
commit 99f954d406
4 changed files with 88 additions and 38 deletions

View File

@@ -139,15 +139,6 @@ Public Class ImportZUGFeRDFiles
' This way we can rollback database changes for the whole filegroup in case something goes wrong.
Dim oSQLConnection As SqlConnection = _mssql.GetConnection()
If oArgs.AllowXRechnung Then
'but before we need to get all Data we need
MyTemplateValues_xInvDT = Nothing
Dim oSQL_MsgIDReplacec = SQL_xRechnung_ItemTemplate
oSQL_MsgIDReplacec = oSQL_MsgIDReplacec.Replace("@MSG_ID", oFileGroup.Key)
MyTemplateValues_xInvDT = _mssql.GetDatatable(oSQL_MsgIDReplacec)
End If
Dim oSQLTransaction As SqlTransaction = oSQLConnection?.BeginTransaction()
@@ -424,12 +415,25 @@ Public Class ImportZUGFeRDFiles
ElseIf oArgs.AllowXRechnung And oIsSuccess And oEInvoiceFileGroup.Item(0).Extension = ".xml" Then
oxRechnungHandle = True
' Hier das neue PDF erzeugen
'but before we need to get all Data we need
MyTemplateValues_xInvDT = Nothing
Dim oSQL_MsgIDReplace = SQL_xRechnung_ItemTemplate
oSQL_MsgIDReplace = oSQL_MsgIDReplace.Replace("@MSG_ID", oFileGroup.Key)
If oSQLTransaction IsNot Nothing Then
' Commit Transaction
oSQLTransaction.Commit()
End If
MyTemplateValues_xInvDT = _mssql.GetDatatable(oSQL_MsgIDReplace)
If Not IsNothing(MyTemplateValues_xInvDT) Then
Dim oViewReceiptFileInfo As FileInfo = _xRechnungCreator.Create_PDFfromXML(oEInvoiceFileGroup.Item(0), MyTemplateValues_xInvDT)
If Not IsNothing(oViewReceiptFileInfo) Then
oEInvoiceFileGroup.Item(0) = oViewReceiptFileInfo
oRegularMove = True
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
oRegularMove = True
End If
End If
End If
Else