This commit is contained in:
2026-10-06 15:33:23 +02:00
parent f52c8455a0
commit e5b9ce0d44

View File

@@ -8254,6 +8254,7 @@ repeatRequest:
Dim arguments = Paramslist.GET_PARAMETER_VALUE("ZUGFeRD_Check_Pfad_CMD")
Dim errorCounter = 0
Dim pathCounter = 0
For Each row In dt.Rows
@@ -8271,20 +8272,23 @@ repeatRequest:
Dim Path As String = DS.GET_TOP1_PATH()
If Path <> "" And System.IO.File.Exists(Path) Then
pathCounter += 1
Try
Dim psi As New ProcessStartInfo()
'If Environment.MachineName = "H6CCWP3" Then
' 'Workstation Daniel
' psi.FileName = "C:\Program Files\Eclipse Adoptium\jre-11.0.32.101-hotspot\bin\java.exe"
' psi.Arguments = "-jar ""C:\Users\d.breimaier\Downloads\Mustang-CLI-2.21.0.jar"" --no-notices --action validate --source " & Path
If Environment.MachineName = "H6CCWP3" Then
'Workstation Daniel
psi.FileName = "C:\Program Files\Eclipse Adoptium\jre-11.0.32.101-hotspot\bin\java.exe"
psi.Arguments = "-jar ""C:\Users\d.breimaier\Downloads\Mustang-CLI-2.21.0.jar"" --no-notices --action validate --source " & Path
'Else
Else
psi.FileName = fileName
psi.Arguments = arguments & Path
'End If
End If
psi.RedirectStandardOutput = True
psi.RedirectStandardError = True
@@ -8314,16 +8318,10 @@ repeatRequest:
Throw New TimeoutException("Der Prozess wurde nach 60 Sekunden beendet." & vbNewLine & "Filename: " & psi.FileName & vbNewLine & "Arguments: " & psi.Arguments)
End If
'MsgBox("PROCESS EXITED")
Dim output = outputTask.Result
Dim err = errorTask.Result
'MsgBox("STDOUT:" & output)
'MsgBox("STDERR:" & err)
If output <> "" Then
Dim tmpPath_Report = VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.getTMPPath("MUSTANG-REPORT_" & rkObj & ".pdf", ".pdf", , False)
Dim PruefungOK = VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.CreateValidationPdf(output, Path, rkId, tmpPath_Report)
@@ -8525,7 +8523,7 @@ repeatRequest:
sumInvalid_Total = sumInvalid_VERAG + sumInvalid_ATILLA + sumInvalid_AMBAR + sumInvalid_360 + sumInvalid_CS + sumInvalid_IMEX + sumInvalid_US
sumvalid_Total = sumvalid_VERAG + sumvalid_ATILLA + sumvalid_AMBAR + sumvalid_360 + sumvalid_CS + sumvalid_IMEX + sumvalid_US
VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail(empfanegerALL, IIf(VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM, "TEST-", "") & Betreff & " ALL", createMailTextZugferd(sumTotal_Total, sumvalid_Total, sumInvalid_Total, "ALL", dt.Rows.Count), getAbsenderEmail(), True, False)
VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail(empfanegerALL, IIf(VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM, "TEST-", "") & Betreff & " ALL", createMailTextZugferd(sumTotal_Total, sumvalid_Total, sumInvalid_Total, "ALL", dt.Rows.Count & "/" & pathCounter), getAbsenderEmail(), True, False)
End If
End If
@@ -8543,7 +8541,7 @@ repeatRequest:
End Function
Private Function createMailTextZugferd(total As Integer, valid As Integer, invalid As Integer, Firma As String, AnzahlLautListe As Integer) As String
Private Function createMailTextZugferd(total As Integer, valid As Integer, invalid As Integer, Firma As String, AnzahlLautListe As String) As String
Dim MailText = "Auflistung der gültigen/ungültigen ZUGFeRD-Prüfungen vom " & Today.ToShortDateString & " für " & Firma & " <br><br>"
MailText &= "<table border=1>"
@@ -8556,7 +8554,7 @@ repeatRequest:
MailText &= "</table>"
If Firma = "ALL" Then
MailText &= "<br><br>Anzahl laut Liste: " & AnzahlLautListe
MailText &= "<br><br>Anzahl laut Liste/davon mit Pfad: " & AnzahlLautListe
End If
MailText &= "<br><br>Erstellt am: " & Now.ToShortDateString & " um " & Now.ToShortTimeString