CBAM, VERAG Cust
This commit is contained in:
@@ -13,7 +13,7 @@ Public Class cImporter_DHFToVERAG
|
||||
' =====================================================================
|
||||
' MAIN ENTRY
|
||||
' =====================================================================
|
||||
Public Function ImportEZOLLByLRN(CRN As String, EZOLL_DB As String, Optional overwrite As Boolean = True) As Boolean
|
||||
Public Function ImportEZOLLByLRN(CRN As String, EZOLL_DB As String, Optional overwrite As Boolean = True, Optional freshInsert As Boolean = True) As Boolean
|
||||
Try
|
||||
If String.IsNullOrWhiteSpace(CRN) Then Return False
|
||||
|
||||
@@ -157,7 +157,7 @@ Public Class cImporter_DHFToVERAG
|
||||
it.zaItem_OriginCountry = ToStringSafe(r("Orig"))
|
||||
it.zaItem_NetMass = ToNullableDecimal(r("Net"))
|
||||
it.zaItem_InvoiceValueEUR = ToNullableDecimal(r("ItVal"))
|
||||
it.zaItem_StatisticalValueEUR = ToNullableDecimal(r("StatVal"))
|
||||
it.zaItem_StatisticalValueEUR = ToNullableDecimal(r("StatVal"))
|
||||
|
||||
LoadEZOLL_HSAddCodes(it, LizenzNr, OperatorID, VorgangID, AnmID, r("GdsItemID"))
|
||||
LoadEZOLL_ItemDocuments(it, LizenzNr, OperatorID, VorgangID, AnmID)
|
||||
@@ -185,6 +185,13 @@ Public Class cImporter_DHFToVERAG
|
||||
ZA.Items.Add(it)
|
||||
Next
|
||||
|
||||
' ================================================================
|
||||
'CBAM WARNING
|
||||
' ================================================================
|
||||
If freshInsert Then
|
||||
ZA.checkfreshCBAMWarning()
|
||||
End If
|
||||
|
||||
' ---------------------------------------------------------------
|
||||
' SAVE
|
||||
' ---------------------------------------------------------------
|
||||
@@ -462,7 +469,9 @@ Public Class cImporter_DHFToVERAG
|
||||
|
||||
|
||||
doc.zaDoc_Reference = ToStringSafe(r("referenceNumber"))
|
||||
doc.zaDoc_Date = ToNullableDate(r("validityDate"))
|
||||
If r("validityDate") IsNot Nothing AndAlso r("validityDate") IsNot DBNull.Value Then
|
||||
doc.zaDoc_Date = ToNullableDate(r("validityDate"))
|
||||
End If
|
||||
'doc.zaDoc_Section = ToStringSafe(r("DocumentTypID"))
|
||||
doc.zaDoc_Description = ToStringSafe(r("text"))
|
||||
|
||||
@@ -471,8 +480,9 @@ Public Class cImporter_DHFToVERAG
|
||||
' ------------------------------------------------------------
|
||||
doc.zaDoc_Presentation = ToStringSafe(r("typeOfPackages"))
|
||||
|
||||
doc.zaDoc_DepreciationAmount = ToNullableDecimal(r("amount"))
|
||||
|
||||
If r("amount") IsNot Nothing AndAlso r("amount") IsNot DBNull.Value Then
|
||||
doc.zaDoc_DepreciationAmount = ToNullableDecimal(r("amount"))
|
||||
End If
|
||||
doc.zaDoc_DepreciationUnitmeasurement =
|
||||
ToStringSafe(r("measurementUnitAndQualifier"))
|
||||
|
||||
@@ -513,7 +523,7 @@ Public Class cImporter_DHFToVERAG
|
||||
|
||||
Dim party As New cVERAG_CustomsDeclarations_Parties
|
||||
|
||||
party.zaParty_Role = r("AdressTypID")
|
||||
party.zaParty_Role = ToStringSafe(r("AdressTypID"))
|
||||
|
||||
party.zaParty_EORI = ToStringSafe(r("identificationNumber"))
|
||||
party.zaParty_Name = ToStringSafe(r("name"))
|
||||
@@ -533,7 +543,7 @@ Public Class cImporter_DHFToVERAG
|
||||
Private Function ExistsInVERAG(CRN As String) As Boolean
|
||||
Dim sql =
|
||||
"SELECT TOP 1 1 FROM tblVERAG_CustomsDeclarations " &
|
||||
"WHERE za_System='EZOLL' AND (za_MRN=@CRN )"
|
||||
"WHERE za_System LIKE 'DHF%' AND (za_MRN=@CRN )"
|
||||
|
||||
Dim p As New List(Of SQLVariable) From {
|
||||
New SQLVariable("CRN", CRN)
|
||||
|
||||
@@ -7,15 +7,15 @@ Public Class cImporter_DakosyToVERAG
|
||||
' ========================================================================
|
||||
' MAIN ENTRY
|
||||
' ========================================================================
|
||||
Public Function ImportDakosyEZA(MRN As String, Optional overwrite As Boolean = True) As Boolean
|
||||
Public Function ImportDakosyEZA(MRN As String, Optional overwrite As Boolean = True, Optional freshInsert As Boolean = False) As Boolean
|
||||
If MRN Is Nothing Then Return False
|
||||
If MRN = "" Then Return False
|
||||
|
||||
Dim EZA = cDakosyEZA.LOADByMRN(MRN, True)
|
||||
If EZA IsNot Nothing Then Return ImportDakosyEZA(EZA)
|
||||
If EZA IsNot Nothing Then Return ImportDakosyEZA(EZA, overwrite, freshInsert)
|
||||
Return False
|
||||
End Function
|
||||
Public Function ImportDakosyEZA(eza As cDakosyEZA, Optional overwrite As Boolean = True) As Boolean
|
||||
Public Function ImportDakosyEZA(eza As cDakosyEZA, Optional overwrite As Boolean = True, Optional freshInsert As Boolean = False) As Boolean
|
||||
Try
|
||||
If eza Is Nothing Then Return False
|
||||
If String.IsNullOrWhiteSpace(eza.eza_MRN) AndAlso String.IsNullOrWhiteSpace(eza.eza_ANR) Then Return False
|
||||
@@ -289,11 +289,22 @@ Public Class cImporter_DakosyToVERAG
|
||||
Next
|
||||
End If
|
||||
|
||||
' ================================================================
|
||||
'CBAM WARNING
|
||||
' ================================================================
|
||||
If freshInsert Then
|
||||
VERAG_ZA.checkfreshCBAMWarning()
|
||||
End If
|
||||
' ================================================================
|
||||
|
||||
|
||||
' ================================================================
|
||||
' SAVE
|
||||
' ================================================================
|
||||
|
||||
Return VERAG_ZA.SAVE()
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
cErrorHandler.ERR(ex.Message, ex.StackTrace, Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
Return False
|
||||
|
||||
@@ -11,18 +11,18 @@ Public Class cImporter_TelotecToVERAG
|
||||
' =====================================================================
|
||||
' MAIN ENTRY
|
||||
' =====================================================================
|
||||
Public Function ImportTelotec(CRN As String, Optional overwrite As Boolean = True) As Boolean
|
||||
Public Function ImportTelotec(CRN As String, Optional overwrite As Boolean = True, Optional freshInsert As Boolean = True) As Boolean
|
||||
|
||||
If CRN Is Nothing Then Return False
|
||||
If CRN = "" Then Return False
|
||||
|
||||
Dim cTelotec_Anmeldung = TELOTEC_Worker.cTelotec_Anmeldung.LOADByCRN(CRN, True)
|
||||
|
||||
If cTelotec_Anmeldung IsNot Nothing Then Return ImportTelotec(cTelotec_Anmeldung, overwrite)
|
||||
If cTelotec_Anmeldung IsNot Nothing Then Return ImportTelotec(cTelotec_Anmeldung, overwrite, freshInsert)
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Public Function ImportTelotec(tel As cTelotec_Anmeldung, Optional overwrite As Boolean = True) As Boolean
|
||||
Public Function ImportTelotec(tel As cTelotec_Anmeldung, Optional overwrite As Boolean = True, Optional freshinsert As Boolean = True) As Boolean
|
||||
Try
|
||||
If tel Is Nothing Then Return False
|
||||
If String.IsNullOrWhiteSpace(ToStringSafe(tel.Refs_LRN)) AndAlso
|
||||
@@ -177,6 +177,14 @@ Public Class cImporter_TelotecToVERAG
|
||||
ZA.Items.Add(it)
|
||||
Next
|
||||
|
||||
|
||||
' ================================================================
|
||||
'CBAM WARNING
|
||||
' ================================================================
|
||||
If freshinsert Then
|
||||
ZA.checkfreshCBAMWarning()
|
||||
End If
|
||||
' ================================================================
|
||||
' ================================================================
|
||||
' SAVE
|
||||
' ================================================================
|
||||
|
||||
Reference in New Issue
Block a user