ustva_antrag, Kundenbatt Umsatzbericht, etc.

This commit is contained in:
2025-04-08 17:29:27 +02:00
parent 669cbcade6
commit 35c6c6ccea
7 changed files with 819 additions and 622 deletions

View File

@@ -624,10 +624,10 @@ Public Class cATEZ_NCTS_IN
Dim SQl As New SQL
Shared apiSettingsloaded As Boolean = False
Sub New(program As String)
Sub New(program As String, Optional errorMessage As Boolean = True)
API = SQl.loadDgvBySql("SELECT top(1) * FROM tblAPIEinstellungen WHERE api_program='" & program & "' and api_productive ='" & If(VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM, "0", "1") & "'", "ADMIN")
If API.Rows.Count = 0 Then
MsgBox("keine gültigen API-Einstellungen für " & program & " gefunden!")
If errorMessage Then MsgBox("keine gültigen API-Einstellungen für " & program & " gefunden!")
Else
apiSettingsloaded = True
API_STRING = API.Rows(0).Item("api_url")
@@ -676,8 +676,8 @@ Public Class cATEZ_NCTS_IN
Dim json As New Chilkat.JsonObject
json.UpdateString("password", API.Rows(0).Item("api_password"))
json.UpdateString("username", API.Rows(0).Item("api_user"))
json.UpdateString("password", API.Rows(0).Item("api_password"))
If client_id <> "" Then json.UpdateString("client_id", client_id)
If grant_type <> "" Then json.UpdateString("grant_type", grant_type)
@@ -724,6 +724,8 @@ Public Class cATEZ_NCTS_IN
Case "NCTS" : myUri &= "/api/tds/auth/"
Case "VAT" : myUri &= "/token" : contentType = "application/x-www-form-urlencoded"
End Select
Dim response = SendRequestAuthentificationToken(myUri, contentType, "POST", token, program, client_id, grant_type)