NCTS_TR CC015B, ATLAS Codelisten, BugFixes DY Nachrichtenverarbeitung, EZOLL: Zollbeleg versenden

This commit is contained in:
2023-03-06 22:04:21 +01:00
parent bdcac48401
commit 6dd614544d
14 changed files with 969 additions and 625 deletions

View File

@@ -4,6 +4,7 @@ Imports System.Xml
Imports Renci.SshNet
Imports System.Net.Mail
Imports GrapeCity.Enterprise.Data.DataEngine.DataProcessing
Imports DocumentFormat.OpenXml.Wordprocessing
Public Class frmDYNachrichtenVerarbeitung
Dim cntDatenEingelesen As Integer = 0
@@ -4197,121 +4198,121 @@ Public Class frmDYNachrichtenVerarbeitung
'Versender/Ausführer
If FCFCDF.Body IsNot Nothing AndAlso FCFCDF.Body.Consignor IsNot Nothing Then
Dim ADR As New DAKOSY_Worker.cDakosy_EZA_Adressen
ADR.ezaAd_AdressTyp = "CZ"
If FCFCDF.Body.Consignor.Name IsNot Nothing Then
If FCFCDF.Body.Consignor.Name.ToString.Length > 40 Then
If FCFCDF.Body.Consignor.Name.ToString.Length > 80 Then
ADR.ezaAd_NameFirma1 = FCFCDF.Body.Consignor.Name.ToString.Substring(0, 40)
ADR.ezaAd_NameFirma2 = FCFCDF.Body.Consignor.Name.ToString.Substring(40, 40)
ADR.ezaAd_NameFirma3 = FCFCDF.Body.Consignor.Name.ToString.Substring(80, FCFCDF.Body.Consignor.Name.ToString.Length - 80)
End If
Dim ADR As New DAKOSY_Worker.cDakosy_EZA_Adressen
ADR.ezaAd_AdressTyp = "CZ"
If FCFCDF.Body.Consignor.Name IsNot Nothing Then
If FCFCDF.Body.Consignor.Name.ToString.Length > 40 Then
If FCFCDF.Body.Consignor.Name.ToString.Length > 80 Then
ADR.ezaAd_NameFirma1 = FCFCDF.Body.Consignor.Name.ToString.Substring(0, 40)
ADR.ezaAd_NameFirma2 = FCFCDF.Body.Consignor.Name.ToString.Substring(40, FCFCDF.Body.Consignor.Name.ToString.Length - 40)
Else
ADR.ezaAd_NameFirma1 = FCFCDF.Body.Consignor.Name
ADR.ezaAd_NameFirma2 = FCFCDF.Body.Consignor.Name.ToString.Substring(40, 40)
ADR.ezaAd_NameFirma3 = FCFCDF.Body.Consignor.Name.ToString.Substring(80, FCFCDF.Body.Consignor.Name.ToString.Length - 80)
End If
ADR.ezaAd_NameFirma1 = FCFCDF.Body.Consignor.Name.ToString.Substring(0, 40)
ADR.ezaAd_NameFirma2 = FCFCDF.Body.Consignor.Name.ToString.Substring(40, FCFCDF.Body.Consignor.Name.ToString.Length - 40)
Else
ADR.ezaAd_NameFirma1 = FCFCDF.Body.Consignor.Name
End If
If FCFCDF.Body.Consignor.Identification IsNot Nothing Then
ADR.ezaAd_TeilnehmerEORI = FCFCDF.Body.Consignor.Identification.ReferenceNumber
' ADR.ezaAd_TeilnehmerNLNR = FCFCDF.Body.Consignor.Identification.SubsidiaryNumber
End If
If FCFCDF.Body.Consignor.Address IsNot Nothing Then
ADR.ezaAd_StrasseHausNr1 = FCFCDF.Body.Consignor.Address.Line
ADR.ezaAd_StrasseHausNr2 = Nothing
ADR.ezaAd_Ort = FCFCDF.Body.Consignor.Address.City
ADR.ezaAd_PLZ = FCFCDF.Body.Consignor.Address.Postcode
ADR.ezaAd_LandCode = FCFCDF.Body.Consignor.Address.Country
End If
EZA.eza_ADRESSEN.Add(ADR)
End If
'Verkäufer
If FCFCDF.Body IsNot Nothing AndAlso FCFCDF.Body.CustomsValue IsNot Nothing AndAlso FCFCDF.Body.CustomsValue.Vendor IsNot Nothing Then
Dim ADR As New DAKOSY_Worker.cDakosy_EZA_Adressen
ADR.ezaAd_AdressTyp = "SE"
If FCFCDF.Body.CustomsValue.Vendor.Name IsNot Nothing Then
If FCFCDF.Body.CustomsValue.Vendor.Name.ToString.Length > 40 Then
If FCFCDF.Body.CustomsValue.Vendor.Name.ToString.Length > 80 Then
ADR.ezaAd_NameFirma1 = FCFCDF.Body.CustomsValue.Vendor.Name.ToString.Substring(0, 40)
ADR.ezaAd_NameFirma2 = FCFCDF.Body.CustomsValue.Vendor.Name.ToString.Substring(40, 40)
ADR.ezaAd_NameFirma3 = FCFCDF.Body.CustomsValue.Vendor.Name.ToString.Substring(80, FCFCDF.Body.CustomsValue.Vendor.Name.ToString.Length - 80)
End If
ADR.ezaAd_NameFirma1 = FCFCDF.Body.CustomsValue.Vendor.Name.ToString.Substring(0, 40)
ADR.ezaAd_NameFirma2 = FCFCDF.Body.CustomsValue.Vendor.Name.ToString.Substring(40, FCFCDF.Body.CustomsValue.Vendor.Name.ToString.Length - 40)
Else
ADR.ezaAd_NameFirma1 = FCFCDF.Body.CustomsValue.Vendor.Name
End If
End If
If FCFCDF.Body.CustomsValue.Vendor.Identification IsNot Nothing Then
ADR.ezaAd_TeilnehmerEORI = FCFCDF.Body.CustomsValue.Vendor.Identification.ReferenceNumber
'ADR.ezaAd_TeilnehmerNLNR = FCFCDF.Body.CustomsValue.Vendor.Identification.SubsidiaryNumber
End If
If FCFCDF.Body.CustomsValue.Vendor.Address IsNot Nothing Then
ADR.ezaAd_StrasseHausNr1 = FCFCDF.Body.CustomsValue.Vendor.Address.Line
ADR.ezaAd_StrasseHausNr2 = Nothing
ADR.ezaAd_Ort = FCFCDF.Body.CustomsValue.Vendor.Address.City
ADR.ezaAd_PLZ = FCFCDF.Body.CustomsValue.Vendor.Address.Postcode
ADR.ezaAd_LandCode = FCFCDF.Body.CustomsValue.Vendor.Address.Country
End If
EZA.eza_ADRESSEN.Add(ADR)
If FCFCDF.Body.Consignor.Identification IsNot Nothing Then
ADR.ezaAd_TeilnehmerEORI = FCFCDF.Body.Consignor.Identification.ReferenceNumber
' ADR.ezaAd_TeilnehmerNLNR = FCFCDF.Body.Consignor.Identification.SubsidiaryNumber
End If
'Käufer
If FCFCDF.Body IsNot Nothing AndAlso FCFCDF.Body.CustomsValue IsNot Nothing AndAlso FCFCDF.Body.CustomsValue.Vendee IsNot Nothing Then
Dim ADR As New DAKOSY_Worker.cDakosy_EZA_Adressen
ADR.ezaAd_AdressTyp = "BY"
If FCFCDF.Body.CustomsValue.Vendee.Name IsNot Nothing Then
If FCFCDF.Body.CustomsValue.Vendee.Name.ToString.Length > 40 Then
If FCFCDF.Body.CustomsValue.Vendee.Name.ToString.Length > 80 Then
ADR.ezaAd_NameFirma1 = FCFCDF.Body.CustomsValue.Vendee.Name.ToString.Substring(0, 40)
ADR.ezaAd_NameFirma2 = FCFCDF.Body.CustomsValue.Vendee.Name.ToString.Substring(40, 40)
ADR.ezaAd_NameFirma3 = FCFCDF.Body.CustomsValue.Vendee.Name.ToString.Substring(80, FCFCDF.Body.CustomsValue.Vendee.Name.ToString.Length - 80)
End If
ADR.ezaAd_NameFirma1 = FCFCDF.Body.CustomsValue.Vendee.Name.ToString.Substring(0, 40)
ADR.ezaAd_NameFirma2 = FCFCDF.Body.CustomsValue.Vendee.Name.ToString.Substring(40, FCFCDF.Body.CustomsValue.Vendee.Name.ToString.Length - 40)
Else
ADR.ezaAd_NameFirma1 = FCFCDF.Body.CustomsValue.Vendee.Name
End If
End If
If FCFCDF.Body.CustomsValue.Vendee.Identification IsNot Nothing Then
ADR.ezaAd_TeilnehmerEORI = FCFCDF.Body.CustomsValue.Vendee.Identification.ReferenceNumber
'ADR.ezaAd_TeilnehmerNLNR = FCFCDF.Body.CustomsValue.Vendee.Identification.SubsidiaryNumber
End If
If FCFCDF.Body.CustomsValue.Vendee.Address IsNot Nothing Then
ADR.ezaAd_StrasseHausNr1 = FCFCDF.Body.CustomsValue.Vendee.Address.Line
ADR.ezaAd_StrasseHausNr2 = Nothing
ADR.ezaAd_Ort = FCFCDF.Body.CustomsValue.Vendee.Address.City
ADR.ezaAd_PLZ = FCFCDF.Body.CustomsValue.Vendee.Address.Postcode
ADR.ezaAd_LandCode = FCFCDF.Body.CustomsValue.Vendee.Address.Country
End If
EZA.eza_ADRESSEN.Add(ADR)
If FCFCDF.Body.Consignor.Address IsNot Nothing Then
ADR.ezaAd_StrasseHausNr1 = FCFCDF.Body.Consignor.Address.Line
ADR.ezaAd_StrasseHausNr2 = Nothing
ADR.ezaAd_Ort = FCFCDF.Body.Consignor.Address.City
ADR.ezaAd_PLZ = FCFCDF.Body.Consignor.Address.Postcode
ADR.ezaAd_LandCode = FCFCDF.Body.Consignor.Address.Country
End If
EZA.eza_ADRESSEN.Add(ADR)
End If
'Verkäufer
If FCFCDF.Body IsNot Nothing AndAlso FCFCDF.Body.CustomsValue IsNot Nothing AndAlso FCFCDF.Body.CustomsValue.Vendor IsNot Nothing Then
Dim ADR As New DAKOSY_Worker.cDakosy_EZA_Adressen
ADR.ezaAd_AdressTyp = "SE"
If FCFCDF.Body.CustomsValue.Vendor.Name IsNot Nothing Then
If FCFCDF.Body.CustomsValue.Vendor.Name.ToString.Length > 40 Then
If FCFCDF.Body.CustomsValue.Vendor.Name.ToString.Length > 80 Then
ADR.ezaAd_NameFirma1 = FCFCDF.Body.CustomsValue.Vendor.Name.ToString.Substring(0, 40)
ADR.ezaAd_NameFirma2 = FCFCDF.Body.CustomsValue.Vendor.Name.ToString.Substring(40, 40)
ADR.ezaAd_NameFirma3 = FCFCDF.Body.CustomsValue.Vendor.Name.ToString.Substring(80, FCFCDF.Body.CustomsValue.Vendor.Name.ToString.Length - 80)
End If
ADR.ezaAd_NameFirma1 = FCFCDF.Body.CustomsValue.Vendor.Name.ToString.Substring(0, 40)
ADR.ezaAd_NameFirma2 = FCFCDF.Body.CustomsValue.Vendor.Name.ToString.Substring(40, FCFCDF.Body.CustomsValue.Vendor.Name.ToString.Length - 40)
Else
ADR.ezaAd_NameFirma1 = FCFCDF.Body.CustomsValue.Vendor.Name
End If
End If
If FCFCDF.Body.CustomsValue.Vendor.Identification IsNot Nothing Then
ADR.ezaAd_TeilnehmerEORI = FCFCDF.Body.CustomsValue.Vendor.Identification.ReferenceNumber
'ADR.ezaAd_TeilnehmerNLNR = FCFCDF.Body.CustomsValue.Vendor.Identification.SubsidiaryNumber
End If
If FCFCDF.Body.CustomsValue.Vendor.Address IsNot Nothing Then
ADR.ezaAd_StrasseHausNr1 = FCFCDF.Body.CustomsValue.Vendor.Address.Line
ADR.ezaAd_StrasseHausNr2 = Nothing
ADR.ezaAd_Ort = FCFCDF.Body.CustomsValue.Vendor.Address.City
ADR.ezaAd_PLZ = FCFCDF.Body.CustomsValue.Vendor.Address.Postcode
ADR.ezaAd_LandCode = FCFCDF.Body.CustomsValue.Vendor.Address.Country
End If
EZA.eza_ADRESSEN.Add(ADR)
End If
'Käufer
If FCFCDF.Body IsNot Nothing AndAlso FCFCDF.Body.CustomsValue IsNot Nothing AndAlso FCFCDF.Body.CustomsValue.Vendee IsNot Nothing Then
Dim ADR As New DAKOSY_Worker.cDakosy_EZA_Adressen
ADR.ezaAd_AdressTyp = "BY"
If FCFCDF.Body.CustomsValue.Vendee.Name IsNot Nothing Then
If FCFCDF.Body.CustomsValue.Vendee.Name.ToString.Length > 40 Then
If FCFCDF.Body.CustomsValue.Vendee.Name.ToString.Length > 80 Then
ADR.ezaAd_NameFirma1 = FCFCDF.Body.CustomsValue.Vendee.Name.ToString.Substring(0, 40)
ADR.ezaAd_NameFirma2 = FCFCDF.Body.CustomsValue.Vendee.Name.ToString.Substring(40, 40)
ADR.ezaAd_NameFirma3 = FCFCDF.Body.CustomsValue.Vendee.Name.ToString.Substring(80, FCFCDF.Body.CustomsValue.Vendee.Name.ToString.Length - 80)
End If
ADR.ezaAd_NameFirma1 = FCFCDF.Body.CustomsValue.Vendee.Name.ToString.Substring(0, 40)
ADR.ezaAd_NameFirma2 = FCFCDF.Body.CustomsValue.Vendee.Name.ToString.Substring(40, FCFCDF.Body.CustomsValue.Vendee.Name.ToString.Length - 40)
Else
ADR.ezaAd_NameFirma1 = FCFCDF.Body.CustomsValue.Vendee.Name
End If
End If
If FCFCDF.Body.CustomsValue.Vendee.Identification IsNot Nothing Then
ADR.ezaAd_TeilnehmerEORI = FCFCDF.Body.CustomsValue.Vendee.Identification.ReferenceNumber
'ADR.ezaAd_TeilnehmerNLNR = FCFCDF.Body.CustomsValue.Vendee.Identification.SubsidiaryNumber
End If
If FCFCDF.Body.CustomsValue.Vendee.Address IsNot Nothing Then
ADR.ezaAd_StrasseHausNr1 = FCFCDF.Body.CustomsValue.Vendee.Address.Line
ADR.ezaAd_StrasseHausNr2 = Nothing
ADR.ezaAd_Ort = FCFCDF.Body.CustomsValue.Vendee.Address.City
ADR.ezaAd_PLZ = FCFCDF.Body.CustomsValue.Vendee.Address.Postcode
ADR.ezaAd_LandCode = FCFCDF.Body.CustomsValue.Vendee.Address.Country
End If
EZA.eza_ADRESSEN.Add(ADR)
End If
End If
''Zollwertanmelder
'ADRTMP = cEDI.getValuesFromLine(cEDI.getSimpleLine("NAD+PQ++", lines, , False))
'If ADRTMP.Length > 0 Then EZA.eza_ADRESSEN.Add(getEZAAresseFromLine(ADRTMP, "PQ"))
''Zollwertanmelder
'ADRTMP = cEDI.getValuesFromLine(cEDI.getSimpleLine("NAD+PQ++", lines, , False))
'If ADRTMP.Length > 0 Then EZA.eza_ADRESSEN.Add(getEZAAresseFromLine(ADRTMP, "PQ"))
''Vertr. Zollwertanmelder
'ADRTMP = cEDI.getValuesFromLine(cEDI.getSimpleLine("NAD+AG++", lines, , False))
'If ADRTMP.Length > 0 Then EZA.eza_ADRESSEN.Add(getEZAAresseFromLine(ADRTMP, "AG"))
''Vertr. Zollwertanmelder
'ADRTMP = cEDI.getValuesFromLine(cEDI.getSimpleLine("NAD+AG++", lines, , False))
'If ADRTMP.Length > 0 Then EZA.eza_ADRESSEN.Add(getEZAAresseFromLine(ADRTMP, "AG"))
''Rechnung
'ADRTMP = cEDI.getValuesFromLine(cEDI.getSimpleLine("NAD+AA++", lines))
'If ADRTMP.Length > 0 Then EZA.eza_ADRESSEN.Add(getEZAAresseFromLine(ADRTMP, "AA"))
''Rechnung
'ADRTMP = cEDI.getValuesFromLine(cEDI.getSimpleLine("NAD+AA++", lines))
'If ADRTMP.Length > 0 Then EZA.eza_ADRESSEN.Add(getEZAAresseFromLine(ADRTMP, "AA"))
''Postfachadresse
'ADRTMP = cEDI.getValuesFromLine(cEDI.getSimpleLine("NAD+AAP++", lines))
'If ADRTMP.Length > 0 Then EZA.eza_ADRESSEN.Add(getEZAAresseFromLine(ADRTMP, "AAP"))
''--
''Postfachadresse
'ADRTMP = cEDI.getValuesFromLine(cEDI.getSimpleLine("NAD+AAP++", lines))
'If ADRTMP.Length > 0 Then EZA.eza_ADRESSEN.Add(getEZAAresseFromLine(ADRTMP, "AAP"))
''--
'AUFSCHUB
If FCFCDF.DutyDefermentApproval IsNot Nothing AndAlso FCFCDF.DutyDefermentApproval.Count > 0 Then
'AUFSCHUB
If FCFCDF.DutyDefermentApproval IsNot Nothing AndAlso FCFCDF.DutyDefermentApproval.Count > 0 Then
For Each TMP In FCFCDF.DutyDefermentApproval
Dim AUFSCHUB As New DAKOSY_Worker.cDakosy_EZA_Aufschub
If TMP.DutyDefermentApplicant IsNot Nothing AndAlso TMP.DutyDefermentApplicant.Identification IsNot Nothing Then
@@ -4589,20 +4590,20 @@ Public Class frmDYNachrichtenVerarbeitung
If FCFCDC.Header IsNot Nothing Then
EZA.eza_VersendungsLandCode = FCFCDC.Header.DepartureCountry
EZA.eza_FinanzamtAnmelder = FCFCDC.Header.TaxOffice
EZA.eza_UstIdAnmelder = FCFCDC.Header.TaxNumber
EZA.eza_VersendungsLandCode = FCFCDC.Header.DepartureCountry
EZA.eza_FinanzamtAnmelder = FCFCDC.Header.TaxOffice
EZA.eza_UstIdAnmelder = FCFCDC.Header.TaxNumber
EZA.eza_Warenort = FCFCDC.Header.GoodsLocation
EZA.eza_Ausstellungsort = FCFCDC.Header.DeclarationPlace
EZA.eza_Warenort = FCFCDC.Header.GoodsLocation
EZA.eza_Ausstellungsort = FCFCDC.Header.DeclarationPlace
EZA.eza_ZollrechtlicherStatus = FCFCDC.Header.CustomsGoodsStatus
EZA.eza_Zahlungsart = FCFCDC.Header.PaymentMethod
EZA.eza_AnmelderistEmpfaenger = FCFCDC.Header.DeclarantIsConsigneeFlag
EZA.eza_VertretungsVerhaeltnisCode = FCFCDC.Header.RepresentativeRelationshipFlag
EZA.eza_Vorsteuerabzug = FCFCDC.Header.InputTaxDeductionFlag
EZA.eza_ZusatzangabenAnmeldung = FCFCDC.Header.AdditionalInformation
EZA.eza_ZollrechtlicherStatus = FCFCDC.Header.CustomsGoodsStatus
EZA.eza_Zahlungsart = FCFCDC.Header.PaymentMethod
EZA.eza_AnmelderistEmpfaenger = FCFCDC.Header.DeclarantIsConsigneeFlag
EZA.eza_VertretungsVerhaeltnisCode = FCFCDC.Header.RepresentativeRelationshipFlag
EZA.eza_Vorsteuerabzug = FCFCDC.Header.InputTaxDeductionFlag
EZA.eza_ZusatzangabenAnmeldung = FCFCDC.Header.AdditionalInformation
' EZA.eza_VerfahrenBeantragtCode
End If
@@ -4627,45 +4628,45 @@ Public Class frmDYNachrichtenVerarbeitung
End If
If FCFCDC.Body.PaymentTransaction IsNot Nothing Then
EZA.eza_Rechnungswaehrung = FCFCDC.Body.PaymentTransaction.CurrencyCode
EZA.eza_Rechnungspreis = FCFCDC.Body.PaymentTransaction.Amount
EZA.eza_Rechnungswaehrung = FCFCDC.Body.PaymentTransaction.CurrencyCode
EZA.eza_Rechnungspreis = FCFCDC.Body.PaymentTransaction.Amount
End If
End If
If FCFCDC.Body.CustomsValue IsNot Nothing Then
If FCFCDC.Body.CustomsValue.RestrictionOrCondition IsNot Nothing Then EZA.eza_DV1EinschraenkungenKz = FCFCDC.Body.CustomsValue.RestrictionOrCondition.RestrictionFlag
EZA.eza_DV1FruehereEntscheidungen = FCFCDC.Body.CustomsValue.FormerDecisions
If FCFCDC.Body.CustomsValue IsNot Nothing Then
If FCFCDC.Body.CustomsValue.RestrictionOrCondition IsNot Nothing Then EZA.eza_DV1EinschraenkungenKz = FCFCDC.Body.CustomsValue.RestrictionOrCondition.RestrictionFlag
EZA.eza_DV1FruehereEntscheidungen = FCFCDC.Body.CustomsValue.FormerDecisions
If FCFCDC.Body.CustomsValue.Affiliation IsNot Nothing Then EZA.eza_DV1Verbundenheit = FCFCDC.Body.CustomsValue.Affiliation.Type
If FCFCDC.Body.CustomsValue.Affiliation IsNot Nothing Then EZA.eza_DV1VerbungenheitEinzelheiten = FCFCDC.Body.CustomsValue.Affiliation.Description
If FCFCDC.Body.CustomsValue.LicenseFee IsNot Nothing Then EZA.eza_DV1LizenzgebuehrenUmstand = FCFCDC.Body.CustomsValue.LicenseFee.Description
If FCFCDC.Body.CustomsValue.LicenseFee IsNot Nothing Then EZA.eza_DV1LizenzgebuehrenKz = FCFCDC.Body.CustomsValue.LicenseFee.LicenseFeeFlag
End If
If FCFCDC.Body.CustomsValue.Affiliation IsNot Nothing Then EZA.eza_DV1Verbundenheit = FCFCDC.Body.CustomsValue.Affiliation.Type
If FCFCDC.Body.CustomsValue.Affiliation IsNot Nothing Then EZA.eza_DV1VerbungenheitEinzelheiten = FCFCDC.Body.CustomsValue.Affiliation.Description
If FCFCDC.Body.CustomsValue.LicenseFee IsNot Nothing Then EZA.eza_DV1LizenzgebuehrenUmstand = FCFCDC.Body.CustomsValue.LicenseFee.Description
If FCFCDC.Body.CustomsValue.LicenseFee IsNot Nothing Then EZA.eza_DV1LizenzgebuehrenKz = FCFCDC.Body.CustomsValue.LicenseFee.LicenseFeeFlag
End If
If FCFCDC.Body.Document IsNot Nothing AndAlso FCFCDC.Body.Document.Count > 0 Then
For Each docTMP In FCFCDC.Body.Document
Dim UNTERLAGE As New DAKOSY_Worker.cDakosy_EZA_Unterlagen
UNTERLAGE.ezaUl_Art = docTMP.Type
UNTERLAGE.ezaUl_Nummer = docTMP.ReferenceNumber
UNTERLAGE.ezaUl_Bereich = docTMP.Division
If FCFCDC.Body.Document IsNot Nothing AndAlso FCFCDC.Body.Document.Count > 0 Then
For Each docTMP In FCFCDC.Body.Document
Dim UNTERLAGE As New DAKOSY_Worker.cDakosy_EZA_Unterlagen
UNTERLAGE.ezaUl_Art = docTMP.Type
UNTERLAGE.ezaUl_Nummer = docTMP.ReferenceNumber
UNTERLAGE.ezaUl_Bereich = docTMP.Division
UNTERLAGE.ezaUl_DatumAusstellung = CDate(docTMP.IssuingDate).ToShortDateString
EZA.eza_UNTERLAGEN.Add(UNTERLAGE)
Next
Next
End If
End If
' EZA.eza_DV1Verbundenheit = cEDI.getSimpleLine("GIS+904:::", lines, Nothing)???
' EZA.eza_BewilligungsIDZLAVUV = cEDI.getSimpleLine("RFF+AEM:", lines) '?
' EZA.eza_DV1Verbundenheit = cEDI.getSimpleLine("GIS+904:::", lines, Nothing)???
' EZA.eza_BewilligungsIDZLAVUV = cEDI.getSimpleLine("RFF+AEM:", lines) '?
'Vorpapier
If FCFCDC.PreviousAdministrativeReferences IsNot Nothing Then
EZA.eza_VorpapierArtCode = FCFCDC.PreviousAdministrativeReferences.Type
'Vorpapier
If FCFCDC.PreviousAdministrativeReferences IsNot Nothing Then
EZA.eza_VorpapierArtCode = FCFCDC.PreviousAdministrativeReferences.Type
If FCFCDC.PreviousAdministrativeReferences.PreviousAdministrativeReference IsNot Nothing Then EZA.eza_VorpapierNr = FCFCDC.PreviousAdministrativeReferences.PreviousAdministrativeReference.ReferenceNumber
End If
'Beförderungsmittel Grenze
If FCFCDC.BorderTransportMeans IsNot Nothing Then
'Beförderungsmittel Grenze
If FCFCDC.BorderTransportMeans IsNot Nothing Then
EZA.eza_BeförderungsmittelGrenzeArt = FCFCDC.BorderTransportMeans.Type
EZA.eza_VerkehrszweigGrenze = FCFCDC.BorderTransportMeans.Mode
EZA.eza_BeförderungsmittelGrenze = FCFCDC.BorderTransportMeans.Information
@@ -4674,111 +4675,111 @@ Public Class frmDYNachrichtenVerarbeitung
'Beförderungsmittel Inland
If FCFCDC.BorderTransportMeans IsNot Nothing Then
EZA.eza_BeförderungsmittelGrenzeArt = FCFCDC.BorderTransportMeans.Type
EZA.eza_VerkehrszweigGrenze = FCFCDC.BorderTransportMeans.Mode
EZA.eza_BeförderungsmittelGrenze = FCFCDC.BorderTransportMeans.Information
EZA.eza_BeförderungsmittelGrenzeStaatszugehörigkeitCode = FCFCDC.BorderTransportMeans.Nationality
End If
'Beförderungsmittel Inland
If FCFCDC.ArrivalTransportMeans IsNot Nothing Then
EZA.eza_KennzeichenNameBefoerderungsmittelAnkunft = FCFCDC.ArrivalTransportMeans.Identity
End If
'Ansprechpartenr
If FCFCDC.ContactPerson IsNot Nothing Then
EZA.eza_AnmeldenderBearbeiterName = FCFCDC.ContactPerson.Name
EZA.eza_AnmeldenderBearbeiterEMail = FCFCDC.ContactPerson.MailAddress
EZA.eza_AnmeldenderBearbeiterStellung = FCFCDC.ContactPerson.Position
EZA.eza_AnmeldenderBearbeiterTel = FCFCDC.ContactPerson.PhoneNumber
Dim SB_Tmp = SQL.getValueTxtBySql("SELECT isnull([mit_DAKOSY_SB],'') FROM [tblMitarbeiter] where [mit_DAKOSY_SBFull]='" & EZA.eza_AnmeldenderBearbeiterName & "'", "ADMIN")
If SB_Tmp <> "" Then
EZA.eza_Bearbeiter = SB_Tmp
End If
EZA.eza_BeförderungsmittelGrenzeArt = FCFCDC.BorderTransportMeans.Type
EZA.eza_VerkehrszweigGrenze = FCFCDC.BorderTransportMeans.Mode
EZA.eza_BeförderungsmittelGrenze = FCFCDC.BorderTransportMeans.Information
EZA.eza_BeförderungsmittelGrenzeStaatszugehörigkeitCode = FCFCDC.BorderTransportMeans.Nationality
End If
'Beförderungsmittel Inland
If FCFCDC.ArrivalTransportMeans IsNot Nothing Then
EZA.eza_KennzeichenNameBefoerderungsmittelAnkunft = FCFCDC.ArrivalTransportMeans.Identity
End If
'Ansprechpartenr
If FCFCDC.ContactPerson IsNot Nothing Then
EZA.eza_AnmeldenderBearbeiterName = FCFCDC.ContactPerson.Name
EZA.eza_AnmeldenderBearbeiterEMail = FCFCDC.ContactPerson.MailAddress
EZA.eza_AnmeldenderBearbeiterStellung = FCFCDC.ContactPerson.Position
EZA.eza_AnmeldenderBearbeiterTel = FCFCDC.ContactPerson.PhoneNumber
Dim SB_Tmp = SQL.getValueTxtBySql("SELECT isnull([mit_DAKOSY_SB],'') FROM [tblMitarbeiter] where [mit_DAKOSY_SBFull]='" & EZA.eza_AnmeldenderBearbeiterName & "'", "ADMIN")
If SB_Tmp <> "" Then
EZA.eza_Bearbeiter = SB_Tmp
End If
End If
'Anmleder
If FCFCDC.Declarant IsNot Nothing Then
Dim ADR As New DAKOSY_Worker.cDakosy_EZA_Adressen
ADR.ezaAd_AdressTyp = "DT"
If FCFCDC.Declarant.Name IsNot Nothing Then
If FCFCDC.Declarant.Name.ToString.Length > 40 Then
If FCFCDC.Declarant.Name.ToString.Length > 80 Then
ADR.ezaAd_NameFirma1 = FCFCDC.Declarant.Name.ToString.Substring(0, 40)
ADR.ezaAd_NameFirma2 = FCFCDC.Declarant.Name.ToString.Substring(40, 40)
ADR.ezaAd_NameFirma3 = FCFCDC.Declarant.Name.ToString.Substring(80, FCFCDC.Declarant.Name.ToString.Length - 80)
End If
'Anmleder
If FCFCDC.Declarant IsNot Nothing Then
Dim ADR As New DAKOSY_Worker.cDakosy_EZA_Adressen
ADR.ezaAd_AdressTyp = "DT"
If FCFCDC.Declarant.Name IsNot Nothing Then
If FCFCDC.Declarant.Name.ToString.Length > 40 Then
If FCFCDC.Declarant.Name.ToString.Length > 80 Then
ADR.ezaAd_NameFirma1 = FCFCDC.Declarant.Name.ToString.Substring(0, 40)
ADR.ezaAd_NameFirma2 = FCFCDC.Declarant.Name.ToString.Substring(40, FCFCDC.Declarant.Name.ToString.Length - 40)
Else
ADR.ezaAd_NameFirma1 = FCFCDC.Declarant.Name
ADR.ezaAd_NameFirma2 = FCFCDC.Declarant.Name.ToString.Substring(40, 40)
ADR.ezaAd_NameFirma3 = FCFCDC.Declarant.Name.ToString.Substring(80, FCFCDC.Declarant.Name.ToString.Length - 80)
End If
ADR.ezaAd_NameFirma1 = FCFCDC.Declarant.Name.ToString.Substring(0, 40)
ADR.ezaAd_NameFirma2 = FCFCDC.Declarant.Name.ToString.Substring(40, FCFCDC.Declarant.Name.ToString.Length - 40)
Else
ADR.ezaAd_NameFirma1 = FCFCDC.Declarant.Name
End If
If FCFCDC.Declarant.Identification IsNot Nothing Then
ADR.ezaAd_TeilnehmerEORI = FCFCDC.Declarant.Identification.ReferenceNumber
ADR.ezaAd_TeilnehmerNLNR = FCFCDC.Declarant.Identification.SubsidiaryNumber
End If
If FCFCDC.Declarant.Address IsNot Nothing Then
ADR.ezaAd_StrasseHausNr1 = FCFCDC.Declarant.Address.Line
ADR.ezaAd_StrasseHausNr2 = Nothing
ADR.ezaAd_Ort = FCFCDC.Declarant.Address.City
ADR.ezaAd_PLZ = FCFCDC.Declarant.Address.Postcode
ADR.ezaAd_LandCode = FCFCDC.Declarant.Address.Country
End If
EZA.eza_ADRESSEN.Add(ADR)
End If
If FCFCDC.Declarant.Identification IsNot Nothing Then
ADR.ezaAd_TeilnehmerEORI = FCFCDC.Declarant.Identification.ReferenceNumber
ADR.ezaAd_TeilnehmerNLNR = FCFCDC.Declarant.Identification.SubsidiaryNumber
End If
If FCFCDC.Declarant.Address IsNot Nothing Then
ADR.ezaAd_StrasseHausNr1 = FCFCDC.Declarant.Address.Line
ADR.ezaAd_StrasseHausNr2 = Nothing
ADR.ezaAd_Ort = FCFCDC.Declarant.Address.City
ADR.ezaAd_PLZ = FCFCDC.Declarant.Address.Postcode
ADR.ezaAd_LandCode = FCFCDC.Declarant.Address.Country
End If
EZA.eza_ADRESSEN.Add(ADR)
End If
'Vertreter
If FCFCDC.Representative IsNot Nothing Then
Dim ADR As New DAKOSY_Worker.cDakosy_EZA_Adressen
ADR.ezaAd_AdressTyp = "CB"
If FCFCDC.Representative.Identification IsNot Nothing Then
ADR.ezaAd_TeilnehmerEORI = FCFCDC.Representative.Identification.ReferenceNumber
ADR.ezaAd_TeilnehmerNLNR = FCFCDC.Representative.Identification.SubsidiaryNumber
EZA.eza_ADRESSEN.Add(ADR)
End If
End If
'Empfänger
If FCFCDC.Body IsNot Nothing AndAlso FCFCDC.Body.Consignee IsNot Nothing Then
Dim ADR As New DAKOSY_Worker.cDakosy_EZA_Adressen
ADR.ezaAd_AdressTyp = "CN"
If FCFCDC.Body.Consignee.Name IsNot Nothing Then
If FCFCDC.Body.Consignee.Name.ToString.Length > 40 Then
If FCFCDC.Body.Consignee.Name.ToString.Length > 80 Then
ADR.ezaAd_NameFirma1 = FCFCDC.Body.Consignee.Name.ToString.Substring(0, 40)
ADR.ezaAd_NameFirma2 = FCFCDC.Body.Consignee.Name.ToString.Substring(40, 40)
ADR.ezaAd_NameFirma3 = FCFCDC.Body.Consignee.Name.ToString.Substring(80, FCFCDC.Body.Consignee.Name.ToString.Length - 80)
End If
ADR.ezaAd_NameFirma1 = FCFCDC.Body.Consignee.Name.ToString.Substring(0, 40)
ADR.ezaAd_NameFirma2 = FCFCDC.Body.Consignee.Name.ToString.Substring(40, FCFCDC.Body.Consignee.Name.ToString.Length - 40)
Else
ADR.ezaAd_NameFirma1 = FCFCDC.Body.Consignee.Name
End If
End If
If FCFCDC.Body.Consignee.Identification IsNot Nothing Then
ADR.ezaAd_TeilnehmerEORI = FCFCDC.Body.Consignee.Identification.ReferenceNumber
ADR.ezaAd_TeilnehmerNLNR = FCFCDC.Body.Consignee.Identification.SubsidiaryNumber
End If
If FCFCDC.Body.Consignee.Address IsNot Nothing Then
ADR.ezaAd_StrasseHausNr1 = FCFCDC.Body.Consignee.Address.Line
ADR.ezaAd_StrasseHausNr2 = Nothing
ADR.ezaAd_Ort = FCFCDC.Body.Consignee.Address.City
ADR.ezaAd_PLZ = FCFCDC.Body.Consignee.Address.Postcode
ADR.ezaAd_LandCode = FCFCDC.Body.Consignee.Address.Country
End If
Dim ADR As New DAKOSY_Worker.cDakosy_EZA_Adressen
ADR.ezaAd_AdressTyp = "CB"
If FCFCDC.Representative.Identification IsNot Nothing Then
ADR.ezaAd_TeilnehmerEORI = FCFCDC.Representative.Identification.ReferenceNumber
ADR.ezaAd_TeilnehmerNLNR = FCFCDC.Representative.Identification.SubsidiaryNumber
EZA.eza_ADRESSEN.Add(ADR)
End If
End If
'Erwerber
If FCFCDC.Body IsNot Nothing AndAlso FCFCDC.Body.Acquirer IsNot Nothing Then
Dim ADR As New DAKOSY_Worker.cDakosy_EZA_Adressen
ADR.ezaAd_AdressTyp = "UC"
'Empfänger
If FCFCDC.Body IsNot Nothing AndAlso FCFCDC.Body.Consignee IsNot Nothing Then
Dim ADR As New DAKOSY_Worker.cDakosy_EZA_Adressen
ADR.ezaAd_AdressTyp = "CN"
If FCFCDC.Body.Consignee.Name IsNot Nothing Then
If FCFCDC.Body.Consignee.Name.ToString.Length > 40 Then
If FCFCDC.Body.Consignee.Name.ToString.Length > 80 Then
ADR.ezaAd_NameFirma1 = FCFCDC.Body.Consignee.Name.ToString.Substring(0, 40)
ADR.ezaAd_NameFirma2 = FCFCDC.Body.Consignee.Name.ToString.Substring(40, 40)
ADR.ezaAd_NameFirma3 = FCFCDC.Body.Consignee.Name.ToString.Substring(80, FCFCDC.Body.Consignee.Name.ToString.Length - 80)
End If
ADR.ezaAd_NameFirma1 = FCFCDC.Body.Consignee.Name.ToString.Substring(0, 40)
ADR.ezaAd_NameFirma2 = FCFCDC.Body.Consignee.Name.ToString.Substring(40, FCFCDC.Body.Consignee.Name.ToString.Length - 40)
Else
ADR.ezaAd_NameFirma1 = FCFCDC.Body.Consignee.Name
End If
End If
If FCFCDC.Body.Consignee.Identification IsNot Nothing Then
ADR.ezaAd_TeilnehmerEORI = FCFCDC.Body.Consignee.Identification.ReferenceNumber
ADR.ezaAd_TeilnehmerNLNR = FCFCDC.Body.Consignee.Identification.SubsidiaryNumber
End If
If FCFCDC.Body.Consignee.Address IsNot Nothing Then
ADR.ezaAd_StrasseHausNr1 = FCFCDC.Body.Consignee.Address.Line
ADR.ezaAd_StrasseHausNr2 = Nothing
ADR.ezaAd_Ort = FCFCDC.Body.Consignee.Address.City
ADR.ezaAd_PLZ = FCFCDC.Body.Consignee.Address.Postcode
ADR.ezaAd_LandCode = FCFCDC.Body.Consignee.Address.Country
End If
EZA.eza_ADRESSEN.Add(ADR)
End If
'Erwerber
If FCFCDC.Body IsNot Nothing AndAlso FCFCDC.Body.Acquirer IsNot Nothing Then
Dim ADR As New DAKOSY_Worker.cDakosy_EZA_Adressen
ADR.ezaAd_AdressTyp = "UC"
If FCFCDC.Body.Acquirer.Name IsNot Nothing Then
If FCFCDC.Body.Acquirer.Name.ToString.Length > 40 Then
If FCFCDC.Body.Acquirer.Name.ToString.Length > 80 Then
@@ -4843,90 +4844,90 @@ Public Class frmDYNachrichtenVerarbeitung
'Verkäufer
If FCFCDC.Body IsNot Nothing AndAlso FCFCDC.Body.CustomsValue IsNot Nothing AndAlso FCFCDC.Body.CustomsValue.Vendor IsNot Nothing Then
Dim ADR As New DAKOSY_Worker.cDakosy_EZA_Adressen
ADR.ezaAd_AdressTyp = "SE"
If FCFCDC.Body.CustomsValue.Vendor.Name IsNot Nothing Then
If FCFCDC.Body.CustomsValue.Vendor.Name.ToString.Length > 40 Then
If FCFCDC.Body.CustomsValue.Vendor.Name.ToString.Length > 80 Then
ADR.ezaAd_NameFirma1 = FCFCDC.Body.CustomsValue.Vendor.Name.ToString.Substring(0, 40)
ADR.ezaAd_NameFirma2 = FCFCDC.Body.CustomsValue.Vendor.Name.ToString.Substring(40, 40)
ADR.ezaAd_NameFirma3 = FCFCDC.Body.CustomsValue.Vendor.Name.ToString.Substring(80, FCFCDC.Body.CustomsValue.Vendor.Name.ToString.Length - 80)
End If
Dim ADR As New DAKOSY_Worker.cDakosy_EZA_Adressen
ADR.ezaAd_AdressTyp = "SE"
If FCFCDC.Body.CustomsValue.Vendor.Name IsNot Nothing Then
If FCFCDC.Body.CustomsValue.Vendor.Name.ToString.Length > 40 Then
If FCFCDC.Body.CustomsValue.Vendor.Name.ToString.Length > 80 Then
ADR.ezaAd_NameFirma1 = FCFCDC.Body.CustomsValue.Vendor.Name.ToString.Substring(0, 40)
ADR.ezaAd_NameFirma2 = FCFCDC.Body.CustomsValue.Vendor.Name.ToString.Substring(40, FCFCDC.Body.CustomsValue.Vendor.Name.ToString.Length - 40)
Else
ADR.ezaAd_NameFirma1 = FCFCDC.Body.CustomsValue.Vendor.Name
ADR.ezaAd_NameFirma2 = FCFCDC.Body.CustomsValue.Vendor.Name.ToString.Substring(40, 40)
ADR.ezaAd_NameFirma3 = FCFCDC.Body.CustomsValue.Vendor.Name.ToString.Substring(80, FCFCDC.Body.CustomsValue.Vendor.Name.ToString.Length - 80)
End If
ADR.ezaAd_NameFirma1 = FCFCDC.Body.CustomsValue.Vendor.Name.ToString.Substring(0, 40)
ADR.ezaAd_NameFirma2 = FCFCDC.Body.CustomsValue.Vendor.Name.ToString.Substring(40, FCFCDC.Body.CustomsValue.Vendor.Name.ToString.Length - 40)
Else
ADR.ezaAd_NameFirma1 = FCFCDC.Body.CustomsValue.Vendor.Name
End If
If FCFCDC.Body.CustomsValue.Vendor.Identification IsNot Nothing Then
ADR.ezaAd_TeilnehmerEORI = FCFCDC.Body.CustomsValue.Vendor.Identification.ReferenceNumber
'ADR.ezaAd_TeilnehmerNLNR = FCFCDC.Body.CustomsValue.Vendor.Identification.SubsidiaryNumber
End If
If FCFCDC.Body.CustomsValue.Vendor.Address IsNot Nothing Then
ADR.ezaAd_StrasseHausNr1 = FCFCDC.Body.CustomsValue.Vendor.Address.Line
ADR.ezaAd_StrasseHausNr2 = Nothing
ADR.ezaAd_Ort = FCFCDC.Body.CustomsValue.Vendor.Address.City
ADR.ezaAd_PLZ = FCFCDC.Body.CustomsValue.Vendor.Address.Postcode
ADR.ezaAd_LandCode = FCFCDC.Body.CustomsValue.Vendor.Address.Country
End If
EZA.eza_ADRESSEN.Add(ADR)
End If
'Käufer
If FCFCDC.Body IsNot Nothing AndAlso FCFCDC.Body.CustomsValue IsNot Nothing AndAlso FCFCDC.Body.CustomsValue.Vendee IsNot Nothing Then
Dim ADR As New DAKOSY_Worker.cDakosy_EZA_Adressen
ADR.ezaAd_AdressTyp = "BY"
If FCFCDC.Body.CustomsValue.Vendee.Name IsNot Nothing Then
If FCFCDC.Body.CustomsValue.Vendee.Name.ToString.Length > 40 Then
If FCFCDC.Body.CustomsValue.Vendee.Name.ToString.Length > 80 Then
ADR.ezaAd_NameFirma1 = FCFCDC.Body.CustomsValue.Vendee.Name.ToString.Substring(0, 40)
ADR.ezaAd_NameFirma2 = FCFCDC.Body.CustomsValue.Vendee.Name.ToString.Substring(40, 40)
ADR.ezaAd_NameFirma3 = FCFCDC.Body.CustomsValue.Vendee.Name.ToString.Substring(80, FCFCDC.Body.CustomsValue.Vendee.Name.ToString.Length - 80)
End If
ADR.ezaAd_NameFirma1 = FCFCDC.Body.CustomsValue.Vendee.Name.ToString.Substring(0, 40)
ADR.ezaAd_NameFirma2 = FCFCDC.Body.CustomsValue.Vendee.Name.ToString.Substring(40, FCFCDC.Body.CustomsValue.Vendee.Name.ToString.Length - 40)
Else
ADR.ezaAd_NameFirma1 = FCFCDC.Body.CustomsValue.Vendee.Name
End If
End If
If FCFCDC.Body.CustomsValue.Vendee.Identification IsNot Nothing Then
ADR.ezaAd_TeilnehmerEORI = FCFCDC.Body.CustomsValue.Vendee.Identification.ReferenceNumber
'ADR.ezaAd_TeilnehmerNLNR = FCFCDC.Body.CustomsValue.Vendee.Identification.SubsidiaryNumber
End If
If FCFCDC.Body.CustomsValue.Vendee.Address IsNot Nothing Then
ADR.ezaAd_StrasseHausNr1 = FCFCDC.Body.CustomsValue.Vendee.Address.Line
ADR.ezaAd_StrasseHausNr2 = Nothing
ADR.ezaAd_Ort = FCFCDC.Body.CustomsValue.Vendee.Address.City
ADR.ezaAd_PLZ = FCFCDC.Body.CustomsValue.Vendee.Address.Postcode
ADR.ezaAd_LandCode = FCFCDC.Body.CustomsValue.Vendee.Address.Country
End If
EZA.eza_ADRESSEN.Add(ADR)
If FCFCDC.Body.CustomsValue.Vendor.Identification IsNot Nothing Then
ADR.ezaAd_TeilnehmerEORI = FCFCDC.Body.CustomsValue.Vendor.Identification.ReferenceNumber
'ADR.ezaAd_TeilnehmerNLNR = FCFCDC.Body.CustomsValue.Vendor.Identification.SubsidiaryNumber
End If
If FCFCDC.Body.CustomsValue.Vendor.Address IsNot Nothing Then
ADR.ezaAd_StrasseHausNr1 = FCFCDC.Body.CustomsValue.Vendor.Address.Line
ADR.ezaAd_StrasseHausNr2 = Nothing
ADR.ezaAd_Ort = FCFCDC.Body.CustomsValue.Vendor.Address.City
ADR.ezaAd_PLZ = FCFCDC.Body.CustomsValue.Vendor.Address.Postcode
ADR.ezaAd_LandCode = FCFCDC.Body.CustomsValue.Vendor.Address.Country
End If
EZA.eza_ADRESSEN.Add(ADR)
End If
'Käufer
If FCFCDC.Body IsNot Nothing AndAlso FCFCDC.Body.CustomsValue IsNot Nothing AndAlso FCFCDC.Body.CustomsValue.Vendee IsNot Nothing Then
Dim ADR As New DAKOSY_Worker.cDakosy_EZA_Adressen
ADR.ezaAd_AdressTyp = "BY"
If FCFCDC.Body.CustomsValue.Vendee.Name IsNot Nothing Then
If FCFCDC.Body.CustomsValue.Vendee.Name.ToString.Length > 40 Then
If FCFCDC.Body.CustomsValue.Vendee.Name.ToString.Length > 80 Then
ADR.ezaAd_NameFirma1 = FCFCDC.Body.CustomsValue.Vendee.Name.ToString.Substring(0, 40)
ADR.ezaAd_NameFirma2 = FCFCDC.Body.CustomsValue.Vendee.Name.ToString.Substring(40, 40)
ADR.ezaAd_NameFirma3 = FCFCDC.Body.CustomsValue.Vendee.Name.ToString.Substring(80, FCFCDC.Body.CustomsValue.Vendee.Name.ToString.Length - 80)
End If
ADR.ezaAd_NameFirma1 = FCFCDC.Body.CustomsValue.Vendee.Name.ToString.Substring(0, 40)
ADR.ezaAd_NameFirma2 = FCFCDC.Body.CustomsValue.Vendee.Name.ToString.Substring(40, FCFCDC.Body.CustomsValue.Vendee.Name.ToString.Length - 40)
Else
ADR.ezaAd_NameFirma1 = FCFCDC.Body.CustomsValue.Vendee.Name
End If
End If
If FCFCDC.Body.CustomsValue.Vendee.Identification IsNot Nothing Then
ADR.ezaAd_TeilnehmerEORI = FCFCDC.Body.CustomsValue.Vendee.Identification.ReferenceNumber
'ADR.ezaAd_TeilnehmerNLNR = FCFCDC.Body.CustomsValue.Vendee.Identification.SubsidiaryNumber
End If
If FCFCDC.Body.CustomsValue.Vendee.Address IsNot Nothing Then
ADR.ezaAd_StrasseHausNr1 = FCFCDC.Body.CustomsValue.Vendee.Address.Line
ADR.ezaAd_StrasseHausNr2 = Nothing
ADR.ezaAd_Ort = FCFCDC.Body.CustomsValue.Vendee.Address.City
ADR.ezaAd_PLZ = FCFCDC.Body.CustomsValue.Vendee.Address.Postcode
ADR.ezaAd_LandCode = FCFCDC.Body.CustomsValue.Vendee.Address.Country
End If
EZA.eza_ADRESSEN.Add(ADR)
End If
End If
''Zollwertanmelder
'ADRTMP = cEDI.getValuesFromLine(cEDI.getSimpleLine("NAD+PQ++", lines, , False))
'If ADRTMP.Length > 0 Then EZA.eza_ADRESSEN.Add(getEZAAresseFromLine(ADRTMP, "PQ"))
''Zollwertanmelder
'ADRTMP = cEDI.getValuesFromLine(cEDI.getSimpleLine("NAD+PQ++", lines, , False))
'If ADRTMP.Length > 0 Then EZA.eza_ADRESSEN.Add(getEZAAresseFromLine(ADRTMP, "PQ"))
''Vertr. Zollwertanmelder
'ADRTMP = cEDI.getValuesFromLine(cEDI.getSimpleLine("NAD+AG++", lines, , False))
'If ADRTMP.Length > 0 Then EZA.eza_ADRESSEN.Add(getEZAAresseFromLine(ADRTMP, "AG"))
''Vertr. Zollwertanmelder
'ADRTMP = cEDI.getValuesFromLine(cEDI.getSimpleLine("NAD+AG++", lines, , False))
'If ADRTMP.Length > 0 Then EZA.eza_ADRESSEN.Add(getEZAAresseFromLine(ADRTMP, "AG"))
''Rechnung
'ADRTMP = cEDI.getValuesFromLine(cEDI.getSimpleLine("NAD+AA++", lines))
'If ADRTMP.Length > 0 Then EZA.eza_ADRESSEN.Add(getEZAAresseFromLine(ADRTMP, "AA"))
''Rechnung
'ADRTMP = cEDI.getValuesFromLine(cEDI.getSimpleLine("NAD+AA++", lines))
'If ADRTMP.Length > 0 Then EZA.eza_ADRESSEN.Add(getEZAAresseFromLine(ADRTMP, "AA"))
''Postfachadresse
'ADRTMP = cEDI.getValuesFromLine(cEDI.getSimpleLine("NAD+AAP++", lines))
'If ADRTMP.Length > 0 Then EZA.eza_ADRESSEN.Add(getEZAAresseFromLine(ADRTMP, "AAP"))
''--
''Postfachadresse
'ADRTMP = cEDI.getValuesFromLine(cEDI.getSimpleLine("NAD+AAP++", lines))
'If ADRTMP.Length > 0 Then EZA.eza_ADRESSEN.Add(getEZAAresseFromLine(ADRTMP, "AAP"))
''--
'AUFSCHUB
If FCFCDC.DutyDefermentApproval IsNot Nothing AndAlso FCFCDC.DutyDefermentApproval.Count > 0 Then
'AUFSCHUB
If FCFCDC.DutyDefermentApproval IsNot Nothing AndAlso FCFCDC.DutyDefermentApproval.Count > 0 Then
For Each TMP In FCFCDC.DutyDefermentApproval
Dim AUFSCHUB As New DAKOSY_Worker.cDakosy_EZA_Aufschub
If TMP.DutyDefermentApplicant IsNot Nothing AndAlso TMP.DutyDefermentApplicant.Identification IsNot Nothing Then
@@ -6037,6 +6038,9 @@ Public Class frmDYNachrichtenVerarbeitung
Dim division = ""
Dim TXT_DokBeschau = ""
Dim TXT_Rückweisung = ""
Dim TXT_Mitteilung = ""
Dim TXT_Mitteilung_Zollbeamter = ""
'Dim annahmeKz As Object = Nothing
'Dim ueberlassungKz As Object = Nothing
'Dim RueckgabeKz As Object = Nothing
@@ -6085,9 +6089,27 @@ Public Class frmDYNachrichtenVerarbeitung
'MitteilungTeilnehmerBeschau
End Select
End If
If POS.RueckgabeKz IsNot Nothing Then
If POS.RueckgabeKz = "J" Then
TXT_Rückweisung &= POS.Positionsnummer & ": Rückweisung " & vbNewLine
End If
End If
Next
End If
If EZA.EinzelEntscheidungAnmeldung.KopfDaten IsNot Nothing Then
If EZA.EinzelEntscheidungAnmeldung.KopfDaten.MitteilungTeilnehmerGestellungsmodalitaeten IsNot Nothing Then
TXT_Mitteilung &= "Text: " & EZA.EinzelEntscheidungAnmeldung.KopfDaten.MitteilungTeilnehmerGestellungsmodalitaeten
If EZA.EinzelEntscheidungAnmeldung.KopfDaten.BearbeiterZoll IsNot Nothing Then
TXT_Mitteilung_Zollbeamter &= " (" & EZA.EinzelEntscheidungAnmeldung.KopfDaten.BearbeiterZoll & ")"
End If
TXT_Mitteilung &= vbNewLine
End If
End If
'End If
End If
@@ -6108,7 +6130,7 @@ Public Class frmDYNachrichtenVerarbeitung
STATUS.dySt_ergDetails = details
'EINTRAG IN tblDakosy_Zollanmeldungen
Dim DY_TMP As DAKOSY_Worker.cDakosy_Zollanmeldungen = saveDY_ZA(STATUS, EZA.Transaktion.IOReferenz, If(zp, EZA.Transaktion.IODatumZeit), "EZA")
Dim EZA_TMP As DAKOSY_Worker.cDakosyEZA
Dim EZA_TMP As DAKOSY_Worker.cDakosyEZA = Nothing
If DY_TMP.dy_Status <> DAKOSY_Worker.cDY_Statusliste.S_60 Then 'Wenn beretis auf 60, dann wird kiene Änderung mehr vorgenommen!
@@ -6144,26 +6166,26 @@ Public Class frmDYNachrichtenVerarbeitung
Dim art = "B"
'Wenn Benutzer vorschreiben nicht online, dann Benutzer der Sendung...
If sendToID <= 0 OrElse (Not VERAG_PROG_ALLGEMEIN.cSession.IS_ONLINE(sendToID)) Then
If sendToID <= 0 OrElse (Not VERAG_PROG_ALLGEMEIN.cSession.IS_ONLINE(sendToID, True)) Then
sendToID = SQL.DLookup("LetzterMitarbeiterId", "tblSendungen", "tblSnd_SendungID='" & DY_TMP.dy_SendungsId & "'", "AVISO")
art = "B"
End If
'Wenn Benutzer der Sendung nicht online, dann Benutzer des LKW ..
If sendToID <= 0 OrElse (Not VERAG_PROG_ALLGEMEIN.cSession.IS_ONLINE(sendToID)) Then
If sendToID <= 0 OrElse (Not VERAG_PROG_ALLGEMEIN.cSession.IS_ONLINE(sendToID, True)) Then
sendToID = SQL.DLookup("LetzterMitarbeiterId", "Aviso", "AvisoId='" & DY_TMP.dy_AvisoId & "'", "AVISO")
art = "B"
End If
'Wenn Benutzer des LKWs nicht online, Team...
If sendToID <= 0 OrElse (Not VERAG_PROG_ALLGEMEIN.cSession.IS_ONLINE(sendToID)) Then
If sendToID <= 0 OrElse (Not VERAG_PROG_ALLGEMEIN.cSession.IS_ONLINE(sendToID, True)) Then
sendToID = SQL.DLookup("tblSnd_TeamId", "tblSendungen", "tblSnd_SendungID='" & DY_TMP.dy_SendungsId & "'", "AVISO")
art = "T"
End If
'Wenn TEAM nicht gefunden, Firma...
If EZA_TMP.eza_firma IsNot Nothing AndAlso EZA_TMP.eza_firma <> "" Then
If sendToID <= 0 OrElse (Not VERAG_PROG_ALLGEMEIN.cSession.IS_ONLINE(sendToID)) Then
If EZA_TMP IsNot Nothing AndAlso EZA_TMP.eza_firma IsNot Nothing AndAlso EZA_TMP.eza_firma <> "" Then
If sendToID <= 0 OrElse (Not VERAG_PROG_ALLGEMEIN.cSession.IS_ONLINE(sendToID, True)) Then
sendToID = EZA_TMP.eza_firma
art = "F"
End If
@@ -6179,14 +6201,139 @@ Public Class frmDYNachrichtenVerarbeitung
'Nicht
Case Else
Dim code = VERAG_PROG_ALLGEMEIN.cAvisoBenachrichtigungenCodes.ZOLL_Dokumentenbeschau
VERAG_PROG_ALLGEMEIN.cAvisoBenachrichtigungen.INSERT_BENACHRICHTIGUNG(DY_TMP.dy_AvisoId, DY_TMP.dy_SendungsId, code, art, sendToID, "ZOLL: Dokumentenbeschau", 1, , TXT_DokBeschau.Trim,,, If(EZA_TMP.eza_firma, ""))
VERAG_PROG_ALLGEMEIN.cAvisoBenachrichtigungen.INSERT_BENACHRICHTIGUNG(DY_TMP.dy_AvisoId, DY_TMP.dy_SendungsId, code, art, sendToID, "ZOLL: Dokumentenbeschau", 1, , (TXT_DokBeschau & vbNewLine & TXT_Mitteilung).Trim,,, If(EZA_TMP.eza_firma, ""))
End Select
End If
Catch ex As Exception
MsgBox(ex.Message & ex.StackTrace)
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace & vbNewLine & "TXT_DokBeschau - Datei: " & Dateiname, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
End If
If TXT_Rückweisung <> "" Then
'Benachrichtigung
Try
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
Dim sendToID As String = SQL.DLookup("tblSnd_VG_MA", "tblSendungen", "tblSnd_SendungID='" & DY_TMP.dy_SendungsId & "'", "AVISO")
Dim art = "B"
'Wenn Benutzer vorschreiben nicht online, dann Benutzer der Sendung...
If sendToID <= 0 OrElse (Not VERAG_PROG_ALLGEMEIN.cSession.IS_ONLINE(sendToID, True)) Then
sendToID = SQL.DLookup("LetzterMitarbeiterId", "tblSendungen", "tblSnd_SendungID='" & DY_TMP.dy_SendungsId & "'", "AVISO")
art = "B"
End If
'Wenn Benutzer der Sendung nicht online, dann Benutzer des LKW ..
If sendToID <= 0 OrElse (Not VERAG_PROG_ALLGEMEIN.cSession.IS_ONLINE(sendToID, True)) Then
sendToID = SQL.DLookup("LetzterMitarbeiterId", "Aviso", "AvisoId='" & DY_TMP.dy_AvisoId & "'", "AVISO")
art = "B"
End If
'Wenn Benutzer des LKWs nicht online, Team...
If sendToID <= 0 OrElse (Not VERAG_PROG_ALLGEMEIN.cSession.IS_ONLINE(sendToID, True)) Then
sendToID = SQL.DLookup("tblSnd_TeamId", "tblSendungen", "tblSnd_SendungID='" & DY_TMP.dy_SendungsId & "'", "AVISO")
art = "T"
End If
'Wenn TEAM nicht gefunden, Firma...
If EZA_TMP.eza_firma IsNot Nothing AndAlso EZA_TMP.eza_firma <> "" Then
If sendToID <= 0 OrElse (Not VERAG_PROG_ALLGEMEIN.cSession.IS_ONLINE(sendToID, True)) Then
sendToID = EZA_TMP.eza_firma
art = "F"
End If
End If
'Wenn gefunden
If sendToID >= 0 Then
Dim statusAVISO = SQL.DLookup("Status", "Aviso", "AvisoID='" & DY_TMP.dy_AvisoId & "'", "AVISO")
Dim GrenzstelleAVISO = SQL.DLookup("Grenzstelle", "Aviso", "AvisoID='" & DY_TMP.dy_AvisoId & "'", "AVISO")
If GrenzstelleAVISO = "???" Then
Select Case statusAVISO
Case VERAG_PROG_ALLGEMEIN.cGlobal.Status_NichtEingetroffen, VERAG_PROG_ALLGEMEIN.cGlobal.Status_Freigegeben
'Nicht
Case Else
Dim code = VERAG_PROG_ALLGEMEIN.cAvisoBenachrichtigungenCodes.ZOLL_Rueckweisung
VERAG_PROG_ALLGEMEIN.cAvisoBenachrichtigungen.INSERT_BENACHRICHTIGUNG(DY_TMP.dy_AvisoId, DY_TMP.dy_SendungsId, code, art, sendToID, "ZOLL: Rückweisung", 1, , (TXT_Rückweisung & vbNewLine & TXT_Mitteilung).Trim,,, If(EZA_TMP.eza_firma, ""))
End Select
End If
End If
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace & vbNewLine & "TXT_Rückweisung - Datei: " & Dateiname, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
End If
'Nur Mitteilung - keine Beschau, RW...
If TXT_Mitteilung <> "" And TXT_Rückweisung = "" And TXT_DokBeschau = "" Then
Select Case TXT_Mitteilung.Replace("Text: ", "").Replace(".", "").Trim.ToLower
Case "entgegengenommen"
Case "Zollanmeldung entgegengenommen"
Case "0"
Case "eingegangen"
Case Else
'Benachrichtigung
Try
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
Dim sendToID As String = SQL.DLookup("tblSnd_VG_MA", "tblSendungen", "tblSnd_SendungID='" & DY_TMP.dy_SendungsId & "'", "AVISO")
Dim art = "B"
'Wenn Benutzer vorschreiben nicht online, dann Benutzer der Sendung...
If sendToID <= 0 OrElse (Not VERAG_PROG_ALLGEMEIN.cSession.IS_ONLINE(sendToID, True)) Then
sendToID = SQL.DLookup("LetzterMitarbeiterId", "tblSendungen", "tblSnd_SendungID='" & DY_TMP.dy_SendungsId & "'", "AVISO")
art = "B"
End If
'Wenn Benutzer der Sendung nicht online, dann Benutzer des LKW ..
If sendToID <= 0 OrElse (Not VERAG_PROG_ALLGEMEIN.cSession.IS_ONLINE(sendToID, True)) Then
sendToID = SQL.DLookup("LetzterMitarbeiterId", "Aviso", "AvisoId='" & DY_TMP.dy_AvisoId & "'", "AVISO")
art = "B"
End If
'Wenn Benutzer des LKWs nicht online, Team...
If sendToID <= 0 OrElse (Not VERAG_PROG_ALLGEMEIN.cSession.IS_ONLINE(sendToID, True)) Then
sendToID = SQL.DLookup("tblSnd_TeamId", "tblSendungen", "tblSnd_SendungID='" & DY_TMP.dy_SendungsId & "'", "AVISO")
art = "T"
End If
'Wenn TEAM nicht gefunden, Firma...
If EZA_TMP.eza_firma IsNot Nothing AndAlso EZA_TMP.eza_firma <> "" Then
If sendToID <= 0 OrElse (Not VERAG_PROG_ALLGEMEIN.cSession.IS_ONLINE(sendToID, True)) Then
sendToID = EZA_TMP.eza_firma
art = "F"
End If
End If
'Wenn gefunden
If sendToID >= 0 Then
' If sendToID = 153 Or sendToID = 174 Then '--> NUR TOBI/MATHIAS!!
Dim statusAVISO = SQL.DLookup("Status", "Aviso", "AvisoID='" & DY_TMP.dy_AvisoId & "'", "AVISO")
Dim GrenzstelleAVISO = SQL.DLookup("Grenzstelle", "Aviso", "AvisoID='" & DY_TMP.dy_AvisoId & "'", "AVISO")
If GrenzstelleAVISO = "???" Then
Select Case statusAVISO
Case VERAG_PROG_ALLGEMEIN.cGlobal.Status_NichtEingetroffen, VERAG_PROG_ALLGEMEIN.cGlobal.Status_Freigegeben
'Nicht
Case Else
Dim code = VERAG_PROG_ALLGEMEIN.cAvisoBenachrichtigungenCodes.ZOLL_Mitteilung
VERAG_PROG_ALLGEMEIN.cAvisoBenachrichtigungen.INSERT_BENACHRICHTIGUNG(DY_TMP.dy_AvisoId, DY_TMP.dy_SendungsId, code, art, sendToID, "ZOLL: Mitteilung", 1, , (TXT_Mitteilung & TXT_Mitteilung_Zollbeamter).Trim,,, If(EZA_TMP.eza_firma, ""))
End Select
End If
' End If
End If
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace & vbNewLine & "TXT_Mitteilung - Datei: " & Dateiname, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
End Select
End If
End If
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace & vbNewLine & "Datei: " & Dateiname, System.Reflection.MethodInfo.GetCurrentMethod.Name)