diff --git a/UID/My Project/AssemblyInfo.vb b/UID/My Project/AssemblyInfo.vb index 70e96f6..a5462b1 100644 --- a/UID/My Project/AssemblyInfo.vb +++ b/UID/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + + diff --git a/initATLASAufschubkonten/frmStartOptions.vb b/initATLASAufschubkonten/frmStartOptions.vb index 4712e37..ff1434a 100644 --- a/initATLASAufschubkonten/frmStartOptions.vb +++ b/initATLASAufschubkonten/frmStartOptions.vb @@ -5846,12 +5846,14 @@ 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 ok_OhneDVR As Boolean = False + Dim ok_mitDVR As Boolean = False + Dim ok_setInvoiceID As Boolean = False + Dim rechnugdatum As String = "" Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL Dim dtRechnnungsdatenOhneDVR As DataTable = SQL.loadDgvBySql(fehlendeRechungsdatenOhneDVR, "FMZOLL") @@ -5895,6 +5897,7 @@ weiter: Next MsgBox("alle Daten der tblIDSInvoicesNewSplittedByCountry Ohne DVR gesetzt!") + ok_OhneDVR = True Else MsgBox("keine fehlenden Daten der tblIDSInvoicesNewSplittedByCountry Ohne DVR vorhanden!") End If @@ -5934,6 +5937,7 @@ weiter: Next + ok_mitDVR = True MsgBox("alle Daten der tblIDSInvoicesNewSplittedByCountry mit DVR gesetzt!") Else MsgBox("keine fehlenden Daten der tblIDSInvoicesNewSplittedByCountry mit DVR vorhanden!") @@ -5943,6 +5947,7 @@ weiter: If dtRechnnungsdatenTotalInvoiceID.Rows.Count > 0 Then For Each r As DataRow In dtRechnnungsdatenTotalInvoiceID.Rows + rechnugdatum = r.Item("YearMonthDay") SQL.doSQL(" UPDATE @@ -5972,11 +5977,15 @@ weiter: Next + ok_setInvoiceID = True MsgBox("alle TotalInvoiceIDs gesetzt!") Else MsgBox("keine fehlenden TotalInvoiceIDs vorhanden!") End If + If ok_mitDVR AndAlso ok_OhneDVR AndAlso ok_setInvoiceID AndAlso rechnugdatum <> "" Then + SQL.doSQL("Update tblMDMEinarbeitung set nacharbeitung_completed = 1 where invoicedate = '" & rechnugdatum & "' and completed = 1", "FMZOLL") + End If End Sub