1304 lines
64 KiB
VB.net
1304 lines
64 KiB
VB.net
Imports System.Data.SqlClient
|
||
Imports System.Reflection
|
||
Imports System.Runtime.InteropServices.ComTypes
|
||
Imports com.sun.tools.javac.util
|
||
Imports java.lang.ProcessBuilder
|
||
Imports sun.util.resources.cldr.aa
|
||
Imports VERAG_PROG_ALLGEMEIN.TESTJSON
|
||
|
||
' ==========================================================================
|
||
' MASTER CLASS
|
||
' Customs Declaration (Header + Items + Duties + Documents)
|
||
' ==========================================================================
|
||
|
||
Public Class cVERAG_CustomsDeclarations
|
||
|
||
Public Property za_Id As Integer
|
||
Public Property za_System As String ' z.B. "DAKOSY"
|
||
Public Property za_CustomsSystem As String ' z.B. "ATLAS"
|
||
Public Property za_CustomsSystemCountry As String ' z.B. "DE"
|
||
Public Property za_IsExternalSystem As Boolean = False
|
||
Public Property za_IsFinalDeclaration As Boolean = False
|
||
Public Property za_UCR As String
|
||
Public Property za_Mandant_ID As String
|
||
Public Property za_Bereich_ID As String
|
||
Public Property za_Firma As String
|
||
Public Property za_Niederlassung As String
|
||
Public Property za_MRN As String
|
||
Public Property za_LRN As String
|
||
Public Property za_DeclarationNo As String
|
||
Public Property za_ReferenceCustomer As String
|
||
Public Property za_REGIME As String ' IMPORT, EXPORT, ...
|
||
Public Property za_RegistrationType As String
|
||
Public Property za_MainProcedure As String
|
||
Public Property za_AdditionalProcedure As String
|
||
Public Property za_DeclarationDate As Date?
|
||
Public Property za_ReleaseDate As Date?
|
||
Public Property za_AcceptanceDate As Date?
|
||
Public Property za_CustomsOffice As String
|
||
Public Property za_EntryCustomsOffice As String
|
||
Public Property za_RepresentationCode As String
|
||
Public Property za_TransportModeInland As String
|
||
Public Property za_TransportModeBorder As String
|
||
Public Property za_MeansOfTransport_Vehicle As String
|
||
Public Property za_MeansOfTransport_Type As String
|
||
Public Property za_MeansOfTransport_Nationality As String
|
||
|
||
Public Property za_ContainerNr1 As String
|
||
Public Property za_ContainerNr2 As String
|
||
Public Property za_ContainerNr3 As String
|
||
Public Property za_ContainerNr4 As String
|
||
Public Property za_ContainerNr5 As String
|
||
Public Property za_ContainerNr6 As String
|
||
Public Property za_ContainerNr7 As String
|
||
Public Property za_ContainerNr8 As String
|
||
Public Property za_ContainerNr9 As String
|
||
Public Property za_CountryDispatch As String
|
||
Public Property za_CountryDestination As String
|
||
Public Property za_CountryDestinationState As String
|
||
Public Property za_CountryImport As String
|
||
Public Property za_WarehouseCode As String
|
||
Public Property za_Incoterms As String
|
||
Public Property za_IncotermsPlace As String
|
||
Public Property za_InvoiceAmount As Decimal?
|
||
Public Property za_InvoiceCurrency As String
|
||
|
||
Public Property za_FiscalRepFlag As Boolean?
|
||
Public Property za_TaxDeduction As Boolean?
|
||
Public Property za_ApplicantTaxOffice As String
|
||
Public Property za_ApplicantVATNo As String
|
||
Public Property za_DV1Flag As Boolean?
|
||
Public Property za_PrevDocument_Type As String
|
||
Public Property za_PrevDocument_No As String
|
||
Public Property za_AvisoId As Integer?
|
||
Public Property za_SendungsId As Integer?
|
||
Public Property za_Remarks As String
|
||
Public Property za_Sachbearbeiter As String
|
||
Public Property za_SachbearbeiterId As String
|
||
Public Property za_TotGrossMass As Decimal?
|
||
|
||
Public Property Parties As New List(Of cVERAG_CustomsDeclarations_Parties)
|
||
Public Property Items As New List(Of cVERAG_CustomsDeclarations_Item)
|
||
Public Property Duties As New List(Of cVERAG_CustomsDeclarations_Duty)
|
||
Public Property Documents As New List(Of cVERAG_CustomsDeclarations_Document)
|
||
|
||
Public Property hasEntry As Boolean = False
|
||
|
||
Public Shared IMPORTER_ROLES As String() = {"CN", "IM", "IMP", "IMPORTER", "CONSIGNEE"}
|
||
Public Shared EXPORTER_ROLES As String() = {"CZ", "EX", "EXP", "EXPORTER", "CONSIGNOR"}
|
||
Public Shared DECLARANT_ROLES As String() = {"CB", "DT", "ANM", "DEC", "VERTRETER", "DEKLARANT", "DECLARANT"}
|
||
|
||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||
|
||
Public Function getParameterList() As List(Of SQLVariable)
|
||
Return New List(Of SQLVariable) From {
|
||
New SQLVariable("za_Id", za_Id,, True),
|
||
New SQLVariable("za_System", za_System),
|
||
New SQLVariable("za_CustomsSystem", za_CustomsSystem),
|
||
New SQLVariable("za_CustomsSystemCountry", za_CustomsSystemCountry),
|
||
New SQLVariable("za_IsExternalSystem", za_IsExternalSystem),
|
||
New SQLVariable("za_IsFinalDeclaration", za_IsFinalDeclaration),
|
||
New SQLVariable("za_UCR", za_UCR),
|
||
New SQLVariable("za_Mandant_ID", za_Mandant_ID),
|
||
New SQLVariable("za_Bereich_ID", za_Bereich_ID),
|
||
New SQLVariable("za_Firma", za_Firma),
|
||
New SQLVariable("za_Niederlassung", za_Niederlassung),
|
||
New SQLVariable("za_MRN", za_MRN),
|
||
New SQLVariable("za_LRN", za_LRN),
|
||
New SQLVariable("za_DeclarationNo", za_DeclarationNo),
|
||
New SQLVariable("za_ReferenceCustomer", za_ReferenceCustomer),
|
||
New SQLVariable("za_REGIME", za_REGIME),
|
||
New SQLVariable("za_RegistrationType", za_RegistrationType),
|
||
New SQLVariable("za_MainProcedure", za_MainProcedure),
|
||
New SQLVariable("za_AdditionalProcedure", za_AdditionalProcedure),
|
||
New SQLVariable("za_DeclarationDate", za_DeclarationDate),
|
||
New SQLVariable("za_ReleaseDate", za_ReleaseDate),
|
||
New SQLVariable("za_AcceptanceDate", za_AcceptanceDate),
|
||
New SQLVariable("za_CustomsOffice", za_CustomsOffice),
|
||
New SQLVariable("za_EntryCustomsOffice", za_EntryCustomsOffice),
|
||
New SQLVariable("za_RepresentationCode", za_RepresentationCode),
|
||
New SQLVariable("za_TransportModeInland", za_TransportModeInland),
|
||
New SQLVariable("za_TransportModeBorder", za_TransportModeBorder),
|
||
New SQLVariable("za_MeansOfTransport_Vehicle", za_MeansOfTransport_Vehicle),
|
||
New SQLVariable("za_MeansOfTransport_Type", za_MeansOfTransport_Type),
|
||
New SQLVariable("za_MeansOfTransport_Nationality", za_MeansOfTransport_Nationality),
|
||
New SQLVariable("za_ContainerNr1", za_ContainerNr1),
|
||
New SQLVariable("za_ContainerNr2", za_ContainerNr2),
|
||
New SQLVariable("za_ContainerNr3", za_ContainerNr3),
|
||
New SQLVariable("za_ContainerNr4", za_ContainerNr4),
|
||
New SQLVariable("za_ContainerNr5", za_ContainerNr5),
|
||
New SQLVariable("za_ContainerNr6", za_ContainerNr6),
|
||
New SQLVariable("za_ContainerNr7", za_ContainerNr7),
|
||
New SQLVariable("za_ContainerNr8", za_ContainerNr8),
|
||
New SQLVariable("za_ContainerNr9", za_ContainerNr9),
|
||
New SQLVariable("za_CountryDispatch", za_CountryDispatch),
|
||
New SQLVariable("za_CountryDestination", za_CountryDestination),
|
||
New SQLVariable("za_CountryDestinationState", za_CountryDestinationState),
|
||
New SQLVariable("za_CountryImport", za_CountryImport),
|
||
New SQLVariable("za_WarehouseCode", za_WarehouseCode),
|
||
New SQLVariable("za_Incoterms", za_Incoterms),
|
||
New SQLVariable("za_IncotermsPlace", za_IncotermsPlace),
|
||
New SQLVariable("za_InvoiceAmount", za_InvoiceAmount),
|
||
New SQLVariable("za_InvoiceCurrency", za_InvoiceCurrency),
|
||
New SQLVariable("za_FiscalRepFlag", za_FiscalRepFlag),
|
||
New SQLVariable("za_TaxDeduction", za_TaxDeduction),
|
||
New SQLVariable("za_ApplicantTaxOffice", za_ApplicantTaxOffice),
|
||
New SQLVariable("za_ApplicantVATNo", za_ApplicantVATNo),
|
||
New SQLVariable("za_DV1Flag", za_DV1Flag),
|
||
New SQLVariable("za_PrevDocument_Type", za_PrevDocument_Type),
|
||
New SQLVariable("za_PrevDocument_No", za_PrevDocument_No),
|
||
New SQLVariable("za_AvisoId", za_AvisoId),
|
||
New SQLVariable("za_SendungsId", za_SendungsId),
|
||
New SQLVariable("za_Remarks", za_Remarks),
|
||
New SQLVariable("za_Sachbearbeiter", za_Sachbearbeiter),
|
||
New SQLVariable("za_SachbearbeiterId", za_SachbearbeiterId),
|
||
New SQLVariable("za_TotGrossMass", za_TotGrossMass)
|
||
}
|
||
End Function
|
||
|
||
|
||
Public Function getInsertCmd() As String
|
||
Dim f As String = "", v As String = ""
|
||
For Each i In getParameterList()
|
||
If Not i.isPrimaryParam Then
|
||
f &= "[" & i.Text & "],"
|
||
v &= "@" & i.Scalarvariable & ","
|
||
End If
|
||
Next
|
||
Return "INSERT INTO tblVERAG_CustomsDeclarations (" &
|
||
f.TrimEnd(","c) & ") VALUES (" & v.TrimEnd(","c) & ")"
|
||
End Function
|
||
|
||
Public Function getUpdateCmd() As String
|
||
Dim s As String = ""
|
||
For Each i In getParameterList()
|
||
If Not i.isPrimaryParam Then
|
||
s &= "[" & i.Text & "]=@" & i.Scalarvariable & ","
|
||
End If
|
||
Next
|
||
Return "UPDATE tblVERAG_CustomsDeclarations SET " &
|
||
s.TrimEnd(","c) & " WHERE za_Id=@za_Id"
|
||
End Function
|
||
|
||
Public Sub LOAD()
|
||
Try
|
||
hasEntry = False
|
||
Using conn = SQL.GetNewOpenConnectionFMZOLL()
|
||
Using cmd As New SqlCommand(
|
||
"SELECT * FROM tblVERAG_CustomsDeclarations WHERE za_Id=@_BASE_id", conn)
|
||
|
||
cmd.Parameters.AddWithValue("@_BASE_id", za_Id)
|
||
Dim dr = cmd.ExecuteReader()
|
||
If dr.Read Then
|
||
For Each li In getParameterList()
|
||
Dim pi = Me.GetType.GetProperty(li.Scalarvariable)
|
||
If dr.Item(li.Text) Is DBNull.Value Then
|
||
pi.SetValue(Me, Nothing)
|
||
Else
|
||
pi.SetValue(Me, dr.Item(li.Text))
|
||
End If
|
||
Next
|
||
hasEntry = True
|
||
End If
|
||
dr.Close()
|
||
End Using
|
||
End Using
|
||
|
||
Parties = cVERAG_CustomsDeclarations_Parties.LOAD_BY_ZAID(za_Id)
|
||
Items = cVERAG_CustomsDeclarations_Item.LOAD_BY_ZAID(za_Id)
|
||
Duties = cVERAG_CustomsDeclarations_Duty.LOAD_BY_ZAID(za_Id)
|
||
Documents = cVERAG_CustomsDeclarations_Document.LOAD_HEAD_BY_ZAID(za_Id)
|
||
|
||
Catch ex As Exception
|
||
cErrorHandler.ERR(ex.Message, ex.StackTrace, MethodInfo.GetCurrentMethod.Name)
|
||
End Try
|
||
End Sub
|
||
|
||
|
||
|
||
Public Shared Function LOAD_List_CBAM(EORI() As String, ImportCountry As String, datFrom As Date, datTo As Date, Optional CustomsSystem As String = "", Optional loadAll As Boolean = True, Optional indirect As Boolean = False) As List(Of cVERAG_CustomsDeclarations)
|
||
|
||
Dim LIST As New List(Of cVERAG_CustomsDeclarations)
|
||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||
Try
|
||
' ------------------------------------------------------------
|
||
' CBAM Pattern (HSCode)
|
||
' ------------------------------------------------------------
|
||
Dim cbamWhere As String =
|
||
VERAG_PROG_ALLGEMEIN.cGreendeal_CBAM_Trn.BuildCBAMPatternWhereClause("i.zaItem_HSCode")
|
||
|
||
' ------------------------------------------------------------
|
||
' SQL: ZA-IDs ermitteln
|
||
' ------------------------------------------------------------
|
||
Dim eoriIn As String =
|
||
String.Join(",", EORI.
|
||
Where(Function(x) Not String.IsNullOrWhiteSpace(x)).
|
||
Select(Function(x) "'" & x.Replace("'", "''") & "'"))
|
||
Dim sqlstr As String =
|
||
"SELECT DISTINCT z.* " &
|
||
"FROM VERAG.dbo.tblVERAG_CustomsDeclarations z " &
|
||
"INNER JOIN VERAG.dbo.tblVERAG_CustomsDeclarations_Items i " &
|
||
" ON z.za_Id = i.zaItem_zaId " &
|
||
"LEFT JOIN VERAG.dbo.tblVERAG_CustomsDeclarations_Parties p " &
|
||
" ON z.za_Id = p.zaParty_zaId " &
|
||
"WHERE z.za_REGIME = 'IMPORT' " &
|
||
" AND z.za_IsFinalDeclaration = 1 " &
|
||
" AND cast(z.za_DeclarationDate as date) >= @dateFrom " &
|
||
" AND cast(z.za_DeclarationDate as date) <= @dateTo " &
|
||
If(eoriIn <> "", " AND p.zaParty_EORI IN (" & eoriIn & ") ", "") &
|
||
" AND " & cbamWhere
|
||
|
||
If indirect Then
|
||
sqlstr &= " AND (
|
||
(za_System IN('DHF','DHF_UNISPED') AND za_RepresentationCode=3) OR
|
||
(za_System IN('TELOTEC') AND za_RepresentationCode=3) OR
|
||
(za_System IN('DAKOSY') AND za_RepresentationCode=2)
|
||
)"
|
||
End If
|
||
|
||
If ImportCountry <> "" Then
|
||
sqlstr &= " AND z.za_CountryImport = @importCountry "
|
||
End If
|
||
|
||
If CustomsSystem <> "" Then
|
||
sqlstr &= " AND z.za_System = @sys "
|
||
End If
|
||
Using conn = SQL.GetNewOpenConnectionFMZOLL()
|
||
Using cmd As New SqlCommand(sqlstr, conn)
|
||
|
||
' cmd.Parameters.AddWithValue("@eori", EORI)
|
||
cmd.Parameters.AddWithValue("@dateFrom", datFrom.ToShortDateString)
|
||
cmd.Parameters.AddWithValue("@dateTo", datTo.ToShortDateString)
|
||
|
||
If ImportCountry <> "" Then
|
||
cmd.Parameters.AddWithValue("@importCountry", ImportCountry)
|
||
End If
|
||
|
||
If CustomsSystem <> "" Then
|
||
cmd.Parameters.AddWithValue("@sys", CustomsSystem)
|
||
End If
|
||
|
||
Using dr = cmd.ExecuteReader()
|
||
|
||
While dr.Read()
|
||
|
||
Dim CD As New cVERAG_CustomsDeclarations
|
||
CD.hasEntry = False
|
||
|
||
' ------------------------------------------------
|
||
' DIREKTE BEFÜLLUNG (wie gewünscht)
|
||
' ------------------------------------------------
|
||
For Each li In CD.getParameterList()
|
||
Dim pi = CD.GetType().GetProperty(li.Scalarvariable)
|
||
If pi Is Nothing Then Continue For
|
||
|
||
If dr.Item(li.Text) Is DBNull.Value Then
|
||
pi.SetValue(CD, Nothing)
|
||
Else
|
||
pi.SetValue(CD, dr.Item(li.Text))
|
||
End If
|
||
Next
|
||
|
||
CD.hasEntry = True
|
||
|
||
' ------------------------------------------------
|
||
' OPTIONALES NACHLADEN
|
||
' ------------------------------------------------
|
||
If loadAll Then
|
||
CD.Parties = cVERAG_CustomsDeclarations_Parties.LOAD_BY_ZAID(CD.za_Id)
|
||
CD.Items = cVERAG_CustomsDeclarations_Item.LOAD_BY_ZAID(CD.za_Id)
|
||
CD.Duties = cVERAG_CustomsDeclarations_Duty.LOAD_BY_ZAID(CD.za_Id)
|
||
CD.Documents = cVERAG_CustomsDeclarations_Document.LOAD_HEAD_BY_ZAID(CD.za_Id)
|
||
End If
|
||
|
||
LIST.Add(CD)
|
||
|
||
End While
|
||
End Using
|
||
End Using
|
||
End Using
|
||
|
||
Catch ex As Exception
|
||
cErrorHandler.ERR(ex.Message, ex.StackTrace, Reflection.MethodInfo.GetCurrentMethod.Name)
|
||
End Try
|
||
|
||
Return LIST
|
||
End Function
|
||
|
||
|
||
Public Shared Function loadByMRN(MRN As String, loadall As Boolean) As cVERAG_CustomsDeclarations
|
||
Dim ZA As New cVERAG_CustomsDeclarations
|
||
If If(MRN, "") = "" Then Return ZA
|
||
Try
|
||
ZA.hasEntry = False
|
||
Using conn = SQL.GetNewOpenConnectionFMZOLL()
|
||
Using cmd As New SqlCommand(
|
||
"SELECT * FROM tblVERAG_CustomsDeclarations WHERE za_MRN=@_BASE_id", conn)
|
||
|
||
cmd.Parameters.AddWithValue("@_BASE_id", MRN)
|
||
Dim dr = cmd.ExecuteReader()
|
||
If dr.Read Then
|
||
For Each li In ZA.getParameterList()
|
||
Dim pi = ZA.GetType.GetProperty(li.Scalarvariable)
|
||
If dr.Item(li.Text) Is DBNull.Value Then
|
||
pi.SetValue(ZA, Nothing)
|
||
Else
|
||
pi.SetValue(ZA, dr.Item(li.Text))
|
||
End If
|
||
Next
|
||
ZA.hasEntry = True
|
||
End If
|
||
dr.Close()
|
||
End Using
|
||
End Using
|
||
If loadall Then
|
||
|
||
ZA.Parties = cVERAG_CustomsDeclarations_Parties.LOAD_BY_ZAID(ZA.za_Id)
|
||
ZA.Items = cVERAG_CustomsDeclarations_Item.LOAD_BY_ZAID(ZA.za_Id)
|
||
ZA.Duties = cVERAG_CustomsDeclarations_Duty.LOAD_BY_ZAID(ZA.za_Id)
|
||
ZA.Documents = cVERAG_CustomsDeclarations_Document.LOAD_HEAD_BY_ZAID(ZA.za_Id)
|
||
End If
|
||
|
||
Catch ex As Exception
|
||
cErrorHandler.ERR(ex.Message, ex.StackTrace, MethodInfo.GetCurrentMethod.Name)
|
||
End Try
|
||
Return ZA
|
||
End Function
|
||
|
||
Public Sub checkfreshCBAMWarning()
|
||
Try
|
||
Dim CBAM_ITEMS As New List(Of cVERAG_CustomsDeclarations_Item)
|
||
|
||
If hasCBAM(CBAM_ITEMS) Then
|
||
|
||
Dim vertreterEORI As String = Me.Parties.Where(Function(p) DECLARANT_ROLES.Contains(p.zaParty_Role)).Select(Function(p) p.zaParty_EORI).FirstOrDefault()
|
||
Dim vertreterString As String = Me.Parties.Where(Function(p) DECLARANT_ROLES.Contains(p.zaParty_Role)).Select(Function(p) p.zaParty_Name).FirstOrDefault()
|
||
Dim importerEORI As String = Me.Parties.Where(Function(p) IMPORTER_ROLES.Contains(p.zaParty_Role)).Select(Function(p) p.zaParty_EORI).FirstOrDefault()
|
||
Dim ImporterString As String = Me.Parties.Where(Function(p) IMPORTER_ROLES.Contains(p.zaParty_Role)).Select(Function(p) p.zaParty_Name).FirstOrDefault()
|
||
Dim ExporterEORI As String = Me.Parties.Where(Function(p) EXPORTER_ROLES.Contains(p.zaParty_Role)).Select(Function(p) p.zaParty_EORI).FirstOrDefault()
|
||
Dim ExporterString As String = Me.Parties.Where(Function(p) EXPORTER_ROLES.Contains(p.zaParty_Role)).Select(Function(p) p.zaParty_Name).FirstOrDefault()
|
||
|
||
Dim KD As cKunde = Nothing
|
||
Dim AD As cAdressen = Nothing
|
||
If If(importerEORI, "") <> "" Then
|
||
KD = cKunde.LOAD_ByEORI(importerEORI, If(za_Firma, ""))
|
||
If KD Is Nothing Then KD = cKunde.LOAD_ByEORI(importerEORI) 'Wenn kein Kunde mit Firma gefunden wurde, nur nach EORI suchen (default VERAG)
|
||
AD = New cAdressen(KD.KundenNr)
|
||
End If
|
||
|
||
|
||
If AD IsNot Nothing Then
|
||
ImporterString = AD.Name_1 & " " & If(AD.Name_2, "") & "<br/>" & If(AD.LandKz, "") & " " & If(AD.PLZ, "") & " " & If(AD.Ort, "")
|
||
End If
|
||
|
||
Dim KD_EX As cKunde = Nothing
|
||
Dim AD_EX As cAdressen = Nothing
|
||
If If(ExporterEORI, "") <> "" Then
|
||
KD_EX = cKunde.LOAD_ByEORI(ExporterEORI, If(za_Firma, ""))
|
||
If KD_EX Is Nothing Then KD_EX = cKunde.LOAD_ByEORI(ExporterEORI) 'Wenn kein Kunde mit Firma gefunden wurde, nur nach EORI suchen (default VERAG)
|
||
AD_EX = New cAdressen(KD_EX.KundenNr)
|
||
|
||
End If
|
||
If AD_EX IsNot Nothing Then
|
||
ExporterString = AD_EX.Name_1 & " " & If(AD_EX.Name_2, "") & "<br/>" & If(AD_EX.LandKz, "") & " " & If(AD_EX.PLZ, "") & " " & If(AD_EX.Ort, "")
|
||
End If
|
||
|
||
|
||
If isIndirect() Then
|
||
|
||
Dim vertretenerEORI = ""
|
||
Dim vertretenerString = ""
|
||
If importerEORI IsNot Nothing Then
|
||
vertretenerEORI = importerEORI
|
||
vertretenerString = ImporterString
|
||
Else
|
||
vertretenerEORI = ExporterEORI
|
||
vertretenerString = ExporterString
|
||
End If
|
||
|
||
Dim KD_IND As cKunde = Nothing
|
||
Dim AD_IND As cAdressen = Nothing
|
||
Dim ERW_IND As cKundenErweitert = Nothing
|
||
Dim VERTR_IND As List(Of cKundenVertraege) = Nothing
|
||
If If(ExporterEORI, "") <> "" Then
|
||
KD_IND = cKunde.LOAD_ByEORI(ExporterEORI, If(za_Firma, ""))
|
||
If KD_IND Is Nothing Then KD_IND = cKunde.LOAD_ByEORI(ExporterEORI) 'Wenn kein Kunde mit Firma gefunden wurde, nur nach EORI suchen (default VERAG)
|
||
AD_IND = New cAdressen(KD_IND.KundenNr)
|
||
|
||
End If
|
||
If AD_IND IsNot Nothing Then
|
||
vertretenerString = AD_IND.Name_1 & " " & If(AD_IND.Name_2, "") & "<br/>" & If(AD_IND.LandKz, "") & " " & If(AD_IND.PLZ, "") & " " & If(AD_IND.Ort, "")
|
||
ERW_IND = New cKundenErweitert(AD.AdressenNr)
|
||
VERTR_IND = cKundenVertraege.LOAD_LISTOF(AD.AdressenNr)
|
||
End If
|
||
|
||
|
||
'==================>> INDIRECT <<=========================
|
||
Dim itemsHtml As String =
|
||
String.Join("", CBAM_ITEMS.Select(Function(i) "<tr>" &
|
||
"<td>" & i.zaItem_PosNo.ToString & "</td>" &
|
||
"<td>" & If(i.zaItem_HSCode, "") & "</td>" &
|
||
"<td>" & If(i.zaItem_Description, "") & "</td>" &
|
||
"</tr>"
|
||
))
|
||
|
||
Dim dateCBAM = If(If(za_ReleaseDate, za_DeclarationDate), Now)
|
||
Dim eigenmasseSumme_YEAR As Decimal = getCBAM_KG(vertretenerEORI, CDate("01.01." & dateCBAM.Year), CDate("31.12." & dateCBAM.Year), za_MRN) / 1000
|
||
|
||
|
||
'Prüft, ob Vertrag vorliegt:
|
||
Dim hasValidVertrag_CBAM As Boolean =
|
||
VERTR_IND.Any(Function(v) _
|
||
v.kv_vertragArtId = 8 AndAlso
|
||
v.kv_gueltig AndAlso
|
||
(Not v.kv_gueltigBis_Datum.HasValue OrElse
|
||
v.kv_gueltigBis_Datum.Value.Date <= dateCBAM)
|
||
)
|
||
Dim vertragHinweisHtml As String =
|
||
If(Not hasValidVertrag_CBAM,
|
||
"<div style='margin:15px 0; padding:12px; border:2px solid #b00020; " &
|
||
"background-color:#fdeaea; color:#b00020; font-weight:bold; font-size:13pt'>" &
|
||
"⚠️ ACHTUNG: Es liegt kein gültiger CBAM-Vertrag vor!" &
|
||
"</div>",
|
||
"")
|
||
|
||
|
||
Dim bodyHtml As String =
|
||
"<html><body style='font-family:Segoe UI, Arial, sans-serif; font-size:12pt; color:#222'>" &
|
||
"<h2 style='color:#b00020'>CBAM-Warnmeldung bei Zollanmeldung " & Me.za_MRN & "</h2>" &
|
||
"<p>" &
|
||
"Bei der Zollanmeldung mit der MRN <b>" & Me.za_MRN & "</b> wurden CBAM-relevante Warenpositionen erkannt.<br/>" &
|
||
"Bitte prüfen Sie diese Anmeldung im Hinblick auf die CBAM-Meldepflicht." &
|
||
"</p>" &
|
||
vertragHinweisHtml & ' <<< HIER die Einblendung abhängig von vertrag99
|
||
"<h3>Erkannte CBAM-Positionen</h3>" &
|
||
"<table cellpadding='6' cellspacing='0' border='1' style='border-collapse:collapse; width:100%'>" &
|
||
"<tr style='background-color:#f0f0f0'>" &
|
||
"<th align='left'>PosNr</th>" &
|
||
"<th align='left'>HS-Code</th>" &
|
||
"<th align='left'>Beschreibung</th>" &
|
||
"</tr>" &
|
||
itemsHtml &
|
||
"</table>" &
|
||
"<p>" &
|
||
"<b>Ind.Vertreter:</b><br/>" &
|
||
If(vertreterEORI, "") & "<br>" & If(vertreterString, "") &
|
||
"</p>" &
|
||
"<p>" &
|
||
"<b>Kunde:</b><br/>" &
|
||
If(vertretenerEORI, "") & "<br>" & If(vertretenerString, "") &
|
||
"</p>" &
|
||
"<p>" &
|
||
"<b>Importeur:</b><br/>" &
|
||
If(importerEORI, "") & "<br>" & If(ImporterString, "") &
|
||
"</p>" &
|
||
"<p>" &
|
||
"<b>Exporteur:</b><br/>" &
|
||
If(ExporterEORI, "") & "<br>" & If(ExporterString, "") &
|
||
"</p>" &
|
||
"<br/><p><b>VERAG – CBAM Compliance Services</b></p>" &
|
||
"</body></html>"
|
||
|
||
VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail("al@verag.ag", "CBAM WARNUNG - " & Me.za_MRN, bodyHtml, "cbam@verag.ag")
|
||
|
||
'VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail("al@verag.ag", "CBAM WARNUNG",
|
||
' "CBAM-Warnmeldung bei Zollanmeldung " & Me.za_MRN & vbNewLine &
|
||
' "Bei der Zollanmeldung mit der MRN " & Me.za_MRN & " wurden CBAM-relevante Warenpositionen erkannt." & vbCrLf &
|
||
' "Bitte prüfen Sie diese Anmeldung im Hinblick auf die CBAM-Meldepflicht." & vbCrLf & vbCrLf &
|
||
' "Erkannte CBAM-Positionen:" & vbCrLf &
|
||
' String.Join(vbCrLf, CBAM_ITEMS.Select(Function(i) " - PosNr: " & i.zaItem_PosNo.ToString & " | HS-Code: " & If(i.zaItem_HSCode, "") & " | Beschreibung: " & If(i.zaItem_Description, "")))
|
||
' )
|
||
''=========================================================
|
||
Else
|
||
'==================>> DIRECT <<=========================
|
||
|
||
Try
|
||
If KD IsNot Nothing Then
|
||
Dim ERW As New cKundenErweitert(KD.KundenNr)
|
||
|
||
Select Case ERW.kde_CBAM_Status
|
||
Case "", "50to" ' Nur hier wird eine Warnung gesendet!! -> WEnn der Kunde bereits Registriert ist, nicht notwendig.
|
||
|
||
Dim dateCBAM = If(If(za_ReleaseDate, za_DeclarationDate), Now)
|
||
|
||
Dim eigenmasseSumme_Shipment As Decimal = CBAM_ITEMS.Sum(Function(i) If(i.zaItem_NetMass, 0D)) / 1000
|
||
Dim eigenmasseSumme_YEAR As Decimal = getCBAM_KG(importerEORI, CDate("01.01." & dateCBAM.Year), CDate("31.12." & dateCBAM.Year)) / 1000
|
||
|
||
Dim WarnLevel As String = ""
|
||
Dim Schwellenwert As Decimal = 0
|
||
|
||
Dim Warn1 As Decimal = If(If(ERW.kde_CBAM_Warn1, 0) > 0, ERW.kde_CBAM_Warn1, 30)
|
||
Dim Warn2 As Decimal = If(If(ERW.kde_CBAM_Warn2, 0) > 0, ERW.kde_CBAM_Warn2, 40)
|
||
Dim Warn50to As Decimal = 50
|
||
|
||
'geprüft werden die bisherigen CBAM Waren im Jahr + die aktuelle Sendung
|
||
If eigenmasseSumme_YEAR < Warn50to And (eigenmasseSumme_Shipment + eigenmasseSumme_YEAR) >= Warn50to Then
|
||
'--> WARN 2 überschritten
|
||
WarnLevel = "3"
|
||
Schwellenwert = 50
|
||
End If
|
||
'geprüft werden die bisherigen CBAM Waren im Jahr + die aktuelle Sendung
|
||
If eigenmasseSumme_YEAR < Warn2 And (eigenmasseSumme_Shipment + eigenmasseSumme_YEAR) >= Warn2 Then
|
||
'--> WARN 2 überschritten
|
||
WarnLevel = "2"
|
||
Schwellenwert = Warn2
|
||
End If
|
||
'geprüft werden die bisherigen CBAM Waren im Jahr + die aktuelle Sendung
|
||
If eigenmasseSumme_YEAR < Warn1 And (eigenmasseSumme_Shipment + eigenmasseSumme_YEAR) >= Warn1 Then
|
||
'--> WARN 1 überschritten
|
||
WarnLevel = "1"
|
||
Schwellenwert = Warn1
|
||
End If
|
||
|
||
'===========>>>> WARNUNG <<<<<<<=================================
|
||
If WarnLevel <> "" Then
|
||
|
||
Dim bodyHtml As String =
|
||
"<html><body style='font-family:Segoe UI, Arial, sans-serif; font-size:12pt; color:#222'>" &
|
||
"<h2 style='color:#b00020'>CBAM-Warnmeldung zu Ihrer Zollanmeldung " & Me.za_MRN & "</h2>" &
|
||
"<p>" &
|
||
"Laut unserem System wurden in der Zollanmeldung mit der MRN <b>" & Me.za_MRN & "</b> " &
|
||
"CBAM-pflichtige Warenpositionen erkannt.<br/>" &
|
||
"Für Ihr Unternehmen liegen uns derzeit keine Informationen über eine gültige CBAM-Registrierung vor." &
|
||
"</p>" &
|
||
"<p style='font-style:italic; color:#444'>" &
|
||
"Falls Sie uns Ihre CBAM-Antrags- oder Registriernummer bereits übermittelt haben, " &
|
||
"betrachten Sie diese Nachricht bitte als gegenstandslos." &
|
||
"</p>" &
|
||
"<table cellpadding='6' cellspacing='0' border='1' style='border-collapse:collapse'>" &
|
||
"<tr><td><b>Warnstufe</b></td><td>" & WarnLevel & If(WarnLevel = 3, " - <span style='color:#b00020'><b>ÜBERSCHREITUNG!</b></span>", "") & "</td></tr>" &
|
||
"<tr><td><b>Schwellenwert</b></td><td>" & Schwellenwert.ToString("N0") & " Tonnen</td></tr>" &
|
||
"</table><br/>" &
|
||
"<p>" &
|
||
"<b>Importeur:</b><br/>" &
|
||
If(importerEORI, "") & "<br>" & If(ImporterString, "") &
|
||
"</p>" &
|
||
"<p>" &
|
||
"Bei Überschreitung einer jährlichen Gesamtmenge von <b>50 Tonnen CBAM-pflichtiger Waren</b> (Jahressumme) " &
|
||
"ist eine gültige CBAM-Registrierung zwingend erforderlich.<br/>" &
|
||
"Ohne gültige Registrierung kann es zu Zollblockaden oder Abfertigungsstopps kommen." &
|
||
"</p>" &
|
||
"<p>" &
|
||
"Bitte teilen Sie uns kurzfristig unter " &
|
||
"<a href='mailto:cbam@verag.ag'>cbam@verag.ag</a> mit, wie Sie weiter vorgehen möchten " &
|
||
"(z. B. bestehende Registrierung, Beantragung mit VERAG oder Bevollmächtigung)." &
|
||
"</p>" &
|
||
"<p><b>VERAG DCS – CBAM Compliance Services</b></p>" &
|
||
"<p>VERAG Spedition AG<br>A-4975 Suben, Suben 100</p>" &
|
||
"</body></html>"
|
||
|
||
'"<b>Exporteur:</b><br/>" &
|
||
' If (ExporterEORI, "") & "<br>" & If(ExporterString, "") &
|
||
' "</p>" &
|
||
' "<p style='color:#b00020'><b>WICHTIG</b></p>" &
|
||
' "<p>" &
|
||
|
||
' VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail(If(AD.E_Mail, ""), "CBAM-WARNUNG – " & If(WarnLevel = 3, " ACHTUNG: Überschreitung 50to! ", "Überschreitung der Meldeschwelle"), bodyHtml, "cbam@verag.ag", (WarnLevel = 3), "cbam@verag.ag",, "al@verag.ag")
|
||
VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail(If(AD.E_Mail, ""), "CBAM-WARNUNG – " & If(WarnLevel = 3, " ACHTUNG: Überschreitung 50to! ", "Überschreitung der Meldeschwelle"), bodyHtml, "cbam@verag.ag", (WarnLevel = 3), False, "cbam@verag.ag;" & If(AD.E_Mail2, ""), "al@verag.ag")
|
||
|
||
'VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail(
|
||
' "al@verag.ag",
|
||
' "CBAM-WARNUNG – Überschreitung der Meldeschwelle",
|
||
' "CBAM-Warnmeldung zu Ihrer Zollanmeldung " & Me.za_MRN & vbCrLf & vbCrLf &
|
||
' "Laut unserem System wurden in der Zollanmeldung mit der MRN " & Me.za_MRN & " CBAM-pflichtige Warenpositionen erkannt." & vbCrLf &
|
||
' "Für Ihr Unternehmen liegen uns derzeit keine Informationen über eine gültige CBAM-Registrierung vor." & vbCrLf & vbCrLf &
|
||
' "Der für diese Sendung relevante Schwellenwert wurde überschritten." & vbCrLf &
|
||
' "Aktuelle Warnstufe: " & WarnLevel & vbCrLf &
|
||
' "Angewendeter Schwellenwert: " & Schwellenwert.ToString("N0") & " Tonnen" & vbCrLf & vbCrLf &
|
||
' "Importeur: " & importerEORI & " - " & AD.Name_1 & " " & If(AD.Name_2, "") & " " & If(AD.LandKz, "") & " " & If(AD.PLZ, "") & " " & If(AD.Ort, "") & vbCrLf &
|
||
' "WICHTIG:" & vbCrLf &
|
||
' "Bei Überschreitung einer jährlichen Gesamtmenge von 50 Tonnen CBAM-pflichtiger Waren ist eine gültige CBAM-Registrierung zwingend erforderlich." & vbCrLf &
|
||
' "Ohne gültige Registrierung kann es zu Zollblockaden oder Abfertigungsstopps kommen." & vbCrLf & vbCrLf &
|
||
' "Bitte teilen Sie uns kurzfristig unter cbam@verag.ag mit, wie Sie weiter vorgehen möchten (z. B. bestehende Registrierung, Beantragung mit VERAG oder Bevollmächtigung)." & vbCrLf & vbCrLf &
|
||
' "VERAG – CBAM Compliance Services"
|
||
' )
|
||
End If
|
||
'================================================================
|
||
End Select
|
||
End If
|
||
'=========================================================
|
||
Catch ex As Exception
|
||
cErrorHandler.ERR(ex.Message, ex.StackTrace, Reflection.MethodInfo.GetCurrentMethod.Name)
|
||
End Try
|
||
End If
|
||
End If
|
||
Catch ex As Exception
|
||
cErrorHandler.ERR(ex.Message, ex.StackTrace, Reflection.MethodInfo.GetCurrentMethod.Name)
|
||
End Try
|
||
|
||
End Sub
|
||
|
||
Public Function getCBAM_KG(EORI As String, von As Date, bis As Date, Optional without_MRN As String = "", Optional isDeclarant As Boolean = False) As Decimal
|
||
Try
|
||
If EORI = "" Then Return 0
|
||
Dim sqlstr = "SELECT SUM(i.zaItem_NetMass) AS CBAM_Eigenmasse_kg
|
||
FROM VERAG.dbo.tblVERAG_CustomsDeclarations_Items i
|
||
JOIN VERAG.dbo.tblVERAG_CustomsDeclarations z
|
||
ON z.za_Id = i.zaItem_zaId
|
||
|
||
JOIN VERAG.dbo.tblVERAG_CustomsDeclarations_Parties p
|
||
ON p.zaParty_zaId = z.za_Id
|
||
AND p.zaParty_EORI = '" & EORI & "'
|
||
" & If(isDeclarant, "AND (p.zaParty_Role IN ('CB','DT','DEKLARANT','DECLARANT') ",
|
||
" AND (p.zaParty_Role IN ('CN','IM','IMP','IMPORTER','CONSIGNEE') OR
|
||
p.zaParty_Role IN ('CZ','EX','EXP','EXPORTER','CONSIGNOR'))") & "
|
||
|
||
WHERE z.za_ReleaseDate BETWEEN '" & von.ToShortDateString & "' AND '" & bis.ToShortDateString & "'
|
||
AND EXISTS (
|
||
SELECT 1
|
||
FROM VERAG.dbo.tblGreendeal_CBAM_Trn t
|
||
WHERE
|
||
i.zaItem_HSCode LIKE t.trnPattern
|
||
AND t.is_active = 1
|
||
AND ISNULL(t.is_exclusion,0) = 0
|
||
AND (t.start_date IS NULL OR t.start_date <= z.za_ReleaseDate)
|
||
AND (t.end_date IS NULL OR t.end_date >= z.za_ReleaseDate)
|
||
) "
|
||
|
||
If without_MRN <> "" Then sqlstr &= " and za_MRN <>'" & without_MRN & "'"
|
||
|
||
Return SQL.getValueTxtBySql(sqlstr, "FMZOLL",,, 0)
|
||
|
||
Catch ex As Exception
|
||
cErrorHandler.ERR(ex.Message, ex.StackTrace, Reflection.MethodInfo.GetCurrentMethod.Name)
|
||
End Try
|
||
Return 0
|
||
End Function
|
||
Public Function isIndirect() As Boolean
|
||
If Me.za_System Is Nothing Then Return False
|
||
If Me.za_RepresentationCode Is Nothing Then Return False
|
||
If Me.za_System.Contains("DHF") AndAlso Me.za_RepresentationCode = 3 Then Return True
|
||
If Me.za_System.Contains("TELOTEC") AndAlso Me.za_RepresentationCode = 3 Then Return True
|
||
If Me.za_System.Contains("DAKOSY") AndAlso Me.za_RepresentationCode = 2 Then Return True
|
||
Return False
|
||
End Function
|
||
Public Function hasCBAM(Optional ByRef CBAM_ITEMS As List(Of cVERAG_CustomsDeclarations_Item) = Nothing) As Boolean
|
||
|
||
Dim LIST As New List(Of cVERAG_CustomsDeclarations)
|
||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||
Try
|
||
CBAM_ITEMS = getCBAM_ITEMS()
|
||
If CBAM_ITEMS IsNot Nothing AndAlso CBAM_ITEMS.Count > 0 Then
|
||
Return True
|
||
End If
|
||
|
||
Catch ex As Exception
|
||
cErrorHandler.ERR(ex.Message, ex.StackTrace, Reflection.MethodInfo.GetCurrentMethod.Name)
|
||
End Try
|
||
Return False
|
||
End Function
|
||
|
||
Public Function getCBAM_ITEMS() As List(Of cVERAG_CustomsDeclarations_Item)
|
||
|
||
Dim LIST As New List(Of cVERAG_CustomsDeclarations)
|
||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||
Try
|
||
' ------------------------------------------------------------
|
||
' CBAM Pattern (HSCode)
|
||
' ------------------------------------------------------------
|
||
Dim cbamHsCodes = VERAG_PROG_ALLGEMEIN.cGreendeal_CBAM_Trn.LoadCBAMTariffNumbers()
|
||
|
||
|
||
If Items Is Nothing OrElse cbamHsCodes Is Nothing OrElse cbamHsCodes.Count = 0 Then Return Nothing
|
||
|
||
' Performance: HashSet für Prefix-Liste
|
||
Dim prefixes As HashSet(Of String) =
|
||
New HashSet(Of String)(cbamHsCodes)
|
||
|
||
Return Me.Items.
|
||
Where(Function(it)
|
||
Dim hs As String = If(it.zaItem_HSCode, "").Trim()
|
||
If hs = "" Then Return False
|
||
' linksseitiger Prefix-Abgleich
|
||
For Each p In prefixes
|
||
If hs.StartsWith(p) Then
|
||
Return True
|
||
End If
|
||
Next
|
||
End Function).ToList()
|
||
Catch ex As Exception
|
||
cErrorHandler.ERR(ex.Message, ex.StackTrace, Reflection.MethodInfo.GetCurrentMethod.Name)
|
||
End Try
|
||
Return Nothing
|
||
End Function
|
||
Public Function SAVE() As Boolean
|
||
Dim list = getParameterList()
|
||
|
||
Dim sqlstr =
|
||
"BEGIN TRAN " &
|
||
"IF EXISTS(SELECT 1 FROM tblVERAG_CustomsDeclarations WHERE za_Id=@za_Id) " &
|
||
"BEGIN " & getUpdateCmd() & " END " &
|
||
"ELSE BEGIN " & getInsertCmd() & " END " &
|
||
"COMMIT TRAN"
|
||
|
||
za_Id = SQL.doSQLVarListID(za_Id, sqlstr, "FMZOLL", , list)
|
||
If za_Id <= 0 Then Return False
|
||
|
||
cVERAG_CustomsDeclarations_Parties.REPLACE_ALL(za_Id, Parties)
|
||
cVERAG_CustomsDeclarations_Duty.REPLACE_ALL(za_Id, Duties)
|
||
cVERAG_CustomsDeclarations_Document.REPLACE_HEAD(za_Id, Documents)
|
||
cVERAG_CustomsDeclarations_Item.REPLACE_ALL(za_Id, Items)
|
||
|
||
Return True
|
||
End Function
|
||
End Class
|
||
|
||
Public Class cVERAG_CustomsDeclarations_Parties
|
||
|
||
Public Property zaParty_Id As Integer
|
||
Public Property zaParty_zaId As Integer
|
||
Public Property zaParty_Role As String
|
||
Public Property zaParty_EORI As String
|
||
Public Property zaParty_EORI_NL As String
|
||
Public Property zaParty_Name As String
|
||
Public Property zaParty_Street As String
|
||
Public Property zaParty_PostalCode As String
|
||
Public Property zaParty_City As String
|
||
Public Property zaParty_Country As String
|
||
Public Property zaParty_TIN As String
|
||
Public Property zaParty_VATNumber As String
|
||
Public Property zaParty_TaxOffice As String
|
||
Public Property zaParty_ContactName As String
|
||
Public Property zaParty_Phone As String
|
||
Public Property zaParty_Email As String
|
||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||
|
||
Public Function getParameterList() As List(Of SQLVariable)
|
||
Return New List(Of SQLVariable) From {
|
||
New SQLVariable("zaParty_Id", zaParty_Id,, True),
|
||
New SQLVariable("zaParty_zaId", zaParty_zaId),
|
||
New SQLVariable("zaParty_Role", zaParty_Role),
|
||
New SQLVariable("zaParty_EORI", zaParty_EORI),
|
||
New SQLVariable("zaParty_EORI_NL", zaParty_EORI_NL),
|
||
New SQLVariable("zaParty_Name", zaParty_Name),
|
||
New SQLVariable("zaParty_Street", zaParty_Street),
|
||
New SQLVariable("zaParty_PostalCode", zaParty_PostalCode),
|
||
New SQLVariable("zaParty_City", zaParty_City),
|
||
New SQLVariable("zaParty_Country", zaParty_Country),
|
||
New SQLVariable("zaParty_VATNumber", zaParty_VATNumber),
|
||
New SQLVariable("zaParty_TaxOffice", zaParty_TaxOffice),
|
||
New SQLVariable("zaParty_TIN", zaParty_TIN),
|
||
New SQLVariable("zaParty_ContactName", zaParty_ContactName),
|
||
New SQLVariable("zaParty_Phone", zaParty_Phone),
|
||
New SQLVariable("zaParty_Email", zaParty_Email)
|
||
}
|
||
End Function
|
||
|
||
Public Function getInsertCmd() As String
|
||
Dim f As String = "", v As String = ""
|
||
For Each i In getParameterList()
|
||
If Not i.isPrimaryParam Then
|
||
f &= "[" & i.Text & "],"
|
||
v &= "@" & i.Scalarvariable & ","
|
||
End If
|
||
Next
|
||
Return "INSERT INTO tblVERAG_CustomsDeclarations_Parties (" &
|
||
f.TrimEnd(","c) & ") VALUES (" & v.TrimEnd(","c) & ")"
|
||
End Function
|
||
|
||
Public Shared Sub REPLACE_ALL(zaId As Integer, list As List(Of cVERAG_CustomsDeclarations_Parties))
|
||
|
||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||
SQL.doSQL("DELETE FROM tblVERAG_CustomsDeclarations_Parties WHERE zaParty_zaId=" & zaId, "FMZOLL")
|
||
For Each p In list
|
||
p.zaParty_zaId = zaId
|
||
p.zaParty_Id = SQL.doSQLVarListID(p.zaParty_Id, p.getInsertCmd(), "FMZOLL", , p.getParameterList())
|
||
Next
|
||
End Sub
|
||
|
||
Public Shared Function LOAD_BY_ZAID(zaId As Integer) As List(Of cVERAG_CustomsDeclarations_Parties)
|
||
|
||
Dim result As New List(Of cVERAG_CustomsDeclarations_Parties)
|
||
|
||
Try
|
||
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
|
||
Using cmd As New SqlCommand(
|
||
"SELECT * FROM tblVERAG_CustomsDeclarations_Parties WHERE zaParty_zaId=@zaId",
|
||
conn)
|
||
|
||
cmd.Parameters.AddWithValue("@zaId", zaId)
|
||
|
||
Using dr As SqlDataReader = cmd.ExecuteReader()
|
||
While dr.Read()
|
||
|
||
Dim obj As New cVERAG_CustomsDeclarations_Parties
|
||
|
||
For Each li In obj.getParameterList()
|
||
Dim propInfo As PropertyInfo =
|
||
obj.GetType().GetProperty(li.Scalarvariable)
|
||
|
||
If dr.Item(li.Text) Is DBNull.Value Then
|
||
propInfo.SetValue(obj, Nothing)
|
||
Else
|
||
propInfo.SetValue(obj, dr.Item(li.Text))
|
||
End If
|
||
Next
|
||
|
||
result.Add(obj)
|
||
|
||
End While
|
||
End Using
|
||
End Using
|
||
End Using
|
||
|
||
Catch ex As Exception
|
||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(
|
||
ex.Message,
|
||
ex.StackTrace,
|
||
System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||
End Try
|
||
|
||
Return result
|
||
End Function
|
||
End Class
|
||
|
||
' ##########################################################
|
||
' ITEMS
|
||
' ##########################################################
|
||
Public Class cVERAG_CustomsDeclarations_Item
|
||
|
||
Public Property zaItem_Id As Integer
|
||
Public Property zaItem_zaId As Integer
|
||
Public Property zaItem_PosNo As Integer
|
||
|
||
Public Property zaItem_ArticleCode As String
|
||
Public Property zaItem_HSCode As String
|
||
Public Property zaItem_HSAddition1 As String
|
||
Public Property zaItem_HSAddition2 As String
|
||
Public Property zaItem_HSAddCodes1 As String
|
||
Public Property zaItem_HSAddCodes2 As String
|
||
Public Property zaItem_HSAddCodes3 As String
|
||
Public Property zaItem_HSAddCodes4 As String
|
||
Public Property zaItem_HSAddCodes5 As String
|
||
Public Property zaItem_HSAddCodes6 As String
|
||
Public Property zaItem_HSAddCodes7 As String
|
||
Public Property zaItem_HSAddCodes8 As String
|
||
Public Property zaItem_HSAddCodes9 As String
|
||
Public Property zaItem_HSAddCodes10 As String
|
||
Public Property zaItem_Description As String
|
||
|
||
Public Property zaItem_PackageColli As String
|
||
Public Property zaItem_PackageType As String
|
||
Public Property zaItem_PackageMark As String
|
||
Public Property zaItem_OriginCountry As String
|
||
Public Property zaItem_PreferentialCountry As String
|
||
Public Property zaItem_PreferenceCode As String
|
||
Public Property zaItem_QuotaNo As String
|
||
|
||
Public Property zaItem_MainProcedure As String
|
||
Public Property zaItem_AdditionalProc As String
|
||
Public Property zaItem_PrevProcedure As String
|
||
|
||
Public Property zaItem_GrossMass As Decimal?
|
||
Public Property zaItem_NetMass As Decimal?
|
||
|
||
Public Property zaItem_SuppUnitCode As String
|
||
Public Property zaItem_SuppQuantity As Decimal?
|
||
|
||
Public Property zaItem_StatisticalValueEUR As Decimal?
|
||
Public Property zaItem_CustomsValueEUR As Decimal?
|
||
|
||
Public Property zaItem_InvoiceCurrency As String
|
||
Public Property zaItem_InvoiceValueForeign As Decimal?
|
||
Public Property zaItem_InvoiceValueEUR As Decimal?
|
||
|
||
Public Property zaItem_BeguenstigungCode As String
|
||
Public Property zaItem_DV1Flag As Boolean?
|
||
Public Property zaItem_PosAddition As String
|
||
Public Property zaItem_Remarks As String
|
||
|
||
Public Property Documents As New List(Of cVERAG_CustomsDeclarations_Document)
|
||
Public Property hasEntry As Boolean = False
|
||
|
||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||
|
||
Public Function getParameterList() As List(Of SQLVariable)
|
||
Return New List(Of SQLVariable) From {
|
||
New SQLVariable("zaItem_Id", zaItem_Id,, True),
|
||
New SQLVariable("zaItem_zaId", zaItem_zaId),
|
||
New SQLVariable("zaItem_PosNo", zaItem_PosNo),
|
||
New SQLVariable("zaItem_ArticleCode", zaItem_ArticleCode),
|
||
New SQLVariable("zaItem_HSCode", zaItem_HSCode),
|
||
New SQLVariable("zaItem_HSAddition1", zaItem_HSAddition1),
|
||
New SQLVariable("zaItem_HSAddition2", zaItem_HSAddition2),
|
||
New SQLVariable("zaItem_HSAddCodes1", zaItem_HSAddCodes1),
|
||
New SQLVariable("zaItem_HSAddCodes2", zaItem_HSAddCodes2),
|
||
New SQLVariable("zaItem_HSAddCodes3", zaItem_HSAddCodes3),
|
||
New SQLVariable("zaItem_HSAddCodes4", zaItem_HSAddCodes4),
|
||
New SQLVariable("zaItem_HSAddCodes5", zaItem_HSAddCodes5),
|
||
New SQLVariable("zaItem_HSAddCodes6", zaItem_HSAddCodes6),
|
||
New SQLVariable("zaItem_HSAddCodes7", zaItem_HSAddCodes7),
|
||
New SQLVariable("zaItem_HSAddCodes8", zaItem_HSAddCodes8),
|
||
New SQLVariable("zaItem_HSAddCodes9", zaItem_HSAddCodes9),
|
||
New SQLVariable("zaItem_HSAddCodes10", zaItem_HSAddCodes10),
|
||
New SQLVariable("zaItem_Description", zaItem_Description),
|
||
New SQLVariable("zaItem_PackageColli", zaItem_PackageColli),
|
||
New SQLVariable("zaItem_PackageType", zaItem_PackageType),
|
||
New SQLVariable("zaItem_PackageMark", zaItem_PackageMark),
|
||
New SQLVariable("zaItem_OriginCountry", zaItem_OriginCountry),
|
||
New SQLVariable("zaItem_PreferentialCountry", zaItem_PreferentialCountry),
|
||
New SQLVariable("zaItem_PreferenceCode", zaItem_PreferenceCode),
|
||
New SQLVariable("zaItem_QuotaNo", zaItem_QuotaNo),
|
||
New SQLVariable("zaItem_MainProcedure", zaItem_MainProcedure),
|
||
New SQLVariable("zaItem_AdditionalProc", zaItem_AdditionalProc),
|
||
New SQLVariable("zaItem_PrevProcedure", zaItem_PrevProcedure),
|
||
New SQLVariable("zaItem_GrossMass", zaItem_GrossMass),
|
||
New SQLVariable("zaItem_NetMass", zaItem_NetMass),
|
||
New SQLVariable("zaItem_SuppUnitCode", zaItem_SuppUnitCode),
|
||
New SQLVariable("zaItem_SuppQuantity", zaItem_SuppQuantity),
|
||
New SQLVariable("zaItem_StatisticalValueEUR", zaItem_StatisticalValueEUR),
|
||
New SQLVariable("zaItem_CustomsValueEUR", zaItem_CustomsValueEUR),
|
||
New SQLVariable("zaItem_InvoiceCurrency", zaItem_InvoiceCurrency),
|
||
New SQLVariable("zaItem_InvoiceValueForeign", zaItem_InvoiceValueForeign),
|
||
New SQLVariable("zaItem_InvoiceValueEUR", zaItem_InvoiceValueEUR),
|
||
New SQLVariable("zaItem_BeguenstigungCode", zaItem_BeguenstigungCode),
|
||
New SQLVariable("zaItem_DV1Flag", zaItem_DV1Flag),
|
||
New SQLVariable("zaItem_PosAddition", zaItem_PosAddition),
|
||
New SQLVariable("zaItem_Remarks", zaItem_Remarks)
|
||
}
|
||
End Function
|
||
|
||
|
||
Public Function getInsertCmd() As String
|
||
Dim f As String = "", v As String = ""
|
||
For Each i In getParameterList()
|
||
If Not i.isPrimaryParam Then
|
||
f &= "[" & i.Text & "],"
|
||
v &= "@" & i.Scalarvariable & ","
|
||
End If
|
||
Next
|
||
Return "INSERT INTO tblVERAG_CustomsDeclarations_Items (" &
|
||
f.TrimEnd(","c) & ") VALUES (" & v.TrimEnd(","c) & ")"
|
||
End Function
|
||
|
||
|
||
' ---------- DELETE + INSERT ----------
|
||
Public Shared Sub REPLACE_ALL(zaId As Integer, list As List(Of cVERAG_CustomsDeclarations_Item))
|
||
|
||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||
|
||
SQL.doSQL("DELETE FROM tblVERAG_CustomsDeclarations_Items WHERE zaItem_zaId=" & zaId, "FMZOLL")
|
||
SQL.doSQL("DELETE FROM tblVERAG_CustomsDeclarations_Documents WHERE zaDoc_zaId=" & zaId & " AND zaDoc_ItemId is not null", "FMZOLL")
|
||
|
||
For Each it In list
|
||
it.zaItem_zaId = zaId
|
||
it.zaItem_Id = SQL.doSQLVarListID(it.zaItem_Id, it.getInsertCmd(), "FMZOLL", , it.getParameterList())
|
||
'MsgBox(it.zaItem_Id)
|
||
cVERAG_CustomsDeclarations_Document.INSERT_ITEM(it.zaItem_zaId, it.zaItem_Id, it.Documents)
|
||
Next
|
||
End Sub
|
||
|
||
Public Shared Function LOAD_BY_ZAID(zaId As Integer) As List(Of cVERAG_CustomsDeclarations_Item)
|
||
|
||
Dim result As New List(Of cVERAG_CustomsDeclarations_Item)
|
||
|
||
Try
|
||
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
|
||
|
||
Using cmd As New SqlCommand(
|
||
"SELECT * FROM tblVERAG_CustomsDeclarations_Items WHERE zaItem_zaId=@zaId",
|
||
conn)
|
||
|
||
cmd.Parameters.AddWithValue("@zaId", zaId)
|
||
|
||
Using dr As SqlDataReader = cmd.ExecuteReader()
|
||
While dr.Read()
|
||
|
||
Dim it As New cVERAG_CustomsDeclarations_Item
|
||
it.hasEntry = False
|
||
|
||
For Each li In it.getParameterList()
|
||
Dim pi As PropertyInfo =
|
||
it.GetType().GetProperty(li.Scalarvariable)
|
||
|
||
If dr.Item(li.Text) Is DBNull.Value Then
|
||
pi.SetValue(it, Nothing)
|
||
Else
|
||
pi.SetValue(it, dr.Item(li.Text))
|
||
End If
|
||
Next
|
||
|
||
it.hasEntry = True
|
||
result.Add(it)
|
||
|
||
End While
|
||
End Using
|
||
End Using
|
||
End Using
|
||
|
||
' ===== Documents NACHLADEN (pro Item) =====
|
||
For Each it In result
|
||
it.Documents =
|
||
cVERAG_CustomsDeclarations_Document.LOAD_ITEM_BY_ITEMID(zaId, it.zaItem_Id)
|
||
Next
|
||
|
||
Catch ex As Exception
|
||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||
End Try
|
||
|
||
Return result
|
||
End Function
|
||
End Class
|
||
|
||
' ##########################################################
|
||
' DUTIES
|
||
' ##########################################################
|
||
Public Class cVERAG_CustomsDeclarations_Duty
|
||
|
||
Public Property zaDuty_Id As Integer
|
||
Public Property zaDuty_zaId As Integer
|
||
Public Property zaDuty_AccountType As String
|
||
Public Property zaDuty_AccountHeadCustoms As String
|
||
Public Property zaDuty_ApplicationType As String
|
||
Public Property zaDuty_AccountNo As String
|
||
|
||
|
||
|
||
|
||
Public Property zaDuty_AccountEORI As String
|
||
Public Property zaDuty_AccountHolderName As String
|
||
Public Property zaDuty_DutyType As String
|
||
Public Property zaDuty_BIN As String
|
||
Public Property zaDuty_AmountEUR As Decimal?
|
||
Public Property zaDuty_AmountForeign As Decimal?
|
||
Public Property zaDuty_Currency As String
|
||
Public Property zaDuty_LimitDate As Date?
|
||
Public Property hasEntry As Boolean = False
|
||
|
||
Public Function getParameterList() As List(Of SQLVariable)
|
||
Return New List(Of SQLVariable) From {
|
||
New SQLVariable("zaDuty_Id", zaDuty_Id,, True),
|
||
New SQLVariable("zaDuty_zaId", zaDuty_zaId),
|
||
New SQLVariable("zaDuty_AccountType", zaDuty_AccountType),
|
||
New SQLVariable("zaDuty_AccountHeadCustoms", zaDuty_AccountHeadCustoms),
|
||
New SQLVariable("zaDuty_ApplicationType", zaDuty_ApplicationType),
|
||
New SQLVariable("zaDuty_AccountNo", zaDuty_AccountNo),
|
||
New SQLVariable("zaDuty_AccountEORI", zaDuty_AccountEORI),
|
||
New SQLVariable("zaDuty_AccountHolderName", zaDuty_AccountHolderName),
|
||
New SQLVariable("zaDuty_DutyType", zaDuty_DutyType),
|
||
New SQLVariable("zaDuty_BIN", zaDuty_BIN),
|
||
New SQLVariable("zaDuty_AmountEUR", zaDuty_AmountEUR),
|
||
New SQLVariable("zaDuty_AmountForeign", zaDuty_AmountForeign),
|
||
New SQLVariable("zaDuty_Currency", zaDuty_Currency),
|
||
New SQLVariable("zaDuty_LimitDate", zaDuty_LimitDate)
|
||
}
|
||
End Function
|
||
|
||
Public Function getInsertCmd() As String
|
||
Dim f As String = "", v As String = ""
|
||
For Each i In getParameterList()
|
||
If Not i.isPrimaryParam Then
|
||
f &= "[" & i.Text & "],"
|
||
v &= "@" & i.Scalarvariable & ","
|
||
End If
|
||
Next
|
||
Return "INSERT INTO tblVERAG_CustomsDeclarations_Duties (" &
|
||
f.TrimEnd(","c) & ") VALUES (" & v.TrimEnd(","c) & ")"
|
||
End Function
|
||
|
||
|
||
|
||
' ---------- DELETE + INSERT ----------
|
||
Public Shared Sub REPLACE_ALL(zaId As Integer, list As List(Of cVERAG_CustomsDeclarations_Duty))
|
||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||
|
||
SQL.doSQL("DELETE FROM tblVERAG_CustomsDeclarations_Duties WHERE zaDuty_zaId=" & zaId, "FMZOLL")
|
||
For Each d In list
|
||
d.zaDuty_zaId = zaId
|
||
d.zaDuty_Id = SQL.doSQLVarListID(d.zaDuty_Id, d.getInsertCmd(), "FMZOLL", , d.getParameterList())
|
||
Next
|
||
End Sub
|
||
|
||
Public Shared Function LOAD_BY_ZAID(zaId As Integer) _
|
||
As List(Of cVERAG_CustomsDeclarations_Duty)
|
||
|
||
Dim result As New List(Of cVERAG_CustomsDeclarations_Duty)
|
||
|
||
Try
|
||
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
|
||
Using cmd As New SqlCommand(
|
||
"SELECT * FROM tblVERAG_CustomsDeclarations_Duties WHERE zaDuty_zaId=@zaId",
|
||
conn)
|
||
|
||
cmd.Parameters.AddWithValue("@zaId", zaId)
|
||
|
||
Using dr As SqlDataReader = cmd.ExecuteReader()
|
||
While dr.Read()
|
||
|
||
Dim d As New cVERAG_CustomsDeclarations_Duty
|
||
d.hasEntry = False
|
||
|
||
' ===== DEINE LOAD-VORLAGE (1:1, nur in While) =====
|
||
For Each li In d.getParameterList()
|
||
Dim pi As PropertyInfo =
|
||
d.GetType().GetProperty(li.Scalarvariable)
|
||
|
||
If dr.Item(li.Text) Is DBNull.Value Then
|
||
pi.SetValue(d, Nothing)
|
||
Else
|
||
pi.SetValue(d, dr.Item(li.Text))
|
||
End If
|
||
Next
|
||
|
||
d.hasEntry = True
|
||
result.Add(d)
|
||
|
||
End While
|
||
End Using
|
||
End Using
|
||
End Using
|
||
|
||
Catch ex As Exception
|
||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(
|
||
ex.Message,
|
||
ex.StackTrace,
|
||
System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||
End Try
|
||
|
||
Return result
|
||
End Function
|
||
|
||
End Class
|
||
|
||
' ##########################################################
|
||
' DOCUMENTS (HEAD + ITEM)
|
||
' ##########################################################
|
||
Public Class cVERAG_CustomsDeclarations_Document
|
||
|
||
Public Property zaDoc_Id As Integer
|
||
Public Property zaDoc_zaId As Integer
|
||
Public Property zaDoc_ItemId As Integer?
|
||
Public Property zaDoc_Date As String
|
||
Public Property zaDoc_Section As String
|
||
Public Property zaDoc_Code As String
|
||
Public Property zaDoc_Presentation As String
|
||
Public Property zaDoc_DepreciationAmount As String
|
||
Public Property zaDoc_DepreciationUnitmeasurement As String
|
||
Public Property zaDoc_DepreciationUnitmeasurementQualifier As String
|
||
|
||
|
||
Public Property zaDoc_Reference As String
|
||
Public Property zaDoc_Description As String
|
||
|
||
Public Property hasEntry As Boolean = False
|
||
|
||
Public Function getParameterList() As List(Of SQLVariable)
|
||
Return New List(Of SQLVariable) From {
|
||
New SQLVariable("zaDoc_Id", zaDoc_Id,, True),
|
||
New SQLVariable("zaDoc_zaId", zaDoc_zaId),
|
||
New SQLVariable("zaDoc_ItemId", zaDoc_ItemId),
|
||
New SQLVariable("zaDoc_Date", zaDoc_Date),
|
||
New SQLVariable("zaDoc_Section", zaDoc_Section),
|
||
New SQLVariable("zaDoc_Code", zaDoc_Code),
|
||
New SQLVariable("zaDoc_Reference", zaDoc_Reference),
|
||
New SQLVariable("zaDoc_Presentation", zaDoc_Presentation),
|
||
New SQLVariable("zaDoc_DepreciationAmount", zaDoc_DepreciationAmount),
|
||
New SQLVariable("zaDoc_DepreciationUnitmeasurement", zaDoc_DepreciationUnitmeasurement),
|
||
New SQLVariable("zaDoc_DepreciationUnitmeasurementQualifier", zaDoc_DepreciationUnitmeasurementQualifier),
|
||
New SQLVariable("zaDoc_Description", zaDoc_Description)
|
||
}
|
||
End Function
|
||
|
||
Public Function getInsertCmd() As String
|
||
Dim f As String = "", v As String = ""
|
||
For Each i In getParameterList()
|
||
If Not i.isPrimaryParam Then
|
||
f &= "[" & i.Text & "],"
|
||
v &= "@" & i.Scalarvariable & ","
|
||
End If
|
||
Next
|
||
Return "INSERT INTO tblVERAG_CustomsDeclarations_Documents (" &
|
||
f.TrimEnd(","c) & ") VALUES (" & v.TrimEnd(","c) & ")"
|
||
End Function
|
||
|
||
|
||
|
||
' ---------- DELETE + INSERT ----------
|
||
Public Shared Sub REPLACE_HEAD(zaId As Integer, list As List(Of cVERAG_CustomsDeclarations_Document))
|
||
|
||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||
SQL.doSQL(
|
||
"DELETE FROM tblVERAG_CustomsDeclarations_Documents
|
||
WHERE zaDoc_zaId=" & zaId & " AND zaDoc_ItemId IS NULL",
|
||
"FMZOLL")
|
||
|
||
For Each d In list
|
||
d.zaDoc_zaId = zaId
|
||
d.zaDoc_ItemId = Nothing
|
||
d.zaDoc_Id = SQL.doSQLVarListID(d.zaDoc_Id, d.getInsertCmd(), "FMZOLL", , d.getParameterList())
|
||
Next
|
||
End Sub
|
||
|
||
Public Shared Sub INSERT_ITEM(zaId As Integer, itemId As Integer, list As List(Of cVERAG_CustomsDeclarations_Document))
|
||
|
||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||
|
||
For Each d In list
|
||
d.zaDoc_zaId = zaId
|
||
d.zaDoc_ItemId = itemId
|
||
d.zaDoc_Id = SQL.doSQLVarListID(d.zaDoc_Id, d.getInsertCmd(), "FMZOLL", , d.getParameterList())
|
||
Next
|
||
End Sub
|
||
|
||
Public Shared Function LOAD_HEAD_BY_ZAID(zaId As Integer) As List(Of cVERAG_CustomsDeclarations_Document)
|
||
Return LOAD_BY_SQL(
|
||
"SELECT * FROM tblVERAG_CustomsDeclarations_Documents
|
||
WHERE zaDoc_zaId=" & zaId & " AND zaDoc_ItemId IS NULL")
|
||
End Function
|
||
|
||
Public Shared Function LOAD_ITEM_BY_ITEMID(zaId As Integer, itemId As Integer) As List(Of cVERAG_CustomsDeclarations_Document)
|
||
Return LOAD_BY_SQL(
|
||
"SELECT * FROM tblVERAG_CustomsDeclarations_Documents
|
||
WHERE zaDoc_zaId=" & zaId & " AND zaDoc_ItemId=" & itemId)
|
||
End Function
|
||
|
||
Private Shared Function LOAD_BY_SQL(sqlstr As String) _
|
||
As List(Of cVERAG_CustomsDeclarations_Document)
|
||
|
||
Dim result As New List(Of cVERAG_CustomsDeclarations_Document)
|
||
|
||
Try
|
||
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
|
||
Using cmd As New SqlCommand(sqlstr, conn)
|
||
|
||
Using dr As SqlDataReader = cmd.ExecuteReader()
|
||
While dr.Read()
|
||
|
||
Dim d As New cVERAG_CustomsDeclarations_Document
|
||
d.hasEntry = False
|
||
|
||
' ===== DEINE LOAD-VORLAGE (1:1, kombiniert) =====
|
||
For Each li In d.getParameterList()
|
||
Dim pi As PropertyInfo =
|
||
d.GetType().GetProperty(li.Scalarvariable)
|
||
|
||
If dr.Item(li.Text) Is DBNull.Value Then
|
||
pi.SetValue(d, Nothing)
|
||
Else
|
||
pi.SetValue(d, dr.Item(li.Text))
|
||
End If
|
||
Next
|
||
|
||
d.hasEntry = True
|
||
result.Add(d)
|
||
|
||
End While
|
||
End Using
|
||
End Using
|
||
End Using
|
||
|
||
Catch ex As Exception
|
||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(
|
||
ex.Message,
|
||
ex.StackTrace,
|
||
System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||
End Try
|
||
|
||
Return result
|
||
End Function
|
||
|
||
End Class
|
||
|
||
|
||
|