diff --git a/SDL/USTV/frmUSTVoffeneAntraege.vb b/SDL/USTV/frmUSTVoffeneAntraege.vb index e3e4bed7..d4251908 100644 --- a/SDL/USTV/frmUSTVoffeneAntraege.vb +++ b/SDL/USTV/frmUSTVoffeneAntraege.vb @@ -574,12 +574,12 @@ Public Class frmUSTVoffeneAntraege 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