neu
This commit is contained in:
@@ -44,6 +44,7 @@ Partial Class usrCntlATLAS_EZA
|
||||
Me.lblBezugsnummer = New System.Windows.Forms.Label()
|
||||
Me.cntxtBezugsnr = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
Me.NeueBezugsnummerVergebenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.BezugsnummerKopierenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||
Me.txtDyMandant = New System.Windows.Forms.Label()
|
||||
Me.txtDyNiederlassung = New System.Windows.Forms.Label()
|
||||
@@ -53,7 +54,8 @@ Partial Class usrCntlATLAS_EZA
|
||||
Me.LadenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.ToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.EZAIDToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.BezugsnummerKopierenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.DateiimportToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.DynamicAutomotiveXLSToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
CType(Me.SplitContainer, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainer.Panel1.SuspendLayout()
|
||||
Me.SplitContainer.SuspendLayout()
|
||||
@@ -352,9 +354,10 @@ Partial Class usrCntlATLAS_EZA
|
||||
'
|
||||
'cntxtBezugsnr
|
||||
'
|
||||
Me.cntxtBezugsnr.ImageScalingSize = New System.Drawing.Size(24, 24)
|
||||
Me.cntxtBezugsnr.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.NeueBezugsnummerVergebenToolStripMenuItem, Me.BezugsnummerKopierenToolStripMenuItem})
|
||||
Me.cntxtBezugsnr.Name = "cntxtBezugsnr"
|
||||
Me.cntxtBezugsnr.Size = New System.Drawing.Size(239, 70)
|
||||
Me.cntxtBezugsnr.Size = New System.Drawing.Size(239, 48)
|
||||
Me.cntxtBezugsnr.Text = "Bezugsnr"
|
||||
'
|
||||
'NeueBezugsnummerVergebenToolStripMenuItem
|
||||
@@ -363,6 +366,12 @@ Partial Class usrCntlATLAS_EZA
|
||||
Me.NeueBezugsnummerVergebenToolStripMenuItem.Size = New System.Drawing.Size(238, 22)
|
||||
Me.NeueBezugsnummerVergebenToolStripMenuItem.Text = "neue Bezugsnummer vergeben"
|
||||
'
|
||||
'BezugsnummerKopierenToolStripMenuItem
|
||||
'
|
||||
Me.BezugsnummerKopierenToolStripMenuItem.Name = "BezugsnummerKopierenToolStripMenuItem"
|
||||
Me.BezugsnummerKopierenToolStripMenuItem.Size = New System.Drawing.Size(238, 22)
|
||||
Me.BezugsnummerKopierenToolStripMenuItem.Text = "Bezugsnummer kopieren"
|
||||
'
|
||||
'Panel1
|
||||
'
|
||||
Me.Panel1.Controls.Add(Me.txtDyMandant)
|
||||
@@ -398,7 +407,8 @@ Partial Class usrCntlATLAS_EZA
|
||||
'MenuStrip
|
||||
'
|
||||
Me.MenuStrip.BackColor = System.Drawing.Color.White
|
||||
Me.MenuStrip.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.OptionenToolStripMenuItem, Me.ToolStripMenuItem1})
|
||||
Me.MenuStrip.ImageScalingSize = New System.Drawing.Size(24, 24)
|
||||
Me.MenuStrip.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.OptionenToolStripMenuItem, Me.DateiimportToolStripMenuItem, Me.ToolStripMenuItem1})
|
||||
Me.MenuStrip.Location = New System.Drawing.Point(0, 0)
|
||||
Me.MenuStrip.Name = "MenuStrip"
|
||||
Me.MenuStrip.Size = New System.Drawing.Size(934, 24)
|
||||
@@ -414,13 +424,13 @@ Partial Class usrCntlATLAS_EZA
|
||||
'SpeichernToolStripMenuItem
|
||||
'
|
||||
Me.SpeichernToolStripMenuItem.Name = "SpeichernToolStripMenuItem"
|
||||
Me.SpeichernToolStripMenuItem.Size = New System.Drawing.Size(126, 22)
|
||||
Me.SpeichernToolStripMenuItem.Size = New System.Drawing.Size(180, 22)
|
||||
Me.SpeichernToolStripMenuItem.Text = "Speichern"
|
||||
'
|
||||
'LadenToolStripMenuItem
|
||||
'
|
||||
Me.LadenToolStripMenuItem.Name = "LadenToolStripMenuItem"
|
||||
Me.LadenToolStripMenuItem.Size = New System.Drawing.Size(126, 22)
|
||||
Me.LadenToolStripMenuItem.Size = New System.Drawing.Size(180, 22)
|
||||
Me.LadenToolStripMenuItem.Text = "Laden ..."
|
||||
Me.LadenToolStripMenuItem.Visible = False
|
||||
'
|
||||
@@ -437,11 +447,18 @@ Partial Class usrCntlATLAS_EZA
|
||||
Me.EZAIDToolStripMenuItem.Size = New System.Drawing.Size(109, 22)
|
||||
Me.EZAIDToolStripMenuItem.Text = "EZA ID"
|
||||
'
|
||||
'BezugsnummerKopierenToolStripMenuItem
|
||||
'DateiimportToolStripMenuItem
|
||||
'
|
||||
Me.BezugsnummerKopierenToolStripMenuItem.Name = "BezugsnummerKopierenToolStripMenuItem"
|
||||
Me.BezugsnummerKopierenToolStripMenuItem.Size = New System.Drawing.Size(238, 22)
|
||||
Me.BezugsnummerKopierenToolStripMenuItem.Text = "Bezugsnummer kopieren"
|
||||
Me.DateiimportToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.DynamicAutomotiveXLSToolStripMenuItem})
|
||||
Me.DateiimportToolStripMenuItem.Name = "DateiimportToolStripMenuItem"
|
||||
Me.DateiimportToolStripMenuItem.Size = New System.Drawing.Size(87, 20)
|
||||
Me.DateiimportToolStripMenuItem.Text = "Datei-Import"
|
||||
'
|
||||
'DynamicAutomotiveXLSToolStripMenuItem
|
||||
'
|
||||
Me.DynamicAutomotiveXLSToolStripMenuItem.Name = "DynamicAutomotiveXLSToolStripMenuItem"
|
||||
Me.DynamicAutomotiveXLSToolStripMenuItem.Size = New System.Drawing.Size(224, 22)
|
||||
Me.DynamicAutomotiveXLSToolStripMenuItem.Text = "Dynamic Automotive (XLSX)"
|
||||
'
|
||||
'usrCntlATLAS_EZA
|
||||
'
|
||||
@@ -497,4 +514,6 @@ Partial Class usrCntlATLAS_EZA
|
||||
Friend WithEvents ToolStripMenuItem1 As ToolStripMenuItem
|
||||
Friend WithEvents EZAIDToolStripMenuItem As ToolStripMenuItem
|
||||
Friend WithEvents BezugsnummerKopierenToolStripMenuItem As ToolStripMenuItem
|
||||
Friend WithEvents DateiimportToolStripMenuItem As ToolStripMenuItem
|
||||
Friend WithEvents DynamicAutomotiveXLSToolStripMenuItem As ToolStripMenuItem
|
||||
End Class
|
||||
|
||||
@@ -123,4 +123,7 @@
|
||||
<metadata name="MenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="MenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -1,6 +1,7 @@
|
||||
Imports DAKOSY_Worker
|
||||
Imports Tamir
|
||||
Imports Tamir.SharpSsh
|
||||
Imports Microsoft.Office.Interop
|
||||
|
||||
Public Class usrCntlATLAS_EZA
|
||||
|
||||
@@ -51,7 +52,7 @@ Public Class usrCntlATLAS_EZA
|
||||
|
||||
If DY_ANM IsNot Nothing Then
|
||||
Me.EZA = DAKOSY_Worker.cDakosyEZA.LOADByAnmIDFull(DY_ANM.dy_Id, True)
|
||||
Me.FIRMA_DY = Me.EZA.eza_firma
|
||||
If Me.EZA IsNot Nothing AndAlso Me.EZA.eza_firma IsNot Nothing Then Me.FIRMA_DY = Me.EZA.eza_firma
|
||||
End If
|
||||
|
||||
|
||||
@@ -747,5 +748,172 @@ Public Class usrCntlATLAS_EZA
|
||||
Private Sub BezugsnummerKopierenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles BezugsnummerKopierenToolStripMenuItem.Click
|
||||
Clipboard.SetText(lblBezugsnummer.Text)
|
||||
End Sub
|
||||
|
||||
Private Sub DynamicAutomotiveXLSToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles DynamicAutomotiveXLSToolStripMenuItem.Click
|
||||
importExcel_DynamicAutomotive()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Function checkExcel_DynamicAutomotive(Blatt As Excel.Worksheet) As Boolean
|
||||
'Prüfung
|
||||
Try
|
||||
If Blatt Is Nothing Then Return False
|
||||
If Blatt.Range("B23") Is Nothing Then Return False
|
||||
If Blatt.Range("B23").Value.ToString <> "Code" Then Return False
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Fehler bei der Prüfung!" & ex.Message)
|
||||
Me.Cursor = Cursors.Default
|
||||
Return False
|
||||
End Try
|
||||
Return True
|
||||
|
||||
End Function
|
||||
Private Function importExcel_DynamicAutomotive() As Boolean
|
||||
|
||||
|
||||
Dim fd As New OpenFileDialog
|
||||
fd.Filter = "Excel Dateien|*.xls;*.xlsx"
|
||||
Dim result As DialogResult = fd.ShowDialog()
|
||||
|
||||
If Not fd.FileName.EndsWith(".xls") And Not fd.FileName.EndsWith(".xlsx") Then
|
||||
Me.Cursor = Cursors.Default
|
||||
Return False
|
||||
End If
|
||||
|
||||
If result = System.Windows.Forms.DialogResult.OK Then
|
||||
|
||||
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
Dim exclApp As New Excel.Application 'Object 'as Application
|
||||
Dim Datei As Excel.Workbook ' 'as WorkBook
|
||||
Dim Blatt As Excel.Worksheet 'Object 'as WorkSheet
|
||||
|
||||
With exclApp
|
||||
Try
|
||||
|
||||
.CutCopyMode = False
|
||||
|
||||
.DisplayAlerts = False
|
||||
|
||||
|
||||
Datei = .Workbooks.Open(fd.FileName)
|
||||
Blatt = Datei.Worksheets(1)
|
||||
|
||||
Datei.Activate()
|
||||
|
||||
Try
|
||||
Blatt.ShowAllData() 'Falls Filter ausgewählt wurde
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
Dim startFound As Boolean = False
|
||||
Dim endFound As Boolean = False
|
||||
|
||||
If Not checkExcel_DynamicAutomotive(Blatt) Then 'VALIDIERUNG
|
||||
Me.Cursor = Cursors.Default
|
||||
Return False
|
||||
End If
|
||||
|
||||
If EZA.eza_WARENPOS.Count > 0 Then
|
||||
If vbYes = MsgBox("Sollten die aktuellen Einträge gelöscht werden?", vbYesNo) Then
|
||||
EZA.eza_WARENPOS.Clear() 'Zurücksetzen
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim startRows As Integer = 24
|
||||
|
||||
Dim endRows As Integer = startRows
|
||||
While endRows < Blatt.UsedRange.Rows.Count
|
||||
If Not Blatt.Range("B" & endRows) Is Nothing AndAlso Not Blatt.Range("B" & endRows).Value Is Nothing AndAlso Not Blatt.Range("B" & endRows).Value.ToString.Trim = "" Then
|
||||
endFound = True
|
||||
Else
|
||||
Exit While
|
||||
End If
|
||||
endRows += 1
|
||||
End While
|
||||
endRows -= 1
|
||||
|
||||
If Not endFound Then
|
||||
MsgBox("Keine Daten vorhanden!")
|
||||
Me.Cursor = Cursors.Default
|
||||
Return False
|
||||
End If
|
||||
|
||||
'Laden des Bereiches aus dem Excel:
|
||||
Dim myRange As Excel.Range
|
||||
myRange = Blatt.Range("B" & startRows & ":I" & endRows & "")
|
||||
Dim myArray As Object(,) '<-- declared as 2D Array
|
||||
myArray = myRange.Value 'store the content of each cell
|
||||
'myArray(i_soll2 - startRows + 1, 4)
|
||||
|
||||
|
||||
Dim cnt = 0
|
||||
|
||||
Try
|
||||
For i As Integer = 1 To endRows - startRows + 1 Step 1
|
||||
Dim POSITION As New DAKOSY_Worker.cDakosy_EZA_Warenposition
|
||||
POSITION.ezaWP_WarennummerEZT = myArray(i, 5).ToString()
|
||||
POSITION.ezaWP_PackstueckAnzahl = myArray(i, 6).ToString()
|
||||
POSITION.ezaWP_PackstueckArt = "PK"
|
||||
POSITION.ezaWP_Artikelpreis = CDbl(myArray(i, 8).ToString()).ToString("N2")
|
||||
POSITION.ezaWP_ArtikelpreisWaehrung = "EUR"
|
||||
POSITION.ezaWP_Warenbezeichnung = myArray(i, 2).ToString()
|
||||
Select Case myArray(i, 4).ToString
|
||||
Case "TURKEY" : POSITION.ezaWP_UrsprungslandCode = "TR"
|
||||
Case "ITALY" : POSITION.ezaWP_UrsprungslandCode = "IT"
|
||||
Case "SPAIN" : POSITION.ezaWP_UrsprungslandCode = "ES"
|
||||
Case "GERMANY" : POSITION.ezaWP_UrsprungslandCode = "DE"
|
||||
Case "CZECH REPUBLIC" : POSITION.ezaWP_UrsprungslandCode = "CZ"
|
||||
Case "FRANCE" : POSITION.ezaWP_UrsprungslandCode = "FR"
|
||||
|
||||
End Select
|
||||
|
||||
EZA.eza_WARENPOS.Add(POSITION)
|
||||
cnt += 1
|
||||
Next
|
||||
Catch ex As Exception
|
||||
MsgBox("Fehler beim Einlesen der Excel-Datei!" & vbNewLine & vbNewLine & ex.Message & ex.StackTrace)
|
||||
Me.Cursor = Cursors.Default
|
||||
Return False
|
||||
End Try
|
||||
|
||||
|
||||
.Visible = False
|
||||
|
||||
' AddHandler exclApp.WorkbookBeforeClose, AddressOf BeforeBookClose
|
||||
'Excelobjekte freistellten
|
||||
' For Each obj In New Object() {exclApp, Datei, Datei, Blatt, Blatt}
|
||||
' System.Runtime.InteropServices.Marshal.FinalReleaseComObject(obj)
|
||||
' Next
|
||||
Datei.Close()
|
||||
|
||||
Me.FindForm.SuspendLayout()
|
||||
POSITIONEN.setValues(EZA, True)
|
||||
btnPositionen.PerformClick()
|
||||
MsgBox(cnt & " Datensätze wurden eingelesen. ")
|
||||
Me.FindForm.ResumeLayout()
|
||||
|
||||
Me.Cursor = Cursors.Default
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
'
|
||||
Me.Cursor = Cursors.Default
|
||||
MsgBox("FEHLER! Datei im richtigen Format?" & vbNewLine & vbNewLine & ex.Message & ex.StackTrace)
|
||||
' Return False
|
||||
End Try
|
||||
End With
|
||||
Return True
|
||||
Else
|
||||
MsgBox("Keine Datei ausgewählt!")
|
||||
End If
|
||||
|
||||
Me.Cursor = Cursors.Default
|
||||
Return False
|
||||
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
@@ -31,14 +31,14 @@
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub initSrch()
|
||||
Public Sub initSrch(Optional blockEvents As Boolean = False)
|
||||
|
||||
sbPkTyp.initSearchBox(Me.FindForm, " [Code] ,[Description] as Verpackungsart, Code + ' ' + Description as display FROM tbl_DY_ZollDE_C0017_PackstueckeVerpackungsarten", {"Code", "Description"}, " (StartDate is null OR StartDate< GETDATE()) AND (EndDate is null OR EndDate> GETDATE()) ", "Code", "Code", "display", "FMZOLL", , 400, 200)
|
||||
sbUlArt.initSearchBox(Me.FindForm, " [Code] ,[Description] as Art, Code + ' ' + Description as display FROM tbl_DY_ZollDE_I0200_Unterlagearten", {"Description", "'%'+Code", "DocumentCode", "Division"}, " (StartDate is null OR StartDate< GETDATE()) AND (EndDate is null OR EndDate> GETDATE()) ", "Code", "Code", "display", "FMZOLL", , 400, 200)
|
||||
' sbExportAusLand.initSearchBox(Me.FindForm, " [Code] ,[Description] as Land FROM tbl_DY_ZollDE_C0008_LaenderFull", {"Code", "Description"}, " (StartDate is null OR StartDate< GETDATE()) AND (EndDate is null OR EndDate> GETDATE()) ", "Code", "Code", "Code", "FMZOLL", , 400, 200)
|
||||
sbPkTyp.SET_VALUE("Pk")
|
||||
|
||||
setvalue(WARE)
|
||||
setvalue(WARE, blockEvents)
|
||||
End Sub
|
||||
|
||||
Private Sub usrCntlATLAS_NCTS_Position_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
@@ -133,11 +133,11 @@
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Sub setvalue(WARE As DAKOSY_Worker.cDakosy_EZA_Warenposition)
|
||||
Sub setvalue(WARE As DAKOSY_Worker.cDakosy_EZA_Warenposition, Optional blockEvents As Boolean = False)
|
||||
If WARE IsNot Nothing Then
|
||||
Me.txtWarenbezeichnung.Text = If(WARE.ezaWP_Warenbezeichnung, "")
|
||||
Me.txtRohmasse.Text = If(WARE.ezaWP_Rohmasse, "")
|
||||
RaiseEvent RohmasseChanged(If(IsNumeric(txtRohmasse.Text), CDbl(txtRohmasse.Text), 0))
|
||||
If Not blockEvents Then RaiseEvent RohmasseChanged(If(IsNumeric(txtRohmasse.Text), CDbl(txtRohmasse.Text), 0))
|
||||
Me.txtEigenmasse.Text = If(WARE.ezaWP_Eigenmasse, "")
|
||||
Me.txtWarenwert._value = If(WARE.ezaWP_Artikelpreis, "")
|
||||
Me.txtArtikelpreisWaehrung.SET_VALUE(If(WARE.ezaWP_ArtikelpreisWaehrung, ""))
|
||||
|
||||
@@ -26,15 +26,15 @@
|
||||
'setValues(NCTS.ncts_WARENPOS)
|
||||
End Sub
|
||||
|
||||
Public Sub setValues(ncts_POS As DAKOSY_Worker.cDakosyEZA)
|
||||
Public Sub setValues(ncts_POS As DAKOSY_Worker.cDakosyEZA, Optional blockEvents As Boolean = False)
|
||||
If ncts_POS Is Nothing Then Exit Sub
|
||||
POS.Clear()
|
||||
|
||||
For Each p In ncts_POS.EZA_WARENPOS
|
||||
addItem(p) 'MyPanel2.Controls.Add()
|
||||
For Each p In ncts_POS.eza_WARENPOS
|
||||
addItem(p, blockEvents) 'MyPanel2.Controls.Add()
|
||||
Next
|
||||
MyPanel2.Controls.Clear()
|
||||
MyListBox1_SelectedIndexChanged(dgvPositionen, New EventArgs)
|
||||
If Not blockEvents Then MyListBox1_SelectedIndexChanged(dgvPositionen, New EventArgs)
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
End Sub
|
||||
|
||||
|
||||
Function addItem(Optional POSTMP As DAKOSY_Worker.cDakosy_EZA_Warenposition = Nothing) As usrCntlATLAS_EZA_Position
|
||||
Function addItem(Optional POSTMP As DAKOSY_Worker.cDakosy_EZA_Warenposition = Nothing, Optional blockEvents As Boolean = False) As usrCntlATLAS_EZA_Position
|
||||
Dim u = New usrCntlATLAS_EZA_Position(POS.Count, POSTMP, USRCNTL_EZA)
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
For Each p In POS
|
||||
gesRohmasse += If(IsNumeric(p.txtRohmasse.Text), p.txtRohmasse.Text, 0)
|
||||
Next
|
||||
RaiseEvent RohmasseChanged(gesRohmasse)
|
||||
If Not blockEvents Then RaiseEvent RohmasseChanged(gesRohmasse)
|
||||
End Sub
|
||||
u.Dock = DockStyle.Fill
|
||||
' AddHandler u.ADD, AddressOf addItem
|
||||
@@ -140,11 +140,13 @@
|
||||
' AddHandler u.NEXT_POS, AddressOf NEXT_POS
|
||||
' AddHandler u.PREV_POS, AddressOf PREV_POS
|
||||
POS.Add(u)
|
||||
u.initSrch()
|
||||
u.initSrch(blockEvents)
|
||||
initListBox()
|
||||
dgvPositionen.ClearSelection()
|
||||
If dgvPositionen.RowCount > 0 Then dgvPositionen.Rows(dgvPositionen.RowCount - 1).Selected = True
|
||||
RaiseEvent PosAnzChanged(POS.Count)
|
||||
If Not blockEvents Then
|
||||
dgvPositionen.ClearSelection()
|
||||
If dgvPositionen.RowCount > 0 Then dgvPositionen.Rows(dgvPositionen.RowCount - 1).Selected = True
|
||||
RaiseEvent PosAnzChanged(POS.Count)
|
||||
End If
|
||||
Return u
|
||||
End Function
|
||||
|
||||
|
||||
@@ -471,14 +471,34 @@ Public Class usrCntlATLAS_NCTS
|
||||
End If
|
||||
'cdy.ncts_WARENPOS.Add(p)
|
||||
|
||||
cdy.ncts_Empfaenger_EORI = cProgramFunctions.isLeerNothing(SENDUNG.NCTS_Verzollungsadresse_EORI)
|
||||
cdy.ncts_Empfaenger_NLNR = cProgramFunctions.isLeerNothing(SENDUNG.NCTS_Verzollungsadresse_EORI_NL)
|
||||
cdy.ncts_Empfaenger_Name = cProgramFunctions.isLeerNothing(SENDUNG.tblSnd_NCTSVerzollungsadresse)
|
||||
cdy.ncts_Empfaenger_StrasseHausnummer = cProgramFunctions.isLeerNothing(SENDUNG.NCTS_Verzollungsadresse_Strasse)
|
||||
cdy.ncts_Empfaenger_PLZ = cProgramFunctions.isLeerNothing(SENDUNG.NCTS_Verzollungsadresse_PLZ)
|
||||
cdy.ncts_Empfaenger_Ort = cProgramFunctions.isLeerNothing(SENDUNG.NCTS_Verzollungsadresse_Ort)
|
||||
cdy.ncts_Empfaenger_Land = cProgramFunctions.isLeerNothing(SENDUNG.NCTS_Verzollungsadresse_Land)
|
||||
cdy.ncts_BestimmungsstelleDienststellennummer = cProgramFunctions.isLeerNothing(SENDUNG.NCTS_Bestimmungszollstelle)
|
||||
Select Case cdy.ncts_AbgangsDienststellennummer
|
||||
Case "DE007458" 'Bad Reichenhall --> Empfänger muss tat. Empf. sein; Gest.Adresse nicht akzeptiert!!
|
||||
|
||||
If SENDUNG.tblSnd_EmpfaengerKdNr > 0 Then
|
||||
Dim adEMPF As New VERAG_PROG_ALLGEMEIN.cAdressen(SENDUNG.tblSnd_EmpfaengerKdNr)
|
||||
Dim kdEMPF As New VERAG_PROG_ALLGEMEIN.cKunde(SENDUNG.tblSnd_EmpfaengerKdNr)
|
||||
cdy.ncts_Empfaenger_EORI = kdEMPF.EORITIN
|
||||
cdy.ncts_Empfaenger_NLNR = kdEMPF.EORITIN_NL
|
||||
cdy.ncts_Empfaenger_Name = If(adEMPF.Name_1, "") & If(adEMPF.Name_2, "")
|
||||
cdy.ncts_Empfaenger_StrasseHausnummer = adEMPF.Straße
|
||||
cdy.ncts_Empfaenger_PLZ = adEMPF.PLZ
|
||||
cdy.ncts_Empfaenger_Ort = adEMPF.Ort
|
||||
If adEMPF.LandKz IsNot Nothing Then cdy.ncts_Empfaenger_Land = cProgramFunctions.getISO2Land(adEMPF.LandKz)
|
||||
cdy.ncts_BestimmungsstelleDienststellennummer = cProgramFunctions.isLeerNothing(SENDUNG.NCTS_Bestimmungszollstelle)
|
||||
|
||||
End If
|
||||
|
||||
Case Else
|
||||
cdy.ncts_Empfaenger_EORI = cProgramFunctions.isLeerNothing(SENDUNG.NCTS_Verzollungsadresse_EORI)
|
||||
cdy.ncts_Empfaenger_NLNR = cProgramFunctions.isLeerNothing(SENDUNG.NCTS_Verzollungsadresse_EORI_NL)
|
||||
cdy.ncts_Empfaenger_Name = cProgramFunctions.isLeerNothing(SENDUNG.tblSnd_NCTSVerzollungsadresse)
|
||||
cdy.ncts_Empfaenger_StrasseHausnummer = cProgramFunctions.isLeerNothing(SENDUNG.NCTS_Verzollungsadresse_Strasse)
|
||||
cdy.ncts_Empfaenger_PLZ = cProgramFunctions.isLeerNothing(SENDUNG.NCTS_Verzollungsadresse_PLZ)
|
||||
cdy.ncts_Empfaenger_Ort = cProgramFunctions.isLeerNothing(SENDUNG.NCTS_Verzollungsadresse_Ort)
|
||||
cdy.ncts_Empfaenger_Land = cProgramFunctions.isLeerNothing(SENDUNG.NCTS_Verzollungsadresse_Land)
|
||||
cdy.ncts_BestimmungsstelleDienststellennummer = cProgramFunctions.isLeerNothing(SENDUNG.NCTS_Bestimmungszollstelle)
|
||||
|
||||
End Select
|
||||
|
||||
|
||||
If SENDUNG.tblSnd_AbsenderKdNr > 0 Then
|
||||
|
||||
@@ -213,14 +213,21 @@
|
||||
If AVISO.Grenzstelle.Replace("???", "") = "" Then
|
||||
zst = AVISO.Zollstelle
|
||||
Else
|
||||
Select Case AVISO.Grenzstelle
|
||||
Case "SUB" : zst = "DE007701"'Suben Autobahngrenze
|
||||
Case "SBG", "AMB" : zst = "DE007458" 'Bad Reichenhall-Autobahn
|
||||
Case "WAI" : zst = "DE008904" 'Weiden-Waidhaus
|
||||
Case "NEU" : zst = "DE007703" 'Passau
|
||||
Case "WO_GE" : zst = "DE008752" 'Erlangen
|
||||
' Case "SFD" : zst = Asd ....DAKOS DE -.-
|
||||
End Select
|
||||
|
||||
Dim GRZ As New VERAG_PROG_ALLGEMEIN.cGrenzstelle(AVISO.Grenzstelle)
|
||||
If GRZ IsNot Nothing AndAlso GRZ.hasEntry Then
|
||||
If GRZ.grz_ZollamtDST IsNot Nothing Then zst = GRZ.grz_ZollamtDST ' ZollDST setzen, zB "DE007701"'Suben Autobahngrenze
|
||||
End If
|
||||
|
||||
|
||||
'Select Case AVISO.Grenzstelle
|
||||
' Case "SUB" : zst = "DE007701"'Suben Autobahngrenze
|
||||
' Case "SBG", "AMB" : zst = "DE007458" 'Bad Reichenhall-Autobahn
|
||||
' Case "WAI" : zst = "DE008904" 'Weiden-Waidhaus
|
||||
' Case "NEU" : zst = "DE007703" 'Passau
|
||||
' Case "WO_GE" : zst = "DE008752" 'Erlangen
|
||||
' ' Case "SFD" : zst = Asd ....DAKOS DE -.-
|
||||
'End Select
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message & ex.StackTrace)
|
||||
|
||||
@@ -553,7 +553,7 @@ Public Class usrCntlTCeZOLL_EZA
|
||||
|
||||
Me.Refresh()
|
||||
cboDakosyAction.Focus() 'nur, damit alle _value aktualisuiert sind...
|
||||
If sentToDakosy OrElse vbYes = MsgBox("Sollen die Daten abgeschickt werden?" & vbNewLine & "Eine Änderung ist nur noch in der Dakosy Software möglich.", vbYesNoCancel) Then
|
||||
If sentToDakosy OrElse vbYes = MsgBox("Sollen die Daten abgeschickt werden?" & vbNewLine & "Eine Änderung ist nur noch in der Telotec Software möglich.", vbYesNoCancel) Then
|
||||
' Dim cDyAnm As New cDakosy_Zollanmeldungen(cDy_ART, BezugsNr, AVISO.AvisoID, SENDUNG.tblSnd_SendungID)
|
||||
loadDYZollanmeldungen()
|
||||
|
||||
@@ -583,8 +583,10 @@ Public Class usrCntlTCeZOLL_EZA
|
||||
cTELOTECInterface_Send.loadInClass_VersandanmeldungEZA(TC_ANM, Me)
|
||||
If Not TC_ANM.SAVE() Then Exit Sub
|
||||
|
||||
|
||||
Dim saveFile = ""
|
||||
If cTELOTECInterface_Send.generateVersandanmeldungEZA(TC_ANM, saveFile, cboDakosyAction._value) Then
|
||||
MsgBox(saveFile)
|
||||
If saveFile <> "" Then
|
||||
If Not cTC_Functions.send_Data_To_TC(saveFile, BezugsNr, TC_ANM.telanm_id, FIRMA_DY) Then
|
||||
MsgBox("Sendefehler!")
|
||||
|
||||
Reference in New Issue
Block a user