From e5b9ce0d4429e7199ddbd878abb71d6ba69f17d6 Mon Sep 17 00:00:00 2001 From: "d.breimaier" Date: Tue, 6 Oct 2026 15:33:23 +0200 Subject: [PATCH] startOpt --- initATLASAufschubkonten/frmStartOptions.vb | 30 ++++++++++------------ 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/initATLASAufschubkonten/frmStartOptions.vb b/initATLASAufschubkonten/frmStartOptions.vb index f3d6a29..4ac1127 100644 --- a/initATLASAufschubkonten/frmStartOptions.vb +++ b/initATLASAufschubkonten/frmStartOptions.vb @@ -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 - psi.FileName = fileName + 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 & "

" MailText &= "" @@ -8556,7 +8554,7 @@ repeatRequest: MailText &= "
" If Firma = "ALL" Then - MailText &= "

Anzahl laut Liste: " & AnzahlLautListe + MailText &= "

Anzahl laut Liste/davon mit Pfad: " & AnzahlLautListe End If MailText &= "

Erstellt am: " & Now.ToShortDateString & " um " & Now.ToShortTimeString