diff --git a/VERAG_PROG_ALLGEMEIN/VERAG_Zollanmeldung/cVERAG_CustomsDeclarations.vb b/VERAG_PROG_ALLGEMEIN/VERAG_Zollanmeldung/cVERAG_CustomsDeclarations.vb index 845fc7d1..909f6554 100644 --- a/VERAG_PROG_ALLGEMEIN/VERAG_Zollanmeldung/cVERAG_CustomsDeclarations.vb +++ b/VERAG_PROG_ALLGEMEIN/VERAG_Zollanmeldung/cVERAG_CustomsDeclarations.vb @@ -727,6 +727,12 @@ Public Class cVERAG_CustomsDeclarations p.zaParty_Role IN ('CZ','EX','EXP','EXPORTER','CONSIGNOR'))") & " WHERE z.za_ReleaseDate BETWEEN '" & von.ToShortDateString & "' AND '" & bis.ToShortDateString & "' + AND i.zaItem_OriginCountry NOT IN ( + 'EU','AT','BE','BG','HR','CY','CZ','DK','EE','FI','FR', + 'DE','GR','HU','IE','IT','LV','LT','LU','MT','NL', + 'PL','PT','RO','SK','SI','ES','SE', + 'CH','NO','IS','LI','XI' + ) AND EXISTS ( SELECT 1 FROM VERAG.dbo.tblGreendeal_CBAM_Trn t @@ -788,11 +794,19 @@ Public Class cVERAG_CustomsDeclarations Dim prefixes As HashSet(Of String) = New HashSet(Of String)(cbamHsCodes) + Dim excludedCountries As New HashSet(Of String) From { + "EU", "AT", "BE", "BG", "HR", "CY", "CZ", "DK", "EE", "FI", "FR", + "DE", "GR", "HU", "IE", "IT", "LV", "LT", "LU", "MT", "NL", + "PL", "PT", "RO", "SK", "SI", "ES", "SE", + "CH", "NO", "IS", "LI", "XI" + } + Return Me.Items. Where(Function(it) Dim hs As String = If(it.zaItem_HSCode, "").Trim() If hs = "" Then Return False - ' linksseitiger Prefix-Abgleich + Dim origin As String = If(it.zaItem_OriginCountry, "").Trim().ToUpper() + If origin <> "" AndAlso excludedCountries.Contains(origin) Then Return False For Each p In prefixes If hs.StartsWith(p) Then Return True