This commit is contained in:
2021-06-24 23:05:48 +02:00
parent e625acc609
commit f2f992547d
134 changed files with 72921 additions and 2011 deletions

View File

@@ -122,18 +122,20 @@ Public Class cUIDPruefung
Dim where = ""
Select Case VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA
Case "IMEX" : where = " And FilialenNr IN (5501)"
Case "ATILLA" : where = " And FilialenNr IN (4801)"
Case Else : where = " And isnull(FilialenNr,'') Not IN (5501)"
Case "AMBAR" : where = " And Filialen.FilialenNr IN (5701)"
Case "IMEX" : where = " And Filialen.FilialenNr IN (5501)"
Case "ATILLA" : where = " And Filialen.FilialenNr IN (4801)"
Case "UNISPED" : where = " AND Filialen.firma='UNISPED' "
Case Else : where = " AND Filialen.firma='VERAG' " '" And isnull(FilialenNr,'') Not IN (5501,5701)"
End Select
Dim Top = ""
If MaxEintraege > 0 Then
Top = " TOP " & MaxEintraege
End If
dt = SQL.loadDgvBySql("SELECT " & Top & " [AdressenNr] as KdNr,[Ordnungsbegriff] as Firma,UstIdGeprüft as [letzte Prüfung],UstIdKz,UstIdnr " &
" From [Adressen] inner Join kunden On KundenNr=AdressenNr " &
" where UstIdGeprüft <= '" & datum.ToShortDateString & "' and UstIdKz is not null and UstIdNr is not null " &
dt = SQL.loadDgvBySql("SELECT " & Top & " [AdressenNr] as KdNr,[Ordnungsbegriff] as Firma,UstIdGeprüft as [letzte Prüfung],Adressen.UstIdKz,Adressen.UstIdnr " &
" From [Adressen] inner Join kunden On KundenNr=AdressenNr inner join Filialen on Filialen.FilialenNr=Kunden.FilialenNr " &
" where (UstIdGeprüft <= '" & datum.ToShortDateString & "' OR (Adressen.UstIdKz is not null and Adressen.UstIdNr is not null)) " &
" And Auswahl='A' " & where & " ORDER BY Ordnungsbegriff", "FMZOLL")
If dt IsNot Nothing Then