verwahrung, etc.

This commit is contained in:
2025-12-31 09:19:14 +01:00
parent eab90bc81a
commit e3c2ac353d
6 changed files with 380 additions and 289 deletions

View File

@@ -151,6 +151,7 @@ Public Class frmMitarbDetails
cbxClientTimas.Items.Clear() cbxClientTimas.Items.Clear()
cbxClientTimas.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("", "")) cbxClientTimas.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("", ""))
cbxClientTimas.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("AMBAR", "AMBAR"))
cbxClientTimas.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("ATILLA", "ATILLA")) cbxClientTimas.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("ATILLA", "ATILLA"))
cbxClientTimas.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("FRONTOFFICE", "FO")) cbxClientTimas.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("FRONTOFFICE", "FO"))
cbxClientTimas.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("IMEX", "IMEX")) cbxClientTimas.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("IMEX", "IMEX"))

View File

@@ -59,6 +59,8 @@ Partial Class usrctlProcedures
Me.Button11 = New System.Windows.Forms.Button() Me.Button11 = New System.Windows.Forms.Button()
Me.Button10 = New System.Windows.Forms.Button() Me.Button10 = New System.Windows.Forms.Button()
Me.DataGridView1 = New System.Windows.Forms.DataGridView() Me.DataGridView1 = New System.Windows.Forms.DataGridView()
Me.Column1 = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.Column2 = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.Button9 = New System.Windows.Forms.Button() Me.Button9 = New System.Windows.Forms.Button()
Me.Button8 = New System.Windows.Forms.Button() Me.Button8 = New System.Windows.Forms.Button()
Me.Button7 = New System.Windows.Forms.Button() Me.Button7 = New System.Windows.Forms.Button()
@@ -85,6 +87,8 @@ Partial Class usrctlProcedures
Me.Button48 = New System.Windows.Forms.Button() Me.Button48 = New System.Windows.Forms.Button()
Me.Button47 = New System.Windows.Forms.Button() Me.Button47 = New System.Windows.Forms.Button()
Me.TabPage6 = New System.Windows.Forms.TabPage() Me.TabPage6 = New System.Windows.Forms.TabPage()
Me.Label23 = New System.Windows.Forms.Label()
Me.Button54 = New System.Windows.Forms.Button()
Me.Label19 = New System.Windows.Forms.Label() Me.Label19 = New System.Windows.Forms.Label()
Me.Label18 = New System.Windows.Forms.Label() Me.Label18 = New System.Windows.Forms.Label()
Me.Label17 = New System.Windows.Forms.Label() Me.Label17 = New System.Windows.Forms.Label()
@@ -93,7 +97,7 @@ Partial Class usrctlProcedures
Me.Button50 = New System.Windows.Forms.Button() Me.Button50 = New System.Windows.Forms.Button()
Me.Button49 = New System.Windows.Forms.Button() Me.Button49 = New System.Windows.Forms.Button()
Me.TabPage7 = New System.Windows.Forms.TabPage() Me.TabPage7 = New System.Windows.Forms.TabPage()
Me.btnT1Data = New System.Windows.Forms.Button() Me.Button53 = New System.Windows.Forms.Button()
Me.Label22 = New System.Windows.Forms.Label() Me.Label22 = New System.Windows.Forms.Label()
Me.dtpbis = New System.Windows.Forms.DateTimePicker() Me.dtpbis = New System.Windows.Forms.DateTimePicker()
Me.lblDakosyImport = New System.Windows.Forms.Label() Me.lblDakosyImport = New System.Windows.Forms.Label()
@@ -104,6 +108,8 @@ Partial Class usrctlProcedures
Me.Button52 = New System.Windows.Forms.Button() Me.Button52 = New System.Windows.Forms.Button()
Me.TabPage8 = New System.Windows.Forms.TabPage() Me.TabPage8 = New System.Windows.Forms.TabPage()
Me.btnImportTrStat = New System.Windows.Forms.Button() Me.btnImportTrStat = New System.Windows.Forms.Button()
Me.TabPage9 = New System.Windows.Forms.TabPage()
Me.btnT1Data = New System.Windows.Forms.Button()
Me.Button18 = New System.Windows.Forms.Button() Me.Button18 = New System.Windows.Forms.Button()
Me.TextBox1 = New System.Windows.Forms.TextBox() Me.TextBox1 = New System.Windows.Forms.TextBox()
Me.lblAnzahl = New System.Windows.Forms.Label() Me.lblAnzahl = New System.Windows.Forms.Label()
@@ -157,14 +163,7 @@ Partial Class usrctlProcedures
Me.Button99 = New System.Windows.Forms.Button() Me.Button99 = New System.Windows.Forms.Button()
Me.DataGridViewTextBoxColumn1 = New System.Windows.Forms.DataGridViewTextBoxColumn() Me.DataGridViewTextBoxColumn1 = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.DataGridViewTextBoxColumn2 = New System.Windows.Forms.DataGridViewTextBoxColumn() Me.DataGridViewTextBoxColumn2 = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.TabPage9 = New System.Windows.Forms.TabPage()
Me.Button53 = New System.Windows.Forms.Button()
Me.tbTRStat.SuspendLayout() Me.tbTRStat.SuspendLayout()
Me.Column1 = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.Column2 = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.Button54 = New System.Windows.Forms.Button()
Me.Label23 = New System.Windows.Forms.Label()
'Me.TabControl1.SuspendLayout()
Me.TabPage3.SuspendLayout() Me.TabPage3.SuspendLayout()
Me.TabPage1.SuspendLayout() Me.TabPage1.SuspendLayout()
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -550,6 +549,16 @@ Partial Class usrctlProcedures
Me.DataGridView1.Size = New System.Drawing.Size(240, 431) Me.DataGridView1.Size = New System.Drawing.Size(240, 431)
Me.DataGridView1.TabIndex = 5 Me.DataGridView1.TabIndex = 5
' '
'Column1
'
Me.Column1.HeaderText = "dat"
Me.Column1.Name = "Column1"
'
'Column2
'
Me.Column2.HeaderText = "anz"
Me.Column2.Name = "Column2"
'
'Button9 'Button9
' '
Me.Button9.Location = New System.Drawing.Point(131, 131) Me.Button9.Location = New System.Drawing.Point(131, 131)
@@ -810,6 +819,24 @@ Partial Class usrctlProcedures
Me.TabPage6.Text = "MDM Importe" Me.TabPage6.Text = "MDM Importe"
Me.TabPage6.UseVisualStyleBackColor = True Me.TabPage6.UseVisualStyleBackColor = True
' '
'Label23
'
Me.Label23.AutoSize = True
Me.Label23.Location = New System.Drawing.Point(11, 141)
Me.Label23.Name = "Label23"
Me.Label23.Size = New System.Drawing.Size(16, 13)
Me.Label23.TabIndex = 73
Me.Label23.Text = "3."
'
'Button54
'
Me.Button54.Location = New System.Drawing.Point(33, 133)
Me.Button54.Name = "Button54"
Me.Button54.Size = New System.Drawing.Size(106, 28)
Me.Button54.TabIndex = 72
Me.Button54.Text = "Vers-Summe"
Me.Button54.UseVisualStyleBackColor = True
'
'Label19 'Label19
' '
Me.Label19.AutoSize = True Me.Label19.AutoSize = True
@@ -993,6 +1020,26 @@ Partial Class usrctlProcedures
Me.btnImportTrStat.Text = "Import TrStat" Me.btnImportTrStat.Text = "Import TrStat"
Me.btnImportTrStat.UseVisualStyleBackColor = True Me.btnImportTrStat.UseVisualStyleBackColor = True
' '
'TabPage9
'
Me.TabPage9.Controls.Add(Me.btnT1Data)
Me.TabPage9.Location = New System.Drawing.Point(4, 22)
Me.TabPage9.Name = "TabPage9"
Me.TabPage9.Padding = New System.Windows.Forms.Padding(3)
Me.TabPage9.Size = New System.Drawing.Size(601, 288)
Me.TabPage9.TabIndex = 8
Me.TabPage9.Text = "T1 Serice"
Me.TabPage9.UseVisualStyleBackColor = True
'
'btnT1Data
'
Me.btnT1Data.Location = New System.Drawing.Point(228, 120)
Me.btnT1Data.Name = "btnT1Data"
Me.btnT1Data.Size = New System.Drawing.Size(145, 49)
Me.btnT1Data.TabIndex = 25
Me.btnT1Data.Text = "T1 Servcie"
Me.btnT1Data.UseVisualStyleBackColor = True
'
'Button18 'Button18
' '
Me.Button18.Location = New System.Drawing.Point(59, 183) Me.Button18.Location = New System.Drawing.Point(59, 183)
@@ -1472,54 +1519,6 @@ Partial Class usrctlProcedures
Me.DataGridViewTextBoxColumn2.HeaderText = "anz" Me.DataGridViewTextBoxColumn2.HeaderText = "anz"
Me.DataGridViewTextBoxColumn2.Name = "DataGridViewTextBoxColumn2" Me.DataGridViewTextBoxColumn2.Name = "DataGridViewTextBoxColumn2"
' '
'Column1
'
Me.Column1.HeaderText = "dat"
Me.Column1.Name = "Column1"
'
'Column2
'
Me.Column2.HeaderText = "anz"
Me.Column2.Name = "Column2"
'
'Button54
'
Me.Button54.Location = New System.Drawing.Point(33, 133)
Me.Button54.Name = "Button54"
Me.Button54.Size = New System.Drawing.Size(106, 28)
Me.Button54.TabIndex = 72
Me.Button54.Text = "ZNB Zinssätze"
Me.Button54.UseVisualStyleBackColor = True
'
'Label23
'
Me.Label23.AutoSize = True
Me.Label23.Location = New System.Drawing.Point(11, 141)
Me.Label23.Name = "Label23"
Me.Label23.Size = New System.Drawing.Size(16, 13)
Me.Label23.TabIndex = 73
Me.Label23.Text = "3."
'
'TabPage9
'
Me.TabPage9.Controls.Add(Me.btnT1Data)
Me.TabPage9.Location = New System.Drawing.Point(4, 22)
Me.TabPage9.Name = "TabPage9"
Me.TabPage9.Padding = New System.Windows.Forms.Padding(3)
Me.TabPage9.Size = New System.Drawing.Size(601, 288)
Me.TabPage9.TabIndex = 8
Me.TabPage9.Text = "T1 Serice"
Me.TabPage9.UseVisualStyleBackColor = True
'
'Button53
'
Me.btnT1Data.Location = New System.Drawing.Point(228, 120)
Me.btnT1Data.Name = "btnT1Data"
Me.btnT1Data.Size = New System.Drawing.Size(145, 49)
Me.btnT1Data.TabIndex = 25
Me.btnT1Data.Text = "T1 Servcie"
Me.btnT1Data.UseVisualStyleBackColor = True
'
'usrctlProcedures 'usrctlProcedures
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)

