From b05953a76a9ebc7ce944240238c20b4c9ac58b03 Mon Sep 17 00:00:00 2001 From: "d.breimaier" Date: Tue, 15 Apr 2025 14:45:26 +0200 Subject: [PATCH] ustva --- SDL/USTV/frmMDM_USTVAntrag.vb | 5 ++++- SDL/USTV/frmUSTVoffeneAntraege.vb | 19 ++++++++++--------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/SDL/USTV/frmMDM_USTVAntrag.vb b/SDL/USTV/frmMDM_USTVAntrag.vb index 776d59e0..51c9faa1 100644 --- a/SDL/USTV/frmMDM_USTVAntrag.vb +++ b/SDL/USTV/frmMDM_USTVAntrag.vb @@ -1098,10 +1098,13 @@ Public Class frmMDM_USTVAntrag If Leistender IsNot Nothing Then USTV_POS.UStVPo_LeistenderId = Leistender.UStV_LeistenderId + USTV_POS.UStVPo_Leistender = Leistender.UStV_Leistender + Else + USTV_POS.UStVPo_Leistender = "Union Tank Eckstein Gmbh&Co KG" End If USTV_POS.UStVPo_Leistungsbezeichnung = "MAUT, DIESEL oder KFZ-Zubehör" - USTV_POS.UStVPo_Leistender = "Union Tank Eckstein Gmbh&Co KG, Kleinostheim" + USTV_POS.UStVPo_Sachbearbeiter = VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME USTV_POS.UStVPo_Zeitstempel = Now() diff --git a/SDL/USTV/frmUSTVoffeneAntraege.vb b/SDL/USTV/frmUSTVoffeneAntraege.vb index d4251908..c1074ebe 100644 --- a/SDL/USTV/frmUSTVoffeneAntraege.vb +++ b/SDL/USTV/frmUSTVoffeneAntraege.vb @@ -569,17 +569,18 @@ Public Class frmUSTVoffeneAntraege Dim counter = 0 Dim landBez As String = "" Dim klammer = "" - For Each t In dtKundeMWST.Rows - klammer &= ")" - Next + 'klammer &= IIf(dtKundeMWST.Rows.Count > 0, "OR AdressenNr <> -1 ", "") + 'For Each t In dtKundeMWST.Rows + ' 'klammer &= ")" + 'Next If dtKundeMWST.Columns.Contains("KdNr") Then - 'If dtKundeMWST.Rows.Count > 0 Then sqlwhereLand &= "And " - 'For Each row As DataRow In dtKundeMWST.Rows - ' landBez = row.Item("abc").ToString.Replace(";", "'") - ' counter = counter + 1 - ' sqlwhereLand &= " ( AdressenNr = " & row.Item("KdNr") & " AND Einreichland Not in (" & landBez.ToString.Substring(0, landBez.ToString.Length - 1) & ") " & IIf(dtKundeMWST.Rows.Count <> 0 And counter <> dtKundeMWST.Rows.Count, "OR ", klammer) - 'Next + ' If dtKundeMWST.Rows.Count > 0 Then sqlwhereLand &= "And " + ' For Each row As DataRow In dtKundeMWST.Rows + ' landBez = row.Item("abc").ToString.Replace(";", "'") + ' counter = counter + 1 + ' sqlwhereLand &= " ( AdressenNr = " & row.Item("KdNr") & " AND Einreichland Not in (" & landBez.ToString.Substring(0, landBez.ToString.Length - 1) & ")) " & IIf(dtKundeMWST.Rows.Count <> 0 And counter <> dtKundeMWST.Rows.Count, "OR ", klammer) + ' Next Else