StartOpt, MDM
This commit is contained in:
@@ -1939,6 +1939,12 @@ Public Class usrctlProcedures
|
||||
Return s.trim
|
||||
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
|
||||
|
||||
Dim test = VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM
|
||||
@@ -3599,6 +3605,7 @@ Public Class usrctlProcedures
|
||||
|
||||
DYIMPORT.Packstückart = isleernothing((currentRow(99)))
|
||||
DYIMPORT.Packstückbezeichnung = isleernothing((currentRow(100)))
|
||||
|
||||
'DYIMPORT.Zusätzliche_angaben = isleernothing((currentRow(101)))
|
||||
|
||||
DYIMPORT.SonderAbgabeZoll = IIf(isleernothing((currentRow(102))) <> "", CDbl(isleernothing(currentRow(102))), 0)
|
||||
|
||||
@@ -352,6 +352,8 @@ Public Class frmNachrichtenVerarbeitung_MDM_divers
|
||||
Select Case invEndung
|
||||
Case "SP" : country = "ES" 'SPANIEN
|
||||
Case "DA" : country = "DK" 'DÄNEMARK
|
||||
Case "P1" : country = "PL" 'Portugal
|
||||
|
||||
'Case "RO" : country = "RO" 'RUMÄNIEN
|
||||
'Case "PL" : country = "PL" 'POLEN
|
||||
'Case "LV" : country = "LV" 'LETTLAND
|
||||
|
||||
@@ -5,6 +5,7 @@ Imports System.Net.Security
|
||||
Imports System.Security.Cryptography.X509Certificates
|
||||
Imports System.Text
|
||||
Imports System.Xml
|
||||
Imports com.sun.org.apache.xerces.internal.impl.dv.xs
|
||||
Imports MDM_Worker
|
||||
Imports Renci.SshNet
|
||||
Imports VERAG_PROG_ALLGEMEIN
|
||||
@@ -1286,6 +1287,8 @@ Public Class frmStartOptions
|
||||
|
||||
End Try
|
||||
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)
|
||||
Try
|
||||
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
|
||||
|
||||
|
||||
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
|
||||
|
||||
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")
|
||||
|
||||
If dtRechnnungsdaten.Rows.Count > 0 Then
|
||||
@@ -5580,9 +5595,9 @@ Public Class frmStartOptions
|
||||
|
||||
|
||||
Next
|
||||
MsgBox("alle Rechnungsdaten gesetzt!")
|
||||
MsgBox("alle Daten in tblIDSInvoicesNew gesetzt!")
|
||||
Else
|
||||
MsgBox("keine fehlenden Rechnunngsdaten vorhanden!")
|
||||
MsgBox("keine fehlenden Daten in tblIDSInvoicesNew vorhanden!")
|
||||
End If
|
||||
|
||||
|
||||
@@ -5647,9 +5662,20 @@ Public Class frmStartOptions
|
||||
|
||||
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"
|
||||
|
||||
@@ -5696,9 +5722,9 @@ Public Class frmStartOptions
|
||||
|
||||
|
||||
Next
|
||||
MsgBox("alle Rechnungspositionsdaten gesetzt!")
|
||||
MsgBox("alle Daten der tblIDSInvoicesNewSplittedByCountry Ohne DVR gesetzt!")
|
||||
Else
|
||||
MsgBox("keine fehlenden Rechnungspositionsdaten vorhanden!")
|
||||
MsgBox("keine fehlenden Daten der tblIDSInvoicesNewSplittedByCountry Ohne DVR vorhanden!")
|
||||
End If
|
||||
|
||||
|
||||
@@ -5736,9 +5762,9 @@ Public Class frmStartOptions
|
||||
|
||||
|
||||
Next
|
||||
MsgBox("alle Rechnungspositionsdaten gesetzt!")
|
||||
MsgBox("alle Daten der tblIDSInvoicesNewSplittedByCountry mit DVR gesetzt!")
|
||||
Else
|
||||
MsgBox("keine fehlenden Rechnungspositionsdaten vorhanden!")
|
||||
MsgBox("keine fehlenden Daten der tblIDSInvoicesNewSplittedByCountry mit DVR vorhanden!")
|
||||
End If
|
||||
|
||||
|
||||
@@ -5840,4 +5866,55 @@ Public Class frmStartOptions
|
||||
cPLOSE_Inv_Data.setWahrunginIvoiceFromTransactions(txtPloseJahr.Text, True, kdNrPlose)
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user