neu
This commit is contained in:
@@ -426,15 +426,33 @@ Public Class usrCntlATLAS_EZA
|
||||
Try
|
||||
Dim SH As New VERAG_PROG_ALLGEMEIN.cVERAG_in_eza_FULL(CInt(SENDUNG.VORSYSTEM_Id))
|
||||
If SH IsNot Nothing Then
|
||||
|
||||
Dim ABFERTIGUNGSART = 1 'DEFAULT Fiskal?
|
||||
EZA.eza_GesamtRohmasse = SH.EZA.TotGrossWeight
|
||||
If If(SH.EZA.Incoterm, "") <> "" Then EZA.eza_LieferbedingungCode = SH.EZA.Incoterm
|
||||
If If(SH.EZA.Incoterm, "") <> "" Then
|
||||
EZA.eza_LieferbedingungCode = SH.EZA.Incoterm
|
||||
End If
|
||||
'EZA.pack= SH.EZA.TotPackage
|
||||
'EZA.eza_Rechnungspreis = SH.EZA.TotGrossWeight
|
||||
'EZA.eza_Rechnungswaehrung = SENDUNG.tblSnd_WarenwertWaehrung
|
||||
' If If(SH.EZA.TransportModeBorder, "") <> "" Then EZA.eza_BeförderungsmittelGrenzeArt = SH.EZA.TransportModeBorder
|
||||
' If If(SH.EZA.TransportModeBorder, "") <> "" Then EZA.eza_BeförderungsmittelGrenzeArt = SH.EZA.TransportModeBorder
|
||||
'If If(SH.EZA.TransportBorderType, "") <> "" Then EZA.bef = SH.EZA.TransportBorderType
|
||||
|
||||
If If(SH.EZA.PrePaperCode, "") <> "" Then EZA.eza_VorpapierArtCode = SH.EZA.PrePaperCode
|
||||
If If(SH.EZA.PrePaperNr, "") <> "" Then EZA.eza_VorpapierNr = SH.EZA.PrePaperNr
|
||||
If If(SH.EZA.CountryCodeDeparture, "") <> "" Then EZA.eza_VersendungsLandCode = SH.EZA.CountryCodeDeparture
|
||||
|
||||
If If(SH.EZA.TransportBorderType, "") <> "" Then EZA.eza_VerkehrszweigInland = SH.EZA.TransportBorderType
|
||||
If If(SH.EZA.TransportBorderType, "") <> "" Then EZA.eza_VerkehrszweigGrenze = SH.EZA.TransportBorderType
|
||||
|
||||
'If If(AD.ezaAd_LandCode, "") = "DE" And AD.ezaAd_PLZ IsNot Nothing Then
|
||||
' EZA.eza_Bestimmungsbundesland = VERAG_PROG_ALLGEMEIN.cDEBundeslaenderPLZ.LOADBundeslandCode_ByPLZ(AD.ezaAd_PLZ)
|
||||
'ElseIf If(AD.ezaAd_LandCode, "") <> "" Then
|
||||
' EZA.eza_Bestimmungsbundesland = 25
|
||||
'End If
|
||||
|
||||
Dim InvoiceSum As Double = 0.0
|
||||
Dim InvoiceCurr As String = ""
|
||||
|
||||
For Each SH_POS In SH.EZA.POSITIONS
|
||||
Dim EZA_POS As New DAKOSY_Worker.cDakosy_EZA_Warenposition
|
||||
EZA_POS.ezaWP_PackstueckAnzahl = SH_POS.NumberOfPackages
|
||||
@@ -443,27 +461,50 @@ Public Class usrCntlATLAS_EZA
|
||||
EZA_POS.ezaWP_Warenbezeichnung = SH_POS.GoodsDescription
|
||||
EZA_POS.ezaWP_WarennummerEZT = SH_POS.GoodsTariff
|
||||
|
||||
|
||||
EZA_POS.ezaWP_UrsprungslandCode = SH_POS.OriginCountryCode
|
||||
If If(SH_POS.KindOfPackages, "") <> "" Then EZA_POS.ezaWP_PackstueckArt = SH_POS.KindOfPackages
|
||||
|
||||
If SH_POS.ItemInvoiceAmount IsNot Nothing Then
|
||||
EZA_POS.ezaWP_Artikelpreis = SH_POS.ItemInvoiceAmount
|
||||
EZA_POS.ezaWP_AHStatWert = SH_POS.ItemInvoiceAmount
|
||||
Else
|
||||
InvoiceSum += CDbl(SH_POS.ItemInvoiceAmount)
|
||||
If SH_POS.ItemInvoiceCurrency = "" Then
|
||||
InvoiceCurr = SH_POS.ItemInvoiceCurrency
|
||||
ElseIf SH_POS.ItemInvoiceCurrency <> InvoiceCurr Then
|
||||
InvoiceCurr = "XXX" ' Wenn währung unterschiedlich XX --> kein Übertrag
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
For Each SH_POS_DOC In SH_POS.DOCUMENTS
|
||||
Dim bool_add = False
|
||||
Dim EZA_POS_DOC As New DAKOSY_Worker.cDakosy_EZA_WarenpositionVorgelegteUnterlagen
|
||||
EZA_POS_DOC.ezaWpUl_DatumAusstellung = SH_POS_DOC.DocumentDate
|
||||
EZA_POS_DOC.ezaWpUl_Nummer = SH_POS_DOC.DocumentNr
|
||||
Select Case SH_POS_DOC.DocumentType
|
||||
Case "CMR" : EZA_POS_DOC.ezaWpUl_Art = "7HHF" : EZA_POS_DOC.ezaWpUl_Bereich = "4" : EZA_POS_DOC.ezaWpUl_VorlageKz = "J" : bool_add = True
|
||||
Case "INV" : EZA_POS_DOC.ezaWpUl_Art = "N380" : EZA_POS_DOC.ezaWpUl_Bereich = "4" : EZA_POS_DOC.ezaWpUl_VorlageKz = "J" : bool_add = True
|
||||
Case "ATR" : EZA_POS_DOC.ezaWpUl_Art = "N018" : EZA_POS_DOC.ezaWpUl_Bereich = "6" : EZA_POS_DOC.ezaWpUl_VorlageKz = "J" : bool_add = True
|
||||
' Case "EX" : EZA_POS_DOC.ezaWpUl_Art = "N380": EZA_POS_DOC.ezaWpUl_Bereich = "4
|
||||
End Select
|
||||
|
||||
If bool_add Then EZA_POS.ezaWP_UNTERLAGEN.Add(EZA_POS_DOC)
|
||||
Next
|
||||
|
||||
EZA.eza_WARENPOS.Add(EZA_POS)
|
||||
Next
|
||||
|
||||
EZA.eza_Rechnungspreis = InvoiceSum
|
||||
If InvoiceCurr <> "XXX" Then EZA.eza_Rechnungswaehrung = InvoiceCurr
|
||||
|
||||
Dim LieferbedingungOrtAbsedner = ""
|
||||
Dim LieferbedingungOrtEmpfaenger = ""
|
||||
For Each SH_AD In SH.EZA.ADDRESS
|
||||
Dim EZA_AD As New DAKOSY_Worker.cDakosy_EZA_Adressen
|
||||
EZA_AD.ezaAd_AdressTyp = SH_AD.AddressCode
|
||||
EZA_AD.ezaAd_LandCode = SH_AD.CountryCode
|
||||
|
||||
EZA_AD.ezaAd_TeilnehmerEORI = SH_AD.EORI
|
||||
EZA_AD.ezaAd_TeilnehmerNLNR = SH_AD.NLNR
|
||||
EZA_AD.ezaAd_NameFirma1 = SH_AD.Name1
|
||||
EZA_AD.ezaAd_NameFirma2 = SH_AD.Name2
|
||||
EZA_AD.ezaAd_NameFirma3 = SH_AD.Name3
|
||||
@@ -473,9 +514,37 @@ Public Class usrCntlATLAS_EZA
|
||||
EZA_AD.ezaAd_PLZ = SH_AD.PostalCode
|
||||
EZA_AD.ezaAd_UStIDAnmelder = SH_AD.UStID
|
||||
|
||||
If EZA_AD.ezaAd_AdressTyp = "CN" Then 'EMPFÄNGER
|
||||
EZA_AD.ezaAd_TeilnehmerEORI = SH_AD.EORI
|
||||
EZA_AD.ezaAd_TeilnehmerNLNR = SH_AD.NLNR
|
||||
|
||||
If If(EZA_AD.ezaAd_LandCode, "") = "DE" And EZA_AD.ezaAd_PLZ IsNot Nothing Then
|
||||
EZA.eza_Bestimmungsbundesland = VERAG_PROG_ALLGEMEIN.cDEBundeslaenderPLZ.LOADBundeslandCode_ByPLZ(EZA_AD.ezaAd_PLZ)
|
||||
ElseIf If(EZA_AD.ezaAd_LandCode, "") <> "" Then
|
||||
EZA.eza_Bestimmungsbundesland = 25
|
||||
End If
|
||||
|
||||
If If(EZA_AD.ezaAd_Ort, "") <> "" Then LieferbedingungOrtEmpfaenger = EZA_AD.ezaAd_Ort
|
||||
End If
|
||||
|
||||
If EZA_AD.ezaAd_AdressTyp = "CZ" Then 'ABSENDER
|
||||
If If(EZA_AD.ezaAd_Ort, "") <> "" Then LieferbedingungOrtAbsedner = EZA_AD.ezaAd_Ort
|
||||
End If
|
||||
|
||||
EZA.eza_ADRESSEN.Add(EZA_AD)
|
||||
Next
|
||||
|
||||
|
||||
Select Case If(EZA.eza_LieferbedingungCode, "")
|
||||
Case ""
|
||||
Case "EXW", "FCA", "FOB", "FAS"
|
||||
EZA.eza_LieferbedingungSchluessel = 1
|
||||
EZA.eza_LieferbedingungOrt = LieferbedingungOrtAbsedner
|
||||
Case Else
|
||||
EZA.eza_LieferbedingungSchluessel = 3
|
||||
EZA.eza_LieferbedingungOrt = LieferbedingungOrtEmpfaenger
|
||||
End Select
|
||||
|
||||
Vorsystem = True
|
||||
End If
|
||||
|
||||
|
||||
@@ -1074,8 +1074,8 @@ Class DAKOSY_Interface_SEND
|
||||
End If
|
||||
|
||||
Dim saveDir = Application.StartupPath & "\Dakosy_SEND\"
|
||||
If Not IO.Directory.Exists(saveDir) Then
|
||||
IO.Directory.CreateDirectory(saveDir)
|
||||
If Not System.IO.Directory.Exists(saveDir) Then
|
||||
System.IO.Directory.CreateDirectory(saveDir)
|
||||
End If
|
||||
|
||||
saveFile = saveDir & "DY_" & Now.ToString("yyMMdd_HHmmss") & ".xml"
|
||||
@@ -1459,8 +1459,8 @@ Class DAKOSY_Interface_SEND
|
||||
XML.EinzelAnmeldung.Add(EA)
|
||||
|
||||
Dim saveDir = Application.StartupPath & "\Dakosy_SEND\"
|
||||
If Not IO.Directory.Exists(saveDir) Then
|
||||
IO.Directory.CreateDirectory(saveDir)
|
||||
If Not System.IO.Directory.Exists(saveDir) Then
|
||||
System.IO.Directory.CreateDirectory(saveDir)
|
||||
End If
|
||||
|
||||
saveFile = saveDir & "DY_" & Now.ToString("yyMMdd_HHmmss") & ".xml"
|
||||
@@ -1474,9 +1474,9 @@ Class DAKOSY_Interface_SEND
|
||||
|
||||
Shared Sub replaceNullDateXML(XMLFile As String)
|
||||
Try
|
||||
If Not IO.File.Exists(XMLFile) Then Exit Sub
|
||||
Dim lines() As String = IO.File.ReadAllLines(XMLFile)
|
||||
Using writer = New IO.StreamWriter(XMLFile, False)
|
||||
If Not System.IO.File.Exists(XMLFile) Then Exit Sub
|
||||
Dim lines() As String = System.IO.File.ReadAllLines(XMLFile)
|
||||
Using writer = New System.IO.StreamWriter(XMLFile, False)
|
||||
For Each line In lines
|
||||
If Not line.Contains("0001-01-01") Then writer.WriteLine(line)
|
||||
Next
|
||||
|
||||
@@ -75,6 +75,7 @@ Partial Class frmDY_LogBuch
|
||||
Me.DataGridView.Name = "DataGridView"
|
||||
Me.DataGridView.ReadOnly = True
|
||||
Me.DataGridView.RowHeadersVisible = False
|
||||
Me.DataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect
|
||||
Me.DataGridView.Size = New System.Drawing.Size(732, 419)
|
||||
Me.DataGridView.TabIndex = 1
|
||||
'
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
lblBezugsNr.Text = ""
|
||||
With DataGridView
|
||||
.Columns.Clear()
|
||||
.DataSource = SQL.loadDgvBySql("SELECT isNull([dySt_BezugsNr],'') as dySt_BezugsNr,[dySt_status] as [Status] ,[dySt_ergCode] as [Code] ,[dySt_ergMitteilung] as [Mitteilung] ,isnull(cast([dySt_ergZeitpunkt] as varchar(20)),'') as Zeitstempel" &
|
||||
" FROM [VERAG].[dbo].[tblDakosy_Statusmeldungen] where dySt_dyId='" & dy_id & "'", "FMZOLL")
|
||||
.DataSource = SQL.loadDgvBySql("SELECT isNull([dySt_BezugsNr],'') as dySt_BezugsNr,[dySt_status] as [Status] ,[dySt_ergCode] as [Code] ,[dySt_ergMitteilung] as [Mitteilung] ,isnull(cast(convert(varchar,[dySt_ergZeitpunkt] ,113) as varchar(20)),'') as Zeitstempel" &
|
||||
" FROM [tblDakosy_Statusmeldungen] where dySt_dyId='" & dy_id & "'", "FMZOLL")
|
||||
|
||||
If .ColumnCount = 0 Then Exit Sub
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells
|
||||
|
||||
.Columns("Mitteilung").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
|
||||
'.Columns("Zeitstempel").DefaultCellStyle.Format = "dd.MM.yyyy HH:mm:ss"
|
||||
|
||||
If .RowCount > 0 Then
|
||||
lblBezugsNr.Text = .Rows(0).Cells("dySt_BezugsNr").Value
|
||||
|
||||
Reference in New Issue
Block a user