From a1c4ea449b870ab9ff9551128793b59f9e76f33d Mon Sep 17 00:00:00 2001 From: "d.breimaier" Date: Tue, 6 Oct 2026 14:43:27 +0200 Subject: [PATCH] fix startoptions --- initATLASAufschubkonten/frmStartOptions.vb | 24 +++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/initATLASAufschubkonten/frmStartOptions.vb b/initATLASAufschubkonten/frmStartOptions.vb index 2542eec..b8e357a 100644 --- a/initATLASAufschubkonten/frmStartOptions.vb +++ b/initATLASAufschubkonten/frmStartOptions.vb @@ -8203,14 +8203,14 @@ repeatRequest: 'aktuell verwendet Verag360 kein Zugferd und Sammelrechnung 6 geht aktuell noch nicht - 29.04.2026 Start der neuen Funktion! - Dim DateString = "and CONVERT(DATE, GETDATE())" + Dim DateString = " CONVERT(DATE, GETDATE())" Dim top As String = "" If InvoicesUntilYesterday Then top = " top(1000) " DateString = "CONVERT(DATE, DATEADD(DAY, -1, GETDATE()))" End If - Dim dt As DataTable = SQL.loadDgvBySql("SELECT " & top & " RK_ID, dsId, Firma_ID, RechnungsNr FROM [Rechnungsausgang] where [zugferdcheck_daid] is null and [zugferdcheck_datetime] is null and dsId is not null and cast(RechnungsDatum as Date) between '29.04.2026' and " & DateString & " and Sammelrechnung <> 6 and Firma_ID <> 19 order by ReErfZeitstempel desc", "FMZOLL", 100, False) + Dim dt As DataTable = SQL.loadDgvBySql("SELECT " & top & " RK_ID, dsId, Firma_ID, RechnungsNr FROM [Rechnungsausgang] where [zugferdcheck_daid] is null and [zugferdcheck_datetime] is null and dsId is not null and cast(RechnungsDatum as Date) between '29.04.2026' and " & DateString & " and Sammelrechnung <> 6 and Firma_ID <> 19 order by ReErfZeitstempel desc", "FMZOLL", 100, True) Dim sumTotal_IMEX As Integer = 0 Dim sumTotal_VERAG As Integer = 0 @@ -8286,22 +8286,26 @@ repeatRequest: psi.Arguments = arguments & Path End If - - - - - psi.RedirectStandardOutput = True psi.RedirectStandardError = True psi.UseShellExecute = False psi.CreateNoWindow = True + 'MsgBox("START Mustang") + 'MsgBox("Java: " & psi.FileName) + 'MsgBox("Args: " & psi.Arguments) + Using p As Process = Process.Start(psi) + 'MsgBox("PROCESS STARTED, PID=" & p.Id) + Dim outputTask = p.StandardOutput.ReadToEndAsync() Dim errorTask = p.StandardError.ReadToEndAsync() + 'MsgBox("READERS STARTED") + If Not p.WaitForExit(60000) Then + 'MsgBox("TIMEOUT") Try p.Kill() Catch @@ -8310,10 +8314,16 @@ 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)