View File

@@ -4348,6 +4348,7 @@ OPTION (MAXRECURSION 1000);", "AVISO") '
Case "Vereinigte Staaten" : ISO2SetCountry = "US" Case "Vereinigte Staaten" : ISO2SetCountry = "US"
Case "Vereinigtes Königreich" : ISO2SetCountry = "GB" Case "Vereinigtes Königreich" : ISO2SetCountry = "GB"
Case "Bosnien und Herzegowina" : ISO2SetCountry = "BA" Case "Bosnien und Herzegowina" : ISO2SetCountry = "BA"
Case "Mauretanien" : ISO2SetCountry = "MR"
End Select End Select
@@ -4380,7 +4381,6 @@ OPTION (MAXRECURSION 1000);", "AVISO") '
If fd.ShowDialog = DialogResult.OK Then If fd.ShowDialog = DialogResult.OK Then
If fd.FileName.ToLower.EndsWith(".csv") Then If fd.FileName.ToLower.EndsWith(".csv") Then
' fd.FileName.EndsWith(".csv")
Using MyReader As New Microsoft.VisualBasic.FileIO.TextFieldParser(fd.FileName, Encoding.Default) Using MyReader As New Microsoft.VisualBasic.FileIO.TextFieldParser(fd.FileName, Encoding.Default)
MyReader.TextFieldType = FileIO.FieldType.Delimited MyReader.TextFieldType = FileIO.FieldType.Delimited
MyReader.SetDelimiters(";") MyReader.SetDelimiters(";")
@@ -4393,8 +4393,8 @@ OPTION (MAXRECURSION 1000);", "AVISO") '
Dim KUNDE_ERW As New cKundenErweitert(currentRow(0)) Dim KUNDE_ERW As New cKundenErweitert(currentRow(0))
If isleernothing(currentRow(1)) IsNot Nothing AndAlso IsNumeric(currentRow(1)) Then If isleernothing(currentRow(1)) Is Nothing AndAlso isleernothing(currentRow(2)) IsNot Nothing AndAlso IsNumeric(currentRow(2)) Then
KUNDE_ERW.kde_zinssatz = CDbl(currentRow(1)) KUNDE_ERW.kde_SEG_Summe = CDbl(currentRow(2))
KUNDE_ERW.SAVE() KUNDE_ERW.SAVE()
End If End If

