ATLAS 9.1 AES 3.0; NCTS div.
This commit is contained in:
@@ -504,6 +504,23 @@ Public Class cGetMsgType
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
|
||||
Shared Function isAES_DEXPDF(doc As XmlDocument) As Boolean
|
||||
If doc.HasChildNodes Then
|
||||
' If doc.GetElementsByTagName("DakosyMessageInternal").Count > 0 Then
|
||||
Dim sw = New StringWriter()
|
||||
Dim xw = New XmlTextWriter(sw)
|
||||
doc.WriteTo(xw)
|
||||
Dim XmlString = sw.ToString()
|
||||
If XmlString.Contains("<DEXPDF>") Then
|
||||
|
||||
Return True
|
||||
End If
|
||||
'End If
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
Shared Function isAES_DEXPDD(doc As XmlDocument) As Boolean
|
||||
If doc.HasChildNodes Then
|
||||
' If doc.GetElementsByTagName("DakosyMessageInternal").Count > 0 Then
|
||||
|
||||
@@ -678,15 +678,15 @@ Public Class cWorker_NCTS
|
||||
Dim cntTmp = 0
|
||||
For Each CST In DETPDD.CustomsOfficeOfTransitDeclared
|
||||
|
||||
If cntTmp = 0 Then NCTS.ncts_CustomsOfficeOfTransitDeclared_1_RefNumber = CST.referenceNumber : NCTS.ncts_CustomsOfficeOfTransitDeclared_1_ArravialDateTime = CDate(getDatumXMLNothing(CST.arrivalDateAndTimeEstimated))
|
||||
If cntTmp = 1 Then NCTS.ncts_CustomsOfficeOfTransitDeclared_2_RefNumber = CST.referenceNumber : NCTS.ncts_CustomsOfficeOfTransitDeclared_2_ArravialDateTime = CDate(getDatumXMLNothing(CST.arrivalDateAndTimeEstimated))
|
||||
If cntTmp = 2 Then NCTS.ncts_CustomsOfficeOfTransitDeclared_3_RefNumber = CST.referenceNumber : NCTS.ncts_CustomsOfficeOfTransitDeclared_3_ArravialDateTime = CDate(getDatumXMLNothing(CST.arrivalDateAndTimeEstimated))
|
||||
If cntTmp = 3 Then NCTS.ncts_CustomsOfficeOfTransitDeclared_4_RefNumber = CST.referenceNumber : NCTS.ncts_CustomsOfficeOfTransitDeclared_4_ArravialDateTime = CDate(getDatumXMLNothing(CST.arrivalDateAndTimeEstimated))
|
||||
If cntTmp = 4 Then NCTS.ncts_CustomsOfficeOfTransitDeclared_5_RefNumber = CST.referenceNumber : NCTS.ncts_CustomsOfficeOfTransitDeclared_5_ArravialDateTime = CDate(getDatumXMLNothing(CST.arrivalDateAndTimeEstimated))
|
||||
If cntTmp = 5 Then NCTS.ncts_CustomsOfficeOfTransitDeclared_6_RefNumber = CST.referenceNumber : NCTS.ncts_CustomsOfficeOfTransitDeclared_6_ArravialDateTime = CDate(getDatumXMLNothing(CST.arrivalDateAndTimeEstimated))
|
||||
If cntTmp = 6 Then NCTS.ncts_CustomsOfficeOfTransitDeclared_7_RefNumber = CST.referenceNumber : NCTS.ncts_CustomsOfficeOfTransitDeclared_7_ArravialDateTime = CDate(getDatumXMLNothing(CST.arrivalDateAndTimeEstimated))
|
||||
If cntTmp = 7 Then NCTS.ncts_CustomsOfficeOfTransitDeclared_8_RefNumber = CST.referenceNumber : NCTS.ncts_CustomsOfficeOfTransitDeclared_8_ArravialDateTime = CDate(getDatumXMLNothing(CST.arrivalDateAndTimeEstimated))
|
||||
If cntTmp = 8 Then NCTS.ncts_CustomsOfficeOfTransitDeclared_9_RefNumber = CST.referenceNumber : NCTS.ncts_CustomsOfficeOfTransitDeclared_9_ArravialDateTime = CDate(getDatumXMLNothing(CST.arrivalDateAndTimeEstimated))
|
||||
If cntTmp = 0 Then NCTS.ncts_CustomsOfficeOfTransitDeclared_1_RefNumber = CST.referenceNumber : NCTS.ncts_CustomsOfficeOfTransitDeclared_1_ArravialDateTime = (getDatumXMLNothing(CST.arrivalDateAndTimeEstimated))
|
||||
If cntTmp = 1 Then NCTS.ncts_CustomsOfficeOfTransitDeclared_2_RefNumber = CST.referenceNumber : NCTS.ncts_CustomsOfficeOfTransitDeclared_2_ArravialDateTime = (getDatumXMLNothing(CST.arrivalDateAndTimeEstimated))
|
||||
If cntTmp = 2 Then NCTS.ncts_CustomsOfficeOfTransitDeclared_3_RefNumber = CST.referenceNumber : NCTS.ncts_CustomsOfficeOfTransitDeclared_3_ArravialDateTime = (getDatumXMLNothing(CST.arrivalDateAndTimeEstimated))
|
||||
If cntTmp = 3 Then NCTS.ncts_CustomsOfficeOfTransitDeclared_4_RefNumber = CST.referenceNumber : NCTS.ncts_CustomsOfficeOfTransitDeclared_4_ArravialDateTime = (getDatumXMLNothing(CST.arrivalDateAndTimeEstimated))
|
||||
If cntTmp = 4 Then NCTS.ncts_CustomsOfficeOfTransitDeclared_5_RefNumber = CST.referenceNumber : NCTS.ncts_CustomsOfficeOfTransitDeclared_5_ArravialDateTime = (getDatumXMLNothing(CST.arrivalDateAndTimeEstimated))
|
||||
If cntTmp = 5 Then NCTS.ncts_CustomsOfficeOfTransitDeclared_6_RefNumber = CST.referenceNumber : NCTS.ncts_CustomsOfficeOfTransitDeclared_6_ArravialDateTime = (getDatumXMLNothing(CST.arrivalDateAndTimeEstimated))
|
||||
If cntTmp = 6 Then NCTS.ncts_CustomsOfficeOfTransitDeclared_7_RefNumber = CST.referenceNumber : NCTS.ncts_CustomsOfficeOfTransitDeclared_7_ArravialDateTime = (getDatumXMLNothing(CST.arrivalDateAndTimeEstimated))
|
||||
If cntTmp = 7 Then NCTS.ncts_CustomsOfficeOfTransitDeclared_8_RefNumber = CST.referenceNumber : NCTS.ncts_CustomsOfficeOfTransitDeclared_8_ArravialDateTime = (getDatumXMLNothing(CST.arrivalDateAndTimeEstimated))
|
||||
If cntTmp = 8 Then NCTS.ncts_CustomsOfficeOfTransitDeclared_9_RefNumber = CST.referenceNumber : NCTS.ncts_CustomsOfficeOfTransitDeclared_9_ArravialDateTime = (getDatumXMLNothing(CST.arrivalDateAndTimeEstimated))
|
||||
|
||||
cntTmp += 1
|
||||
Next
|
||||
@@ -947,7 +947,7 @@ Public Class cWorker_NCTS
|
||||
|
||||
'WP.nctsWP_PositionsNummer = GOODSITEM.SequenceNumber
|
||||
If HCCI.Commodity IsNot Nothing Then
|
||||
NCTS_HCCI.nctsHCCI_CommodityCode = HCCI.Commodity.CommodityCode
|
||||
If HCCI.Commodity.CommodityCode IsNot Nothing AndAlso HCCI.Commodity.CommodityCode.harmonizedSystemSubHeadingCode IsNot Nothing Then NCTS_HCCI.nctsHCCI_CommodityCode = HCCI.Commodity.CommodityCode.harmonizedSystemSubHeadingCode
|
||||
If HCCI.Commodity.GoodsMeasure IsNot Nothing Then
|
||||
NCTS_HCCI.nctsHCCI_NetMass = HCCI.Commodity.GoodsMeasure.netMass
|
||||
NCTS_HCCI.nctsHCCI_GrossMass = HCCI.Commodity.GoodsMeasure.grossMass
|
||||
@@ -1100,6 +1100,10 @@ Public Class cWorker_NCTS
|
||||
' If If(NCTS.ncts_Status_KEWILL_Equivalent, 0) <= 5 Then NCTS.ncts_Status_KEWILL_Equivalent = DAKOSY_Worker.cDY_Statusliste.S_05
|
||||
NCTS.ncts_Status_KEWILL_Equivalent = NCTS.ncts_Status
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
If NCTS.SAVE_ALL() Then
|
||||
If If(NCTS.ncts_Status, 0) <= 5 Then DAKOSY_Worker.cDakosy_Statusmeldungen.InsertStatusMeldung(DY_TMP, DAKOSY_Worker.cDY_Statusliste.S_05,,,, statusTMP)
|
||||
Else
|
||||
|
||||
@@ -305,7 +305,7 @@ Public Class frmDYNachrichtenVerarbeitung
|
||||
Select Case VERSION
|
||||
Case "002"
|
||||
If cWorker_NCTS.readNCTS004_Versandbestaetigung002(Me, d) <> "" Then found = True 'NEU
|
||||
If Not found Then If cWorker_NCTS.readNCTS_Versandbestaetigung002(Me, d) <> "" Then found = True 'WENN NOCH ALT
|
||||
'If Not found Then If cWorker_NCTS.readNCTS_Versandbestaetigung002(Me, d) <> "" Then found = True 'WENN NOCH ALT
|
||||
Case Else : If cWorker_NCTS.readNCTS_Versandbestaetigung(Me, d) <> "" Then found = True
|
||||
End Select
|
||||
' If bezugsNr <> "" Then addDGVEinarbeitung("NCTS: Versandbestätigung", bezugsNr) : found = True
|
||||
@@ -316,7 +316,7 @@ Public Class frmDYNachrichtenVerarbeitung
|
||||
Select Case VERSION
|
||||
Case "008"
|
||||
If cWorker_NCTS.readNCTS004_Ueberlassungsmeldung008(Me, d, statusTMP) <> "" Then found = True 'NEU
|
||||
If Not found Then If cWorker_NCTS.readNCTS_Ueberlassungsmeldung008(Me, d, statusTMP) <> "" Then found = True
|
||||
' If Not found Then If cWorker_NCTS.readNCTS_Ueberlassungsmeldung008(Me, d, statusTMP) <> "" Then found = True
|
||||
Case "007" : If cWorker_NCTS.readNCTS_Ueberlassungsmeldung007(Me, d, statusTMP) <> "" Then found = True ': MsgBox("005!")
|
||||
Case "006" : If cWorker_NCTS.readNCTS_Ueberlassungsmeldung006(Me, d, statusTMP) <> "" Then found = True ': MsgBox("005!")
|
||||
Case "005" : If cWorker_NCTS.readNCTS_Ueberlassungsmeldung005(Me, d, statusTMP) <> "" Then found = True ': MsgBox("005!")
|
||||
@@ -329,7 +329,7 @@ Public Class frmDYNachrichtenVerarbeitung
|
||||
Select Case VERSION
|
||||
Case "002"
|
||||
If cWorker_NCTS.readNCTS004_AnrechnungReferenzbetraege002(Me, d) <> "" Then found = True 'NEU
|
||||
If Not found Then If cWorker_NCTS.readNCTS_AnrechnungReferenzbetraege002(Me, d) <> "" Then found = True
|
||||
' If Not found Then If cWorker_NCTS.readNCTS_AnrechnungReferenzbetraege002(Me, d) <> "" Then found = True
|
||||
Case Else : If cWorker_NCTS.readNCTS_AnrechnungReferenzbetraege(Me, d) <> "" Then found = True
|
||||
End Select
|
||||
End If
|
||||
@@ -339,7 +339,7 @@ Public Class frmDYNachrichtenVerarbeitung
|
||||
Select Case VERSION
|
||||
Case "003"
|
||||
If cWorker_NCTS.readNCTS004_Erledigungsmeldung003(Me, d) <> "" Then found = True 'NEU
|
||||
If Not found Then If cWorker_NCTS.readNCTS_Erledigungsmeldung003(Me, d) <> "" Then found = True
|
||||
' If Not found Then If cWorker_NCTS.readNCTS_Erledigungsmeldung003(Me, d) <> "" Then found = True
|
||||
Case Else : If cWorker_NCTS.readNCTS_Erledigungsmeldung(Me, d) <> "" Then found = True
|
||||
End Select
|
||||
End If
|
||||
@@ -356,7 +356,7 @@ Public Class frmDYNachrichtenVerarbeitung
|
||||
Select Case VERSION
|
||||
Case "003"
|
||||
If cWorker_NCTS.readNCTS004_StatusmeldungNCTSDE003(Me, d) <> "" Then found = True 'NEU
|
||||
If Not found Then If cWorker_NCTS.readNCTS_StatusmeldungNCTSDE003(Me, d) <> "" Then found = True
|
||||
' If Not found Then If cWorker_NCTS.readNCTS_StatusmeldungNCTSDE003(Me, d) <> "" Then found = True
|
||||
Case Else : If cWorker_NCTS.readNCTS_StatusmeldungNCTSDE(Me, d) <> "" Then found = True
|
||||
End Select
|
||||
End If
|
||||
@@ -366,7 +366,7 @@ Public Class frmDYNachrichtenVerarbeitung
|
||||
Select Case VERSION
|
||||
Case "004"
|
||||
If cWorker_NCTS.readNCTS004_UngueltigkeitSicherheitenNCTSDE004(Me, d) <> "" Then found = True 'NEU
|
||||
If Not found Then If cWorker_NCTS.readNCTS_UngueltigkeitSicherheitenNCTSDE004(Me, d) <> "" Then found = True ': MsgBox("005!")
|
||||
' If Not found Then If cWorker_NCTS.readNCTS_UngueltigkeitSicherheitenNCTSDE004(Me, d) <> "" Then found = True ': MsgBox("005!")
|
||||
Case "003" : If cWorker_NCTS.readNCTS_UngueltigkeitSicherheitenNCTSDE003(Me, d) <> "" Then found = True ': MsgBox("005!")
|
||||
Case Else : If cWorker_NCTS.readNCTS_UngueltigkeitSicherheitenNCTSDE(Me, d) <> "" Then found = True
|
||||
End Select
|
||||
@@ -430,6 +430,7 @@ Public Class frmDYNachrichtenVerarbeitung
|
||||
'EZA: Abgabenbescheid
|
||||
If Not found And cGetMsgType.isEZA_Abgabenbescheid(doc, VERSION) Then
|
||||
Select Case VERSION
|
||||
Case "011" : If readEZA_Abgabenbescheid011(d, statusTMP) <> "" Then found = True
|
||||
Case "010" : If readEZA_Abgabenbescheid010(d, statusTMP) <> "" Then found = True
|
||||
Case "009" : If readEZA_Abgabenbescheid009(d, statusTMP) <> "" Then found = True
|
||||
Case "008" : If readEZA_Abgabenbescheid008(d) <> "" Then found = True
|
||||
@@ -510,6 +511,11 @@ Public Class frmDYNachrichtenVerarbeitung
|
||||
If readAES_DEXPDE(doc2) <> "" Then found = True
|
||||
End If
|
||||
|
||||
'AES: VollstaendigeAusfuhr 2023 ATLAS 9.1
|
||||
If Not found And cGetMsgType.isAES_DEXPDF(doc2) Then
|
||||
If readAES_DEXPDF(doc2) <> "" Then found = True
|
||||
End If
|
||||
|
||||
'AES: Statusmeldung
|
||||
If Not found And cGetMsgType.isAES_DEXPSD(doc2) Then
|
||||
If readAES_DEXPSD(doc2) <> "" Then found = True
|
||||
@@ -542,6 +548,7 @@ Public Class frmDYNachrichtenVerarbeitung
|
||||
'AES: UeberlassungAusfuhr
|
||||
If Not found And cGetMsgType.isAES_UeberlassungAusfuhr(doc, VERSION) Then
|
||||
Select Case VERSION
|
||||
Case "007" : If readAES_UeberlassungAusfuhr_007(d) <> "" Then found = True
|
||||
Case "006" : If readAES_UeberlassungAusfuhr_006(d) <> "" Then found = True
|
||||
End Select
|
||||
End If
|
||||
@@ -550,6 +557,7 @@ Public Class frmDYNachrichtenVerarbeitung
|
||||
'AES: BestaetigungAusfuhr
|
||||
If Not found And cGetMsgType.isAES_BestaetigungAusfuhr(doc, VERSION) Then
|
||||
Select Case VERSION
|
||||
Case "07" : If readAES_BestaetigungAusfuhr_007(d) <> "" Then found = True
|
||||
Case "006" : If readAES_BestaetigungAusfuhr_006(d) <> "" Then found = True
|
||||
End Select
|
||||
End If
|
||||
@@ -1922,6 +1930,452 @@ Public Class frmDYNachrichtenVerarbeitung
|
||||
readAES_DEXPDE = ""
|
||||
End Try
|
||||
End Function
|
||||
Function readAES_DEXPDF(doc As XmlDocument) As String
|
||||
Try
|
||||
readAES_DEXPDF = ""
|
||||
Dim sw = New StringWriter()
|
||||
Dim xw = New XmlTextWriter(sw)
|
||||
doc.WriteTo(xw)
|
||||
Dim XmlString = sw.ToString()
|
||||
If XmlString.Contains("<DEXPDF>") Then
|
||||
Dim xmlDEXPDF = XmlString.Substring(XmlString.IndexOf("<DEXPDF>"), XmlString.IndexOf("</DEXPDF>") + 9 - XmlString.IndexOf("<DEXPDF>"))
|
||||
' MsgBox(xmlDEXPDF)
|
||||
Dim p = Path.GetTempFileName
|
||||
|
||||
Using outputFile As New StreamWriter(p) ', False, System.Text.Encoding.Default)
|
||||
outputFile.Write(xmlDEXPDF)
|
||||
outputFile.Close()
|
||||
|
||||
|
||||
|
||||
Dim DEXPDF As DAKOSY_Worker.DEXPDF.DEXPDF = DAKOSY_Worker.DEXPDF.DEXPDF.LoadFromFile(p)
|
||||
|
||||
|
||||
' Dim AES As New DAKOSY_Worker.cDakosyAES
|
||||
|
||||
|
||||
|
||||
If DEXPDF IsNot Nothing And DEXPDF.ExportOperation IsNot Nothing And DEXPDF.ExportOperation.LRN IsNot Nothing Then
|
||||
readAES_DEXPDF = DEXPDF.ExportOperation.LRN
|
||||
Else
|
||||
Return "" 'Keine Bezugsnummer
|
||||
End If
|
||||
|
||||
Dim DY_TMP As DAKOSY_Worker.cDakosy_Zollanmeldungen = saveDY_ZA(readAES_DEXPDF, "AES")
|
||||
|
||||
Dim AES As DAKOSY_Worker.cDakosyAES = DAKOSY_Worker.cDakosyAES.LOADByBezugsNr(readAES_DEXPDF, False) ' Falls schon ein DS mit dieser Bezugsnummer vorhanden ist.
|
||||
If AES Is Nothing Then AES = New DAKOSY_Worker.cDakosyAES
|
||||
If DY_TMP IsNot Nothing Then AES.aes_dyaAnmID = DY_TMP.dy_Id
|
||||
|
||||
If DY_TMP.dy_AvisoId Is Nothing Then
|
||||
DY_TMP.tryFindAviso()
|
||||
DY_TMP.SAVE()
|
||||
End If
|
||||
|
||||
|
||||
If DEXPDF IsNot Nothing Then
|
||||
|
||||
'Kopfdaten
|
||||
If DEXPDF.ExportOperation IsNot Nothing Then
|
||||
|
||||
If DEXPDF.ExportOperation.declarationType IsNot Nothing Then AES.aes_AnmeldeArtAusfuhrCode = DEXPDF.ExportOperation.declarationType
|
||||
|
||||
If DEXPDF.ExportOperation.LRN IsNot Nothing Then
|
||||
' readAES_DEXPDF = DEXPDF.Header.LocalReferenceNumber
|
||||
AES.aes_ObjectName = DEXPDF.ExportOperation.LRN
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
'Kopfdaten
|
||||
'If DEXPDF.ExportOperation IsNot Nothing Then
|
||||
|
||||
' If DEXPDF.ExportOperation.declarationType IsNot Nothing Then AES.aes_AnmeldeArtAusfuhrCode = DEXPDF.ExportOperation.declarationType
|
||||
|
||||
' If DEXPDF.ExportOperation.LRN IsNot Nothing Then
|
||||
' ' readAES_DEXPDF = DEXPDF.Header.LocalReferenceNumber
|
||||
' AES.aes_ObjectName = DEXPDF.ExportOperation.LRN
|
||||
' End If
|
||||
|
||||
' ' If DEXPDF.ExportOperation.Declaration.Variant IsNot Nothing Then AES.aes_AnmeldeArtUeberfuehrungCode = DEXPDF.ExportOperation.Declaration.Variant
|
||||
|
||||
|
||||
' 'If DEXPDF.Header.MessageVersion IsNot Nothing Then AES.aes_Trans_Version = DEXPDF.
|
||||
' If DEXPDF.ExportOperation.expo.ExportCountry IsNot Nothing Then AES.aes_Ausfuhrland = DEXPDF.Header.ExportCountry
|
||||
' If DEXPDF.Header.DestinationCountry IsNot Nothing Then AES.aes_BestimmungslandCode = DEXPDF.Header.DestinationCountry
|
||||
' AES.aes_AnmeldedatumZeit = cEDI.isValidDateElseNothing(DEXPDF.Header.DeclarationDateTime)
|
||||
' AES.aes_MassgeblichesDatum = cEDI.isValidDateElseNothing(DEXPDF.Header.DecisiveDate)
|
||||
' AES.aes_DatumAusgang = cEDI.isValidDateElseNothing(DEXPDF.Header.ExitDate)
|
||||
' If DEXPDF.Header.SpecificCircumstanceIndicator IsNot Nothing Then AES.aes_BesondereUmstaende = DEXPDF.Header.SpecificCircumstanceIndicator
|
||||
' If DEXPDF.Header.TransportChargesPaymentMethod IsNot Nothing Then AES.aes_Zahlungsweisebefoerderungskosten = DEXPDF.Header.TransportChargesPaymentMethod
|
||||
|
||||
' AES.aes_AdressdatenKonstellation = DEXPDF.Header.PartyConstellation ' PROBLEME?
|
||||
|
||||
' AES.aes_ContainerIndikator = DEXPDF.Header.ContainerFlag ' ?
|
||||
' AES.aes_GesamtRohmasse = DEXPDF.Header.TotalGrossMassMeasure
|
||||
' 'If DEXPDF.Header.RegistrationNumber IsNot Nothing Then AES.aes_RegistriernummerFremdsystem = DEXPDF.Header.RegistrationNumber
|
||||
' 'If DEXPDF.Header.Annotation IsNot Nothing Then AES.aes_Vermerk = DEXPDF.Header.Annotation
|
||||
' 'If DEXPDF.Header.CommercialReferenceNumber IsNot Nothing Then AES.aes_KennnummerSendung = DEXPDF.Header.CommercialReferenceNumber
|
||||
|
||||
|
||||
' If DEXPDF.Header.GoodsItemQuantity IsNot Nothing Then AES.aes_AnzahlPositionen = DEXPDF.Header.GoodsItemQuantity
|
||||
' If DEXPDF.Header.CustomsAuthorization IsNot Nothing Then
|
||||
' If DEXPDF.Header.CustomsAuthorization.LocalClearanceOutwardProcessing IsNot Nothing Then AES.aes_BewiligungsnummerAnschreibeverfahren = DEXPDF.Header.CustomsAuthorization.LocalClearanceOutwardProcessing
|
||||
' If DEXPDF.Header.CustomsAuthorization.OutwardProcessing IsNot Nothing Then AES.aes_BewiligungsnummerPassiveVeredelung = DEXPDF.Header.CustomsAuthorization.OutwardProcessing
|
||||
' ' If DEXPDF.Header.CustomsAuthorization.TrustedExporter IsNot Nothing Then AES.aes_BewiligungsnummerVertrausenswuerdigerAusfuehrer = DEXPDF.Header.CustomsAuthorization.TrustedExporter
|
||||
' If DEXPDF.Header.CustomsAuthorization.AccreditedExporter IsNot Nothing Then AES.aes_BewiligungsnummerAusfuhr = DEXPDF.Header.CustomsAuthorization.AccreditedExporter
|
||||
' End If
|
||||
|
||||
' If DEXPDF.Header.InlandTransportMeans IsNot Nothing Then
|
||||
' If DEXPDF.Header.InlandTransportMeans.Mode IsNot Nothing Then AES.aes_VerkehrszweigInland = DEXPDF.Header.InlandTransportMeans.Mode
|
||||
' End If
|
||||
|
||||
' If DEXPDF.Header.DepartureTransportMeans IsNot Nothing Then
|
||||
' AES.aes_BefoerderungsmittelAbgangArtCode = DEXPDF.Header.DepartureTransportMeans.Type
|
||||
' If DEXPDF.Header.DepartureTransportMeans.Identity IsNot Nothing Then AES.aes_BefoerderungsmittelAbgangKennzeichen = DEXPDF.Header.DepartureTransportMeans.Identity
|
||||
' If DEXPDF.Header.DepartureTransportMeans.Nationality IsNot Nothing Then AES.aes_BefoerderungsmittelAbgangStaatCode = DEXPDF.Header.DepartureTransportMeans.Nationality
|
||||
' End If
|
||||
|
||||
' If DEXPDF.Header.BorderTransportMeans IsNot Nothing Then
|
||||
' AES.aes_BefoerderungsmittelGrenzeArtCode = DEXPDF.Header.BorderTransportMeans.Type
|
||||
' If DEXPDF.Header.BorderTransportMeans.Mode IsNot Nothing Then AES.aes_VerkehrszweigGrenze = DEXPDF.Header.BorderTransportMeans.Mode
|
||||
' If DEXPDF.Header.BorderTransportMeans.Identity IsNot Nothing Then AES.aes_BefoerderungsmittelGrenzeKennzeichen = DEXPDF.Header.BorderTransportMeans.Identity
|
||||
' If DEXPDF.Header.BorderTransportMeans.Nationality IsNot Nothing Then AES.aes_BefoerderungsmittelGrenzeStaatCode = DEXPDF.Header.BorderTransportMeans.Nationality
|
||||
' If DEXPDF.Header.BorderTransportMeans.Nationality IsNot Nothing Then AES.aes_BefoerderungsmittelGrenzeStaatCode = DEXPDF.Header.BorderTransportMeans.Nationality
|
||||
' End If
|
||||
|
||||
' End If
|
||||
|
||||
' If True Then
|
||||
|
||||
|
||||
' 'Ladeort
|
||||
' If DEXPDF.GoodsLoadingPlace IsNot Nothing Then
|
||||
' If DEXPDF.GoodsLoadingPlace.Identification IsNot Nothing Then
|
||||
' If DEXPDF.GoodsLoadingPlace.Identification.ReferenceNumber IsNot Nothing Then AES.aes_LadeortOrtId = DEXPDF.GoodsLoadingPlace.Identification.ReferenceNumber
|
||||
' End If
|
||||
' If DEXPDF.GoodsLoadingPlace.Address IsNot Nothing Then
|
||||
' If DEXPDF.GoodsLoadingPlace.Address.Line IsNot Nothing Then AES.aes_LadeortStrasse = DEXPDF.GoodsLoadingPlace.Address.Line
|
||||
' If DEXPDF.GoodsLoadingPlace.Address.Postcode IsNot Nothing Then AES.aes_LadeortPLZ = DEXPDF.GoodsLoadingPlace.Address.Postcode
|
||||
' If DEXPDF.GoodsLoadingPlace.Address.City IsNot Nothing Then AES.aes_LadeortOrt = DEXPDF.GoodsLoadingPlace.Address.City
|
||||
' If DEXPDF.GoodsLoadingPlace.Address.Complement IsNot Nothing Then AES.aes_LadeortZusatz = DEXPDF.GoodsLoadingPlace.Address.Complement
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' If DEXPDF.ExportCustomsOffice IsNot Nothing Then
|
||||
' If DEXPDF.ExportCustomsOffice.ReferenceNumber IsNot Nothing Then AES.aes_AusfuhrZollstelleID = DEXPDF.ExportCustomsOffice.ReferenceNumber
|
||||
' End If
|
||||
' 'If DEXPDF.SupplementaryDeclarationCustomsOffice IsNot Nothing Then
|
||||
' 'If DEXPDF.SupplementaryDeclarationCustomsOffice.ReferenceNumber IsNot Nothing Then AES.aes_AusgangszollstelleID = DEXPDF.SupplementaryDeclarationCustomsOffice.ReferenceNumber
|
||||
' 'End If
|
||||
' If DEXPDF.IntendedExitCustomsOffice IsNot Nothing Then
|
||||
' If DEXPDF.IntendedExitCustomsOffice.ReferenceNumber IsNot Nothing Then AES.aes_AusgangszollstelleID = DEXPDF.IntendedExitCustomsOffice.ReferenceNumber
|
||||
' End If
|
||||
' If DEXPDF.ActualExitCustomsOffice IsNot Nothing Then
|
||||
' If DEXPDF.ActualExitCustomsOffice.ReferenceNumber IsNot Nothing Then AES.aes_TatsaechlicheAusgangZollstelleID = DEXPDF.ActualExitCustomsOffice.ReferenceNumber
|
||||
' End If
|
||||
' If DEXPDF.Transaction IsNot Nothing Then
|
||||
' AES.aes_GeschaeftartCode = DEXPDF.Transaction.Type
|
||||
' AES.aes_Rechnungspreis = DEXPDF.Transaction.Type
|
||||
' If DEXPDF.Transaction.Currency IsNot Nothing Then AES.aes_Rechnungwaehrung = DEXPDF.Transaction.Currency
|
||||
' End If
|
||||
' If DEXPDF.SpecialFact IsNot Nothing Then
|
||||
' If DEXPDF.SpecialFact.Count > 0 Then AES.aes_BesondererTatbestand = DEXPDF.SpecialFact(0).Indicator 'Könnenn mehrere auftretetn
|
||||
' End If
|
||||
|
||||
' If DEXPDF.Itinerary IsNot Nothing Then
|
||||
' If DEXPDF.Itinerary.Count > 0 Then AES.aes_BefoerderungsrouteLand1 = DEXPDF.Itinerary(0).Country
|
||||
' If DEXPDF.Itinerary.Count > 1 Then AES.aes_BefoerderungsrouteLand2 = DEXPDF.Itinerary(1).Country
|
||||
' If DEXPDF.Itinerary.Count > 2 Then AES.aes_BefoerderungsrouteLand3 = DEXPDF.Itinerary(2).Country
|
||||
' If DEXPDF.Itinerary.Count > 3 Then AES.aes_BefoerderungsrouteLand4 = DEXPDF.Itinerary(3).Country
|
||||
' If DEXPDF.Itinerary.Count > 4 Then AES.aes_BefoerderungsrouteLand5 = DEXPDF.Itinerary(4).Country
|
||||
' If DEXPDF.Itinerary.Count > 5 Then AES.aes_BefoerderungsrouteLand6 = DEXPDF.Itinerary(5).Country
|
||||
' If DEXPDF.Itinerary.Count > 6 Then AES.aes_BefoerderungsrouteLand7 = DEXPDF.Itinerary(6).Country
|
||||
' If DEXPDF.Itinerary.Count > 7 Then AES.aes_BefoerderungsrouteLand8 = DEXPDF.Itinerary(7).Country
|
||||
' If DEXPDF.Itinerary.Count > 8 Then AES.aes_BefoerderungsrouteLand9 = DEXPDF.Itinerary(8).Country
|
||||
' If DEXPDF.Itinerary.Count > 9 Then AES.aes_BefoerderungsrouteLand10 = DEXPDF.Itinerary(9).Country
|
||||
' If DEXPDF.Itinerary.Count > 10 Then AES.aes_BefoerderungsrouteLand11 = DEXPDF.Itinerary(10).Country
|
||||
' If DEXPDF.Itinerary.Count > 11 Then AES.aes_BefoerderungsrouteLand12 = DEXPDF.Itinerary(11).Country
|
||||
' End If
|
||||
|
||||
' If DEXPDF.Seals IsNot Nothing Then
|
||||
' AES.aes_VerschlussArtCode = DEXPDF.Seals.Type
|
||||
' If DEXPDF.Seals.Number IsNot Nothing Then AES.aes_VerschlussAnzahl = DEXPDF.Seals.Number
|
||||
' If DEXPDF.Seals.Seal IsNot Nothing Then
|
||||
' If DEXPDF.Seals.Seal.Count > 0 Then AES.aes_VerschlussZeichen1 = DEXPDF.Seals.Seal(0).Identity
|
||||
' If DEXPDF.Seals.Seal.Count > 1 Then AES.aes_VerschlussZeichen2 = DEXPDF.Seals.Seal(1).Identity
|
||||
' If DEXPDF.Seals.Seal.Count > 2 Then AES.aes_VerschlussZeichen3 = DEXPDF.Seals.Seal(2).Identity
|
||||
' If DEXPDF.Seals.Seal.Count > 3 Then AES.aes_VerschlussZeichen4 = DEXPDF.Seals.Seal(3).Identity
|
||||
' If DEXPDF.Seals.Seal.Count > 4 Then AES.aes_VerschlussZeichen5 = DEXPDF.Seals.Seal(4).Identity
|
||||
' If DEXPDF.Seals.Seal.Count > 5 Then AES.aes_VerschlussZeichen6 = DEXPDF.Seals.Seal(5).Identity
|
||||
' If DEXPDF.Seals.Seal.Count > 6 Then AES.aes_VerschlussZeichen7 = DEXPDF.Seals.Seal(6).Identity
|
||||
' If DEXPDF.Seals.Seal.Count > 7 Then AES.aes_VerschlussZeichen8 = DEXPDF.Seals.Seal(7).Identity
|
||||
' If DEXPDF.Seals.Seal.Count > 8 Then AES.aes_VerschlussZeichen9 = DEXPDF.Seals.Seal(8).Identity
|
||||
' If DEXPDF.Seals.Seal.Count > 9 Then AES.aes_VerschlussZeichen10 = DEXPDF.Seals.Seal(9).Identity
|
||||
' If DEXPDF.Seals.Seal.Count > 10 Then AES.aes_VerschlussZeichen11 = DEXPDF.Seals.Seal(10).Identity
|
||||
' If DEXPDF.Seals.Seal.Count > 11 Then AES.aes_VerschlussZeichen12 = DEXPDF.Seals.Seal(11).Identity
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' If DEXPDF.PresentationPackingLoading IsNot Nothing Then
|
||||
' AES.aes_GestellungsfristAnfangDatumZeit = cEDI.isValidDateElseNothing(DEXPDF.PresentationPackingLoading.StartDateTime)
|
||||
' AES.aes_GestellungsfristEndeDatumZeit = cEDI.isValidDateElseNothing(DEXPDF.PresentationPackingLoading.EndDateTime)
|
||||
' End If
|
||||
|
||||
|
||||
|
||||
' 'Ausführer
|
||||
' If DEXPDF.Exporter IsNot Nothing Then
|
||||
' ' AES.Ausfuehrert = DEXPDF.Exporter.Class
|
||||
' If DEXPDF.Exporter.Identification IsNot Nothing Then
|
||||
' If DEXPDF.Exporter.Identification.ReferenceNumber IsNot Nothing Then AES.aes_AusfuehrerTeilnehmerEORI = DEXPDF.Exporter.Identification.ReferenceNumber
|
||||
' If DEXPDF.Exporter.Identification.SubsidiaryNumber IsNot Nothing Then AES.aes_AusfuehrerTeilnehmerNLNR = DEXPDF.Exporter.Identification.SubsidiaryNumber
|
||||
' End If
|
||||
' If DEXPDF.Exporter.name IsNot Nothing Then AES.aes_AusfuehrerTeilnehmerName = DEXPDF.Exporter.name
|
||||
' If DEXPDF.Exporter.Address IsNot Nothing Then
|
||||
' If DEXPDF.Exporter.Address.Line IsNot Nothing Then AES.aes_AusfuehrerTeilnehmerStrasse = DEXPDF.Exporter.Address.Line
|
||||
' If DEXPDF.Exporter.Address.city IsNot Nothing Then AES.aes_AusfuehrerTeilnehmerOrt = DEXPDF.Exporter.Address.city
|
||||
' If DEXPDF.Exporter.Address.postcode IsNot Nothing Then AES.aes_AusfuehrerTeilnehmerPLZ = DEXPDF.Exporter.Address.postcode
|
||||
' If DEXPDF.Exporter.Address.country IsNot Nothing Then AES.aes_AusfuehrerTeilnehmerLandCode = DEXPDF.Exporter.Address.country
|
||||
' End If
|
||||
' If DEXPDF.Exporter.ContactPerson IsNot Nothing Then
|
||||
' If DEXPDF.Exporter.ContactPerson.Position IsNot Nothing Then AES.aes_AusfuehrerTeilnehmerAnsprechpartnerStellung = DEXPDF.Exporter.ContactPerson.Position
|
||||
' If DEXPDF.Exporter.ContactPerson.Name IsNot Nothing Then AES.aes_AusfuehrerTeilnehmerAnsprechpartnerSachbearbeiter = DEXPDF.Exporter.ContactPerson.Name
|
||||
' If DEXPDF.Exporter.ContactPerson.PhoneNumber IsNot Nothing Then AES.aes_AusfuehrerTeilnehmerAnsprechpartnerTelefonnummer = DEXPDF.Exporter.ContactPerson.PhoneNumber
|
||||
' If DEXPDF.Exporter.ContactPerson.FacsimileNumber IsNot Nothing Then AES.aes_AusfuehrerTeilnehmerAnsprechpartnerTelefax = DEXPDF.Exporter.ContactPerson.FacsimileNumber
|
||||
' If DEXPDF.Exporter.ContactPerson.MailAddress IsNot Nothing Then AES.aes_AusfuehrerTeilnehmerAnsprechpartnerEmail = DEXPDF.Exporter.ContactPerson.MailAddress
|
||||
' End If
|
||||
' End If
|
||||
|
||||
|
||||
' 'Anmelder
|
||||
' If DEXPDF.Declarant IsNot Nothing Then
|
||||
' ' AES.anmeldert = DEXPDF.Declarant.Class
|
||||
' If DEXPDF.Declarant.Identification IsNot Nothing Then
|
||||
' If DEXPDF.Declarant.Identification.ReferenceNumber IsNot Nothing Then AES.aes_AnmelderTeilnehmerEORI = DEXPDF.Declarant.Identification.ReferenceNumber
|
||||
' If DEXPDF.Declarant.Identification.SubsidiaryNumber IsNot Nothing Then AES.aes_AnmelderTeilnehmerNLNR = DEXPDF.Declarant.Identification.SubsidiaryNumber
|
||||
' End If
|
||||
' If DEXPDF.Declarant.name IsNot Nothing Then AES.aes_AnmelderTeilnehmerName = DEXPDF.Declarant.name
|
||||
' If DEXPDF.Declarant.Address IsNot Nothing Then
|
||||
' If DEXPDF.Declarant.Address.Line IsNot Nothing Then AES.aes_AnmelderTeilnehmerStrasse = DEXPDF.Declarant.Address.Line
|
||||
' If DEXPDF.Declarant.Address.city IsNot Nothing Then AES.aes_AnmelderTeilnehmerOrt = DEXPDF.Declarant.Address.city
|
||||
' If DEXPDF.Declarant.Address.postcode IsNot Nothing Then AES.aes_AnmelderTeilnehmerPLZ = DEXPDF.Declarant.Address.postcode
|
||||
' If DEXPDF.Declarant.Address.country IsNot Nothing Then AES.aes_AnmelderTeilnehmerLandCode = DEXPDF.Declarant.Address.country
|
||||
' End If
|
||||
' If DEXPDF.Declarant.ContactPerson IsNot Nothing Then
|
||||
' If DEXPDF.Declarant.ContactPerson.Position IsNot Nothing Then AES.aes_AnmelderTeilnehmerAnsprechpartnerStellung = DEXPDF.Declarant.ContactPerson.Position
|
||||
' If DEXPDF.Declarant.ContactPerson.name IsNot Nothing Then AES.aes_AnmelderTeilnehmerAnsprechpartnerSachbearbeiter = DEXPDF.Declarant.ContactPerson.name
|
||||
' If DEXPDF.Declarant.ContactPerson.phoneNumber IsNot Nothing Then AES.aes_AnmelderTeilnehmerAnsprechpartnerTelefonnummer = DEXPDF.Declarant.ContactPerson.phoneNumber
|
||||
' If DEXPDF.Declarant.ContactPerson.FacsimileNumber IsNot Nothing Then AES.aes_AnmelderTeilnehmerAnsprechpartnerTelefax = DEXPDF.Declarant.ContactPerson.FacsimileNumber
|
||||
' If DEXPDF.Declarant.ContactPerson.MailAddress IsNot Nothing Then AES.aes_AnmelderTeilnehmerAnsprechpartnerEmail = DEXPDF.Declarant.ContactPerson.MailAddress
|
||||
' End If
|
||||
' End If
|
||||
|
||||
|
||||
' 'Vertreter Anmelder
|
||||
' If DEXPDF.Representative IsNot Nothing Then
|
||||
' ' AES.anmeldert = DEXPDF.Representative.Class
|
||||
' If DEXPDF.Representative.Identification IsNot Nothing Then
|
||||
' If DEXPDF.Representative.Identification.ReferenceNumber IsNot Nothing Then AES.aes_VertreterAnmelderTeilnehmerEORI = DEXPDF.Representative.Identification.ReferenceNumber
|
||||
' If DEXPDF.Representative.Identification.SubsidiaryNumber IsNot Nothing Then AES.aes_VertreterAnmelderTeilnehmerNLNR = DEXPDF.Representative.Identification.SubsidiaryNumber
|
||||
' End If
|
||||
' If DEXPDF.Representative.Name IsNot Nothing Then AES.aes_VertreterAnmelderTeilnehmerName = DEXPDF.Representative.Name
|
||||
' If DEXPDF.Representative.Address IsNot Nothing Then
|
||||
' If DEXPDF.Representative.Address.Line IsNot Nothing Then AES.aes_VertreterAnmelderTeilnehmerStrasse = DEXPDF.Representative.Address.Line
|
||||
' If DEXPDF.Representative.Address.City IsNot Nothing Then AES.aes_VertreterAnmelderTeilnehmerOrt = DEXPDF.Representative.Address.City
|
||||
' If DEXPDF.Representative.Address.Postcode IsNot Nothing Then AES.aes_VertreterAnmelderTeilnehmerPLZ = DEXPDF.Representative.Address.Postcode
|
||||
' If DEXPDF.Representative.Address.Country IsNot Nothing Then AES.aes_VertreterAnmelderTeilnehmerLandCode = DEXPDF.Representative.Address.Country
|
||||
' End If
|
||||
' If DEXPDF.Representative.ContactPerson IsNot Nothing Then
|
||||
' If DEXPDF.Representative.ContactPerson.Position IsNot Nothing Then AES.aes_VertreterAnmelderTeilnehmerAnsprechpartnerStellung = DEXPDF.Representative.ContactPerson.Position
|
||||
' If DEXPDF.Representative.ContactPerson.name IsNot Nothing Then AES.aes_VertreterAnmelderTeilnehmerAnsprechpartnerSachbearbeiter = DEXPDF.Representative.ContactPerson.name
|
||||
' If DEXPDF.Representative.ContactPerson.phoneNumber IsNot Nothing Then AES.aes_VertreterAnmelderTeilnehmerAnsprechpartnerTelefonnummer = DEXPDF.Representative.ContactPerson.phoneNumber
|
||||
' If DEXPDF.Representative.ContactPerson.FacsimileNumber IsNot Nothing Then AES.aes_VertreterAnmelderTeilnehmerAnsprechpartnerTelefax = DEXPDF.Representative.ContactPerson.FacsimileNumber
|
||||
' If DEXPDF.Representative.ContactPerson.MailAddress IsNot Nothing Then AES.aes_VertreterAnmelderTeilnehmerAnsprechpartnerEmail = DEXPDF.Representative.ContactPerson.MailAddress
|
||||
' End If
|
||||
' End If
|
||||
|
||||
|
||||
' 'Subunternehmer
|
||||
' If DEXPDF.Contractor IsNot Nothing Then
|
||||
' ' AES.anmeldert = DEXPDF.Contractor.Class
|
||||
' If DEXPDF.Contractor.Identification IsNot Nothing Then
|
||||
' If DEXPDF.Contractor.Identification.ReferenceNumber IsNot Nothing Then AES.aes_SubunternehmerTeilnehmerEORI = DEXPDF.Contractor.Identification.ReferenceNumber
|
||||
' If DEXPDF.Contractor.Identification.SubsidiaryNumber IsNot Nothing Then AES.aes_SubunternehmerTeilnehmerNLNR = DEXPDF.Contractor.Identification.SubsidiaryNumber
|
||||
' End If
|
||||
' If DEXPDF.Contractor.Name IsNot Nothing Then AES.aes_SubunternehmerTeilnehmerName = DEXPDF.Contractor.Name
|
||||
' If DEXPDF.Contractor.Address IsNot Nothing Then
|
||||
' If DEXPDF.Contractor.Address.Line IsNot Nothing Then AES.aes_SubunternehmerTeilnehmerStrasse = DEXPDF.Contractor.Address.Line
|
||||
' If DEXPDF.Contractor.Address.City IsNot Nothing Then AES.aes_SubunternehmerTeilnehmerOrt = DEXPDF.Contractor.Address.City
|
||||
' If DEXPDF.Contractor.Address.Postcode IsNot Nothing Then AES.aes_SubunternehmerTeilnehmerPLZ = DEXPDF.Contractor.Address.Postcode
|
||||
' If DEXPDF.Contractor.Address.Country IsNot Nothing Then AES.aes_SubunternehmerTeilnehmerLandCode = DEXPDF.Contractor.Address.Country
|
||||
' End If
|
||||
' If DEXPDF.Contractor.ContactPerson IsNot Nothing Then
|
||||
' If DEXPDF.Contractor.ContactPerson.Position IsNot Nothing Then AES.aes_SubunternehmerTeilnehmerAnsprechpartnerStellung = DEXPDF.Contractor.ContactPerson.Position
|
||||
' If DEXPDF.Contractor.ContactPerson.Name IsNot Nothing Then AES.aes_SubunternehmerTeilnehmerAnsprechpartnerSachbearbeiter = DEXPDF.Contractor.ContactPerson.Name
|
||||
' If DEXPDF.Contractor.ContactPerson.PhoneNumber IsNot Nothing Then AES.aes_SubunternehmerTeilnehmerAnsprechpartnerTelefonnummer = DEXPDF.Contractor.ContactPerson.PhoneNumber
|
||||
' If DEXPDF.Contractor.ContactPerson.FacsimileNumber IsNot Nothing Then AES.aes_SubunternehmerTeilnehmerAnsprechpartnerTelefax = DEXPDF.Contractor.ContactPerson.FacsimileNumber
|
||||
' If DEXPDF.Contractor.ContactPerson.MailAddress IsNot Nothing Then AES.aes_SubunternehmerTeilnehmerAnsprechpartnerEmail = DEXPDF.Contractor.ContactPerson.MailAddress
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' 'Verfahrensinhaber
|
||||
' If DEXPDF.OutwardProcessingOwner IsNot Nothing Then
|
||||
' ' AES.anmeldert = DEXPDF.OutwardProcessingOwner.Class
|
||||
' If DEXPDF.OutwardProcessingOwner.Identification IsNot Nothing Then
|
||||
' If DEXPDF.OutwardProcessingOwner.Identification.ReferenceNumber IsNot Nothing Then AES.aes_VerfahrensinhaberPVTeilnehmerEORI = DEXPDF.OutwardProcessingOwner.Identification.ReferenceNumber
|
||||
' AES.aes_VerfahrensinhaberPVTeilnehmerNLNR = DEXPDF.OutwardProcessingOwner.Identification.SubsidiaryNumber
|
||||
' End If
|
||||
|
||||
' If DEXPDF.OutwardProcessingOwner.ContactPerson IsNot Nothing Then
|
||||
' If DEXPDF.OutwardProcessingOwner.ContactPerson.Position IsNot Nothing Then AES.aes_VerfahrensinhaberPVTeilnehmerAnsprechpartnerStellung = DEXPDF.OutwardProcessingOwner.ContactPerson.Position
|
||||
' If DEXPDF.OutwardProcessingOwner.ContactPerson.Name IsNot Nothing Then AES.aes_VerfahrensinhaberPVTeilnehmerAnsprechpartnerSachbearbeiter = DEXPDF.OutwardProcessingOwner.ContactPerson.Name
|
||||
' If DEXPDF.OutwardProcessingOwner.ContactPerson.PhoneNumber IsNot Nothing Then AES.aes_VerfahrensinhaberPVTeilnehmerAnsprechpartnerTelefonnummer = DEXPDF.OutwardProcessingOwner.ContactPerson.PhoneNumber
|
||||
' If DEXPDF.OutwardProcessingOwner.ContactPerson.FacsimileNumber IsNot Nothing Then AES.aes_VerfahrensinhaberPVTeilnehmerAnsprechpartnerTelefax = DEXPDF.OutwardProcessingOwner.ContactPerson.FacsimileNumber
|
||||
' If DEXPDF.OutwardProcessingOwner.ContactPerson.MailAddress IsNot Nothing Then AES.aes_VerfahrensinhaberPVTeilnehmerAnsprechpartnerEmail = DEXPDF.OutwardProcessingOwner.ContactPerson.MailAddress
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' 'Empfaenger
|
||||
' If DEXPDF.Consignee IsNot Nothing Then
|
||||
' ' AES.anmeldert = DEXPDF.Consignee.Class
|
||||
' If DEXPDF.Consignee.Identification IsNot Nothing Then
|
||||
' If DEXPDF.Consignee.Identification.ReferenceNumber IsNot Nothing Then AES.aes_EmpfaengerTeilnehmerEORI = DEXPDF.Consignee.Identification.ReferenceNumber
|
||||
' If DEXPDF.Consignee.Identification.SubsidiaryNumber IsNot Nothing Then AES.aes_EmpfaengerTeilnehmerNLNR = DEXPDF.Consignee.Identification.SubsidiaryNumber
|
||||
' End If
|
||||
' If DEXPDF.Consignee.Name IsNot Nothing Then AES.aes_EmpfaengerTeilnehmerName = DEXPDF.Consignee.Name
|
||||
' If DEXPDF.Consignee.Address IsNot Nothing Then
|
||||
' If DEXPDF.Consignee.Address.Line IsNot Nothing Then AES.aes_EmpfaengerTeilnehmerStrasse = DEXPDF.Consignee.Address.Line
|
||||
' If DEXPDF.Consignee.Address.City IsNot Nothing Then AES.aes_EmpfaengerTeilnehmerOrt = DEXPDF.Consignee.Address.City
|
||||
' If DEXPDF.Consignee.Address.Postcode IsNot Nothing Then AES.aes_EmpfaengerTeilnehmerPLZ = DEXPDF.Consignee.Address.Postcode
|
||||
' If DEXPDF.Consignee.Address.Country IsNot Nothing Then AES.aes_EmpfaengerTeilnehmerLandCode = DEXPDF.Consignee.Address.Country
|
||||
' End If
|
||||
' End If
|
||||
|
||||
|
||||
' 'WAREN
|
||||
' AES.aes_WARENPOS.Clear()
|
||||
' If DEXPDF.GoodsItem IsNot Nothing Then
|
||||
' If DEXPDF.GoodsItem.Count > 0 Then
|
||||
' For Each WP In DEXPDF.GoodsItem
|
||||
' Dim AES_WP = New DAKOSY_Worker.cDakosy_AES_Warenposition
|
||||
' If WP.SequenceNumber IsNot Nothing Then AES_WP.aesWP_PositionsNummer = WP.SequenceNumber
|
||||
' If WP.GoodsDescription IsNot Nothing Then AES_WP.aesWP_Warenbezeichnung = WP.GoodsDescription
|
||||
' If WP.CommercialReferenceNumber IsNot Nothing Then AES_WP.aesWP_KennungSendung = WP.CommercialReferenceNumber
|
||||
' If WP.RegistrationNumber IsNot Nothing Then AES_WP.aesWP_RegisternummerFremdsystem = WP.RegistrationNumber
|
||||
' If WP.Annotation IsNot Nothing Then AES_WP.aesWP_Vermerk = WP.Annotation
|
||||
' AES_WP.aesWP_UrsprungsbundeslandCode = WP.OriginFederalState
|
||||
' AES_WP.aesWP_Eigenmasse = WP.NetMass
|
||||
' AES_WP.aesWP_Rohmasse = WP.GrossMass
|
||||
' If WP.DangerousGoodsCode IsNot Nothing Then AES_WP.aesWP_Gefahrgutnummer = WP.DangerousGoodsCode
|
||||
' If WP.TransportChargesPaymentMethod IsNot Nothing Then AES_WP.aesWP_ZahlungsweiseBefoerderungskosten = WP.TransportChargesPaymentMethod
|
||||
' If WP.CommodityCode IsNot Nothing Then
|
||||
' If WP.CommodityCode.CombinedNomenclatureCode IsNot Nothing Then AES_WP.aesWP_WarennummerKN8 = WP.CommodityCode.CombinedNomenclatureCode
|
||||
' If WP.CommodityCode.TaricCode IsNot Nothing Then AES_WP.aesWP_WarennummerTARIC = WP.CommodityCode.TaricCode
|
||||
' If WP.CommodityCode.TaricFirstAdditionalCode IsNot Nothing Then AES_WP.aesWP_WarennummerZusatz1 = WP.CommodityCode.TaricFirstAdditionalCode
|
||||
' If WP.CommodityCode.TaricSecondAdditionalCode IsNot Nothing Then AES_WP.aesWP_WarennummerZusatz2 = WP.CommodityCode.TaricSecondAdditionalCode
|
||||
' If WP.CommodityCode.NationalAdditionalCode IsNot Nothing Then AES_WP.aesWP_WarennummerNational = WP.CommodityCode.NationalAdditionalCode
|
||||
' End If
|
||||
' If WP.Procedure IsNot Nothing Then
|
||||
' If WP.Procedure.RequestedProcedure IsNot Nothing Then AES_WP.aesWP_VerfahrenAngemeldetCode = WP.Procedure.RequestedProcedure
|
||||
' If WP.Procedure.PreviousProcedure IsNot Nothing Then AES_WP.aesWP_VerfahrenVorangegangenCode = WP.Procedure.PreviousProcedure
|
||||
' If WP.Procedure.AdditionalProcedure IsNot Nothing Then AES_WP.aesWP_VerfahrenNationalCode = WP.Procedure.AdditionalProcedure
|
||||
' AES_WP.aesWP_AusfuhrerstattungVerfahrensCode = WP.Procedure.ExportRefundProcedure
|
||||
' End If
|
||||
' If WP.ForeignTradeStatistics IsNot Nothing Then
|
||||
' AES_WP.aesWP_Menge = WP.ForeignTradeStatistics.SpecialUnitQuantity
|
||||
' If WP.ForeignTradeStatistics.StatisticalValue IsNot Nothing Then AES_WP.aesWP_Wert = WP.ForeignTradeStatistics.StatisticalValue
|
||||
' End If
|
||||
|
||||
|
||||
' 'Empfaenger
|
||||
' If WP.Consignee IsNot Nothing Then
|
||||
' ' AES_WP.anmeldert = WP.Consignee.Class
|
||||
' If WP.Consignee.Identification IsNot Nothing Then
|
||||
' If WP.Consignee.Identification.ReferenceNumber IsNot Nothing Then AES_WP.aesWP_EmpfaengerTeilnehmerEORI = WP.Consignee.Identification.ReferenceNumber
|
||||
' If WP.Consignee.Identification.SubsidiaryNumber IsNot Nothing Then AES_WP.aesWP_EmpfaengerTeilnehmerNLNR = WP.Consignee.Identification.SubsidiaryNumber
|
||||
' End If
|
||||
' If WP.Consignee.Name IsNot Nothing Then AES_WP.aesWP_EmpfaengerTeilnehmerName = WP.Consignee.Name
|
||||
' If WP.Consignee.Address IsNot Nothing Then
|
||||
' If WP.Consignee.Address.Line IsNot Nothing Then AES_WP.aesWP_EmpfaengerTeilnehmerStrasse = WP.Consignee.Address.Line
|
||||
' If WP.Consignee.Address.City IsNot Nothing Then AES_WP.aesWP_EmpfaengerTeilnehmerOrt = WP.Consignee.Address.City
|
||||
' If WP.Consignee.Address.Postcode IsNot Nothing Then AES_WP.aesWP_EmpfaengerTeilnehmerPLZ = WP.Consignee.Address.Postcode
|
||||
' If WP.Consignee.Address.Country IsNot Nothing Then AES_WP.aesWP_EmpfaengerTeilnehmerLandCode = WP.Consignee.Address.Country
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' If WP.Container IsNot Nothing Then
|
||||
' If WP.Container.Count > 0 Then AES_WP.aesWP_Containernummer1 = WP.Container(0).IdentificationNumber
|
||||
' If WP.Container.Count > 1 Then AES_WP.aesWP_Containernummer2 = WP.Container(1).IdentificationNumber
|
||||
' If WP.Container.Count > 2 Then AES_WP.aesWP_Containernummer3 = WP.Container(2).IdentificationNumber
|
||||
' If WP.Container.Count > 3 Then AES_WP.aesWP_Containernummer4 = WP.Container(3).IdentificationNumber
|
||||
' End If
|
||||
|
||||
' 'PACKSTÜCKE
|
||||
' AES_WP.aesWP_PACKSTUECKE.Clear()
|
||||
' If WP.Package IsNot Nothing Then
|
||||
' For Each PKST In WP.Package
|
||||
' Dim AES_PKST = New DAKOSY_Worker.cDakosy_AES_WarenpositionPackstuecke
|
||||
' If PKST.Quantity IsNot Nothing Then AES_PKST.aesWpPk_PackstueckeAnzahl = PKST.Quantity
|
||||
' ' If PKST.SequenceNumber IsNot Nothing Then AES_PKST.nu = PKST.SequenceNumber
|
||||
' If PKST.Kind IsNot Nothing Then AES_PKST.aesWpPk_Verpackungsart = PKST.Kind
|
||||
' If PKST.MarksNumbers IsNot Nothing Then AES_PKST.aesWpPk_Kennzeichnung = PKST.MarksNumbers
|
||||
' AES_WP.aesWP_PACKSTUECKE.Add(AES_PKST)
|
||||
' Next
|
||||
' End If
|
||||
|
||||
|
||||
' 'UNTERLAGEN
|
||||
' AES_WP.aesWP_UNTERLAGEN.Clear()
|
||||
' If WP.Document IsNot Nothing Then
|
||||
' For Each UNT In WP.Document
|
||||
' Dim AES_UNT = New DAKOSY_Worker.cDakosy_AES_WarenpositionUnterlagen
|
||||
' If UNT.Qualifier IsNot Nothing Then AES_UNT.aesWpUl_QualifierCode = UNT.Qualifier
|
||||
' If UNT.Type IsNot Nothing Then AES_UNT.aesWpUl_Typ = UNT.Type
|
||||
' If UNT.ReferenceNumber IsNot Nothing Then AES_UNT.aesWpUl_ReferenzID = UNT.ReferenceNumber
|
||||
' If UNT.Complement IsNot Nothing Then AES_UNT.aesWpUl_Zusatz = UNT.Complement
|
||||
' If UNT.Detail IsNot Nothing Then AES_UNT.aesWpUl_Detail = UNT.Detail
|
||||
' AES_UNT.aesWpUl_DatumAusstellung = cEDI.isValidDateElseNothing(UNT.IssuingDate)
|
||||
' AES_UNT.aesWpUl_DatumEndeGueltigkeit = cEDI.isValidDateElseNothing(UNT.ExpiryDate)
|
||||
' If UNT.WriteOffValue IsNot Nothing Then AES_UNT.aesWpUl_Wert = UNT.WriteOffValue
|
||||
' AES_UNT.aesWpUl_Masseinheit = UNT.MeasurementUnit
|
||||
' AES_UNT.aesWpUl_Abschreibungsmenge = UNT.WriteOffQuantity
|
||||
' AES_WP.aesWP_UNTERLAGEN.Add(AES_UNT)
|
||||
' Next
|
||||
' End If
|
||||
' AES.aes_WARENPOS.Add(AES_WP)
|
||||
' Next
|
||||
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' End If
|
||||
AES.aes_Status = DAKOSY_Worker.cDY_Statusliste.S_05
|
||||
AES.aes_Status_KEWILL_Equivalent = DAKOSY_Worker.cDY_Statusliste.S_05
|
||||
If AES.SAVE_ALL() Then
|
||||
DAKOSY_Worker.cDakosy_Statusmeldungen.InsertStatusMeldung(DY_TMP, DAKOSY_Worker.cDY_Statusliste.S_05)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Try
|
||||
System.IO.File.Delete(p)
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace & vbNewLine & "Datei: " & Dateiname, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
|
||||
addDGVEinarbeitung("AES: AnmeldungAusfuhr", readAES_DEXPDF)
|
||||
|
||||
End Using
|
||||
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, Path.GetTempFileName & vbNewLine & ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
readAES_DEXPDF = ""
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Function readAES_DEXPSD(doc As XmlDocument) As String
|
||||
Try
|
||||
@@ -2267,6 +2721,79 @@ Public Class frmDYNachrichtenVerarbeitung
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
Function readAES_UeberlassungAusfuhr_007(d) As String
|
||||
Try
|
||||
|
||||
Dim AES As DAKOSY_Worker.UeberlassungAusfuhr_007.UeberlassungAusfuhrERTyp = DAKOSY_Worker.UeberlassungAusfuhr_007.UeberlassungAusfuhrERTyp.LoadFromFile(d)
|
||||
Dim ART = ""
|
||||
' Dim details = ""
|
||||
|
||||
Dim zp As Object = Nothing
|
||||
Dim regNR = ""
|
||||
Dim division = ""
|
||||
|
||||
readAES_UeberlassungAusfuhr_007 = ""
|
||||
If AES IsNot Nothing Then
|
||||
|
||||
If AES.Transaktion IsNot Nothing Then
|
||||
If AES.Transaktion.IODivision3 IsNot Nothing Then
|
||||
division = AES.Transaktion.IODivision3
|
||||
End If
|
||||
End If
|
||||
|
||||
If AES.EinzelUeberlassung IsNot Nothing AndAlso AES.EinzelUeberlassung.Count > 0 Then
|
||||
If AES.EinzelUeberlassung(0).ObjektIdentifizierung IsNot Nothing Then
|
||||
If AES.EinzelUeberlassung(0).ObjektIdentifizierung.ObjektName IsNot Nothing Then
|
||||
readAES_UeberlassungAusfuhr_007 = AES.EinzelUeberlassung(0).ObjektIdentifizierung.ObjektName
|
||||
End If
|
||||
zp = AES.EinzelUeberlassung(0).ObjektIdentifizierung.ZeitpunktEingang
|
||||
End If
|
||||
If AES.EinzelUeberlassung(0).KopfDaten IsNot Nothing Then
|
||||
' If AES.EinzelNichtAbschliessendeFestsetzung.KopfDaten.ArtErledigung IsNot Nothing Then
|
||||
'ART = AES.EinzelNichtAbschliessendeFestsetzung.KopfDaten.ArtErledigung
|
||||
' End If
|
||||
If AES.EinzelUeberlassung(0).KopfDaten.MovementReferenceNumber IsNot Nothing Then
|
||||
regNR = AES.EinzelUeberlassung(0).KopfDaten.MovementReferenceNumber
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
' AES.LOADByBezugsNr(bezugsNr, False) ' Falls schon ein DS mit dieser Bezugsnummer vorhanden ist.
|
||||
|
||||
If readAES_UeberlassungAusfuhr_007 <> "" And regNR <> "" Then 'BEZUGSNR vorhanden
|
||||
|
||||
Dim STATUS As DAKOSY_Worker.cDakosy_Statusmeldungen = getStatusCheckTransID(AES.Transaktion.IOReferenz, If(zp, AES.Transaktion.IODatumZeit))
|
||||
STATUS.dySt_BezugsNr = readAES_UeberlassungAusfuhr_007
|
||||
STATUS.dySt_artMitteilung = "UEA"
|
||||
STATUS.dySt_dyArt = "AES"
|
||||
|
||||
STATUS.dySt_status = DAKOSY_Worker.cDY_Statusliste.S_60
|
||||
STATUS.dySt_ergCode = "TSTMP"
|
||||
' STATUS.dySt_ergMitteilung = Reason
|
||||
' If tstmp IsNot Nothing Then STATUS.dySt_ergZeitpunkt = tstmp
|
||||
'EINTRAG IN tblDakosy_Zollanmeldungen
|
||||
Dim DY_TMP As DAKOSY_Worker.cDakosy_Zollanmeldungen = saveDY_ZA(STATUS, AES.Transaktion.IOReferenz, If(zp, AES.Transaktion.IODatumZeit), "AES")
|
||||
' Dim NCTS_TMP As DAKOSY_Worker.cDakosyNCTSOut = saveDY_NCTS(STATUS, DY_TMP, messageID, messageTstmp, , regNR)
|
||||
|
||||
Dim AES_TMP As DAKOSY_Worker.cDakosyAES = saveDY_AES(STATUS, DY_TMP, AES.Transaktion.IOReferenz, If(zp, AES.Transaktion.IODatumZeit), , regNR)
|
||||
|
||||
'SaveAES_FirmaNL(AES_TMP, "") 'KEINE NIEDERLASSUNG
|
||||
AES_TMP.insertIntoSpedBuch(DY_TMP)
|
||||
|
||||
If DY_TMP IsNot Nothing Then STATUS.dySt_dyId = DY_TMP.dy_Id
|
||||
STATUS.SAVE()
|
||||
|
||||
addDGVEinarbeitung("AES: Überlassung", STATUS.dySt_BezugsNr)
|
||||
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace & vbNewLine & "Datei: " & Dateiname, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
readAES_UeberlassungAusfuhr_007 = ""
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Function readAES_BestaetigungAusfuhr_006(d) As String
|
||||
Try
|
||||
|
||||
@@ -2338,6 +2865,77 @@ Public Class frmDYNachrichtenVerarbeitung
|
||||
readAES_BestaetigungAusfuhr_006 = ""
|
||||
End Try
|
||||
End Function
|
||||
Function readAES_BestaetigungAusfuhr_007(d) As String
|
||||
Try
|
||||
|
||||
Dim AES As DAKOSY_Worker.BestaetigungAusfuhr_007.BestaetigungAusfuhrENTyp = DAKOSY_Worker.BestaetigungAusfuhr_007.BestaetigungAusfuhrENTyp.LoadFromFile(d)
|
||||
Dim ART = ""
|
||||
' Dim details = ""
|
||||
|
||||
Dim zp As Object = Nothing
|
||||
Dim regNR = ""
|
||||
Dim division = ""
|
||||
|
||||
readAES_BestaetigungAusfuhr_007 = ""
|
||||
If AES IsNot Nothing Then
|
||||
|
||||
If AES.Transaktion IsNot Nothing Then
|
||||
If AES.Transaktion.IODivision3 IsNot Nothing Then
|
||||
division = AES.Transaktion.IODivision3
|
||||
End If
|
||||
End If
|
||||
|
||||
If AES.EinzelBestaetigung IsNot Nothing AndAlso AES.EinzelBestaetigung.Count > 0 Then
|
||||
If AES.EinzelBestaetigung(0).ObjektIdentifizierung IsNot Nothing Then
|
||||
If AES.EinzelBestaetigung(0).ObjektIdentifizierung.ObjektName IsNot Nothing Then
|
||||
readAES_BestaetigungAusfuhr_007 = AES.EinzelBestaetigung(0).ObjektIdentifizierung.ObjektName
|
||||
End If
|
||||
zp = AES.EinzelBestaetigung(0).ObjektIdentifizierung.ZeitpunktEingang
|
||||
End If
|
||||
If AES.EinzelBestaetigung(0).KopfDaten IsNot Nothing Then
|
||||
' If AES.EinzelNichtAbschliessendeFestsetzung.KopfDaten.ArtErledigung IsNot Nothing Then
|
||||
'ART = AES.EinzelNichtAbschliessendeFestsetzung.KopfDaten.ArtErledigung
|
||||
' End If
|
||||
If AES.EinzelBestaetigung(0).KopfDaten.MovementReferenceNumber IsNot Nothing Then
|
||||
regNR = AES.EinzelBestaetigung(0).KopfDaten.MovementReferenceNumber
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
' AES.LOADByBezugsNr(bezugsNr, False) ' Falls schon ein DS mit dieser Bezugsnummer vorhanden ist.
|
||||
|
||||
If readAES_BestaetigungAusfuhr_007 <> "" And regNR <> "" Then 'BEZUGSNR vorhanden
|
||||
|
||||
Dim STATUS As DAKOSY_Worker.cDakosy_Statusmeldungen = getStatusCheckTransID(AES.Transaktion.IOReferenz, If(zp, AES.Transaktion.IODatumZeit))
|
||||
STATUS.dySt_BezugsNr = readAES_BestaetigungAusfuhr_007
|
||||
STATUS.dySt_artMitteilung = "BST"
|
||||
STATUS.dySt_dyArt = "AES"
|
||||
|
||||
STATUS.dySt_status = DAKOSY_Worker.cDY_Statusliste.S_60
|
||||
STATUS.dySt_ergCode = "TSTMP"
|
||||
' STATUS.dySt_ergMitteilung = Reason
|
||||
' If tstmp IsNot Nothing Then STATUS.dySt_ergZeitpunkt = tstmp
|
||||
'EINTRAG IN tblDakosy_Zollanmeldungen
|
||||
Dim DY_TMP As DAKOSY_Worker.cDakosy_Zollanmeldungen = saveDY_ZA(STATUS, AES.Transaktion.IOReferenz, If(zp, AES.Transaktion.IODatumZeit), "AES")
|
||||
' Dim NCTS_TMP As DAKOSY_Worker.cDakosyNCTSOut = saveDY_NCTS(STATUS, DY_TMP, messageID, messageTstmp, , regNR)
|
||||
|
||||
Dim AES_TMP As DAKOSY_Worker.cDakosyAES = saveDY_AES(STATUS, DY_TMP, AES.Transaktion.IOReferenz, If(zp, AES.Transaktion.IODatumZeit), , regNR)
|
||||
|
||||
'SaveAES_FirmaNL(AES_TMP, "") 'KEINE NIEDERLASSUNG
|
||||
AES_TMP.insertIntoSpedBuch(DY_TMP)
|
||||
|
||||
If DY_TMP IsNot Nothing Then STATUS.dySt_dyId = DY_TMP.dy_Id
|
||||
STATUS.SAVE()
|
||||
|
||||
addDGVEinarbeitung("AES: BestätigunAusfuhr", STATUS.dySt_BezugsNr)
|
||||
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace & vbNewLine & "Datei: " & Dateiname, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
readAES_BestaetigungAusfuhr_007 = ""
|
||||
End Try
|
||||
End Function
|
||||
Function readAES_DEXPRE(doc As XmlDocument) As String
|
||||
Try
|
||||
readAES_DEXPRE = ""
|
||||
@@ -7944,6 +8542,199 @@ Public Class frmDYNachrichtenVerarbeitung
|
||||
End Function
|
||||
|
||||
|
||||
Function readEZA_Abgabenbescheid011(d, ByRef statusTMP) As String
|
||||
Try
|
||||
'VERAG_PROG_ALLGEMEIN.cAllgemein.ERR_OP_GLOBAL = VERAG_PROG_ALLGEMEIN.ERROR_OP.SHOW
|
||||
|
||||
Dim EZA As DAKOSY_Worker.Abgabenbescheid_011.AbgabenbescheidEinfuhrTAXTyp = DAKOSY_Worker.Abgabenbescheid_011.AbgabenbescheidEinfuhrTAXTyp.LoadFromFile(d)
|
||||
Dim regNr = ""
|
||||
Dim regDat = ""
|
||||
Dim details = ""
|
||||
Dim zoellner = ""
|
||||
Dim erledigung = ""
|
||||
Dim zp As Object = Nothing
|
||||
Dim EDIFACTNachrichtenNr = ""
|
||||
Dim AUFSCHUB As List(Of DAKOSY_Worker.cDakosy_EZA_Aufschub) = Nothing
|
||||
Dim division = ""
|
||||
|
||||
readEZA_Abgabenbescheid011 = ""
|
||||
If EZA IsNot Nothing Then
|
||||
|
||||
If EZA.Transaktion IsNot Nothing Then
|
||||
If EZA.Transaktion.IODivision3 IsNot Nothing Then
|
||||
division = EZA.Transaktion.IODivision3
|
||||
End If
|
||||
End If
|
||||
|
||||
If EZA.EinzelAbgabenbescheid IsNot Nothing Then
|
||||
|
||||
'Vorgezogen, damit firma/NL erkannt wird
|
||||
Dim STATUS As DAKOSY_Worker.cDakosy_Statusmeldungen = getStatusCheckTransID(EZA.Transaktion.IOReferenz, EZA.Transaktion.IODatumZeit)
|
||||
|
||||
|
||||
If EZA.EinzelAbgabenbescheid.ObjektIdentifizierung IsNot Nothing Then
|
||||
If EZA.EinzelAbgabenbescheid.ObjektIdentifizierung.ObjektName IsNot Nothing Then
|
||||
readEZA_Abgabenbescheid011 = EZA.EinzelAbgabenbescheid.ObjektIdentifizierung.ObjektName
|
||||
End If
|
||||
zp = EZA.EinzelAbgabenbescheid.ObjektIdentifizierung.ZeitpunktEingang
|
||||
If EZA.EinzelAbgabenbescheid.ObjektIdentifizierung.EDIFACTNachrichtenNr IsNot Nothing Then
|
||||
EDIFACTNachrichtenNr = EZA.EinzelAbgabenbescheid.ObjektIdentifizierung.EDIFACTNachrichtenNr
|
||||
End If
|
||||
End If
|
||||
|
||||
If EZA.EinzelAbgabenbescheid.KopfDaten IsNot Nothing Then
|
||||
If EZA.EinzelAbgabenbescheid.KopfDaten.Bearbeiter IsNot Nothing Then
|
||||
zoellner = EZA.EinzelAbgabenbescheid.KopfDaten.Bearbeiter
|
||||
End If
|
||||
|
||||
If EZA.EinzelAbgabenbescheid.KopfDaten.Registriernummer IsNot Nothing Then
|
||||
regNr = EZA.EinzelAbgabenbescheid.KopfDaten.Registriernummer
|
||||
End If
|
||||
If EZA.EinzelAbgabenbescheid.KopfDaten.ErledigungKopfKz IsNot Nothing Then
|
||||
erledigung = EZA.EinzelAbgabenbescheid.KopfDaten.ErledigungKopfKz
|
||||
End If
|
||||
' If EZA.EinzelAbgabenbescheid.KopfDaten.Registrierdatum IsNot Nothing Then
|
||||
regDat = EZA.EinzelAbgabenbescheid.KopfDaten.Registrierdatum
|
||||
'End If
|
||||
|
||||
If EZA.EinzelAbgabenbescheid.KopfDaten.AbgabenNachArt IsNot Nothing AndAlso EZA.EinzelAbgabenbescheid.KopfDaten.AbgabenNachArt.Count > 0 Then
|
||||
Dim a As New DAKOSY_Worker.cDakosy_EZA_Aufschub
|
||||
AUFSCHUB = New List(Of DAKOSY_Worker.cDakosy_EZA_Aufschub)
|
||||
For Each ABG In EZA.EinzelAbgabenbescheid.KopfDaten.AbgabenNachArt
|
||||
a.ezaAfb_ArtAufschubantrag = ABG.ArtAufschubAntrag
|
||||
a.ezaAfb_AufschubnehmerEORI = ABG.AufschubnehmerTIN
|
||||
a.ezaAfb_HZA = ABG.KennBuchstabenAufschub
|
||||
a.ezaAfb_KontoNr = ABG.AufschubkontoNr
|
||||
If ABG.Faelligkeit > CDate("01.01.2000") Then a.ezaAfb_Faelligkeit = ABG.Faelligkeit
|
||||
a.ezaAfb_Zahlungsart = ABG.Zahlungsart
|
||||
a.ezaAfb_Abgabenbetrag = ABG.Abgabenbetrag
|
||||
a.ezaAfb_AbgabeArt = ABG.AbgabeArt
|
||||
a.AufschubnehmerName = ABG.AufschubnehmerName
|
||||
'Select Case AbgabeArt
|
||||
' Case "B0000" 'EUST
|
||||
' Case "B0000" 'EUST
|
||||
'End Select
|
||||
Next
|
||||
AUFSCHUB.Add(a)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
If readEZA_Abgabenbescheid011 <> "" Then 'BEZUGSNR vorhanden
|
||||
STATUS.dySt_BezugsNr = readEZA_Abgabenbescheid011
|
||||
STATUS.dySt_artMitteilung = "AB"
|
||||
STATUS.dySt_dyArt = "EZA" '"EZA" 'T1/T2
|
||||
|
||||
Select Case erledigung
|
||||
Case "0" : STATUS.dySt_status = DAKOSY_Worker.cDY_Statusliste.S_69 'ungültig
|
||||
Case "1" : STATUS.dySt_status = DAKOSY_Worker.cDY_Statusliste.S_69 'ungültig
|
||||
Case "2" : STATUS.dySt_status = DAKOSY_Worker.cDY_Statusliste.S_69 'ungültig
|
||||
Case "3" : STATUS.dySt_status = DAKOSY_Worker.cDY_Statusliste.S_99 'unwirksam
|
||||
Case "4" : STATUS.dySt_status = DAKOSY_Worker.cDY_Statusliste.S_55 'nicht abschleißender Bescheid
|
||||
Case "5" : STATUS.dySt_status = DAKOSY_Worker.cDY_Statusliste.S_60
|
||||
Case "6" : STATUS.dySt_status = DAKOSY_Worker.cDY_Statusliste.S_60
|
||||
Case "7" : STATUS.dySt_status = DAKOSY_Worker.cDY_Statusliste.S_68 'Abgabe HZS
|
||||
Case "8" : STATUS.dySt_status = DAKOSY_Worker.cDY_Statusliste.S_61 'Erledigung außerhalb d. SB
|
||||
End Select
|
||||
|
||||
STATUS.dySt_ergCode = "REGNr"
|
||||
STATUS.dySt_ergMitteilung = regNr
|
||||
STATUS.dySt_ergZeitpunkt = zp
|
||||
STATUS.dySt_ergZoellner = zoellner
|
||||
STATUS.dySt_ergDetails = details
|
||||
'EINTRAG IN tblDakosy_Zollanmeldungen
|
||||
|
||||
Dim EZA_TMP As DAKOSY_Worker.cDakosyEZA
|
||||
|
||||
|
||||
|
||||
Dim DY_TMP As DAKOSY_Worker.cDakosy_Zollanmeldungen = saveDY_ZA(STATUS, EZA.Transaktion.IOReferenz, If(zp, EZA.Transaktion.IODatumZeit), "EZA")
|
||||
|
||||
If regNr <> "" Then
|
||||
EZA_TMP = saveDY_EZA(STATUS, DY_TMP, EZA.Transaktion.IOReferenz, If(zp, EZA.Transaktion.IODatumZeit), regNr)
|
||||
Else
|
||||
EZA_TMP = saveDY_EZA(STATUS, DY_TMP, EZA.Transaktion.IOReferenz, If(zp, EZA.Transaktion.IODatumZeit))
|
||||
End If
|
||||
|
||||
|
||||
Dim firma = ""
|
||||
Dim nl = ""
|
||||
SaveEZA_FirmaNL(EZA_TMP, DY_TMP, division, firma, nl)
|
||||
|
||||
If AUFSCHUB IsNot Nothing And EZA_TMP IsNot Nothing Then
|
||||
EZA_TMP.eza_AUFSCHUB.Clear()
|
||||
For Each a In AUFSCHUB
|
||||
a.ezaAfb_EZAId = EZA_TMP.eza_Id
|
||||
Next
|
||||
EZA_TMP.eza_AUFSCHUB = AUFSCHUB
|
||||
EZA_TMP.SAVE_Aufschub()
|
||||
|
||||
cVERAG_out_eza.copyFileFTP_VERAGEZA_DY(EZA_TMP, DY_TMP) ' SCHNITTSTELLE FTP BEREITSTELLEN
|
||||
'RAISE-API-EVENT/TRIGGER ??
|
||||
End If
|
||||
|
||||
' ------------------------------------------------------------------------------
|
||||
' wenn nicht abschliebender Abgabenbescheid --> Infomail an die Zollbüros!
|
||||
Select Case erledigung
|
||||
Case "4"
|
||||
STATUS.dySt_status = DAKOSY_Worker.cDY_Statusliste.S_55 'nicht abschleißender Bescheid
|
||||
Dim MailTo = "eu@verag.ag"
|
||||
Select Case EZA_TMP.eza_firma
|
||||
Case "IMEX" : MailTo = "info@imex-group.at"
|
||||
Case "ATILLA" : MailTo = "atilla@verag.ag"
|
||||
Case "UNISPED" : MailTo = "office@unisped.at"
|
||||
Case "VERAG"
|
||||
Select Case EZA_TMP.eza_niederlassung
|
||||
Case "WAI" : MailTo = "waidhaus@verag.com"
|
||||
Case "SBG" : MailTo = "de@verag.ag"
|
||||
End Select
|
||||
End Select
|
||||
VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail(MailTo, "MITTEILUNG ZOLL: Nicht abschließender Abgebenbescheid - " & readEZA_Abgabenbescheid011,
|
||||
"Meldung über <b>nicht abschließenden Abgabenbescheid</b> bei der Bezugsnummer: <b>" & readEZA_Abgabenbescheid011 & "</b><br><br>Firma: " & EZA_TMP.eza_firma & "Niederlassung: " & EZA_TMP.eza_niederlassung & "<br><br>Automatisch generiertes E-Mail.",
|
||||
, True, True)
|
||||
'Case "5"
|
||||
' STATUS.dySt_status = DAKOSY_Worker.cDY_Statusliste.S_55 'nicht abschleißender Bescheid
|
||||
' Dim MailTo = "al@verag.ag"
|
||||
|
||||
' VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail(MailTo, "MITTEILUNG ZOLL: Nicht abschließender Abgebenbescheid - " & readEZA_Abgabenbescheid,
|
||||
' "Meldung über <b>abschließenden Abgabenbescheid</b> bei der Bezugsnummer: <b>" & readEZA_Abgabenbescheid & "</b><br><br>Firma: " & EZA_TMP.eza_firma & "Niederlassung: " & EZA_TMP.eza_niederlassung & "<br><br>Automatisch generiertes E-Mail.",
|
||||
' , True, True)
|
||||
|
||||
End Select
|
||||
' ------------------------------------------------------------------------------
|
||||
|
||||
If DY_TMP IsNot Nothing Then STATUS.dySt_dyId = DY_TMP.dy_Id
|
||||
STATUS.SAVE()
|
||||
|
||||
If EZA IsNot Nothing AndAlso EZA.EinzelAbgabenbescheid.KopfDaten IsNot Nothing Then
|
||||
InsertAbgaben(EZA, division, STATUS, DY_TMP, regNr, readEZA_Abgabenbescheid011, regDat, firma, nl, EDIFACTNachrichtenNr)
|
||||
End If
|
||||
|
||||
|
||||
'Status aktualisieren
|
||||
saveDY_EZA(STATUS, DY_TMP, EZA.Transaktion.IOReferenz, If(zp, EZA.Transaktion.IODatumZeit), regNr)
|
||||
statusTMP = STATUS
|
||||
EZA_TMP.insertIntoSpedBuch(DY_TMP)
|
||||
|
||||
|
||||
addDGVEinarbeitung("EZA: Abgabenbescheid", STATUS.dySt_BezugsNr)
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
' EZA.LOADByBezugsNr(bezugsNr, False) ' Falls schon ein DS mit dieser Bezugsnummer vorhanden ist.
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace & vbNewLine & "Datei: " & Dateiname, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
readEZA_Abgabenbescheid011 = ""
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
Function InsertAbgaben(EZA, division, STATUS, DY_TMP, regNr, Bezugsnummer, regDat, firma, nl, EDIFACTNachrichtenNr)
|
||||
Dim EZA_TMP As DAKOSY_Worker.cDakosyEZA = saveDY_EZA(STATUS, DY_TMP, EZA.Transaktion.IOReferenz, EZA.Transaktion.IODatumZeit, regNr)
|
||||
If EZA.EinzelAbgabenbescheid.KopfDaten.AbgabenNachArt IsNot Nothing Then
|
||||
|
||||
Reference in New Issue
Block a user