StartOpt, MDM

This commit is contained in:
2025-04-18 15:38:38 +02:00
parent 8f18b27aa7
commit a7836ff9ed
3 changed files with 99 additions and 13 deletions

View File

@@ -1939,6 +1939,12 @@ Public Class usrctlProcedures
Return s.trim Return s.trim
End Function End Function
Function isleernothingremoveLinkebreaks(s) As Object
If s Is DBNull.Value Then Return Nothing
If s.ToString.Trim = "" Then Return Nothing
Return s.trim.ToString.Replace(vbLf, "")
End Function
Private Sub Button21_Click(sender As Object, e As EventArgs) Handles Button21.Click, Button22.Click Private Sub Button21_Click(sender As Object, e As EventArgs) Handles Button21.Click, Button22.Click
Dim test = VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM Dim test = VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM
@@ -3599,6 +3605,7 @@ Public Class usrctlProcedures
DYIMPORT.Packstückart = isleernothing((currentRow(99))) DYIMPORT.Packstückart = isleernothing((currentRow(99)))
DYIMPORT.Packstückbezeichnung = isleernothing((currentRow(100))) DYIMPORT.Packstückbezeichnung = isleernothing((currentRow(100)))
'DYIMPORT.Zusätzliche_angaben = isleernothing((currentRow(101))) 'DYIMPORT.Zusätzliche_angaben = isleernothing((currentRow(101)))
DYIMPORT.SonderAbgabeZoll = IIf(isleernothing((currentRow(102))) <> "", CDbl(isleernothing(currentRow(102))), 0) DYIMPORT.SonderAbgabeZoll = IIf(isleernothing((currentRow(102))) <> "", CDbl(isleernothing(currentRow(102))), 0)

View File

@@ -352,6 +352,8 @@ Public Class frmNachrichtenVerarbeitung_MDM_divers
Select Case invEndung Select Case invEndung
Case "SP" : country = "ES" 'SPANIEN Case "SP" : country = "ES" 'SPANIEN
Case "DA" : country = "DK" 'DÄNEMARK Case "DA" : country = "DK" 'DÄNEMARK
Case "P1" : country = "PL" 'Portugal
'Case "RO" : country = "RO" 'RUMÄNIEN 'Case "RO" : country = "RO" 'RUMÄNIEN
'Case "PL" : country = "PL" 'POLEN 'Case "PL" : country = "PL" 'POLEN
'Case "LV" : country = "LV" 'LETTLAND 'Case "LV" : country = "LV" 'LETTLAND

View File