View File

@@ -1,4 +1,5 @@
Imports VERAG_PROG_ALLGEMEIN Imports com.sun.xml.internal.bind.v2.model.core
Imports VERAG_PROG_ALLGEMEIN
Public Class cWorker_Verwahrung Public Class cWorker_Verwahrung
Public Shared Dateiname = "" Public Shared Dateiname = ""
@@ -48,6 +49,9 @@ Public Class cWorker_Verwahrung
posGestellung.Columns.Add("PackstArt", GetType(String)) posGestellung.Columns.Add("PackstArt", GetType(String))
posGestellung.Columns.Add("Rohmasse", GetType(Double)) posGestellung.Columns.Add("Rohmasse", GetType(Double))
posGestellung.Columns.Add("Warenbeschreibung", GetType(String)) posGestellung.Columns.Add("Warenbeschreibung", GetType(String))
posGestellung.Columns.Add("VerwahrerFirma", GetType(String))
posGestellung.Columns.Add("VerwahrerOrt", GetType(String))
posGestellung.Columns.Add("VerwahrerEORI", GetType(String))
End If End If
Dim ro As DataRow = posGestellung.NewRow Dim ro As DataRow = posGestellung.NewRow
@@ -56,6 +60,9 @@ Public Class cWorker_Verwahrung
ro("PackstArt") = POS.PackstueckArt ro("PackstArt") = POS.PackstueckArt
ro("Rohmasse") = POS.Rohmasse ro("Rohmasse") = POS.Rohmasse
ro("Warenbeschreibung") = POS.Warenbeschreibung ro("Warenbeschreibung") = POS.Warenbeschreibung
ro("VerwahrerFirma") = POS.Verwahrer.NameFirma
ro("VerwahrerOrt") = POS.Verwahrer.Ortsteil
ro("VerwahrerEORI") = POS.Verwahrer.TeilnehmerEORI
posGestellung.Rows.Add(ro) posGestellung.Rows.Add(ro)
@@ -84,155 +91,182 @@ Public Class cWorker_Verwahrung
STATUS.SAVE() STATUS.SAVE()
If saveVerwahrung Then 'NOCHT NICHT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
If False Then
'---------------------------------------------------------------- 'LINKE SEITE BEI GESAMTSICHERHEITEN!!!!!!!!!!!!!
If saveVerwahrung Then
'----------------------------------------------------------------
Try Try
Dim BezugsNr = readVW_SumAVerwahrungsinfo Dim BezugsNr = readVW_SumAVerwahrungsinfo
Dim Standort As String = "" If VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = True Then VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = False
If BezugsNr.Length > 4 Then
Select Case BezugsNr.Substring(0, 4)
Case "4803", "4809"
Standort = "VERAG AG"
'Case 5601
' Standort = "UNISPED GmbH"
'Case 5701
' Standort = "AMBAR GmbH"
Case "4810", "5103", "5901"
Standort = "VERAG GmbH"
Case "5501"
Standort = "IMEX"
Case Else
GoTo Anzeige
End Select
Dim filiale = IIf(BezugsNr.Length > 4, BezugsNr.Substring(0, 4), "") Dim filiale As String = ""
Dim abfertigungsnummer = IIf(BezugsNr.Length >= 14, BezugsNr.Substring(5, 8), "") Dim abfertigungsnummer = ""
Dim dy_SendungsId = VWI.Transaktion.IOReferenz Dim Standort As String = ""
If filiale <> "" AndAlso abfertigungsnummer <> "" AndAlso IsNumeric(filiale) AndAlso IsNumeric(abfertigungsnummer) Then Dim warenort = ""
Dim SND = VERAG_PROG_ALLGEMEIN.cSendungen.LOADByFilialenNrAbfertigungsNr(filiale, abfertigungsnummer)
If SND IsNot Nothing AndAlso SND.tblSnd_Abfertigungsart_ID = 44 Then If BezugsNr.Length > 4 AndAlso IsNumeric(BezugsNr.Substring(0, 4)) Then
filiale = IIf(BezugsNr.Length > 4, BezugsNr.Substring(0, 4), "")
abfertigungsnummer = IIf(BezugsNr.Length >= 14, BezugsNr.Substring(5, 8), "")
Dim existingEntry As Integer = 0 ElseIf Vorpapiernummer <> "" Then
existingEntry = CInt((New SQL).getValueTxtBySql("Select count(*) from [tblGesamtsicherheit] where [gs_ATBNr] = '" & RegistriernummerATLAS & "' order by gs_datum desc")) If Vorpapiernummer.Length > 18 Then
If existingEntry > 0 Then GoTo Anzeige Vorpapiernummer = Vorpapiernummer.ToString.Substring(0, 18)
existingEntry = CInt((New SQL).getValueTxtBySql("Select count(*) from [tblGesamtsicherheit] where ([gs_filialenNr] = '" & SND.FilialenNr & "' and [gs_abfertigungsNr] = " & SND.AbfertigungsNr & " ) or gs_avisoId = '" & SND.tblSnd_AvisoID & "' order by gs_datum desc")) End If
If existingEntry > 0 Then GoTo Anzeige Dim dtSendungsInfo As New DataTable
dtSendungsInfo = SQL.loadDgvBySql("SELECT [FilialenNr],[AbfertigungsNr],[UnterNr] FROM [dbo].[tblSendungen] where tblSnd_ATB_T1 = '" & Vorpapiernummer & "'", "AVISO")
''sonderfälle lt. Mestan If dtSendungsInfo.Rows.Count > 0 Then
If SND.tblSnd_Zollsystem_Land = "DE" Then filiale = dtSendungsInfo.Rows(0).Item("FilialenNr")
abfertigungsnummer = dtSendungsInfo.Rows(0).Item("AbfertigungsNr")
End If
Select Case SND.FilialenNr
Case 5501, 4803, 4809, 5103
Standort = "VERAG GmbH"
End Select
ElseIf SND.tblSnd_Zollsystem_Land = "AT" Then Select Case filiale
Case "4803", "4809"
Standort = "VERAG AG"
Case "4810", "5103", "5901"
Standort = "VERAG GmbH"
Case "5501"
Standort = "IMEX"
Case Else
GoTo Anzeige
End Select
Dim dy_SendungsId = VWI.Transaktion.IOReferenz
If filiale <> "" AndAlso abfertigungsnummer <> "" AndAlso IsNumeric(filiale) AndAlso IsNumeric(abfertigungsnummer) Then
Dim SND = VERAG_PROG_ALLGEMEIN.cSendungen.LOADByFilialenNrAbfertigungsNr(filiale, abfertigungsnummer)
If SND IsNot Nothing AndAlso SND.tblSnd_Abfertigungsart_ID = 44 Then
Dim existingEntry As Integer = 0
existingEntry = CInt((New SQL).getValueTxtBySql("Select count(*) from [tblGesamtsicherheit] where [gs_ATBNr] = '" & RegistriernummerATLAS & "' order by gs_datum desc",,,, "0"))
If existingEntry <> 0 Then GoTo Anzeige
existingEntry = CInt((New SQL).getValueTxtBySql("Select count(*) from [tblGesamtsicherheit] where ([gs_filialenNr] = '" & SND.FilialenNr & "' and [gs_abfertigungsNr] = " & SND.AbfertigungsNr & " ) or gs_avisoId = '" & SND.tblSnd_AvisoID & "' order by gs_datum desc",,,, "0"))
If existingEntry <> 0 Then GoTo Anzeige
''sonderfälle lt. Mestan
If SND.tblSnd_Zollsystem_Land = "DE" Then
If SND.tblSnd_Abfertigungsart_ID = 1 Then 'ZA
Standort = "VERAG CS"
ElseIf SND.tblSnd_Abfertigungsart_ID = 38 Then 'EV-Verz
Select Case SND.FilialenNr Select Case SND.FilialenNr
Case 4803, 5303, 4809, 5103 Case 5501, 4803, 4809, 5103
Standort = "VERAG CS" Standort = "VERAG GmbH"
End Select End Select
ElseIf SND.tblSnd_Zollsystem_Land = "AT" Then
If SND.tblSnd_Abfertigungsart_ID = 1 Then 'ZA
Standort = "VERAG CS"
ElseIf SND.tblSnd_Abfertigungsart_ID = 38 Then 'EV-Verz
Select Case SND.FilialenNr
Case 4803, 5303, 4809, 5103
Standort = "VERAG CS"
End Select
End If
End If End If
Dim GesSichRef = New VERAG_PROG_ALLGEMEIN.cAufschubKonten(Standort)
Dim saldo = GesSichRef.CalcSaldo()
If SND.FilialenNr > 0 Then filiale = SND.FilialenNr
If SND.AbfertigungsNr > 0 Then abfertigungsnummer = SND.AbfertigungsNr
'Verwahrung ANSCHREIBUNG
Dim ANSCHREIBUNG As New cSicherheiten()
Dim gsId As Integer
With ANSCHREIBUNG
.gs_ATBNr = RegistriernummerATLAS
.gs_posNr = 1
.gs_datum = gestellungsdatum
.gs_warenwert = IIf(SND.tblSnd_Warenwert IsNot Nothing AndAlso IsNumeric(SND.tblSnd_Warenwert), CDbl(SND.tblSnd_Warenwert), 0)
.gs_sicherheitsbetrag = IIf(SND.tblSnd_Warenwert IsNot Nothing AndAlso IsNumeric(SND.tblSnd_Warenwert), CDbl(SND.tblSnd_Warenwert) * (GesSichRef.brgakto_gs_zollsatz / 100), 0)
.gs_standort = Standort
.gs_art = "OPEN"
.gs_gsNr = AddNewGesamtSichNr()
.gs_erstellungsdatum = Now()
.gs_freitext = ""
.gs_saldo = saldo
.gs_atr = ""
.gs_filialenNr = filiale
.gs_abfertigungsnr = abfertigungsnummer
.gs_LKWKZ = SND.tblSnd_AvisoID
.gs_warenort = warenort
'.grenzstelle = AVISO.Grenzstelle.ToString.Replace("WO_", "")
.gs_systemuser = "DAKOSY-AUTO"
.gs_zollsatz = GesSichRef.brgakto_gs_zollsatz
.gs_avisoId = SND.tblSnd_AvisoID
End With
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = True
gsId = ANSCHREIBUNG.SAVEOBJECT()
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = False
If posGestellung.Rows.Count > 1 Then
For i As Integer = 2 To posGestellung.Rows.Count
Dim ANSCHREIBUNG_POS As New cSicherheiten()
With ANSCHREIBUNG_POS
.gs_gsNr = gsId
.gs_ATBNr = RegistriernummerATLAS
.gs_posNr = i
.gs_datum = gestellungsdatum
.gs_gsNr = ANSCHREIBUNG.gs_gsNr
.gs_warenwert = 0
.gs_sicherheitsbetrag = 0
.gs_standort = Standort
.gs_art = "OPEN"
.gs_erstellungsdatum = DateTime.Now
.gs_freitext = ""
.gs_saldo = saldo
.gs_atr = ""
.gs_systemuser = ANSCHREIBUNG.gs_systemuser
.gs_zollsatz = GesSichRef.brgakto_gs_zollsatz
.gs_avisoId = SND.tblSnd_AvisoID
.gs_warenort = ANSCHREIBUNG.gs_warenort
End With
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = True
ANSCHREIBUNG.SAVE()
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = False
Next
End If
End If End If
Dim GesSichRef = New VERAG_PROG_ALLGEMEIN.cAufschubKonten(Standort)
Dim saldo = GesSichRef.CalcSaldo()
If SND.FilialenNr > 0 Then filiale = SND.FilialenNr
If SND.AbfertigungsNr > 0 Then abfertigungsnummer = SND.AbfertigungsNr
'Verwahrung ANSCHREIBUNG
Dim ANSCHREIBUNG As New cSicherheiten()
Dim gsId As Integer
With ANSCHREIBUNG
.gs_ATBNr = RegistriernummerATLAS
.gs_posNr = 1
.gs_datum = gestellungsdatum
.gs_warenwert = IIf(SND.tblSnd_Warenwert IsNot Nothing AndAlso IsNumeric(SND.tblSnd_Warenwert), CDbl(SND.tblSnd_Warenwert), 0)
.gs_sicherheitsbetrag = IIf(SND.tblSnd_Warenwert IsNot Nothing AndAlso IsNumeric(SND.tblSnd_Warenwert), CDbl(SND.tblSnd_Warenwert) * (GesSichRef.brgakto_gs_zollsatz / 100), 0)
.gs_standort = Standort
.gs_art = "OPEN"
'.gs_gsNr = ANSCHREIBUNG.gessicherheitID
.gs_erstellungsdatum = Now()
.gs_freitext = ""
.gs_saldo = saldo
.gs_atr = ""
.gs_filialenNr = filiale
.gs_abfertigungsnr = abfertigungsnummer
.gs_LKWKZ = SND.tblSnd_AvisoID
'.gs_warenort = gessich.warenortID
'.grenzstelle = AVISO.Grenzstelle.ToString.Replace("WO_", "")
.gs_systemuser = "DAKOSY-AUTO"
.gs_zollsatz = GesSichRef.brgakto_gs_zollsatz
.gs_avisoId = SND.tblSnd_AvisoID
End With
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = True
gsId = ANSCHREIBUNG.SAVEOBJECT()
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = False
If posGestellung.Rows.Count > 1 Then
For i As Integer = 2 To posGestellung.Rows.Count
Dim ANSCHREIBUNG_POS As New cSicherheiten()
With ANSCHREIBUNG_POS
.gs_gsNr = gsId
.gs_ATBNr = RegistriernummerATLAS
.gs_posNr = i
.gs_datum = gestellungsdatum
.gs_warenwert = 0
.gs_sicherheitsbetrag = 0
.gs_standort = Standort
.gs_art = "OPEN"
.gs_erstellungsdatum = DateTime.Now
.gs_freitext = ""
.gs_saldo = saldo
.gs_atr = ""
.gs_systemuser = "DAKOSY-AUTO"
.gs_zollsatz = GesSichRef.brgakto_gs_zollsatz
.gs_avisoId = SND.tblSnd_AvisoID
End With
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = True
ANSCHREIBUNG.SAVE()
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = False
Next
End If
End If End If
End If End If
End If
Catch ex As Exception Catch ex As Exception
End Try End Try
End If
Anzeige:
FORM.addDGVEinarbeitung("VW: Verwahrungsinfo", STATUS.dySt_BezugsNr)
End If End If
Anzeige:
FORM.addDGVEinarbeitung("VW: Verwahrungsinfo", STATUS.dySt_BezugsNr)
End If End If
Catch ex As Exception Catch ex As Exception
@@ -241,6 +275,21 @@ Anzeige:
End Try End Try
End Function End Function
Public Shared Function AddNewGesamtSichNr() As Integer
Dim sqlq As String = "select MAX([gs_gsNr]) as MaxGesSich from tblGesamtsicherheit"
Dim dt As New DataTable
dt = SQL.loadDgvBySql(sqlq, "AVISO", 100, True)
Dim LetzteGesSichNum As Integer = -1
If (dt.Rows(0).Item(0) IsNot DBNull.Value) Then
LetzteGesSichNum = dt.Rows(0).Item(0)
Return LetzteGesSichNum + 1
End If
Return 0
End Function
Shared Function readEZA_SumAErledigungsinformationVorpapier_005(FORM As frmDYNachrichtenVerarbeitung, d As String, saveAbschreibung As Boolean) As String Shared Function readEZA_SumAErledigungsinformationVorpapier_005(FORM As frmDYNachrichtenVerarbeitung, d As String, saveAbschreibung As Boolean) As String
@@ -249,7 +298,7 @@ Anzeige:
Dim EZA As DAKOSY_Worker.SumAErledigungsinformationVorpapier_005.SumAErledigungsinformationVorpapierSIVRPTyp = DAKOSY_Worker.SumAErledigungsinformationVorpapier_005.SumAErledigungsinformationVorpapierSIVRPTyp.LoadFromFile(d) Dim EZA As DAKOSY_Worker.SumAErledigungsinformationVorpapier_005.SumAErledigungsinformationVorpapierSIVRPTyp = DAKOSY_Worker.SumAErledigungsinformationVorpapier_005.SumAErledigungsinformationVorpapierSIVRPTyp.LoadFromFile(d)
Dim ART = "" Dim ART = ""
Dim RegistriernummerATLAS = "" Dim RegistriernummerATLAS = ""
Dim posErledigung As New DataTable
' Dim details = "" ' Dim details = ""
Dim zp As Object = Nothing Dim zp As Object = Nothing
@@ -282,10 +331,41 @@ Anzeige:
regNR = EZA.EinzelSumAErledigungsinformation.KopfDaten.RegNrATLASWeitereNachweise regNR = EZA.EinzelSumAErledigungsinformation.KopfDaten.RegNrATLASWeitereNachweise
End If End If
End If End If
If EZA.EinzelSumAErledigungsinformation.Position IsNot Nothing Then
For Each POS In EZA.EinzelSumAErledigungsinformation.Position
If POS.LaufendeNummer IsNot Nothing AndAlso posErledigung IsNot Nothing Then
If Not posErledigung.Columns.Contains("LaufendeNummer") Then
posErledigung.Columns.Add("LaufendeNummer", GetType(String))
posErledigung.Columns.Add("IDRegNrSumA", GetType(String))
posErledigung.Columns.Add("IDRegNrSumAPos", GetType(String))
posErledigung.Columns.Add("StornierungKz", GetType(String))
posErledigung.Columns.Add("StueckzahlErledigte", GetType(String))
End If
Dim ro As DataRow = posErledigung.NewRow
ro("LaufendeNummer") = POS.LaufendeNummer
ro("IDRegNrSumA") = POS.IDRegNrSumA
ro("IDRegNrSumAPos") = POS.IDRegNrSumAPos
ro("StornierungKz") = POS.StornierungKz
ro("StueckzahlErledigte") = POS.StueckzahlErledigte
posErledigung.Rows.Add(ro)
End If
Next
End If
End If End If
End If End If
' EZA.LOADByBezugsNr(bezugsNr, False) ' Falls schon ein DS mit dieser Bezugsnummer vorhanden ist. ' EZA.LOADByBezugsNr(bezugsNr, False) ' Falls schon ein DS mit dieser Bezugsnummer vorhanden ist.
If readEZA_SumAErledigungsinformationVorpapier_005 <> "" Then 'BEZUGSNR vorhanden If readEZA_SumAErledigungsinformationVorpapier_005 <> "" Then 'BEZUGSNR vorhanden
Dim STATUS As DAKOSY_Worker.cDakosy_Statusmeldungen = FORM.getStatusCheckTransID(EZA.Transaktion.IOReferenz, EZA.Transaktion.IODatumZeit) Dim STATUS As DAKOSY_Worker.cDakosy_Statusmeldungen = FORM.getStatusCheckTransID(EZA.Transaktion.IOReferenz, EZA.Transaktion.IODatumZeit)
STATUS.dySt_BezugsNr = readEZA_SumAErledigungsinformationVorpapier_005 STATUS.dySt_BezugsNr = readEZA_SumAErledigungsinformationVorpapier_005
@@ -319,119 +399,123 @@ Anzeige:
'---------------------------------------------------------------- '----------------------------------------------------------------
'Verwahrung ABSCHREIBUNG 'Verwahrung ABSCHREIBUNG - RECHTE Seite bei Gesamtsicherheiten
If saveAbschreibung Then If saveAbschreibung Then
Dim BezugsNr = readEZA_SumAErledigungsinformationVorpapier_005 If posErledigung IsNot Nothing AndAlso posErledigung.Rows.Count > 0 Then
Dim Standort As String = ""
If BezugsNr.Length > 4 Then
Select Case BezugsNr.Substring(0, 4)
Case "4803", "4809"
Standort = "VERAG AG"
'Case 5601
' Standort = "UNISPED GmbH"
'Case 5701
' Standort = "AMBAR GmbH"
Case "4810", "5103", "5901"
Standort = "VERAG GmbH"
Case "5501"
Standort = "IMEX"
Case Else
GoTo Anzeige
End Select
Dim filiale = IIf(BezugsNr.Length > 4, BezugsNr.Substring(0, 4), "")
Dim abfertigungsnummer = IIf(BezugsNr.Length >= 14, BezugsNr.Substring(5, 8), "")
Dim dy_SendungsId = EZA.Transaktion.IOReferenz
If filiale <> "" AndAlso abfertigungsnummer <> "" AndAlso IsNumeric(filiale) AndAlso IsNumeric(abfertigungsnummer) Then
Dim SND = VERAG_PROG_ALLGEMEIN.cSendungen.LOADByFilialenNrAbfertigungsNr(filiale, abfertigungsnummer)
If SND IsNot Nothing AndAlso SND.tblSnd_Abfertigungsart_ID = 44 Then
Dim existingEntryID As Integer = 0
existingEntryID = CInt((New SQL).getValueTxtBySql("Select count(*) From [tblGesamtsicherheitsPositionen] inner join [tblGesamtsicherheit] on gs_gsId = gsp_gsId where [gs_ATBNr] = '" & RegistriernummerATLAS & "' order by gs_datum desc"))
If existingEntryID > 0 Then GoTo Anzeige
existingEntryID = CInt((New SQL).getValueTxtBySql("Select count(*) From [tblGesamtsicherheitsPositionen] inner join [tblGesamtsicherheit] on gs_gsId = gsp_gsId where ([gs_filialenNr] = '" & SND.FilialenNr & "' and [gs_abfertigungsNr] = " & SND.AbfertigungsNr & " ) or gs_avisoId = '" & SND.tblSnd_AvisoID & "' order by gs_datum desc"))
If existingEntryID > 0 Then GoTo Anzeige
Dim gsNr As Integer = 0
gsNr = CInt((New SQL).getValueTxtBySql("Select gsNr From [tblGesamtsicherheit] where [gs_ATBNr] = '" & RegistriernummerATLAS & "' order by gs_datum desc"))
If gsNr > 0 Then GoTo Insert
gsNr = CInt((New SQL).getValueTxtBySql("Select gsNr From [tblGesamtsicherheit] where ([gs_filialenNr] = '" & SND.FilialenNr & "' and [gs_abfertigungsNr] = " & SND.AbfertigungsNr & " ) or gs_avisoId = '" & SND.tblSnd_AvisoID & "' order by gs_datum desc"))
If gsNr > 0 Then
GoTo Insert
Else
GoTo Anzeige
End If
''sonderfälle lt. Mestan For Each POS As DataRow In posErledigung.Rows
If SND.tblSnd_Zollsystem_Land = "DE" Then
Select Case SND.FilialenNr Dim ATBNR As String = ""
Case 5501, 4803, 4809, 5103 Dim existingEntryID As Integer = 0
Standort = "VERAG GmbH" Dim dtGesamtsicherheit As New DataTable
End Select
ElseIf SND.tblSnd_Zollsystem_Land = "AT" Then If Not IsDBNull(POS.Item("IDRegNrSumA")) AndAlso POS.Item("IDRegNrSumA") IsNot Nothing AndAlso POS.Item("IDRegNrSumA") <> "" Then
If SND.tblSnd_Abfertigungsart_ID = 1 Then 'ZA Dim POSNr = POS.Item("IDRegNrSumAPos")
Standort = "VERAG CS"
ElseIf SND.tblSnd_Abfertigungsart_ID = 38 Then 'EV-Verz
Select Case SND.FilialenNr
Case 4803, 5303, 4809, 5103
Standort = "VERAG CS"
End Select
End If If ATBNR <> POS.Item("IDRegNrSumA") Then
ATBNR = POS.Item("IDRegNrSumA")
dtGesamtsicherheit = SQL.loadDgvBySql("Select * From [tblGesamtsicherheit] where [gs_ATBNr] = '" & ATBNR & "'", "AVISO")
End If End If
Insert:
Dim GesSichRef = New VERAG_PROG_ALLGEMEIN.cAufschubKonten(Standort)
Dim saldo = GesSichRef.CalcSaldo()
Try
Dim SicherheitsPos As New cGesamtsicherheitsPositionen()
With SicherheitsPos
'.gsp_gsId = gs_gsId
''.gsp_gspPosId = Me.getLatestPosNr(currentSicherheit.gs_gsNr, ) + 1
'.gsp_gspPosId = OPEN.gs_posNr
'.gsp_warenwert = Double.Parse(txtPosWarenwert.Text)
'.gsp_sicherheitsbetrag = Double.Parse(txtPosSicherheitsbetrag.Text)
'.gsp_freitext = txtPosFreitext.Text
'.gsp_filialenNr = currentSicherheit.gs_filialenNr
'.gsp_art = "CLOSE"
.gsp_gsNr = gsNr
'.gsp_abfertigungsNr = currentSicherheit.gs_abfertigungsnr
.gsp_datum = 'DateTimeString2DateTimeKonvertinator(txtPosDat.Text, txtPosTime.Text)
.gsp_erstellungsdatum = DateTime.Now
.gsp_ust = 'currentSicherheit.gs_ust
.gsp_ATCNr = 'txtPositionenCRN.Text
.gsp_avisoId = 'Me.avisoID'
.gsp_systemuser = "DAKOSY-AUTO"
End With
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = True
SicherheitsPos.SAVE()
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = False
Catch ex As Exception
End Try
End If End If
End If
Next
' If existingEntryID > 0 Then GoTo Anzeige
' existingEntryID = CInt((New SQL).getValueTxtBySql("Select count(*) From [tblGesamtsicherheitsPositionen] inner join [tblGesamtsicherheit] on gs_gsId = gsp_gsId where ([gs_filialenNr] = '" & SND.FilialenNr & "' and [gs_abfertigungsNr] = " & SND.AbfertigungsNr & " ) or gs_avisoId = '" & SND.tblSnd_AvisoID & "' order by gs_datum desc"))
' If existingEntryID > 0 Then GoTo Anzeige
' Dim gsNr As Integer = 0
' gsNr = CInt((New SQL).getValueTxtBySql("Select gsNr From [tblGesamtsicherheit] where [gs_ATBNr] = '" & RegistriernummerATLAS & "' order by gs_datum desc"))
' If gsNr > 0 Then GoTo Insert
' gsNr = CInt((New SQL).getValueTxtBySql("Select gsNr From [tblGesamtsicherheit] where ([gs_filialenNr] = '" & SND.FilialenNr & "' and [gs_abfertigungsNr] = " & SND.AbfertigungsNr & " ) or gs_avisoId = '" & SND.tblSnd_AvisoID & "' order by gs_datum desc"))
' If gsNr > 0 Then
' GoTo Insert
' Else
' GoTo Anzeige
' End If
' ''sonderfälle lt. Mestan
' If SND.tblSnd_Zollsystem_Land = "DE" Then
' Select Case SND.FilialenNr
' Case 5501, 4803, 4809, 5103
' Standort = "VERAG GmbH"
' End Select
' ElseIf SND.tblSnd_Zollsystem_Land = "AT" Then
' If SND.tblSnd_Abfertigungsart_ID = 1 Then 'ZA
' Standort = "VERAG CS"
' ElseIf SND.tblSnd_Abfertigungsart_ID = 38 Then 'EV-Verz
' Select Case SND.FilialenNr
' Case 4803, 5303, 4809, 5103
' Standort = "VERAG CS"
' End Select
' End If
' End If
'Insert:
' Dim GesSichRef = New VERAG_PROG_ALLGEMEIN.cAufschubKonten(Standort)
' Dim saldo = GesSichRef.CalcSaldo()
' Try
' Dim SicherheitsPos As New cGesamtsicherheitsPositionen()
' With SicherheitsPos
' '.gsp_gsId = gs_gsId
' ''.gsp_gspPosId = Me.getLatestPosNr(currentSicherheit.gs_gsNr, ) + 1
' '.gsp_gspPosId = OPEN.gs_posNr
' '.gsp_warenwert = Double.Parse(txtPosWarenwert.Text)
' '.gsp_sicherheitsbetrag = Double.Parse(txtPosSicherheitsbetrag.Text)
' '.gsp_freitext = txtPosFreitext.Text
' '.gsp_filialenNr = currentSicherheit.gs_filialenNr
' '.gsp_art = "CLOSE"
' .gsp_gsNr = gsNr
' '.gsp_abfertigungsNr = currentSicherheit.gs_abfertigungsnr
' .gsp_datum = 'DateTimeString2DateTimeKonvertinator(txtPosDat.Text, txtPosTime.Text)
' .gsp_erstellungsdatum = DateTime.Now
' .gsp_ust = 'currentSicherheit.gs_ust
' .gsp_ATCNr = 'txtPositionenCRN.Text
' .gsp_avisoId = 'Me.avisoID'
' .gsp_systemuser = "DAKOSY-AUTO"
' End With
' 'VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = True
' SicherheitsPos.SAVE()
' 'VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = False
' Catch ex As Exception
' End Try
' End If
' End If
End If End If
@@ -521,10 +605,10 @@ Anzeige:
Catch ex As Exception Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = False ' VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = False
End Try End Try
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = False

