Fakturierung, Timas, MSE_API
This commit is contained in:
@@ -3248,7 +3248,7 @@ Public Class cFakturierung
|
||||
Case 21 : rpt.picVERAG.Image = My.Resources.Unisped_logo : rpt.Picture1.Image = My.Resources.unisped_aeo_AT
|
||||
Case 22 : rpt.picVERAG.Image = My.Resources.Unisped_DE_logo : rpt.Picture1.Image = My.Resources.unisped_aeo_DE
|
||||
Case 23 : rpt.picVERAG.Image = My.Resources.Unisped_ZS_logo : rpt.Picture1.Image = My.Resources.unisped_aeo_ZS_AT
|
||||
Case 24 : rpt.picVERAG.Image = My.Resources.ambar_simple : rpt.Picture1.Image = Nothing
|
||||
Case 24 : rpt.picVERAG.Image = My.Resources.ambar_boarder : rpt.Picture1.Image = Nothing
|
||||
Case 26 : rpt.picVERAG.Image = My.Resources.VERAG_UNISPED_Logo : rpt.Picture1.Image = Nothing
|
||||
Case 17 : rpt.picVERAG.Image = My.Resources.FrontOfficeSUB_Horizontal : rpt.Picture1.Image = Nothing
|
||||
End Select
|
||||
@@ -3272,7 +3272,7 @@ Public Class cFakturierung
|
||||
Case Else : rpt.Label2.Text = ZZTage & " Tage"
|
||||
End Select
|
||||
Select Case ROW("Firma_ID")
|
||||
Case 21, 22, 23, 26 : rpt.Label1.Visible = False : rpt.Label2.Visible = False
|
||||
Case 21, 22, 23, 24, 26 : rpt.Label1.Visible = False : rpt.Label2.Visible = False
|
||||
End Select
|
||||
|
||||
|
||||
@@ -3286,8 +3286,13 @@ Public Class cFakturierung
|
||||
'rpt.lblAbfertigungsNr.Text = ROW("FilialenNr") & " / " & ROW("AbfertigungsNr") & " " & ROW("SpeditionsbuchUnterNr").ToString("00")
|
||||
'rpt.lblAbfertigungsDatum.Text = RECHNUNG.Abfertigungsdatum.ToShortDateString
|
||||
'rpt.lblLKWId.Text = If(RECHNUNG.AvisoID, "")
|
||||
Dim sachbearbeiterAufRechnung = getSBRgName(ROW("Firma_ID"), VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME)
|
||||
rpt.lblSachbearbeiter.Text = IIf(sachbearbeiterAufRechnung = "Herr Ordu", "Verrechnung", sachbearbeiterAufRechnung) 'könnten ja mehrerer SB die Rg-Anlagen geschreiben haben - NEU
|
||||
|
||||
'rpt.lblSachbearbeiter.Text = getSBRgName(ROW("Firma_ID"), VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME) 'könnten ja mehrerer SB die Rg-Anlagen geschreiben haben - ALT
|
||||
|
||||
|
||||
|
||||
rpt.lblSachbearbeiter.Text = getSBRgName(ROW("Firma_ID"), VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME) 'könnten ja mehrerer SB die Rg-Anlagen geschreiben haben
|
||||
'rpt.lblFirmenbuch.Text = If(FIRMA.Firma_Firmenbuch, "").ToString.Replace("Firmenbuch: ", "").Trim
|
||||
'rpt.lblUID.Text = If(FIRMA.Firma_UID, "")
|
||||
'rpt.lblEORI.Text = If(FIRMA.Firma_EORI, "")
|
||||
@@ -3331,6 +3336,8 @@ Public Class cFakturierung
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
' REVERSE CHARGE (Übergang der Steuerschuld in EU-Ländern).
|
||||
' Dies hat zur Folge, dass steuerfreie Rechnungsbeträge für Leistungen,
|
||||
' die in der Leistungstabelle als ReverseCharge gekennzeichnet sind,
|
||||
|
||||
6
SDL/Fakturierung/rptRechnungDruck.Designer.vb
generated
6
SDL/Fakturierung/rptRechnungDruck.Designer.vb
generated
@@ -333,13 +333,13 @@ Partial Public Class rptRechnungDruck
|
||||
'
|
||||
'ReportInfo2
|
||||
'
|
||||
Me.ReportInfo2.FormatString = "Seite {PageNumber} von {PageCount} Seiten "
|
||||
Me.ReportInfo2.FormatString = "Seite {PageNumber} von {PageCount}"
|
||||
Me.ReportInfo2.Height = 0.1330709!
|
||||
Me.ReportInfo2.Left = 5.480315!
|
||||
Me.ReportInfo2.Left = 5.772048!
|
||||
Me.ReportInfo2.Name = "ReportInfo2"
|
||||
Me.ReportInfo2.Style = "font-size: 8pt; text-align: right"
|
||||
Me.ReportInfo2.Top = 0.1173228!
|
||||
Me.ReportInfo2.Width = 1.994928!
|
||||
Me.ReportInfo2.Width = 1.703196!
|
||||
'
|
||||
'lblBankUeberschrift
|
||||
'
|
||||
|
||||
16
SDL/Fakturierung/rptSammelRechnungDruck.Designer.vb
generated
16
SDL/Fakturierung/rptSammelRechnungDruck.Designer.vb
generated
@@ -279,13 +279,13 @@ Partial Public Class rptSammelRechnungDruck
|
||||
'
|
||||
'ReportInfo2
|
||||
'
|
||||
Me.ReportInfo2.FormatString = "Seite {PageNumber} von {PageCount} Seiten "
|
||||
Me.ReportInfo2.FormatString = "Seite {PageNumber} von {PageCount}"
|
||||
Me.ReportInfo2.Height = 0.1330709!
|
||||
Me.ReportInfo2.Left = 5.480315!
|
||||
Me.ReportInfo2.Left = 5.980315!
|
||||
Me.ReportInfo2.Name = "ReportInfo2"
|
||||
Me.ReportInfo2.Style = "font-size: 8pt; text-align: right"
|
||||
Me.ReportInfo2.Top = 0.1173228!
|
||||
Me.ReportInfo2.Width = 1.994928!
|
||||
Me.ReportInfo2.Width = 1.494928!
|
||||
'
|
||||
'lblBankUeberschrift
|
||||
'
|
||||
@@ -309,12 +309,12 @@ Partial Public Class rptSammelRechnungDruck
|
||||
Me.txtBank1.Text = "Deutschland:" & Global.Microsoft.VisualBasic.ChrW(10) & "Raiffeisenbank Suben" & Global.Microsoft.VisualBasic.ChrW(10) & "IBAN: AT54 3445 5000 0420 7791" & Global.Microsoft.VisualBasic.ChrW(10) & "BIC: RZOOAT2L455" &
|
||||
""
|
||||
Me.txtBank1.Top = 0.1173228!
|
||||
Me.txtBank1.Width = 1.783071!
|
||||
Me.txtBank1.Width = 1.866535!
|
||||
'
|
||||
'txtBank2
|
||||
'
|
||||
Me.txtBank2.Height = 0.4181103!
|
||||
Me.txtBank2.Left = 2.994095!
|
||||
Me.txtBank2.Left = 3.077559!
|
||||
Me.txtBank2.Name = "txtBank2"
|
||||
Me.txtBank2.Style = "font-size: 8pt; font-weight: normal; text-align: left; text-justify: auto; ddo-ch" &
|
||||
"ar-set: 1"
|
||||
@@ -339,16 +339,16 @@ Partial Public Class rptSammelRechnungDruck
|
||||
Me.txtBank3.DataField = ""
|
||||
Me.txtBank3.DistinctField = ""
|
||||
Me.txtBank3.Height = 0.4181104!
|
||||
Me.txtBank3.Left = 4.700394!
|
||||
Me.txtBank3.Left = 4.873229!
|
||||
Me.txtBank3.Name = "txtBank3"
|
||||
Me.txtBank3.Style = "color: Black; font-size: 8pt; font-weight: normal; text-align: left; text-justify" &
|
||||
": auto; ddo-char-set: 1"
|
||||
Me.txtBank3.SummaryGroup = ""
|
||||
Me.txtBank3.Text = "Deutschland:" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "Raiffeisenbank Suben" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "IBAN: AT54 3445 5000 0420 7791" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "BIC: RZOOAT2L" &
|
||||
"455"
|
||||
Me.txtBank3.Top = 0.1901575!
|
||||
Me.txtBank3.Top = 0.1173228!
|
||||
Me.txtBank3.Visible = False
|
||||
Me.txtBank3.Width = 1.941338!
|
||||
Me.txtBank3.Width = 2.170473!
|
||||
'
|
||||
'ReportHeader1
|
||||
'
|
||||
|
||||
114
VERAG_PROG_ALLGEMEIN/Schnittstellen/MSE/cMSEAPI.vb
Normal file
114
VERAG_PROG_ALLGEMEIN/Schnittstellen/MSE/cMSEAPI.vb
Normal file
@@ -0,0 +1,114 @@
|
||||
Imports System.Net
|
||||
|
||||
Public Class cMSEAPI
|
||||
|
||||
Public API_STRING
|
||||
Dim API As New DataTable
|
||||
Dim rest As New Chilkat.Rest
|
||||
Dim SQL As New SQL
|
||||
Dim apiSettingsloaded As Boolean = False
|
||||
|
||||
|
||||
Sub New(program As String)
|
||||
VERAG_PROG_ALLGEMEIN.cChilkat_Helper.UnlockCilkat()
|
||||
API = SQL.loadDgvBySql("SELECT top(1) * FROM tblAPIEinstellungen WHERE api_program='" & program & "' and api_productive ='" & IIf(VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM, "0", "1") & "'", "ADMIN")
|
||||
If API.Rows.Count = 0 Then
|
||||
MsgBox("keine gültigen API-Einstellungen für " & program & " gefunden!")
|
||||
Else
|
||||
apiSettingsloaded = True
|
||||
API_STRING = API.Rows(0).Item("api_url")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Public Function createJWT(ByRef failureText As String) As String
|
||||
Try
|
||||
|
||||
If apiSettingsloaded = False Then Return False
|
||||
|
||||
Dim jwt As New Chilkat.Jwt
|
||||
|
||||
' Build the JOSE header
|
||||
Dim jose As New Chilkat.JsonObject
|
||||
' Use HS256. Pass the string "HS384" or "HS512" to use a different algorithm.
|
||||
Dim success As Boolean = jose.AppendString("alg", "HS256")
|
||||
success = jose.AppendString("typ", "JWT")
|
||||
|
||||
' Now build the JWT claims (also known as the payload)
|
||||
Dim claims As New Chilkat.JsonObject
|
||||
success = claims.AppendString("iss", API.Rows(0).Item("api_user"))
|
||||
'success = claims.AppendString("sub", "")
|
||||
'success = claims.AppendString("aud", "http://example.com")
|
||||
|
||||
' Set the timestamp of when the JWT was created to now.
|
||||
Dim curDateTime As Integer = jwt.GenNumericDate(0)
|
||||
'success = claims.AddIntAt(-1, "iat", curDateTime)
|
||||
|
||||
' Set the "not process before" timestamp to now.
|
||||
'success = claims.AddIntAt(-1, "nbf", curDateTime)
|
||||
|
||||
' Set the timestamp defining an expiration time (end time) for the token
|
||||
' to be now + 1 hour (3600 seconds)
|
||||
success = claims.AddIntAt(-1, "exp", curDateTime + 3600)
|
||||
|
||||
' Produce the smallest possible JWT:
|
||||
jwt.AutoCompact = True
|
||||
|
||||
Dim strJwt As String = jwt.CreateJwt(jose.Emit(), claims.Emit(), API.Rows(0).Item("api_passwort"))
|
||||
|
||||
Debug.WriteLine(strJwt)
|
||||
Return strJwt
|
||||
|
||||
Catch ex As WebException
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
|
||||
End Function
|
||||
|
||||
Public Function getTransactions(jwt As String) As String
|
||||
Try
|
||||
Dim returnText As String = ""
|
||||
Dim failureText As String = ""
|
||||
|
||||
|
||||
|
||||
Dim success As Boolean
|
||||
rest.ClearAllQueryParams()
|
||||
|
||||
rest.AddHeader("X_API_KEY", jwt)
|
||||
|
||||
rest.IdleTimeoutMs = 5000
|
||||
|
||||
Dim responseJson As String = rest.FullRequestNoBody("GET", "/v1/transactions/new")
|
||||
If (rest.LastMethodSuccess <> True) Then
|
||||
Debug.WriteLine(rest.LastErrorText)
|
||||
rest.IdleTimeoutMs = 30000 'defualt
|
||||
Return "Fehler"
|
||||
End If
|
||||
|
||||
If (rest.ResponseStatusCode <> 200) Then
|
||||
Debug.WriteLine(rest.ResponseHeader)
|
||||
Return "Fehler"
|
||||
End If
|
||||
|
||||
Debug.WriteLine(responseJson)
|
||||
|
||||
|
||||
Dim json As New Chilkat.JsonObject
|
||||
success = json.Load(responseJson)
|
||||
If (success <> True) Then
|
||||
Debug.WriteLine(json.LastErrorText)
|
||||
End If
|
||||
|
||||
Debug.WriteLine(json)
|
||||
|
||||
|
||||
|
||||
Catch ex As WebException
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
|
||||
End Function
|
||||
|
||||
End Class
|
||||
@@ -1,11 +1,6 @@
|
||||
Imports System.Diagnostics.Tracing
|
||||
Imports System.Net
|
||||
Imports System.Runtime.Remoting
|
||||
Imports System.Net
|
||||
Imports System.Text
|
||||
Imports System.Threading
|
||||
Imports System.Windows.Forms
|
||||
Imports DocumentFormat.OpenXml.Wordprocessing
|
||||
Imports Microsoft.Office.Interop.Outlook
|
||||
|
||||
Public Class cTimasAPI
|
||||
|
||||
|
||||
@@ -625,6 +625,7 @@
|
||||
<Compile Include="Schnittstellen\cJsonPost.vb" />
|
||||
<Compile Include="Schnittstellen\cLDV_Interface.vb" />
|
||||
<Compile Include="Schnittstellen\cNCTS_Helper.vb" />
|
||||
<Compile Include="Schnittstellen\MSE\cMSEAPI.vb" />
|
||||
<Compile Include="Schnittstellen\Norsware\cNorsware.vb" />
|
||||
<Compile Include="Schnittstellen\cSyska_Interface.vb" />
|
||||
<Compile Include="Schnittstellen\cTherefore.vb" />
|
||||
|
||||
Reference in New Issue
Block a user