@@ -5,6 +5,7 @@ Imports System.Net.Security
Imports System.Security.Cryptography.X509Certificates Imports System.Security.Cryptography.X509Certificates
Imports System.Text Imports System.Text
Imports System.Xml Imports System.Xml
Imports com.sun.org.apache.xerces.internal.impl.dv.xs
Imports MDM_Worker Imports MDM_Worker
Imports Renci.SshNet Imports Renci.SshNet
Imports VERAG_PROG_ALLGEMEIN Imports VERAG_PROG_ALLGEMEIN
@@ -1286,6 +1287,8 @@ Public Class frmStartOptions
End Try End Try
End Sub End Sub
Sub sendMailZollbelegGESTELLUNGSADRESSE(pfad As String, nga_id As Object, art As String, ByRef list As List(Of Integer), BezugsNr As String, SND As VERAG_PROG_ALLGEMEIN.cSendungen) Sub sendMailZollbelegGESTELLUNGSADRESSE(pfad As String, nga_id As Object, art As String, ByRef list As List(Of Integer), BezugsNr As String, SND As VERAG_PROG_ALLGEMEIN.cSendungen)
Try Try
If nga_id IsNot Nothing Then If nga_id IsNot Nothing Then
@@ -5538,12 +5541,24 @@ Public Class frmStartOptions
Private Sub IDS_RE_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles IDS_RE.LinkClicked Private Sub IDS_RE_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles IDS_RE.LinkClicked
Dim fehlendeRechungsdaten As String = "select upper(Invoicenumber) as Invoicenumber, CustomerCode, cast(YearMonthDay as Date) as YearMonthDay FROM [VERAG].[dbo].[tblIDSInvoicesNew] where TransactionVolume is null and AmminclVAT is null and TotalNetAmount is null and VATAmount is null"
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
nochmal:
Select Case checkDatefromIDSInvioces("tblIDSInvoicesNew")
Case 0 : Exit Sub
Case 1 : GoTo nochmal
Case 2 : GoTo weiter
End Select
weiter:
Dim fehlendeRechungsdaten As String = "select upper(Invoicenumber) as Invoicenumber, CustomerCode, cast(YearMonthDay as Date) as YearMonthDay FROM [VERAG].[dbo].[tblIDSInvoicesNew] where TransactionVolume is null and AmminclVAT is null and TotalNetAmount is null and VATAmount is null and Year(YearMonthDay) >= " & txtIDSYear.Text
Dim dtRechnnungsdaten As DataTable = SQL.loadDgvBySql(fehlendeRechungsdaten, "FMZOLL") Dim dtRechnnungsdaten As DataTable = SQL.loadDgvBySql(fehlendeRechungsdaten, "FMZOLL")
If dtRechnnungsdaten.Rows.Count > 0 Then If dtRechnnungsdaten.Rows.Count > 0 Then
@@ -5580,9 +5595,9 @@ Public Class frmStartOptions
Next Next
MsgBox("alle Rechnungsdaten gesetzt!") MsgBox("alle Daten in tblIDSInvoicesNew gesetzt!")
Else Else
MsgBox("keine fehlenden Rechnunngsdaten vorhanden!") MsgBox("keine fehlenden Daten in tblIDSInvoicesNew vorhanden!")
End If End If
@@ -5647,9 +5662,20 @@ Public Class frmStartOptions
Private Sub IDS_REDetails_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles IDS_REDetails.LinkClicked Private Sub IDS_REDetails_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles IDS_REDetails.LinkClicked
Dim fehlendeRechungsdatenOhneDVR As String = "select upper([Invoicenumber]) as Invoicenumber, CustomerCode, cast(YearMonthDay as Date) as YearMonthDay FROM [VERAG].[dbo].tblIDSInvoicesNewSplittedByCountry where TransactionVolume is null and AmminclVAT is null and TotalNetAmount is null and VATAmount is null and [Invoicenumber] not like 'DEVR%'"
Dim fehlendeRechungsdatenMitDVR As String = "select upper([Invoicenumber]) as Invoicenumber, CustomerCode, cast(YearMonthDay as Date) as YearMonthDay FROM [VERAG].[dbo].tblIDSInvoicesNewSplittedByCountry where TransactionVolume is null and AmminclVAT is null and TotalNetAmount is null and VATAmount is null and [Invoicenumber] like 'DEVR%'" nochmal:
Select Case checkDatefromIDSInvioces("tblIDSInvoicesNewSplittedByCountry")
Case 0 : Exit Sub
Case 1 : GoTo nochmal
Case 2 : GoTo weiter
End Select
weiter:
Dim fehlendeRechungsdatenOhneDVR As String = "select upper([Invoicenumber]) as Invoicenumber, CustomerCode, cast(YearMonthDay as Date) as YearMonthDay FROM [VERAG].[dbo].tblIDSInvoicesNewSplittedByCountry where TransactionVolume is null and AmminclVAT is null and TotalNetAmount is null and VATAmount is null and [Invoicenumber] not like 'DEVR%' and Year(YearMonthDay) >= " & txtIDSYear.Text
Dim fehlendeRechungsdatenMitDVR As String = "select upper([Invoicenumber]) as Invoicenumber, CustomerCode, cast(YearMonthDay as Date) as YearMonthDay FROM [VERAG].[dbo].tblIDSInvoicesNewSplittedByCountry where TransactionVolume is null and AmminclVAT is null and TotalNetAmount is null and VATAmount is null and [Invoicenumber] like 'DEVR%' and Year(YearMonthDay) >= " & txtIDSYear.Text
Dim fehlendeRechungsdatenTotalInvoiceID As String = "select CustomerCode, cast(YearMonthDay as Date) as YearMonthDay FROM [VERAG].[dbo].tblIDSInvoicesNewSplittedByCountry where TotalInvoiceId is null" Dim fehlendeRechungsdatenTotalInvoiceID As String = "select CustomerCode, cast(YearMonthDay as Date) as YearMonthDay FROM [VERAG].[dbo].tblIDSInvoicesNewSplittedByCountry where TotalInvoiceId is null"
@@ -5696,9 +5722,9 @@ Public Class frmStartOptions
Next Next
MsgBox("alle Rechnungspositionsdaten gesetzt!") MsgBox("alle Daten der tblIDSInvoicesNewSplittedByCountry Ohne DVR gesetzt!")
Else Else
MsgBox("keine fehlenden Rechnungspositionsdaten vorhanden!") MsgBox("keine fehlenden Daten der tblIDSInvoicesNewSplittedByCountry Ohne DVR vorhanden!")
End If End If
@@ -5736,9 +5762,9 @@ Public Class frmStartOptions
Next Next
MsgBox("alle Rechnungspositionsdaten gesetzt!") MsgBox("alle Daten der tblIDSInvoicesNewSplittedByCountry mit DVR gesetzt!")
Else Else
MsgBox("keine fehlenden Rechnungspositionsdaten vorhanden!") MsgBox("keine fehlenden Daten der tblIDSInvoicesNewSplittedByCountry mit DVR vorhanden!")
End If End If
@@ -5840,4 +5866,55 @@ Public Class frmStartOptions
cPLOSE_Inv_Data.setWahrunginIvoiceFromTransactions(txtPloseJahr.Text, True, kdNrPlose) cPLOSE_Inv_Data.setWahrunginIvoiceFromTransactions(txtPloseJahr.Text, True, kdNrPlose)
End Sub End Sub
Private Function checkDatefromIDSInvioces(table As String) As Integer
Dim sql As New SQL
Dim fehlendeRechungsdatenDatum As String = "select distinct(cast(YearMonthDay as Date)) as YearMonthDay FROM [VERAG].[dbo].[" & table & "] where TransactionVolume is null and AmminclVAT is null and TotalNetAmount is null and VATAmount is null and Year(YearMonthDay) >= " & txtIDSYear.Text
Dim dtRechnnungsdatenfalschesDatum As DataTable = sql.loadDgvBySql(fehlendeRechungsdatenDatum, "FMZOLL")
For Each row As DataRow In dtRechnnungsdatenfalschesDatum.Rows
If Not IsDBNull(row.Item("YearMonthDay")) AndAlso row.Item("YearMonthDay") IsNot Nothing AndAlso IsDate(row.Item("YearMonthDay")) Then
Dim abrDate As Date = row.Item("YearMonthDay")
If Not (abrDate.Day = 15 Or abrDate.Day = 30 Or abrDate.Day = 31 Or (abrDate.Month = 2 And abrDate.Day = 28)) Then
If Not vbYes = MsgBox("Die IDS-Rechnungen besitzen das Datum: " & abrDate.ToShortDateString & "!" & vbNewLine & "Soll das Datum auf geändert werden", vbYesNoCancel) Then
Return 0
Else
Dim f As New frmDatumsabfrage("IDS-falsches Rechnungsdatum: " & abrDate.ToShortDateString, True)
f.ShowDialog()
If f.DialogResult = DialogResult.OK Then
If sql.doSQL("Update [" & table & "] set YearMonthDay = '" & f.Datum.ToShortDateString & "' where cast(YearMonthDay as Date) = '" & abrDate.ToShortDateString & "'", "FMZOLL") Then
Return 1
Else
Return 0
End If
Else
Return 0
End If
End If
End If
End If
Next
Return 2
End Function
End Class End Class