View File

@@ -4,7 +4,6 @@ Imports System.Text
Imports System.Text.RegularExpressions Imports System.Text.RegularExpressions
Imports System.Web Imports System.Web
Imports System.Xml Imports System.Xml
Imports io.konik.zugferd
Imports Renci.SshNet Imports Renci.SshNet
Imports Renci.SshNet.Sftp Imports Renci.SshNet.Sftp
Imports VERAG_PROG_ALLGEMEIN Imports VERAG_PROG_ALLGEMEIN
@@ -626,7 +625,7 @@ Public Class frmNachrichtenVerarbeitung_MDM_divers
frmStartOptions.moveFile_DateBack(fileNamePath, zielpfad & "Invoice_PDF\" & Now.Year & "\" & Now.ToString("yyyyMMdd") & "\") frmStartOptions.moveFile_DateBack(fileNamePath, zielpfad & "Invoice_PDF\" & Now.Year & "\" & Now.ToString("yyyyMMdd") & "\")
If fi.Name.ToLower.Contains("pdf") Then addDGVEinarbeitung("PDF", fi.Name) If fi.Name.ToLower.Contains("pdf") Then addDGVEinarbeitung("PDF", fi.Name)
dgvEinarbeitung.Refresh() dgvEinarbeitung.Refresh()
found = True
ElseIf (fi.Name.ToString.StartsWith("maut_") AndAlso fi.Name.ToString.Contains("EGR") AndAlso Not fi.Name.ToString.Contains("ALL")) Then 'EasyTrip IT Rechnungen ElseIf (fi.Name.ToString.StartsWith("maut_") AndAlso fi.Name.ToString.Contains("EGR") AndAlso Not fi.Name.ToString.Contains("ALL")) Then 'EasyTrip IT Rechnungen
Dim DS As New VERAG_PROG_ALLGEMEIN.cDATENSERVER("MDM", "MDM_DATEN", "RMC", Now.Year, Now.ToString("yyyyMMdd"), frmStartOptions.getFileName(fileNamePath)) Dim DS As New VERAG_PROG_ALLGEMEIN.cDATENSERVER("MDM", "MDM_DATEN", "RMC", Now.Year, Now.ToString("yyyyMMdd"), frmStartOptions.getFileName(fileNamePath))
@@ -677,7 +676,8 @@ Public Class frmNachrichtenVerarbeitung_MDM_divers
RMC.rmc_daId = DS.da_id RMC.rmc_daId = DS.da_id
RMC.rmc_pdfFileName = fi.Name RMC.rmc_pdfFileName = fi.Name
'EasyTrip können die Beträge initual nicht ausgelesen werden, dürfen aber nicht 0 sein! 'EasyTrip können die Beträge initial nicht ausgelesen werden, dürfen aber nicht 0 sein!
RMC.rmc_betragBrutto = 0.01 RMC.rmc_betragBrutto = 0.01
RMC.rmc_betragMWST = 0.01 RMC.rmc_betragMWST = 0.01
RMC.rmc_betragNetto = 0.01 RMC.rmc_betragNetto = 0.01
@@ -700,6 +700,7 @@ Public Class frmNachrichtenVerarbeitung_MDM_divers
frmStartOptions.moveFile_DateBack(fileNamePath, zielpfad & "Invoice_PDF\" & Now.Year & "\" & Now.ToString("yyyyMMdd") & "\") frmStartOptions.moveFile_DateBack(fileNamePath, zielpfad & "Invoice_PDF\" & Now.Year & "\" & Now.ToString("yyyyMMdd") & "\")
If fi.Name.ToLower.Contains("pdf") Then addDGVEinarbeitung("PDF", fi.Name) If fi.Name.ToLower.Contains("pdf") Then addDGVEinarbeitung("PDF", fi.Name)
dgvEinarbeitung.Refresh() dgvEinarbeitung.Refresh()
found = True
End If End If
@@ -754,7 +755,7 @@ Public Class frmNachrichtenVerarbeitung_MDM_divers
frmStartOptions.moveFile_DateBack(fileNamePath, zielpfad & "Invoice_PDF\" & Now.Year & "\" & Now.ToString("yyyyMMdd") & "\") frmStartOptions.moveFile_DateBack(fileNamePath, zielpfad & "Invoice_PDF\" & Now.Year & "\" & Now.ToString("yyyyMMdd") & "\")
If fi.Name.ToLower.Contains("pdf") Then addDGVEinarbeitung("PDF", fi.Name) If fi.Name.ToLower.Contains("pdf") Then addDGVEinarbeitung("PDF", fi.Name)
dgvEinarbeitung.Refresh() dgvEinarbeitung.Refresh()
found = True
End If End If

View File

@@ -815,6 +815,9 @@ Public Class frmStartOptions
End If End If
API.UPDTAE_OK(,, PARAM) API.UPDTAE_OK(,, PARAM)
setInvoiceBackToCustomer("MSE")
closeMe() closeMe()
Exit Sub Exit Sub
End If End If
@@ -6539,7 +6542,7 @@ weiter:
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- '-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- '-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'WICHTIG, bei companyDetailEventsRequest = true wird gleich Punkt 3 gemacht (dauert länger, aber mehr Datensätze und alle Kunden werden geprüft, bei companyDetailEventsRequest = false wird die u.a. Best Practice-Methode durchgeführt (Punkt 1 und 2) -> also triggerbasierend)!!!! 'WICHTIG, bei companyDetailEventsRequest = true wird gleich Punkt 3 durchgeführt (dauert länger, aber mehr Datensätze und alle Kunden werden geprüft, bei companyDetailEventsRequest = false wird die u.a. Best Practice-Methode durchgeführt (Punkt 1 und 2) -> also triggerbasierend)!!!!
'ANSATZ, bei der täglichen Prüfung die triggerbasierten Abruf, 1x im Monat bzw. wenn spezisches Unternehmen geprüft wird, dann Punkt 3. 'ANSATZ, bei der täglichen Prüfung die triggerbasierten Abruf, 1x im Monat bzw. wenn spezisches Unternehmen geprüft wird, dann Punkt 3.
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- '-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -6907,10 +6910,6 @@ repeatRequest:
Private Sub lbl_setBackToCustomerIDS_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles lbl_setBackToCustomerIDS.LinkClicked, lblBackToCustomer_MSE.LinkClicked, lblBackToCustomer_PLOSE.LinkClicked, lblBackToCustomer_UTA.LinkClicked, lblBackToCustomer_RMC.LinkClicked Private Sub lbl_setBackToCustomerIDS_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles lbl_setBackToCustomerIDS.LinkClicked, lblBackToCustomer_MSE.LinkClicked, lblBackToCustomer_PLOSE.LinkClicked, lblBackToCustomer_UTA.LinkClicked, lblBackToCustomer_RMC.LinkClicked
Dim dtkeineMWST As DataTable = (New SQL).loadDgvBySql("select Land, Erstattungsland, Lieferant from tblKeineMWSTErstattung", "FMZOLL")
Dim dtKundeMWST As DataTable = (New SQL).loadDgvBySql("select * from tblKundenMWST", "FMZOLL")
Dim Lieferant As String = "" Dim Lieferant As String = ""
Select Case sender.Name Select Case sender.Name
@@ -6921,10 +6920,19 @@ repeatRequest:
Case "lblBackToCustomer_RMC" : Lieferant = "RMC" Case "lblBackToCustomer_RMC" : Lieferant = "RMC"
End Select End Select
setInvoiceBackToCustomer(Lieferant)
End Sub
Private Sub setInvoiceBackToCustomer(Lieferant As String)
Dim sql_query = "" Dim sql_query = ""
Dim sql_query_keineMWST = "" Dim sql_query_keineMWST = ""
Dim dtkeineMWST As DataTable = (New SQL).loadDgvBySql("select Land, Erstattungsland, Lieferant from tblKeineMWSTErstattung", "FMZOLL")
Dim dtKundeMWST As DataTable = (New SQL).loadDgvBySql("select * from tblKundenMWST", "FMZOLL")
'alle ab 2025! 'alle ab 2025!
Select Case Lieferant Select Case Lieferant
@@ -7134,10 +7142,8 @@ repeatRequest:
End Select End Select
End Sub End Sub
Private Sub UpdateLieferantInvToCustomer(Lieferant As String, InvoiceID As String, Optional CustomerNr As String = "") Private Sub UpdateLieferantInvToCustomer(Lieferant As String, InvoiceID As String, Optional CustomerNr As String = "")
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL