CBAM/VERAG Zollanmeldugnen

This commit is contained in:
2026-01-13 10:01:59 +01:00
parent 7cd106a413
commit 0ebe4cf198
12 changed files with 849 additions and 123 deletions

View File

@@ -321,12 +321,13 @@ Public Class cKunde
' Return Nothing
End Sub
Public Shared Function LOAD_ByEORI(EORI) As cKunde
Public Shared Function LOAD_ByEORI(EORI, Optional searchfirma = "") As cKunde
Dim test = ""
Dim KUNDE As New cKunde()
Try
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
Using cmd As New SqlCommand("SELECT * FROM Kunden INNER JOIN Filialen on Filialen.FilialenNr=Kunden.FilialenNr WHERE EORITIN=@EORITIN and ( '" & VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA.Replace("ATILLA", "VERAG") & "' IN (Filialen.Firma,Filialen.Cluster)) ", conn)
If searchfirma = "" Then searchfirma = VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA.Replace("ATILLA", "VERAG")
Using cmd As New SqlCommand("SELECT * FROM Kunden INNER JOIN Filialen on Filialen.FilialenNr=Kunden.FilialenNr WHERE EORITIN=@EORITIN and ( '" & searchfirma & "' IN (Filialen.Firma,Filialen.Cluster)) ", conn)
cmd.Parameters.AddWithValue("@EORITIN", EORI)
Dim dr = cmd.ExecuteReader()