Dakosy Anpassung - Datumsfehler

Dienstplan Feiertage
This commit is contained in:
2022-11-07 13:22:36 +01:00
parent 43d68083aa
commit 655a5fedae
12 changed files with 26652 additions and 247 deletions

View File

@@ -409,6 +409,21 @@ Public Class cGetMsgType
End If
Return False
End Function
Shared Function isEZA_FreierVerkehrAktVeredelUmwandlungXML_FCFCDE(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("<FCFCDE>") Then
Return True
End If
'End If
End If
Return False
End Function
Shared Function isEZA_FreierVerkehrAktVeredelUmwandlungXML_FCFCDF(doc As XmlDocument) As Boolean
If doc.HasChildNodes Then

View File

@@ -345,6 +345,14 @@ Public Class frmDYNachrichtenVerarbeitung
found = True
End If
End If
'EZA: FreierVerkehrAktVeredelUmwandlung NEU XML
If Not found AndAlso cGetMsgType.isEZA_FreierVerkehrAktVeredelUmwandlungXML_FCFCDE(doc) Then
Dim bezugsNr = readEZA_FreierVerkehrAktVeredelUmwandlungXML_FCFCDE(doc)
If bezugsNr <> "" Then
found = True
End If
End If
'EZA: FreierVerkehrAktVeredelUmwandlung NEU XML
If Not found AndAlso cGetMsgType.isEZA_FreierVerkehrAktVeredelUmwandlungXML_FCFCDF(doc) Then
Dim bezugsNr = readEZA_FreierVerkehrAktVeredelUmwandlungXML_FCFCDF(doc)
@@ -3092,6 +3100,624 @@ Public Class frmDYNachrichtenVerarbeitung
End Try
End Function
Function readEZA_FreierVerkehrAktVeredelUmwandlungXML_FCFCDE(doc As XmlDocument) As String
Try
readEZA_FreierVerkehrAktVeredelUmwandlungXML_FCFCDE = ""
Dim sw = New StringWriter()
Dim xw = New XmlTextWriter(sw)
doc.WriteTo(xw)
Dim XmlString = sw.ToString()
If XmlString.Contains("<FCFCDE>") Then
Dim xmlFCFCDE = XmlString.Substring(XmlString.IndexOf("<FCFCDE>"), XmlString.IndexOf("</FCFCDE>") + 9 - XmlString.IndexOf("<FCFCDE>"))
' MsgBox(xmlFCFCDE)
Dim p = Path.GetTempFileName
Using outputFile As New StreamWriter(p, False, System.Text.Encoding.Default)
outputFile.Write(xmlFCFCDE)
outputFile.Close()
Dim FCFCDE As DAKOSY_Worker.FCFCDE.FCFCDE = DAKOSY_Worker.FCFCDE.FCFCDE.LoadFromFile(p)
' Dim EZA As New DAKOSY_Worker.cDakosyEZA
If FCFCDE IsNot Nothing And FCFCDE.Header IsNot Nothing And FCFCDE.Header.LocalReferenceNumber IsNot Nothing Then
readEZA_FreierVerkehrAktVeredelUmwandlungXML_FCFCDE = FCFCDE.Header.LocalReferenceNumber
Else
Return "" 'Keine Bezugsnummer
End If
Dim DY_TMP As DAKOSY_Worker.cDakosy_Zollanmeldungen = saveDY_ZA(readEZA_FreierVerkehrAktVeredelUmwandlungXML_FCFCDE, "EZA")
Dim EZA As DAKOSY_Worker.cDakosyEZA = DAKOSY_Worker.cDakosyEZA.LOADByBezugsNr(readEZA_FreierVerkehrAktVeredelUmwandlungXML_FCFCDE, False) ' Falls schon ein DS mit dieser Bezugsnummer vorhanden ist.
If EZA Is Nothing Then EZA = New DAKOSY_Worker.cDakosyEZA
If DY_TMP IsNot Nothing Then EZA.eza_dyaAnmID = DY_TMP.dy_Id
If DY_TMP.dy_AvisoId Is Nothing Then
DY_TMP.tryFindAviso()
DY_TMP.SAVE()
End If
If FCFCDE IsNot Nothing Then
EZA.eza_ObjectName = readEZA_FreierVerkehrAktVeredelUmwandlungXML_FCFCDE
If FCFCDE.MetaData IsNot Nothing Then
If FCFCDE.MetaData.Preparation IsNot Nothing Then EZA.eza_Trans_DatumZeit = CDate(FCFCDE.MetaData.Preparation.Date).ToShortDateString
End If
If FCFCDE.Header IsNot Nothing Then
EZA.eza_VersendungsLandCode = FCFCDE.Header.DepartureCountry
EZA.eza_FinanzamtAnmelder = FCFCDE.Header.TaxOffice
'EZA.eza_UstIdAnmelder = FCFCDE.Header.TaxNumber
EZA.eza_Warenort = FCFCDE.Header.GoodsLocation
EZA.eza_Ausstellungsort = FCFCDE.Header.DeclarationPlace
EZA.eza_ZollrechtlicherStatus = FCFCDE.Header.CustomsGoodsStatus
EZA.eza_Zahlungsart = FCFCDE.Header.PaymentMethod
EZA.eza_AnmelderistEmpfaenger = FCFCDE.Header.DeclarantIsConsigneeFlag
EZA.eza_VertretungsVerhaeltnisCode = FCFCDE.Header.RepresentativeRelationshipFlag
EZA.eza_Vorsteuerabzug = FCFCDE.Header.InputTaxDeductionFlag
EZA.eza_ZusatzangabenAnmeldung = FCFCDE.Header.AdditionalInformation
' EZA.eza_VerfahrenBeantragtCode
End If
End If
If FCFCDE.Body IsNot Nothing Then
If FCFCDE.Body.ForeignTradeStatistics IsNot Nothing Then
EZA.eza_ArtGeschaeftCode = FCFCDE.Body.ForeignTradeStatistics.TransactionType
EZA.eza_Bestimmungsland = FCFCDE.Body.ForeignTradeStatistics.DestinationCountry
EZA.eza_Bestimmungsbundesland = FCFCDE.Body.ForeignTradeStatistics.DestinationFederalState
If FCFCDE.Body.ForeignTradeStatistics.EntryCustomsOffice IsNot Nothing Then
EZA.eza_Eingangszollstelle = FCFCDE.Body.ForeignTradeStatistics.EntryCustomsOffice.ReferenceNumber
End If
EZA.eza_Statistikstatus = FCFCDE.Body.ForeignTradeStatistics.GoodsStatus
EZA.eza_DV1Kz = FCFCDE.Body.CustomsValueFlag
EZA.eza_GesamtRohmasse = FCFCDE.Body.ForeignTradeStatistics.TotalGrossMassMeasure
End If
If FCFCDE.Body.PaymentTransaction IsNot Nothing Then
EZA.eza_Rechnungswaehrung = FCFCDE.Body.PaymentTransaction.CurrencyCode
EZA.eza_Rechnungspreis = FCFCDE.Body.PaymentTransaction.Amount
End If
If FCFCDE.Body.CustomsValue IsNot Nothing Then
If FCFCDE.Body.CustomsValue.RestrictionOrCondition IsNot Nothing Then EZA.eza_DV1EinschraenkungenKz = FCFCDE.Body.CustomsValue.RestrictionOrCondition.RestrictionFlag
EZA.eza_DV1FruehereEntscheidungen = FCFCDE.Body.CustomsValue.FormerDecisions
If FCFCDE.Body.CustomsValue.Affiliation IsNot Nothing Then EZA.eza_DV1Verbundenheit = FCFCDE.Body.CustomsValue.Affiliation.Type
If FCFCDE.Body.CustomsValue.Affiliation IsNot Nothing Then EZA.eza_DV1VerbungenheitEinzelheiten = FCFCDE.Body.CustomsValue.Affiliation.Description
If FCFCDE.Body.CustomsValue.LicenseFee IsNot Nothing Then EZA.eza_DV1LizenzgebuehrenUmstand = FCFCDE.Body.CustomsValue.LicenseFee.Description
If FCFCDE.Body.CustomsValue.LicenseFee IsNot Nothing Then EZA.eza_DV1LizenzgebuehrenKz = FCFCDE.Body.CustomsValue.LicenseFee.LicenseFeeFlag
End If
If FCFCDE.Body.Document IsNot Nothing AndAlso FCFCDE.Body.Document.Count > 0 Then
For Each docTMP In FCFCDE.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
End If
' EZA.eza_DV1Verbundenheit = cEDI.getSimpleLine("GIS+904:::", lines, Nothing)???
' EZA.eza_BewilligungsIDZLAVUV = cEDI.getSimpleLine("RFF+AEM:", lines) '?
'Vorpapier
If FCFCDE.PreviousAdministrativeReferences IsNot Nothing Then
EZA.eza_VorpapierArtCode = FCFCDE.PreviousAdministrativeReferences.Type
If FCFCDE.PreviousAdministrativeReferences.PreviousAdministrativeReference IsNot Nothing Then EZA.eza_VorpapierNr = FCFCDE.PreviousAdministrativeReferences.PreviousAdministrativeReference.ReferenceNumber
End If
'Beförderungsmittel Grenze
If FCFCDE.BorderTransportMeans IsNot Nothing Then
EZA.eza_BeförderungsmittelGrenzeArt = FCFCDE.BorderTransportMeans.Type
EZA.eza_VerkehrszweigGrenze = FCFCDE.BorderTransportMeans.Mode
EZA.eza_BeförderungsmittelGrenze = FCFCDE.BorderTransportMeans.Information
EZA.eza_BeförderungsmittelGrenzeStaatszugehörigkeitCode = FCFCDE.BorderTransportMeans.Nationality
End If
'Beförderungsmittel Inland
If FCFCDE.BorderTransportMeans IsNot Nothing Then
EZA.eza_BeförderungsmittelGrenzeArt = FCFCDE.BorderTransportMeans.Type
EZA.eza_VerkehrszweigGrenze = FCFCDE.BorderTransportMeans.Mode
EZA.eza_BeförderungsmittelGrenze = FCFCDE.BorderTransportMeans.Information
EZA.eza_BeförderungsmittelGrenzeStaatszugehörigkeitCode = FCFCDE.BorderTransportMeans.Nationality
End If
'Beförderungsmittel Inland
If FCFCDE.ArrivalTransportMeans IsNot Nothing Then
EZA.eza_KennzeichenNameBefoerderungsmittelAnkunft = FCFCDE.ArrivalTransportMeans.Identity
End If
'Ansprechpartenr
If FCFCDE.ContactPerson IsNot Nothing Then
EZA.eza_AnmeldenderBearbeiterName = FCFCDE.ContactPerson.Name
EZA.eza_AnmeldenderBearbeiterEMail = FCFCDE.ContactPerson.MailAddress
EZA.eza_AnmeldenderBearbeiterStellung = FCFCDE.ContactPerson.Position
EZA.eza_AnmeldenderBearbeiterTel = FCFCDE.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 FCFCDE.Declarant IsNot Nothing Then
Dim ADR As New DAKOSY_Worker.cDakosy_EZA_Adressen
ADR.ezaAd_AdressTyp = "DT"
If FCFCDE.Declarant.Name IsNot Nothing Then
If FCFCDE.Declarant.Name.ToString.Length > 40 Then
If FCFCDE.Declarant.Name.ToString.Length > 80 Then
ADR.ezaAd_NameFirma1 = FCFCDE.Declarant.Name.ToString.Substring(0, 40)
ADR.ezaAd_NameFirma2 = FCFCDE.Declarant.Name.ToString.Substring(40, 40)
ADR.ezaAd_NameFirma3 = FCFCDE.Declarant.Name.ToString.Substring(80, FCFCDE.Declarant.Name.ToString.Length - 80)
End If
ADR.ezaAd_NameFirma1 = FCFCDE.Declarant.Name.ToString.Substring(0, 40)
ADR.ezaAd_NameFirma2 = FCFCDE.Declarant.Name.ToString.Substring(40, FCFCDE.Declarant.Name.ToString.Length - 40)
Else
ADR.ezaAd_NameFirma1 = FCFCDE.Declarant.Name
End If
End If
If FCFCDE.Declarant.Identification IsNot Nothing Then
ADR.ezaAd_TeilnehmerEORI = FCFCDE.Declarant.Identification.ReferenceNumber
ADR.ezaAd_TeilnehmerNLNR = FCFCDE.Declarant.Identification.SubsidiaryNumber
End If
If FCFCDE.Declarant.Address IsNot Nothing Then
ADR.ezaAd_StrasseHausNr1 = FCFCDE.Declarant.Address.Line
ADR.ezaAd_StrasseHausNr2 = Nothing
ADR.ezaAd_Ort = FCFCDE.Declarant.Address.City
ADR.ezaAd_PLZ = FCFCDE.Declarant.Address.Postcode
ADR.ezaAd_LandCode = FCFCDE.Declarant.Address.Country
End If
EZA.eza_ADRESSEN.Add(ADR)
End If
'Vertreter
If FCFCDE.Representative IsNot Nothing Then
Dim ADR As New DAKOSY_Worker.cDakosy_EZA_Adressen
ADR.ezaAd_AdressTyp = "CB"
If FCFCDE.Representative.Identification IsNot Nothing Then
ADR.ezaAd_TeilnehmerEORI = FCFCDE.Representative.Identification.ReferenceNumber
ADR.ezaAd_TeilnehmerNLNR = FCFCDE.Representative.Identification.SubsidiaryNumber
EZA.eza_ADRESSEN.Add(ADR)
End If
End If
'Empfänger
If FCFCDE.Body IsNot Nothing AndAlso FCFCDE.Body.Consignee IsNot Nothing Then
Dim ADR As New DAKOSY_Worker.cDakosy_EZA_Adressen
ADR.ezaAd_AdressTyp = "CN"
If FCFCDE.Body.Consignee.Name IsNot Nothing Then
If FCFCDE.Body.Consignee.Name.ToString.Length > 40 Then
If FCFCDE.Body.Consignee.Name.ToString.Length > 80 Then
ADR.ezaAd_NameFirma1 = FCFCDE.Body.Consignee.Name.ToString.Substring(0, 40)
ADR.ezaAd_NameFirma2 = FCFCDE.Body.Consignee.Name.ToString.Substring(40, 40)
ADR.ezaAd_NameFirma3 = FCFCDE.Body.Consignee.Name.ToString.Substring(80, FCFCDE.Body.Consignee.Name.ToString.Length - 80)
End If
ADR.ezaAd_NameFirma1 = FCFCDE.Body.Consignee.Name.ToString.Substring(0, 40)
ADR.ezaAd_NameFirma2 = FCFCDE.Body.Consignee.Name.ToString.Substring(40, FCFCDE.Body.Consignee.Name.ToString.Length - 40)
Else
ADR.ezaAd_NameFirma1 = FCFCDE.Body.Consignee.Name
End If
End If
If FCFCDE.Body.Consignee.Identification IsNot Nothing Then
ADR.ezaAd_TeilnehmerEORI = FCFCDE.Body.Consignee.Identification.ReferenceNumber
ADR.ezaAd_TeilnehmerNLNR = FCFCDE.Body.Consignee.Identification.SubsidiaryNumber
End If
If FCFCDE.Body.Consignee.Address IsNot Nothing Then
ADR.ezaAd_StrasseHausNr1 = FCFCDE.Body.Consignee.Address.Line
ADR.ezaAd_StrasseHausNr2 = Nothing
ADR.ezaAd_Ort = FCFCDE.Body.Consignee.Address.City
ADR.ezaAd_PLZ = FCFCDE.Body.Consignee.Address.Postcode
ADR.ezaAd_LandCode = FCFCDE.Body.Consignee.Address.Country
End If
EZA.eza_ADRESSEN.Add(ADR)
End If
'Erwerber --> NEU!!! = zusätzl. Steuerl. Angaben
If FCFCDE.Body IsNot Nothing AndAlso FCFCDE.Body.AdditionalDutyReferences IsNot Nothing AndAlso FCFCDE.Body.AdditionalDutyReferences.Count > 0 AndAlso FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty IsNot Nothing Then
Dim ADR As New DAKOSY_Worker.cDakosy_EZA_Adressen
ADR.ezaAd_AdressTyp = "UC"
If FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty.Name IsNot Nothing Then
If FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty.Name.ToString.Length > 40 Then
If FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty.Name.ToString.Length > 80 Then
ADR.ezaAd_NameFirma1 = FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty.Name.ToString.Substring(0, 40)
ADR.ezaAd_NameFirma2 = FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty.Name.ToString.Substring(40, 40)
ADR.ezaAd_NameFirma3 = FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty.Name.ToString.Substring(80, FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty.Name.ToString.Length - 80)
End If
ADR.ezaAd_NameFirma1 = FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty.Name.ToString.Substring(0, 40)
ADR.ezaAd_NameFirma2 = FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty.Name.ToString.Substring(40, FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty.Name.ToString.Length - 40)
Else
ADR.ezaAd_NameFirma1 = FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty.Name
End If
End If
If FCFCDE.Body.AdditionalDutyReferences(0).ReferenceNumber IsNot Nothing Then
ADR.ezaAd_UStIDAnmelder = FCFCDE.Body.AdditionalDutyReferences(0).ReferenceNumber
EZA.eza_UstIdAnmelder = FCFCDE.Body.AdditionalDutyReferences(0).ReferenceNumber
End If
If FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty.Identification IsNot Nothing Then
ADR.ezaAd_TeilnehmerEORI = FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty.Identification.ReferenceNumber
'ADR.ezaAd_TeilnehmerNLNR = FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty.Identification.ReferenceNumber
End If
If FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty.Address IsNot Nothing Then
ADR.ezaAd_StrasseHausNr1 = FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty.Address.Line
ADR.ezaAd_StrasseHausNr2 = Nothing
ADR.ezaAd_Ort = FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty.Address.City
ADR.ezaAd_PLZ = FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty.Address.Postcode
ADR.ezaAd_LandCode = FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty.Address.Country
End If
EZA.eza_ADRESSEN.Add(ADR)
End If
'Versender/Ausführer
If FCFCDE.Body IsNot Nothing AndAlso FCFCDE.Body.Consignor IsNot Nothing Then
Dim ADR As New DAKOSY_Worker.cDakosy_EZA_Adressen
ADR.ezaAd_AdressTyp = "CZ"
If FCFCDE.Body.Consignor.Name IsNot Nothing Then
If FCFCDE.Body.Consignor.Name.ToString.Length > 40 Then
If FCFCDE.Body.Consignor.Name.ToString.Length > 80 Then
ADR.ezaAd_NameFirma1 = FCFCDE.Body.Consignor.Name.ToString.Substring(0, 40)
ADR.ezaAd_NameFirma2 = FCFCDE.Body.Consignor.Name.ToString.Substring(40, 40)
ADR.ezaAd_NameFirma3 = FCFCDE.Body.Consignor.Name.ToString.Substring(80, FCFCDE.Body.Consignor.Name.ToString.Length - 80)
End If
ADR.ezaAd_NameFirma1 = FCFCDE.Body.Consignor.Name.ToString.Substring(0, 40)
ADR.ezaAd_NameFirma2 = FCFCDE.Body.Consignor.Name.ToString.Substring(40, FCFCDE.Body.Consignor.Name.ToString.Length - 40)
Else
ADR.ezaAd_NameFirma1 = FCFCDE.Body.Consignor.Name
End If
End If
If FCFCDE.Body.Consignor.Identification IsNot Nothing Then
ADR.ezaAd_TeilnehmerEORI = FCFCDE.Body.Consignor.Identification.ReferenceNumber
' ADR.ezaAd_TeilnehmerNLNR = FCFCDE.Body.Consignor.Identification.SubsidiaryNumber
End If
If FCFCDE.Body.Consignor.Address IsNot Nothing Then
ADR.ezaAd_StrasseHausNr1 = FCFCDE.Body.Consignor.Address.Line
ADR.ezaAd_StrasseHausNr2 = Nothing
ADR.ezaAd_Ort = FCFCDE.Body.Consignor.Address.City
ADR.ezaAd_PLZ = FCFCDE.Body.Consignor.Address.Postcode
ADR.ezaAd_LandCode = FCFCDE.Body.Consignor.Address.Country
End If
EZA.eza_ADRESSEN.Add(ADR)
End If
'Verkäufer
If FCFCDE.Body IsNot Nothing AndAlso FCFCDE.Body.CustomsValue IsNot Nothing AndAlso FCFCDE.Body.CustomsValue.Vendor IsNot Nothing Then
Dim ADR As New DAKOSY_Worker.cDakosy_EZA_Adressen
ADR.ezaAd_AdressTyp = "SE"
If FCFCDE.Body.CustomsValue.Vendor.Name IsNot Nothing Then
If FCFCDE.Body.CustomsValue.Vendor.Name.ToString.Length > 40 Then
If FCFCDE.Body.CustomsValue.Vendor.Name.ToString.Length > 80 Then
ADR.ezaAd_NameFirma1 = FCFCDE.Body.CustomsValue.Vendor.Name.ToString.Substring(0, 40)
ADR.ezaAd_NameFirma2 = FCFCDE.Body.CustomsValue.Vendor.Name.ToString.Substring(40, 40)
ADR.ezaAd_NameFirma3 = FCFCDE.Body.CustomsValue.Vendor.Name.ToString.Substring(80, FCFCDE.Body.CustomsValue.Vendor.Name.ToString.Length - 80)
End If
ADR.ezaAd_NameFirma1 = FCFCDE.Body.CustomsValue.Vendor.Name.ToString.Substring(0, 40)
ADR.ezaAd_NameFirma2 = FCFCDE.Body.CustomsValue.Vendor.Name.ToString.Substring(40, FCFCDE.Body.CustomsValue.Vendor.Name.ToString.Length - 40)
Else
ADR.ezaAd_NameFirma1 = FCFCDE.Body.CustomsValue.Vendor.Name
End If
End If
If FCFCDE.Body.CustomsValue.Vendor.Identification IsNot Nothing Then
ADR.ezaAd_TeilnehmerEORI = FCFCDE.Body.CustomsValue.Vendor.Identification.ReferenceNumber
'ADR.ezaAd_TeilnehmerNLNR = FCFCDE.Body.CustomsValue.Vendor.Identification.SubsidiaryNumber
End If
If FCFCDE.Body.CustomsValue.Vendor.Address IsNot Nothing Then
ADR.ezaAd_StrasseHausNr1 = FCFCDE.Body.CustomsValue.Vendor.Address.Line
ADR.ezaAd_StrasseHausNr2 = Nothing
ADR.ezaAd_Ort = FCFCDE.Body.CustomsValue.Vendor.Address.City
ADR.ezaAd_PLZ = FCFCDE.Body.CustomsValue.Vendor.Address.Postcode
ADR.ezaAd_LandCode = FCFCDE.Body.CustomsValue.Vendor.Address.Country
End If
EZA.eza_ADRESSEN.Add(ADR)
End If
'Käufer
If FCFCDE.Body IsNot Nothing AndAlso FCFCDE.Body.CustomsValue IsNot Nothing AndAlso FCFCDE.Body.CustomsValue.Vendee IsNot Nothing Then
Dim ADR As New DAKOSY_Worker.cDakosy_EZA_Adressen
ADR.ezaAd_AdressTyp = "BY"
If FCFCDE.Body.CustomsValue.Vendee.Name IsNot Nothing Then
If FCFCDE.Body.CustomsValue.Vendee.Name.ToString.Length > 40 Then
If FCFCDE.Body.CustomsValue.Vendee.Name.ToString.Length > 80 Then
ADR.ezaAd_NameFirma1 = FCFCDE.Body.CustomsValue.Vendee.Name.ToString.Substring(0, 40)
ADR.ezaAd_NameFirma2 = FCFCDE.Body.CustomsValue.Vendee.Name.ToString.Substring(40, 40)
ADR.ezaAd_NameFirma3 = FCFCDE.Body.CustomsValue.Vendee.Name.ToString.Substring(80, FCFCDE.Body.CustomsValue.Vendee.Name.ToString.Length - 80)
End If
ADR.ezaAd_NameFirma1 = FCFCDE.Body.CustomsValue.Vendee.Name.ToString.Substring(0, 40)
ADR.ezaAd_NameFirma2 = FCFCDE.Body.CustomsValue.Vendee.Name.ToString.Substring(40, FCFCDE.Body.CustomsValue.Vendee.Name.ToString.Length - 40)
Else
ADR.ezaAd_NameFirma1 = FCFCDE.Body.CustomsValue.Vendee.Name
End If
End If
If FCFCDE.Body.CustomsValue.Vendee.Identification IsNot Nothing Then
ADR.ezaAd_TeilnehmerEORI = FCFCDE.Body.CustomsValue.Vendee.Identification.ReferenceNumber
'ADR.ezaAd_TeilnehmerNLNR = FCFCDE.Body.CustomsValue.Vendee.Identification.SubsidiaryNumber
End If
If FCFCDE.Body.CustomsValue.Vendee.Address IsNot Nothing Then
ADR.ezaAd_StrasseHausNr1 = FCFCDE.Body.CustomsValue.Vendee.Address.Line
ADR.ezaAd_StrasseHausNr2 = Nothing
ADR.ezaAd_Ort = FCFCDE.Body.CustomsValue.Vendee.Address.City
ADR.ezaAd_PLZ = FCFCDE.Body.CustomsValue.Vendee.Address.Postcode
ADR.ezaAd_LandCode = FCFCDE.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"))
''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"))
''Postfachadresse
'ADRTMP = cEDI.getValuesFromLine(cEDI.getSimpleLine("NAD+AAP++", lines))
'If ADRTMP.Length > 0 Then EZA.eza_ADRESSEN.Add(getEZAAresseFromLine(ADRTMP, "AAP"))
''--
'AUFSCHUB
If FCFCDE.DutyDefermentApproval IsNot Nothing AndAlso FCFCDE.DutyDefermentApproval.Count > 0 Then
For Each TMP In FCFCDE.DutyDefermentApproval
Dim AUFSCHUB As New DAKOSY_Worker.cDakosy_EZA_Aufschub
If TMP.DutyDefermentApplicant IsNot Nothing AndAlso TMP.DutyDefermentApplicant.Identification IsNot Nothing Then
AUFSCHUB.ezaAfb_AufschubnehmerEORI = TMP.DutyDefermentApplicant.Identification.ReferenceNumber
End If
AUFSCHUB.ezaAfb_AufschuBIN = TMP.AuthorisationNumber
AUFSCHUB.ezaAfb_HZA = TMP.AccountPrefix
AUFSCHUB.ezaAfb_KontoNr = TMP.AccountNumber
AUFSCHUB.ezaAfb_Aufschubart = TMP.Type
AUFSCHUB.ezaAfb_ArtAufschubantrag = TMP.ApplicationType
EZA.eza_AUFSCHUB.Add(AUFSCHUB)
Next
End If
'Lieferbedingungen
If FCFCDE.Body.DeliveryTerms IsNot Nothing Then
EZA.eza_LieferbedingungCode = FCFCDE.Body.DeliveryTerms.Code
EZA.eza_LieferbedingungText = FCFCDE.Body.DeliveryTerms.Description
EZA.eza_LieferbedingungOrt = FCFCDE.Body.DeliveryTerms.Place
EZA.eza_LieferbedingungSchluessel = FCFCDE.Body.DeliveryTerms.Key
End If
' ###################################################
'POSITIONEN
' ###################################################
If FCFCDE.Body IsNot Nothing AndAlso FCFCDE.Body.GoodsItem IsNot Nothing AndAlso FCFCDE.Body.GoodsItem.Count > 0 Then
For Each GOODSITEM In FCFCDE.Body.GoodsItem
Dim POS As New DAKOSY_Worker.cDakosy_EZA_Warenposition
POS.ezaWP_PositionsNummer = GOODSITEM.SequenceNumber
If GOODSITEM.CommodityCode IsNot Nothing Then POS.ezaWP_WarennummerEZT = GOODSITEM.CommodityCode.CommodityCode
If GOODSITEM.Procedure IsNot Nothing Then POS.ezaWP_AnmeldeVErfahren = GOODSITEM.Procedure.RequestedPreviousProcedure
POS.ezaWP_AbgabensteuerungKz = GOODSITEM.CessionManagementFlag
POS.ezaWP_Warenbezeichnung = GOODSITEM.GoodsDescription
POS.ezaWP_PositionsZusatz = GOODSITEM.SupplementaryInformation
If GOODSITEM.CustomsValue IsNot Nothing Then
POS.ezaWP_OrtVerbringens = GOODSITEM.CustomsValue.DestinationPlace
POS.ezaWP_AbflughafenIATACode = GOODSITEM.CustomsValue.DepartureAirport
If GOODSITEM.CustomsValue.NetPrice IsNot Nothing Then
' POS.ezaWP_KursBetragVereinbart = GOODSITEM.CustomsValue.NetPrice.CurrencyCode
POS.ezaWP_KursVereinbartKz = GOODSITEM.CustomsValue.NetPrice.CurrencyRateAgreedFlag
POS.ezaWP_KursBetragVereinbart = GOODSITEM.CustomsValue.NetPrice.Value
'POS.ezaWP_KursDatum= GOODSITEM.CustomsValue.NetPrice.CurrencyRate
'POS.ezaWP_KursDatum = GOODSITEM.CustomsValue.NetPrice.
End If
If GOODSITEM.ForeignTradeStatistics IsNot Nothing Then
POS.ezaWP_Rohmasse = GOODSITEM.ForeignTradeStatistics.GrossMassMeasure
If GOODSITEM.ForeignTradeStatistics.Amount IsNot Nothing Then
POS.ezaWP_AHStatMengeQualifier = GOODSITEM.ForeignTradeStatistics.Amount.Qualifier
POS.ezaWP_AHStatMengeMasseinheit = GOODSITEM.ForeignTradeStatistics.Amount.MeasurementUnit
POS.ezaWP_AHStatMenge = GOODSITEM.ForeignTradeStatistics.Amount.Quantity
POS.ezaWP_AHStatWert = GOODSITEM.ForeignTradeStatistics.Quantity
End If
End If
POS.ezaWP_UrsprungslandCode = GOODSITEM.OriginCountry
POS.ezaWP_Eigenmasse = GOODSITEM.NetMassMeasure
' POS.ezaWP_BeguenstigungBenatragtCode = Bedingun.
POS.ezaWP_BedingungCode = GOODSITEM.Condition
'POS.ezaWP_EUCode = GOODSITEM.EUCode
'If GOODSITEM.Assessment IsNot Nothing Then
' POS.ezaWP_Zollwert = GOODSITEM.Assessment.Amount.
' POS.ezaWP_KostenEUSt = GOODSITEM.Assessment.TaxCosts
' POS.ezaWP_VeredelungWertsteigerung = GOODSITEM.Assessment.OutwardProcessingFee
'End If
''Packstücke
If GOODSITEM.Package IsNot Nothing Then
POS.ezaWP_PackstueckArt = GOODSITEM.Package.Kind
POS.ezaWP_PackstueckZeichen = GOODSITEM.Package.MarksNumbers
POS.ezaWP_PackstueckAnzahl = GOODSITEM.Package.Quantity
End If
''Packstücke
'If GOODSITEM.Package IsNot Nothing AndAlso GOODSITEM.Package.Count > 0 Then
' For Each PCK In GOODSITEM.Package
' Dim AUFSCHUB As New DAKOSY_Worker.cDakosy_EZA_Aufschub
' If PCK.DutyDefermentApplicant IsNot Nothing AndAlso PCK.DutyDefermentApplicant.Identification IsNot Nothing Then
' AUFSCHUB.ezaAfb_AufschubnehmerEORI = PCK.DutyDefermentApplicant.Identification.ReferenceNumber
' End If
' AUFSCHUB.ezaAfb_AufschuBIN = PCK.AuthorisationNumber
' AUFSCHUB.ezaAfb_KontoNr = PCK.AccountNumber
' AUFSCHUB.ezaAfb_Aufschubart = PCK.Type
' AUFSCHUB.ezaAfb_ArtAufschubantrag = PCK.ApplicationType
' EZA.eza_AUFSCHUB.Add(AUFSCHUB)
' Next
'End If
'Preisart
'-
POS.ezaWP_Artikelpreis = GOODSITEM.InvoiceAmount
'Zusatzcode
If GOODSITEM.SupplementaryCodes IsNot Nothing AndAlso GOODSITEM.SupplementaryCodes.Count > 0 Then
Dim cnt = 0
For Each s In GOODSITEM.SupplementaryCodes
If cnt = 0 Then POS.ezaWP_WarennummerZusatzCode1 = s.Code
If cnt = 1 Then POS.ezaWP_WarennummerZusatzCode2 = s.Code
If cnt = 2 Then POS.ezaWP_WarennummerZusatzCode3 = s.Code
If cnt = 3 Then POS.ezaWP_WarennummerZusatzCode4 = s.Code
If cnt = 4 Then POS.ezaWP_WarennummerZusatzCode5 = s.Code
If cnt = 5 Then POS.ezaWP_WarennummerZusatzCode6 = s.Code
If cnt = 6 Then POS.ezaWP_WarennummerZusatzCode7 = s.Code
If cnt = 7 Then POS.ezaWP_WarennummerZusatzCode8 = s.Code
If cnt = 8 Then POS.ezaWP_WarennummerZusatzCode9 = s.Code
If cnt = 9 Then POS.ezaWP_WarennummerZusatzCode10 = s.Code
cnt += 1
Next
End If
'Abgabenminderung
'-
'Sonderfalldaten
If GOODSITEM.SpecialCase IsNot Nothing AndAlso GOODSITEM.SpecialCase.Count > 0 Then
For Each s In GOODSITEM.SpecialCase
Dim SA As New DAKOSY_Worker.cDakosy_EZA_WarenpositionSonderfalldaten
SA.ezaWpSfd_SonderabgabenGruppeCode = s.Group
SA.ezaWpSfd_AnwendungArt = s.ApplicationType
SA.ezaWpSfd_SatzBetragFaktor = s.RateOrAmountOrFactor
POS.ezaWP_SONDERFALLDATEN.Add(SA)
Next
End If
'Verbrauchsteuer
If GOODSITEM.ExciseDuty IsNot Nothing AndAlso GOODSITEM.ExciseDuty.Count > 0 Then
For Each s In GOODSITEM.ExciseDuty
Dim VS As New DAKOSY_Worker.cDakosy_EZA_WarenpositionVerbrauchssteuer
VS.ezaWpVs_VerbrauchsteuerCode = s.Code
VS.ezaWpVs_VerbrauchssteuerWertbasis = s.Value
'VS.ezaWpVs_VerbrauchssteuerMenge = s.DegreePercentage
If s.Amount IsNot Nothing Then
VS.ezaWpVs_VerbrauchssteuerMasseinheitCode = s.Amount.Quantity
VS.ezaWpVs_VerbrauchssteuerMasseinheitQualifier = s.Amount.Qualifier
VS.ezaWpVs_VerbrauchssteuerMasseinheitCode = s.Amount.MeasurementUnit
End If
POS.ezaWP_VERBRAUCHSSTEUER.Add(VS)
Next
End If
If GOODSITEM.PreferentialTreatment IsNot Nothing Then
POS.ezaWP_BeguenstigungBenatragtCode = GOODSITEM.PreferentialTreatment.RequestedPreferentialTreatment
If GOODSITEM.PreferentialTreatment.Declaration IsNot Nothing AndAlso GOODSITEM.PreferentialTreatment.Declaration.PreferentialTreatmentQuantity IsNot Nothing Then
POS.ezaWP_BeguenstigungsMengeMasseinheitCode = GOODSITEM.PreferentialTreatment.Declaration.PreferentialTreatmentQuantity.MeasurementUnit
POS.ezaWP_BeguenstigungsMengeMenge = GOODSITEM.PreferentialTreatment.Declaration.PreferentialTreatmentQuantity.Quantity
POS.ezaWP_BeguenstigungsMengeQualifier = GOODSITEM.PreferentialTreatment.Declaration.PreferentialTreatmentQuantity.Qualifier
End If
End If
'Unterlagen
If GOODSITEM.Document IsNot Nothing AndAlso GOODSITEM.Document.Count > 0 Then
For Each s In GOODSITEM.Document
Dim UL As New DAKOSY_Worker.cDakosy_EZA_WarenpositionVorgelegteUnterlagen
UL.ezaWpUl_Bereich = s.Division
UL.ezaWpUl_VorlageKz = s.AtHandFlag
If s.WriteOff IsNot Nothing Then
UL.ezaWpUl_AbschreibungsMengeMasseinheitQualifier = s.WriteOff.Qualifier
UL.ezaWpUl_AbschreibungsMengeMasseinheit = s.WriteOff.MeasurementUnit
UL.ezaWpUl_AbschreibungsMenge = s.WriteOff.Quantity
End If
UL.ezaWpUl_Art = s.Type
UL.ezaWpUl_Nummer = s.ReferenceNumber
UL.ezaWpUl_DatumAusstellung = CDate(s.IssuingDate).ToShortDateString
POS.ezaWP_UNTERLAGEN.Add(UL)
Next
End If
End If
EZA.eza_WARENPOS.Add(POS)
Next
End If
If If(EZA.eza_Status, 0) <= 5 Then EZA.eza_Status = DAKOSY_Worker.cDY_Statusliste.S_05
If If(EZA.eza_Status_KEWILL_Equivalent, 0) <= 5 Then EZA.eza_Status_KEWILL_Equivalent = DAKOSY_Worker.cDY_Statusliste.S_05
If EZA.SAVE_ALL() Then
If If(EZA.eza_Status, 0) <= 5 Then DAKOSY_Worker.cDakosy_Statusmeldungen.InsertStatusMeldung(DY_TMP, DAKOSY_Worker.cDY_Statusliste.S_05)
Else
readEZA_FreierVerkehrAktVeredelUmwandlungXML_FCFCDE = ""
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("EZA: FreierVerkehrAktVeredelUmwandlung", readEZA_FreierVerkehrAktVeredelUmwandlungXML_FCFCDE)
End Using
End If
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace & vbNewLine & "Datei: " & Dateiname, System.Reflection.MethodInfo.GetCurrentMethod.Name)
readEZA_FreierVerkehrAktVeredelUmwandlungXML_FCFCDE = ""
End Try
End Function
Function readEZA_FreierVerkehrAktVeredelUmwandlungXML_FCFCDF(doc As XmlDocument) As String
Try
readEZA_FreierVerkehrAktVeredelUmwandlungXML_FCFCDF = ""

View File

@@ -2242,7 +2242,7 @@ Public Class frmStartOptions
Dim firmatmp = VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA
Try
VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = Mail_FIMRA
Dim dateBack = If(TageZurueck <> "", CDate(Now.ToString("01.MM.yyyy")).AddDays(TageZurueck * -1), CDate(Now.ToString("01.MM.yyyy")).AddMonths(-1))
Dim dateBack = If(TageZurueck <> "", CDate(Now.AddDays(TageZurueck * -1)), CDate(Now.ToString("01.MM.yyyy")).AddMonths(-1))
Dim dt = VERAG_PROG_ALLGEMEIN.cUIDPruefung.doUIDPruefungALL(dateBack, True, False, maxAnz, False)
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
Dim PDF = VERAG_PROG_ALLGEMEIN.cProgramFunctions.genExcelFromDT_NEW(dt,,,,, False)