From 2651aeec46aa65bfda125178fd8a8ddacd094d33 Mon Sep 17 00:00:00 2001 From: "d.breimaier" Date: Thu, 2 Oct 2025 09:25:25 +0200 Subject: [PATCH 1/6] cbam --- SDL/Resources/CBAM_Auswertung_GP.xlsx | Bin 9934 -> 11732 bytes SDL/kunden/usrCntlCBAM.vb | 14 +++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/SDL/Resources/CBAM_Auswertung_GP.xlsx b/SDL/Resources/CBAM_Auswertung_GP.xlsx index a9b1fce5bf489ade85b1ad4039aaf335b120dec3..6bea39211b6bfa47e960a866a6926c27235b3c93 100644 GIT binary patch delta 6321 zcmZvgWl$Vzn}!Dn?l8E+;I6^lU4j$b8DN438=T-W1cG}YxCaPMfB}L83ob!}J0#e0 z&bPa#_SAO&=(?+=>Z!Nudhfc%HD*jnwbhVb00AffGyniV2atIgHsOW<0K7o1C#6S( zz8ZGxaB~`T+Z}Q z^o+!UO&I*Uz2}<0WGmlE$uV}a?NlH_f6pIC4EGr$sLS_}Jy>vEE-t{Qf9=Un|Zv<@LC z+zc!2BdvTG{fmBqmIq3t?YWyZE#4OQVqxEthsKNC3bw3IKrnydHjFZeMo~7i)KS7cM_naFxD>d-3yf)HXdK{MPJwp)9Ro z0HRw|UD2QYc*Ll?9YRsgFnFB!ZVKV-|WwLiWhGD%nG zGr?QfB;xFC*eRmLFdrC9eO~~2PgYt1=NxJYs-&%w=aglU4D0>jl0HeMwI7yVfs8M} zjIlQwuiqfYo|@D{Bo96qQTNk9_!_&dE+JF^XGuK`)bo%r5NYik%Bv?iz1ip$f(mGU zCj6k;!e&I@y5%y9ni zo5-sp@H(`L-YU7_kmpw$Yr32MA}^^3hRHgxDJg1}#Oi%?6qQBt+ZOv{FFP|^VlQGu zwKO2vFsLMAfx%GfqPy#iAbY%C2;~cuf{1q#MBs17#-_4}ZkHlbQQ!Zm*daf38kE@> zBzn-}mnp21wpeFx0-+D9niISyYlbU1l5@F(TD#Q)*k#CO2#C~%T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aS z>T??dKMaf?9KZODVXcGhaFJLb0Hu2b6rDid<|9kS~7E%KeWMHNlYCz%jAHBucs0o zrx#6)NQ9~<9U3uPTf_Yy&_=KK?HKp7uBAqK*urWZBI1Dh%0tG9KNfgn>sEqIhef&y zBHvV1;$2kvcG!6P)n?czF$8hzr58@Q%k(^1xiMJ1uHfQR(k*5VK21iZhKEYV=4V^q zol@Uk9g_gPO8(=i@yg;e!j^*Fo(GEtyV_6btN6G+ITH_cRBLOnaxKfU_fyxtq_oDJ zQR7|bW}^XOl6Oiej z=LL}@VMdcqq?J^nX(g&iO7Z@Gr~OxN{x|lBQIdkZ|5yzG0P?@3|K#(;Zb{L "" Then f.Add(btnCBAM_DS_DAKOSY_Summe.Tag) + If btnCBAM_DS_DAKOSY_GP.Tag <> "" Then f.Add(btnCBAM_DS_DAKOSY_GP.Tag) If f.Count > 0 Then 'Zwischenablage @@ -1725,6 +1731,12 @@ Public Class usrCntlCBAM Blatt.Range("AE" & cnt).Value = row("importer po box") Blatt.Range("AF" & cnt).Value = row("importer coordinate longitude (x)") Blatt.Range("AG" & cnt).Value = row("importer coordinate latitude (y)") + + Blatt.Range("AH" & cnt).Value = row("exporter title") + Blatt.Range("AI" & cnt).Value = row("exporter country code or member state") + Blatt.Range("AJ" & cnt).Value = row("exporter street") + Blatt.Range("AK" & cnt).Value = row("exporter street additional") + cnt += 1 rowcounter += 1 Next From 44d3949da57c0eedf6484b799a355a22f1b2431f Mon Sep 17 00:00:00 2001 From: "d.breimaier" Date: Thu, 2 Oct 2025 14:12:19 +0200 Subject: [PATCH 2/6] UIDPrf, MDM-Einarbeitung --- .../Classes/cMDMEInarbeitung.vb | 156 ++++++++++++++++++ VERAG_PROG_ALLGEMEIN/Classes/cUIDPruefung.vb | 5 + .../VERAG_PROG_ALLGEMEIN.vbproj | 1 + 3 files changed, 162 insertions(+) create mode 100644 VERAG_PROG_ALLGEMEIN/Classes/cMDMEInarbeitung.vb diff --git a/VERAG_PROG_ALLGEMEIN/Classes/cMDMEInarbeitung.vb b/VERAG_PROG_ALLGEMEIN/Classes/cMDMEInarbeitung.vb new file mode 100644 index 00000000..ef6111ff --- /dev/null +++ b/VERAG_PROG_ALLGEMEIN/Classes/cMDMEInarbeitung.vb @@ -0,0 +1,156 @@ + +Imports System.Data.SqlClient +Imports System.Reflection + +Public Class cMDMEInarbeitung + Property id As Integer + Property supplier As Object = Nothing + Property invoicedate As Object = Nothing + Property ds_count As Object = Nothing + Property ds_total As Object = Nothing + Property completed As Object = Nothing + Property completed_date As Object = Nothing + + Public hasEntry = False + + Dim SQL As New SQL + + Sub New(id) + Me.id = id + LOAD() + End Sub + + + Sub New(supplier, invoicedate) + Me.supplier = supplier + Me.invoicedate = invoicedate + LOAD(supplier, invoicedate) + End Sub + + Function getParameterList() As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) + Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("id", id,, True)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("supplier", supplier)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("invoicedate", invoicedate)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ds_count", ds_count)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ds_total", ds_total)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("completed", completed)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("completed_date", completed_date)) + + Return list + End Function + + + + Public Function SAVE() As Boolean + Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList() + + Dim sqlstr = " BEGIN TRAN IF EXISTS(SELECT * FROM tblMDMEinarbeitung WHERE id=@id) " & + " BEGIN " & getUpdateCmd() & " END " & + " Else " & + " BEGIN " & getInsertCmd() & " END " & + " commit tran " + + Return SQL.doSQLVarList(sqlstr, "FMZOLL", , list) + End Function + + Public Sub LOAD() + Try + hasEntry = False + Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL() + Using cmd As New SqlCommand("SELECT * FROM tblMDMEinarbeitung WHERE id=@id ", conn) + cmd.Parameters.AddWithValue("@id", id) + Dim dr = cmd.ExecuteReader() + If dr.Read Then + For Each li In getParameterList() + Dim propInfo As PropertyInfo = Me.GetType.GetProperty(li.Scalarvariable) + + If dr.Item(li.Text) Is DBNull.Value Then + propInfo.SetValue(Me, Nothing) + Else + propInfo.SetValue(Me, dr.Item(li.Text)) + End If + + Next + hasEntry = True + End If + dr.Close() + End Using + End Using + Catch ex As Exception + VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name) + End Try + End Sub + + Public Sub LOAD(supplier, invoicedate) + Try + hasEntry = False + Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL() + Using cmd As New SqlCommand("SELECT * FROM tblMDMEinarbeitung WHERE supplier=@supplier and invoicedate=@invoicedate ", conn) + cmd.Parameters.AddWithValue("@supplier", supplier) + cmd.Parameters.AddWithValue("@invoicedate", invoicedate) + Dim dr = cmd.ExecuteReader() + If dr.Read Then + For Each li In getParameterList() + Dim propInfo As PropertyInfo = Me.GetType.GetProperty(li.Scalarvariable) + + If dr.Item(li.Text) Is DBNull.Value Then + propInfo.SetValue(Me, Nothing) + Else + propInfo.SetValue(Me, dr.Item(li.Text)) + End If + + Next + hasEntry = True + End If + dr.Close() + End Using + End Using + Catch ex As Exception + VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name) + End Try + End Sub + + + + Public Function getUpdateCmd() As String + Try + Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList() + + Dim str As String = "" + For Each i In list + If Not i.isPrimaryParam Then + str &= "[" & i.Text & "] = @" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & "," + End If + Next + str = str.Substring(0, str.Length - 1) 'wg. ',' + Return (" UPDATE [tblMDMEinarbeitung] SET " & str & " WHERE id=@id ") + + Catch ex As Exception + VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name) + End Try + Return "" + End Function + + + Public Function getInsertCmd() As String + Try + Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList() + Dim str As String = "" + Dim values As String = "" + For Each i In list + If Not i.isPrimaryParam Then + str &= "[" & i.Text & "]," + values &= "@" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & "," + End If + Next + str = str.Substring(0, str.Length - 1) 'wg. ',' + values = values.Substring(0, values.Length - 1) 'wg. ',' + Return (" INSERT INTO tblMDMEinarbeitung (" & str & ") VALUES(" & values & ") ") + Catch ex As Exception + VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name) + End Try + Return "" + End Function + +End Class diff --git a/VERAG_PROG_ALLGEMEIN/Classes/cUIDPruefung.vb b/VERAG_PROG_ALLGEMEIN/Classes/cUIDPruefung.vb index 15fe47bc..d105ca23 100644 --- a/VERAG_PROG_ALLGEMEIN/Classes/cUIDPruefung.vb +++ b/VERAG_PROG_ALLGEMEIN/Classes/cUIDPruefung.vb @@ -214,6 +214,11 @@ Public Class cUIDPruefung r("Ergebnis") = "ERROR" End If + + If veroegerungMs > 0 Then + Thread.Sleep(veroegerungMs) 'Bei Verögeung soll zwischen jeder Abfrage eine Pause gemacht werden! (Wegen Sperre bei zu vielen Abfragen) + End If + Next diff --git a/VERAG_PROG_ALLGEMEIN/VERAG_PROG_ALLGEMEIN.vbproj b/VERAG_PROG_ALLGEMEIN/VERAG_PROG_ALLGEMEIN.vbproj index d31def16..0e6f2e8b 100644 --- a/VERAG_PROG_ALLGEMEIN/VERAG_PROG_ALLGEMEIN.vbproj +++ b/VERAG_PROG_ALLGEMEIN/VERAG_PROG_ALLGEMEIN.vbproj @@ -386,6 +386,7 @@ + frmTimasabfrage.vb From 584c88c68e43846386146b5f93e1abc53d4325db Mon Sep 17 00:00:00 2001 From: "d.breimaier" Date: Fri, 3 Oct 2025 09:12:44 +0200 Subject: [PATCH 3/6] USTVA; MDM-Einarbeitung --- SDL/USTV/usrCntlUSTV.vb | 11 ++- VERAG_PROG_ALLGEMEIN/Classes/cIDS.vb | 25 ++++++- .../Classes/cMDMEInarbeitung.vb | 73 ++++++++++++++++++- VERAG_PROG_ALLGEMEIN/Classes/cUIDPruefung.vb | 2 +- VERAG_PROG_ALLGEMEIN/Classes/cUTA.vb | 17 ++++- .../Schnittstellen/MSE/cMSEAPI.vb | 20 ++--- 6 files changed, 131 insertions(+), 17 deletions(-) diff --git a/SDL/USTV/usrCntlUSTV.vb b/SDL/USTV/usrCntlUSTV.vb index 9e8742d4..aa658d15 100644 --- a/SDL/USTV/usrCntlUSTV.vb +++ b/SDL/USTV/usrCntlUSTV.vb @@ -680,7 +680,16 @@ Public Class usrCntlUSTV Else - Dim frm As New frmUSTVoffeneAntraege() + + Dim start_date As New Date(Today.Year, 1, 1) + Dim end_date As New Date(Today.Year, 12, 31) + + + + + Dim ADR As cAdressen = New cAdressen(kdNr) + + Dim frm As New frmUSTVoffeneAntraege(start_date, end_date, kdNr, ADR.Name_1) frm.Show() End If diff --git a/VERAG_PROG_ALLGEMEIN/Classes/cIDS.vb b/VERAG_PROG_ALLGEMEIN/Classes/cIDS.vb index ee4e99c4..66420845 100644 --- a/VERAG_PROG_ALLGEMEIN/Classes/cIDS.vb +++ b/VERAG_PROG_ALLGEMEIN/Classes/cIDS.vb @@ -342,6 +342,10 @@ Public Class cIDS objFileRead.DiscardBufferedData() objFileRead.BaseStream.Seek(0, System.IO.SeekOrigin.Begin) + Dim counTrans As Integer = 0 + Dim savedTrans As Integer = 0 + Dim MDMEinarb As New cMDMEinarbeitung("IDS", Now()) + Do While (objFileRead.Peek() > -1) Dim currentRow As String() @@ -354,7 +358,6 @@ Public Class cIDS Return False End If - Else Try @@ -388,6 +391,8 @@ Public Class cIDS + + With ids .YearMonthDay = isleernothing((currentRow(0))) .CustomerCode = isleernothing((currentRow(1))) @@ -398,6 +403,10 @@ Public Class cIDS .OutletCode = isleernothing((currentRow(6))) .ProductTypeCode = isleernothing((currentRow(7))) + If lngRecordCount = 2 Then + MDMEinarb.invoicedate = CDate(.YearMonthDay) + End If + 'Dim transVol_old = .TransactionVolume 'Dim transVol_new = isleernothing((currentRow(8))) @@ -471,9 +480,9 @@ Public Class cIDS Console.WriteLine("IDS: " & isleernothing((currentRow(1))) & " - " & lngRecordCount & " - " & isleernothing((currentRow(10)))) If isOBO Then - .SAVE_OBO() + If .SAVE_OBO() Then counTrans += 1 Else - .SAVE_VR() + If .SAVE_VR() Then counTrans += 1 End If '.SAVE() @@ -488,6 +497,16 @@ Public Class cIDS Loop cnt = CInt(lngRecordCount) + MDMEinarb.ds_total += cnt - 1 + MDMEinarb.ds_count += counTrans + MDMEinarb.import_date = Now() + + If MDMEinarb.ds_total = MDMEinarb.ds_count Then + MDMEinarb.completed = True + MDMEinarb.completed_date = Now() + End If + + MDMEinarb.SAVE() objFileRead.Close() Return True diff --git a/VERAG_PROG_ALLGEMEIN/Classes/cMDMEInarbeitung.vb b/VERAG_PROG_ALLGEMEIN/Classes/cMDMEInarbeitung.vb index ef6111ff..b896302d 100644 --- a/VERAG_PROG_ALLGEMEIN/Classes/cMDMEInarbeitung.vb +++ b/VERAG_PROG_ALLGEMEIN/Classes/cMDMEInarbeitung.vb @@ -1,15 +1,17 @@  Imports System.Data.SqlClient Imports System.Reflection +Imports com.sun.xml.internal.rngom.digested -Public Class cMDMEInarbeitung +Public Class cMDMEinarbeitung Property id As Integer Property supplier As Object = Nothing Property invoicedate As Object = Nothing Property ds_count As Object = Nothing Property ds_total As Object = Nothing - Property completed As Object = Nothing + Property completed As Boolean = False Property completed_date As Object = Nothing + Property import_date As Object = Nothing Public hasEntry = False @@ -27,6 +29,13 @@ Public Class cMDMEInarbeitung LOAD(supplier, invoicedate) End Sub + Sub New(supplier, invoicedate, importdate) + Me.supplier = supplier + Me.invoicedate = invoicedate + Me.import_date = import_date + LOAD(supplier, invoicedate, import_date) + End Sub + Function getParameterList() As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("id", id,, True)) @@ -36,6 +45,7 @@ Public Class cMDMEInarbeitung list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ds_total", ds_total)) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("completed", completed)) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("completed_date", completed_date)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("import_date", import_date)) Return list End Function @@ -111,6 +121,36 @@ Public Class cMDMEInarbeitung End Try End Sub + Public Sub LOAD(supplier, invoicedate, import_date) + Try + hasEntry = False + Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL() + Using cmd As New SqlCommand("SELECT * FROM tblMDMEinarbeitung WHERE supplier=@supplier and invoicedate=@invoicedate and import_date=@import_date ", conn) + cmd.Parameters.AddWithValue("@supplier", supplier) + cmd.Parameters.AddWithValue("@invoicedate", invoicedate) + cmd.Parameters.AddWithValue("@import_date", import_date) + Dim dr = cmd.ExecuteReader() + If dr.Read Then + For Each li In getParameterList() + Dim propInfo As PropertyInfo = Me.GetType.GetProperty(li.Scalarvariable) + + If dr.Item(li.Text) Is DBNull.Value Then + propInfo.SetValue(Me, Nothing) + Else + propInfo.SetValue(Me, dr.Item(li.Text)) + End If + + Next + hasEntry = True + End If + dr.Close() + End Using + End Using + Catch ex As Exception + VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name) + End Try + End Sub + Public Function getUpdateCmd() As String @@ -153,4 +193,33 @@ Public Class cMDMEInarbeitung Return "" End Function + Shared Function setInvoicingDate(ByRef import_date As Date, ByRef MDM_OBJ As cMDMEinarbeitung) As Boolean + + Dim REDat + + If import_date.Day < 15 Then + 'vor 15, letzer Monat Monatsletzter! + If import_date.Month <> 1 Then + 'Monatsletzter aus Vorjahr + REDat = New Date(Today.Year, Today.Month - 1, DateTime.DaysInMonth(import_date.Year, import_date.Month - 1)) + Else + REDat = New Date(Today.Year - 1, 12, DateTime.DaysInMonth(import_date.Year - 1, 12)) + End If + + ElseIf Today().Day >= 15 Then + REDat = New Date(import_date.Year, import_date.Month, 15) + End If + + If REDat IsNot Nothing AndAlso IsDate(REDat) Then + MDM_OBJ.invoicedate = REDat + Return True + Else + Return False + End If + + + End Function + + + End Class diff --git a/VERAG_PROG_ALLGEMEIN/Classes/cUIDPruefung.vb b/VERAG_PROG_ALLGEMEIN/Classes/cUIDPruefung.vb index d105ca23..01ad1d4a 100644 --- a/VERAG_PROG_ALLGEMEIN/Classes/cUIDPruefung.vb +++ b/VERAG_PROG_ALLGEMEIN/Classes/cUIDPruefung.vb @@ -148,7 +148,7 @@ Public Class cUIDPruefung End Function - Public Shared Function doUIDPruefungALL(Optional datum As Object = Nothing, Optional SaveErgInAdressen As Boolean = True, Optional Sciherheitsabfrage As Boolean = True, Optional MaxEintraege As Integer = -1, Optional showErr As Boolean = True, Optional finanzOnline As Boolean = True, Optional veroegerungMs As Integer = 1000) As DataTable + Public Shared Function doUIDPruefungALL(Optional datum As Object = Nothing, Optional SaveErgInAdressen As Boolean = True, Optional Sciherheitsabfrage As Boolean = True, Optional MaxEintraege As Integer = -1, Optional showErr As Boolean = True, Optional finanzOnline As Boolean = True, Optional veroegerungMs As Integer = 1500) As DataTable Dim dt As DataTable = Nothing If datum = Nothing Then datum = CDate("15." & Now.ToString("MM.yyyy")).AddMonths(-1) diff --git a/VERAG_PROG_ALLGEMEIN/Classes/cUTA.vb b/VERAG_PROG_ALLGEMEIN/Classes/cUTA.vb index 5b9c6d66..58959710 100644 --- a/VERAG_PROG_ALLGEMEIN/Classes/cUTA.vb +++ b/VERAG_PROG_ALLGEMEIN/Classes/cUTA.vb @@ -989,6 +989,11 @@ Public Class cUTA Dim lngÜbertragungsposition As Integer Dim curChecksumme As Double + Dim counTrans As Integer = 0 + Dim savedTrans As Integer = 0 + Dim MDMEinarb As New cMDMEinarbeitung("UTA", Now()) + MDMEinarb.setInvoicingDate(Now(), MDMEinarb) + Dim lngRecordCount As Long Try @@ -1209,7 +1214,7 @@ Public Class cUTA .SAVE() End If Else - .SAVE() + If .SAVE() Then savedTrans += 1 End If @@ -1324,6 +1329,7 @@ Public Class cUTA .Anzahl_Sätze = Mid(strZeile, 3, 13) .Checksumme = Mid(strZeile, 16, 18) / 100 .SAVE() + MDMEinarb.ds_total += .Anzahl_Sätze End With @@ -1334,6 +1340,15 @@ Public Class cUTA Loop + MDMEinarb.ds_count += savedTrans + MDMEinarb.import_date = Now() + If MDMEinarb.ds_count = MDMEinarb.ds_total Then + MDMEinarb.completed = True + MDMEinarb.completed_date = Now() + End If + MDMEinarb.SAVE() + + Catch ex As Exception VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace & vbNewLine & "Datei: " & Dateiname, System.Reflection.MethodInfo.GetCurrentMethod.Name) End Try diff --git a/VERAG_PROG_ALLGEMEIN/Schnittstellen/MSE/cMSEAPI.vb b/VERAG_PROG_ALLGEMEIN/Schnittstellen/MSE/cMSEAPI.vb index 2be35739..0297494a 100644 --- a/VERAG_PROG_ALLGEMEIN/Schnittstellen/MSE/cMSEAPI.vb +++ b/VERAG_PROG_ALLGEMEIN/Schnittstellen/MSE/cMSEAPI.vb @@ -78,7 +78,7 @@ Public Class cMSEAPI End Function - Public Function getNewestTransactions(jwt As String, dt As DataTable, ByRef batchNr As Integer, ByRef totalPages As Integer, ByRef currentPage As Integer, onlyBilledTransactions As Boolean) As String + Public Function getNewestTransactions(jwt As String, dt As DataTable, ByRef batchNr As Integer, ByRef totalPages As Integer, ByRef currentPage As Integer, onlyBilledTransactions As Boolean, ByRef savedTrans As Integer) As String Try Dim returnText As String = "" Dim failureText As String = "" @@ -155,7 +155,7 @@ Public Class cMSEAPI Return "FEHLER im TransaktionArray" End If - If json.StringOf("receiver") = "10738" Then saveTransactions(num, dt, transactions, json.StringOf("receiver"), onlyBilledTransactions) + If json.StringOf("receiver") = "10738" Then saveTransactions(num, dt, transactions, json.StringOf("receiver"), onlyBilledTransactions, savedTrans) Catch ex As WebException @@ -413,7 +413,7 @@ Public Class cMSEAPI End If - If json.StringOf("receiver") = "10738" Then saveTransactions(num, dt, transactions, json.StringOf("receiver")) + If json.StringOf("receiver") = "10738" Then saveTransactions(num, dt, transactions, json.StringOf("receiver"), 0) Catch ex As WebException @@ -526,7 +526,7 @@ Public Class cMSEAPI End If 'If json.StringOf("receiver") = "10738" Then saveTransactions(num, dt, transactions, json.StringOf("receiver")) - saveTransactions(num, dt, transactions, json.StringOf("receiver"), True,) ' wenn ID explizit aufgerufen keine Prüfung auf receivcer und purchaseDate + saveTransactions(num, dt, transactions, json.StringOf("receiver"), 0, True,) ' wenn ID explizit aufgerufen keine Prüfung auf receivcer und purchaseDate End If Next row @@ -545,7 +545,7 @@ Public Class cMSEAPI End Function - Public Function getTransactionsFromBatchNrAndPage(jwt As String, dt As DataTable, ByRef batchNr As Integer, ByRef totalPages As Integer, ByRef currentPage As Integer) As String + Public Function getTransactionsFromBatchNrAndPage(jwt As String, dt As DataTable, ByRef batchNr As Integer, ByRef totalPages As Integer, ByRef currentPage As Integer, ByRef savedTrans As Integer) As String Try Dim returnText As String = "" Dim failureText As String = "" @@ -625,7 +625,7 @@ Public Class cMSEAPI Return "FEHLER Array Transaktions ist leer" End If - If json.StringOf("receiver") = "10738" Then saveTransactions(num, dt, transactions, json.StringOf("receiver")) + If json.StringOf("receiver") = "10738" Then saveTransactions(num, dt, transactions, json.StringOf("receiver"), savedTrans) Catch ex As WebException @@ -1048,7 +1048,7 @@ Public Class cMSEAPI End Function - Public Sub saveTransactions(num As Integer, dt As DataTable, transactions As Chilkat.JsonArray, receiver As Integer, Optional ignorePurchaseDate As Boolean = False, Optional onlyBilledTransactions As Boolean = True) + Public Sub saveTransactions(num As Integer, dt As DataTable, transactions As Chilkat.JsonArray, receiver As Integer, ByRef savedTrans As Integer, Optional ignorePurchaseDate As Boolean = False, Optional onlyBilledTransactions As Boolean = True) Dim j As Integer = 0 @@ -1215,9 +1215,11 @@ Public Class cMSEAPI 'trans.distance_km = CDbl(R("distance_km")) If onlyBilledTransactions Then - If trans.transaction_status = "Billed" Then trans.SAVE() + If trans.transaction_status = "Billed" Then + If trans.SAVE() Then savedTrans += 1 + End If Else - trans.SAVE() + If trans.SAVE() Then savedTrans += 1 End If From 96a87afca45cdd8334e3ca528209a368a678c8b3 Mon Sep 17 00:00:00 2001 From: "d.breimaier" Date: Fri, 3 Oct 2025 10:53:50 +0200 Subject: [PATCH 4/6] ustva-offeneAntraege --- SDL/My Project/AssemblyInfo.vb | 4 +- SDL/USTV/frmUSTVoffeneAntraege.Designer.vb | 165 ++++++++++++--------- SDL/USTV/frmUSTVoffeneAntraege.vb | 48 ++++-- 3 files changed, 137 insertions(+), 80 deletions(-) diff --git a/SDL/My Project/AssemblyInfo.vb b/SDL/My Project/AssemblyInfo.vb index 3bfd776e..0d98e0be 100644 --- a/SDL/My Project/AssemblyInfo.vb +++ b/SDL/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + + diff --git a/SDL/USTV/frmUSTVoffeneAntraege.Designer.vb b/SDL/USTV/frmUSTVoffeneAntraege.Designer.vb index 11e42309..bcb4006b 100644 --- a/SDL/USTV/frmUSTVoffeneAntraege.Designer.vb +++ b/SDL/USTV/frmUSTVoffeneAntraege.Designer.vb @@ -23,9 +23,9 @@ Partial Class frmUSTVoffeneAntraege _ Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() - Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle5 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle6 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() Me.FlowLayoutPanel = New System.Windows.Forms.FlowLayoutPanel() Me.btn = New System.Windows.Forms.Button() Me.Button7 = New System.Windows.Forms.Button() @@ -48,18 +48,20 @@ Partial Class frmUSTVoffeneAntraege Me.Label4 = New System.Windows.Forms.Label() Me.pnlLand = New System.Windows.Forms.Panel() Me.Label5 = New System.Windows.Forms.Label() + Me.cbxKundeLand = New VERAG_PROG_ALLGEMEIN.MyComboBox() Me.cbxNichtEroeffneteAntraege = New System.Windows.Forms.CheckBox() Me.cbxUStV = New System.Windows.Forms.CheckBox() + Me.MyComboBox1 = New VERAG_PROG_ALLGEMEIN.MyComboBox() Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.AntragEröffnenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.Button4 = New System.Windows.Forms.Button() - Me.cbxKundeLand = New VERAG_PROG_ALLGEMEIN.MyComboBox() - Me.MyComboBox1 = New VERAG_PROG_ALLGEMEIN.MyComboBox() Me.txtmaxAnz = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.txtMWST = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.txtAnzahl = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.MyDatagridview1 = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components) Me.cbxKundenMWST = New System.Windows.Forms.CheckBox() + Me.Label6 = New System.Windows.Forms.Label() + Me.cbxLieferant = New VERAG_PROG_ALLGEMEIN.MyComboBox() Me.FlowLayoutPanel.SuspendLayout() Me.Panel4.SuspendLayout() Me.pnlLand.SuspendLayout() @@ -82,7 +84,7 @@ Partial Class frmUSTVoffeneAntraege Me.FlowLayoutPanel.Controls.Add(Me.btnAlle) Me.FlowLayoutPanel.Location = New System.Drawing.Point(12, 29) Me.FlowLayoutPanel.Name = "FlowLayoutPanel" - Me.FlowLayoutPanel.Size = New System.Drawing.Size(1409, 31) + Me.FlowLayoutPanel.Size = New System.Drawing.Size(1770, 31) Me.FlowLayoutPanel.TabIndex = 28 ' 'btn @@ -176,7 +178,7 @@ Partial Class frmUSTVoffeneAntraege ' Me.Label2.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.Label2.AutoSize = True - Me.Label2.Location = New System.Drawing.Point(1223, 639) + Me.Label2.Location = New System.Drawing.Point(1584, 639) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(42, 13) Me.Label2.TabIndex = 38 @@ -186,7 +188,7 @@ Partial Class frmUSTVoffeneAntraege ' Me.Label1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.Label1.AutoSize = True - Me.Label1.Location = New System.Drawing.Point(1225, 661) + Me.Label1.Location = New System.Drawing.Point(1586, 661) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(40, 13) Me.Label1.TabIndex = 40 @@ -202,7 +204,7 @@ Partial Class frmUSTVoffeneAntraege Me.Panel4.Controls.Add(Me.dat_Sum_Von) Me.Panel4.Location = New System.Drawing.Point(16, 62) Me.Panel4.Name = "Panel4" - Me.Panel4.Size = New System.Drawing.Size(417, 33) + Me.Panel4.Size = New System.Drawing.Size(778, 33) Me.Panel4.TabIndex = 41 ' 'Label46 @@ -243,7 +245,7 @@ Partial Class frmUSTVoffeneAntraege ' Me.Label3.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.Label3.AutoSize = True - Me.Label3.Location = New System.Drawing.Point(1295, 9) + Me.Label3.Location = New System.Drawing.Point(1656, 9) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(50, 13) Me.Label3.TabIndex = 43 @@ -253,7 +255,7 @@ Partial Class frmUSTVoffeneAntraege ' Me.cbxAlleoffenen.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.cbxAlleoffenen.AutoSize = True - Me.cbxAlleoffenen.Location = New System.Drawing.Point(1293, 60) + Me.cbxAlleoffenen.Location = New System.Drawing.Point(1654, 60) Me.cbxAlleoffenen.Name = "cbxAlleoffenen" Me.cbxAlleoffenen.Size = New System.Drawing.Size(128, 17) Me.cbxAlleoffenen.TabIndex = 44 @@ -273,7 +275,7 @@ Partial Class frmUSTVoffeneAntraege ' Me.Label4.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.Label4.AutoSize = True - Me.Label4.Location = New System.Drawing.Point(170, 9) + Me.Label4.Location = New System.Drawing.Point(322, 9) Me.Label4.Name = "Label4" Me.Label4.Size = New System.Drawing.Size(68, 13) Me.Label4.TabIndex = 47 @@ -282,15 +284,17 @@ Partial Class frmUSTVoffeneAntraege 'pnlLand ' Me.pnlLand.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.pnlLand.Controls.Add(Me.Label6) + Me.pnlLand.Controls.Add(Me.cbxLieferant) Me.pnlLand.Controls.Add(Me.Label5) Me.pnlLand.Controls.Add(Me.cbxKundeLand) Me.pnlLand.Controls.Add(Me.cbxNichtEroeffneteAntraege) Me.pnlLand.Controls.Add(Me.cbxUStV) Me.pnlLand.Controls.Add(Me.Label4) Me.pnlLand.Controls.Add(Me.MyComboBox1) - Me.pnlLand.Location = New System.Drawing.Point(807, 62) + Me.pnlLand.Location = New System.Drawing.Point(1016, 62) Me.pnlLand.Name = "pnlLand" - Me.pnlLand.Size = New System.Drawing.Size(480, 35) + Me.pnlLand.Size = New System.Drawing.Size(632, 35) Me.pnlLand.TabIndex = 42 Me.pnlLand.Visible = False ' @@ -298,17 +302,28 @@ Partial Class frmUSTVoffeneAntraege ' Me.Label5.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.Label5.AutoSize = True - Me.Label5.Location = New System.Drawing.Point(18, 9) + Me.Label5.Location = New System.Drawing.Point(170, 9) Me.Label5.Name = "Label5" Me.Label5.Size = New System.Drawing.Size(68, 13) Me.Label5.TabIndex = 49 Me.Label5.Text = "Land-Kunde:" ' + 'cbxKundeLand + ' + Me.cbxKundeLand._allowedValuesFreiText = Nothing + Me.cbxKundeLand._allowFreiText = False + Me.cbxKundeLand._value = "" + Me.cbxKundeLand.FormattingEnabled = True + Me.cbxKundeLand.Location = New System.Drawing.Point(244, 6) + Me.cbxKundeLand.Name = "cbxKundeLand" + Me.cbxKundeLand.Size = New System.Drawing.Size(72, 21) + Me.cbxKundeLand.TabIndex = 48 + ' 'cbxNichtEroeffneteAntraege ' Me.cbxNichtEroeffneteAntraege.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.cbxNichtEroeffneteAntraege.AutoSize = True - Me.cbxNichtEroeffneteAntraege.Location = New System.Drawing.Point(338, 0) + Me.cbxNichtEroeffneteAntraege.Location = New System.Drawing.Point(490, 0) Me.cbxNichtEroeffneteAntraege.Name = "cbxNichtEroeffneteAntraege" Me.cbxNichtEroeffneteAntraege.Size = New System.Drawing.Size(134, 17) Me.cbxNichtEroeffneteAntraege.TabIndex = 46 @@ -319,13 +334,24 @@ Partial Class frmUSTVoffeneAntraege ' Me.cbxUStV.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.cbxUStV.AutoSize = True - Me.cbxUStV.Location = New System.Drawing.Point(338, 17) + Me.cbxUStV.Location = New System.Drawing.Point(490, 17) Me.cbxUStV.Name = "cbxUStV" Me.cbxUStV.Size = New System.Drawing.Size(88, 17) Me.cbxUStV.TabIndex = 46 Me.cbxUStV.Text = " nur mit UStV" Me.cbxUStV.UseVisualStyleBackColor = True ' + 'MyComboBox1 + ' + Me.MyComboBox1._allowedValuesFreiText = Nothing + Me.MyComboBox1._allowFreiText = False + Me.MyComboBox1._value = "" + Me.MyComboBox1.FormattingEnabled = True + Me.MyComboBox1.Location = New System.Drawing.Point(396, 5) + Me.MyComboBox1.Name = "MyComboBox1" + Me.MyComboBox1.Size = New System.Drawing.Size(72, 21) + Me.MyComboBox1.TabIndex = 46 + ' 'ContextMenuStrip1 ' Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.AntragEröffnenToolStripMenuItem}) @@ -348,28 +374,6 @@ Partial Class frmUSTVoffeneAntraege Me.Button4.Text = "PDFs prüfen" Me.Button4.UseVisualStyleBackColor = True ' - 'cbxKundeLand - ' - Me.cbxKundeLand._allowedValuesFreiText = Nothing - Me.cbxKundeLand._allowFreiText = False - Me.cbxKundeLand._value = "" - Me.cbxKundeLand.FormattingEnabled = True - Me.cbxKundeLand.Location = New System.Drawing.Point(92, 6) - Me.cbxKundeLand.Name = "cbxKundeLand" - Me.cbxKundeLand.Size = New System.Drawing.Size(72, 21) - Me.cbxKundeLand.TabIndex = 48 - ' - 'MyComboBox1 - ' - Me.MyComboBox1._allowedValuesFreiText = Nothing - Me.MyComboBox1._allowFreiText = False - Me.MyComboBox1._value = "" - Me.MyComboBox1.FormattingEnabled = True - Me.MyComboBox1.Location = New System.Drawing.Point(244, 5) - Me.MyComboBox1.Name = "MyComboBox1" - Me.MyComboBox1.Size = New System.Drawing.Size(72, 21) - Me.MyComboBox1.TabIndex = 46 - ' 'txtmaxAnz ' Me.txtmaxAnz._DateTimeOnly = False @@ -386,7 +390,7 @@ Partial Class frmUSTVoffeneAntraege Me.txtmaxAnz._WaehrungZeichen = True Me.txtmaxAnz.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.txtmaxAnz.ForeColor = System.Drawing.Color.Black - Me.txtmaxAnz.Location = New System.Drawing.Point(1362, 6) + Me.txtmaxAnz.Location = New System.Drawing.Point(1723, 6) Me.txtmaxAnz.MaxLineLength = -1 Me.txtmaxAnz.MaxLines_Warning = "" Me.txtmaxAnz.MaxLines_Warning_Label = Nothing @@ -412,7 +416,7 @@ Partial Class frmUSTVoffeneAntraege Me.txtMWST._WaehrungZeichen = True Me.txtMWST.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.txtMWST.ForeColor = System.Drawing.Color.Black - Me.txtMWST.Location = New System.Drawing.Point(1321, 658) + Me.txtMWST.Location = New System.Drawing.Point(1682, 658) Me.txtMWST.MaxLineLength = -1 Me.txtMWST.MaxLines_Warning = "" Me.txtMWST.MaxLines_Warning_Label = Nothing @@ -437,7 +441,7 @@ Partial Class frmUSTVoffeneAntraege Me.txtAnzahl._WaehrungZeichen = True Me.txtAnzahl.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.txtAnzahl.ForeColor = System.Drawing.Color.Black - Me.txtAnzahl.Location = New System.Drawing.Point(1321, 636) + Me.txtAnzahl.Location = New System.Drawing.Point(1682, 636) Me.txtAnzahl.MaxLineLength = -1 Me.txtAnzahl.MaxLines_Warning = "" Me.txtAnzahl.MaxLines_Warning_Label = Nothing @@ -456,37 +460,37 @@ Partial Class frmUSTVoffeneAntraege Me.MyDatagridview1.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ Or System.Windows.Forms.AnchorStyles.Left) _ Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - DataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control - DataGridViewCellStyle4.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - DataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText - DataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] - Me.MyDatagridview1.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle4 + DataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control + DataGridViewCellStyle1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + DataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText + DataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.MyDatagridview1.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle1 Me.MyDatagridview1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize - DataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Window - DataGridViewCellStyle5.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - DataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.ControlText - DataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] - Me.MyDatagridview1.DefaultCellStyle = DataGridViewCellStyle5 + DataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window + DataGridViewCellStyle2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + DataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText + DataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] + Me.MyDatagridview1.DefaultCellStyle = DataGridViewCellStyle2 Me.MyDatagridview1.Location = New System.Drawing.Point(12, 98) Me.MyDatagridview1.Name = "MyDatagridview1" Me.MyDatagridview1.ReadOnly = True - DataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Control - DataGridViewCellStyle6.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - DataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText - DataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] - Me.MyDatagridview1.RowHeadersDefaultCellStyle = DataGridViewCellStyle6 + DataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control + DataGridViewCellStyle3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + DataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText + DataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.MyDatagridview1.RowHeadersDefaultCellStyle = DataGridViewCellStyle3 Me.MyDatagridview1.RowHeadersWidth = 62 Me.MyDatagridview1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect - Me.MyDatagridview1.Size = New System.Drawing.Size(1409, 528) + Me.MyDatagridview1.Size = New System.Drawing.Size(1770, 528) Me.MyDatagridview1.TabIndex = 30 ' 'cbxKundenMWST @@ -495,7 +499,7 @@ Partial Class frmUSTVoffeneAntraege Me.cbxKundenMWST.AutoSize = True Me.cbxKundenMWST.Checked = True Me.cbxKundenMWST.CheckState = System.Windows.Forms.CheckState.Checked - Me.cbxKundenMWST.Location = New System.Drawing.Point(1293, 78) + Me.cbxKundenMWST.Location = New System.Drawing.Point(1654, 78) Me.cbxKundenMWST.Name = "cbxKundenMWST" Me.cbxKundenMWST.Size = New System.Drawing.Size(158, 17) Me.cbxKundenMWST.TabIndex = 47 @@ -503,11 +507,32 @@ Partial Class frmUSTVoffeneAntraege Me.cbxKundenMWST.UseVisualStyleBackColor = True Me.cbxKundenMWST.Visible = False ' + 'Label6 + ' + Me.Label6.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.Label6.AutoSize = True + Me.Label6.Location = New System.Drawing.Point(18, 9) + Me.Label6.Name = "Label6" + Me.Label6.Size = New System.Drawing.Size(51, 13) + Me.Label6.TabIndex = 51 + Me.Label6.Text = "Lieferant:" + ' + 'cbxLieferant + ' + Me.cbxLieferant._allowedValuesFreiText = Nothing + Me.cbxLieferant._allowFreiText = False + Me.cbxLieferant._value = "" + Me.cbxLieferant.FormattingEnabled = True + Me.cbxLieferant.Location = New System.Drawing.Point(92, 6) + Me.cbxLieferant.Name = "cbxLieferant" + Me.cbxLieferant.Size = New System.Drawing.Size(72, 21) + Me.cbxLieferant.TabIndex = 50 + ' 'frmUSTVoffeneAntraege ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(1457, 681) + Me.ClientSize = New System.Drawing.Size(1818, 681) Me.Controls.Add(Me.cbxKundenMWST) Me.Controls.Add(Me.Button4) Me.Controls.Add(Me.lblKunde) @@ -571,4 +596,6 @@ Partial Class frmUSTVoffeneAntraege Friend WithEvents btnVerag As Button Friend WithEvents Button4 As Button Friend WithEvents cbxKundenMWST As CheckBox + Friend WithEvents Label6 As Label + Friend WithEvents cbxLieferant As VERAG_PROG_ALLGEMEIN.MyComboBox End Class diff --git a/SDL/USTV/frmUSTVoffeneAntraege.vb b/SDL/USTV/frmUSTVoffeneAntraege.vb index eb44b85d..e878c58c 100644 --- a/SDL/USTV/frmUSTVoffeneAntraege.vb +++ b/SDL/USTV/frmUSTVoffeneAntraege.vb @@ -511,6 +511,7 @@ Public Class frmUSTVoffeneAntraege Dim sqlwhereMSE = "" Dim sqlwhereLand = "" Dim sqlwhereSteuerNr = "" + Dim sqlwhereLieferant = "" Dim kundenLandISO2 As String = "" @@ -544,6 +545,11 @@ Public Class frmUSTVoffeneAntraege End If + If cbxLieferant._value <> "" Then + sqlwhereLieferant &= " and Lieferant = '" & cbxLieferant._value & "'" + End If + + If cbxUStV.Checked Then sqlwhereSteuerNr &= " and isnull(tblSteuernummern.UStV,0) <> 0" End If @@ -611,15 +617,18 @@ Public Class frmUSTVoffeneAntraege Next If dtKundeMWST.Columns.Contains("KdNr") Then + + If dtKundeMWST.Rows.Count > 0 Then sqlwhereLand &= " AND ( NOT " + For Each row As DataRow In dtKundeMWST.Rows - landBez = row.Item("abc").ToString.Replace(";", "'") - counter = counter + 1 - sqlwhereLand &= " AND NOT ( AdressenNr = " & row.Item("KdNr") & " AND Einreichland in (" & landBez.ToString.Substring(0, landBez.ToString.Length - 1) & ")) " '& IIf(dtKundeMWST.Rows.Count <> 0 And counter <> dtKundeMWST.Rows.Count, "OR ", klammer) + landBez = row.Item("abc").ToString.Replace(";", "'") + counter = counter + 1 + sqlwhereLand &= " ( AdressenNr = " & row.Item("KdNr") & " AND Einreichland in (" & landBez.ToString.Substring(0, landBez.ToString.Length - 1) & ")) " & IIf(dtKundeMWST.Rows.Count <> 0 And counter <> dtKundeMWST.Rows.Count, "OR ", ")") Next - Else + Else - For Each row As DataRow In dtKundeMWST.Rows + For Each row As DataRow In dtKundeMWST.Rows landBez &= "'" & row.Item("LandKz") & "'" counter = counter + 1 If (dtKundeMWST.Rows.Count <> 0 And counter <> dtKundeMWST.Rows.Count) Then landBez &= "," @@ -678,7 +687,7 @@ Public Class frmUSTVoffeneAntraege - Dim sqlstring = "select isnull(UStVAn_ID,0) as antragExisitiert,cast(case when isnull(UStVAn_AntragEingereichtAm,0) = 0 then 0 else 1 end as bit) as eingereicht,tblSteuernummern.UStV as UStV,Lieferant , KdNr, Kundenname, Kundenland, Einreichland from (" & SQLPLOSEUMSTELLUNG & " + Dim sqlstring = "select isnull(UStVAn_ID,0) as antragExisitiert,cast(case when UStVAn_AntragEingereichtAm IS NULL THEN 0 else 1 end as bit) as eingereicht,isnull(tblSteuernummern.UStV,0) as UStV,Lieferant , KdNr, Kundenname, Kundenland, Einreichland from (" & SQLPLOSEUMSTELLUNG & " UNION ALL @@ -779,8 +788,8 @@ Public Class frmUSTVoffeneAntraege inner join [Länderverzeichnis für die Außenhandelsstatistik] on temp.Einreichland=LandKz left join tblUStVAntrag on UStVAn_KuNr = temp.kdnr and UStVAn_ReDatVon <= temp.Rechnungsdatum and UStVAn_ReDatBis >= temp.Rechnungsdatum and [Länderverzeichnis für die Außenhandelsstatistik].LandNr = UStVAn_LandNr and isnull(UStVAn_AntragArt,'MWST') = 'MWST' left JOIN tblSteuernummern On temp.Einreichland = tblSteuernummern.LandKz and KdNr = tblSteuernummern.AdressenNr - where 1 = 1 and isnull(kde_keineMWSt,0) = 0 " & sqlwhereLand & sqlwhereSteuerNr & - " group by isnull(UStVAn_ID,0) , Lieferant, KdNr, Kundenname,Kundenland, Einreichland, tblSteuernummern.UStV, case when isnull(UStVAn_AntragEingereichtAm,0) = 0 then 0 else 1 end " + where 1 = 1 and isnull(kde_keineMWSt,0) = 0 " & sqlwhereLand & sqlwhereSteuerNr & sqlwhereLieferant & + " group by isnull(UStVAn_ID,0) , Lieferant, KdNr, Kundenname,Kundenland, Einreichland, isnull(tblSteuernummern.UStV,0), case WHEN UStVAn_AntragEingereichtAm IS NULL THEN 0 else 1 end " Dim SQLWhere = "" @@ -851,6 +860,27 @@ Public Class frmUSTVoffeneAntraege Next End If + If Not cbxLieferant._value <> "" Then + cbxLieferant.Items.Clear() + cbxLieferant.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("", "")) + Dim list As New List(Of String) + For Each r As DataGridViewRow In .Rows + + If r.Cells("Lieferant").Value IsNot Nothing And r.Cells("Lieferant").Value <> "" Then + + If Not list.Any(Function(c) c = r.Cells("Lieferant").Value) Then + list.Add(r.Cells("Lieferant").Value) + + End If + End If + Next + + For Each l In list + Dim listItem As New VERAG_PROG_ALLGEMEIN.MyListItem(l, l) + cbxLieferant.Items.Add(listItem) + Next + End If + txtAnzahl.Text = .Rows.Count txtMWST.Text = sumMwSt @@ -997,7 +1027,7 @@ Public Class frmUSTVoffeneAntraege End Sub - Private Sub cbxKundeLand_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cbxKundeLand.SelectedIndexChanged + Private Sub cbxKundeLand_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cbxKundeLand.SelectedIndexChanged, cbxLieferant.SelectedIndexChanged initDgv_gesamt(txtmaxAnz.Text, cbxNichtEroeffneteAntraege.Checked, IIf(cbxAlleoffenen.Checked, -1, kdNr)) End Sub From 7ea2686718a85cd7589871d15a3a4f4f91b982f5 Mon Sep 17 00:00:00 2001 From: "d.breimaier" Date: Fri, 3 Oct 2025 12:28:49 +0200 Subject: [PATCH 5/6] ustva --- SDL/USTV/frmUSTVoffeneAntraege.vb | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/SDL/USTV/frmUSTVoffeneAntraege.vb b/SDL/USTV/frmUSTVoffeneAntraege.vb index e878c58c..fc47e190 100644 --- a/SDL/USTV/frmUSTVoffeneAntraege.vb +++ b/SDL/USTV/frmUSTVoffeneAntraege.vb @@ -618,17 +618,21 @@ Public Class frmUSTVoffeneAntraege If dtKundeMWST.Columns.Contains("KdNr") Then + 'bei Einstellung "ALLE KUNDEN" + If dtKundeMWST.Rows.Count > 0 Then sqlwhereLand &= " AND ( NOT " For Each row As DataRow In dtKundeMWST.Rows - landBez = row.Item("abc").ToString.Replace(";", "'") - counter = counter + 1 - sqlwhereLand &= " ( AdressenNr = " & row.Item("KdNr") & " AND Einreichland in (" & landBez.ToString.Substring(0, landBez.ToString.Length - 1) & ")) " & IIf(dtKundeMWST.Rows.Count <> 0 And counter <> dtKundeMWST.Rows.Count, "OR ", ")") + landBez = row.Item("abc").ToString.Replace(";", "'") + counter = counter + 1 + sqlwhereLand &= " ( isnull(AdressenNr,0) = " & row.Item("KdNr") & " AND Einreichland in (" & landBez.ToString.Substring(0, landBez.ToString.Length - 1) & ")) " & IIf(dtKundeMWST.Rows.Count <> 0 And counter <> dtKundeMWST.Rows.Count, "OR ", ")") Next - Else + Else - For Each row As DataRow In dtKundeMWST.Rows + 'bei Einstellung "SPEZIFISCHER KUNDE" + + For Each row As DataRow In dtKundeMWST.Rows landBez &= "'" & row.Item("LandKz") & "'" counter = counter + 1 If (dtKundeMWST.Rows.Count <> 0 And counter <> dtKundeMWST.Rows.Count) Then landBez &= "," From c0a54388bc40c2c607c44715ec89cb3d3eb7c9db Mon Sep 17 00:00:00 2001 From: "m.ilhan" Date: Mon, 6 Oct 2025 08:32:17 +0200 Subject: [PATCH 6/6] New BenachrichtigungsCode AVISO_ERSTELLT --- VERAG_PROG_ALLGEMEIN/Classes/cAvisoBenachrichtigungen.vb | 3 ++- _VERAG_PROG_ALLGEMEIN/Classes/cAvisoBenachrichtigungen.vb | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/VERAG_PROG_ALLGEMEIN/Classes/cAvisoBenachrichtigungen.vb b/VERAG_PROG_ALLGEMEIN/Classes/cAvisoBenachrichtigungen.vb index e4b63c76..476397f0 100644 --- a/VERAG_PROG_ALLGEMEIN/Classes/cAvisoBenachrichtigungen.vb +++ b/VERAG_PROG_ALLGEMEIN/Classes/cAvisoBenachrichtigungen.vb @@ -1,4 +1,4 @@ -Imports System.Data.SqlClient +Imports System.Data.SqlClient Imports System.Reflection Public Class cAvisoBenachrichtigungen @@ -311,5 +311,6 @@ Public Class cAvisoBenachrichtigungenCodes Public Shared AES_NachfrageVerbleib As Integer = 11 Public Shared Verwahrung_Foto As Integer = 20 Public Shared Essensgeld As Integer = 21 + Public Shared AVISO_ERSTELLT As Integer = 22 End Class diff --git a/_VERAG_PROG_ALLGEMEIN/Classes/cAvisoBenachrichtigungen.vb b/_VERAG_PROG_ALLGEMEIN/Classes/cAvisoBenachrichtigungen.vb index aed3cd87..e5fb0ae2 100644 --- a/_VERAG_PROG_ALLGEMEIN/Classes/cAvisoBenachrichtigungen.vb +++ b/_VERAG_PROG_ALLGEMEIN/Classes/cAvisoBenachrichtigungen.vb @@ -1,4 +1,4 @@ -Imports System.Data.SqlClient +Imports System.Data.SqlClient Imports System.Reflection Public Class cAvisoBenachrichtigungen