kAssenbuch, etc.

This commit is contained in:
2026-05-28 14:30:36 +02:00
parent d1ceb61efe
commit 62d776f00a
6 changed files with 366 additions and 116 deletions

View File

@@ -1712,8 +1712,10 @@ Public Class frmBelegNeu
If Not verarbeitet Then
If Not TESTBUCHUNG Then
KASSE.DECREASE_BELEG_UMSATZ(oldBelegZaehler, If(EA = "E", summeBRUTTO * -1, summeBRUTTO))
cRKSV.DELETE(BELEG, KASSE.rksv_firma)
End If
Dim Errmsg = "Programmfehler bei der digitalen Signatur." & vbNewLine & vbNewLine & answer
MsgBox(Errmsg, MsgBoxStyle.Critical)
@@ -1887,40 +1889,136 @@ Public Class frmBelegNeu
Process.Start("https://wiki.verag.ag/de/software/aviso/howtos/Bankomat")
End Sub
Private Async Function Button4_ClickAsync(sender As Object, e As EventArgs) As Task Handles Button4.Click
Try
Dim QR_CodeString As String = ""
Dim LastJWS As String = ""
KASSE.LOAD(cboKassen._value)
If KASSE.rksv_FT_RestServiceURL <> "" Then
Dim client As New cFiskaltrustClient(KASSE.rksv_FT_RestServiceURL, KASSE.rksv_FT_CashboxID, KASSE.rksv_FT_AccessToken, KASSE.rksv_FT_Country)
Dim result_verbindungstest As String = Await client.Echo()
Dim result_zahlung As String = Await client.SignReceiptAsync_test()
client.saveRKSV_FT(result_zahlung, QR_CodeString)
MsgBox(result_verbindungstest)
Else
MsgBox("keine Rest-Service URL hinterlegt!")
End If
Catch ex As Exception
End Try
End Function
Private Sub cboKassen_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboKassen.SelectedIndexChanged
KASSE.LOAD(cboKassen._value)
Button4.Visible = KASSE.rksv_FT_RestServiceURL <> ""
End Sub
Private Sub Button4_ClickAsync(sender As Object, e As EventArgs) Handles Button4.Click
If Not cm_FT.Items.ContainsKey("null") Then
Dim plose = New ToolStripMenuItem() With {.Text = "Nullbeleg", .Name = "null", .Font = New Font(Me.Font.FontFamily, Me.Font.Size)}
cm_FT.Items.Add(plose)
AddHandler plose.Click, AddressOf mnuItemAuftrauege_Clicked
End If
If Not cm_FT.Items.ContainsKey("monthly") Then
Dim rmc = New ToolStripMenuItem() With {.Text = "Monatabschluss", .Name = "monthly", .Font = New Font(Me.Font.FontFamily, Me.Font.Size)}
AddHandler rmc.Click, AddressOf mnuItemAuftrauege_Clicked
cm_FT.Items.Add(rmc)
End If
If Not cm_FT.Items.ContainsKey("daily") Then
Dim rmc = New ToolStripMenuItem() With {.Text = "Tagesabschluss", .Name = "daily", .Font = New Font(Me.Font.FontFamily, Me.Font.Size)}
AddHandler rmc.Click, AddressOf mnuItemAuftrauege_Clicked
cm_FT.Items.Add(rmc)
End If
If Not cm_FT.Items.ContainsKey("yearly") Then
Dim uta = New ToolStripMenuItem() With {.Text = "Jahresabschluss", .Name = "yearly", .Font = New Font(Me.Font.FontFamily, Me.Font.Size)}
AddHandler uta.Click, AddressOf mnuItemAuftrauege_Clicked
cm_FT.Items.Add(uta)
End If
If Not cm_FT.Items.ContainsKey("bar") Then
Dim ids = New ToolStripMenuItem() With {.Text = "Barverkauf", .Name = "bar", .Font = New Font(Me.Font.FontFamily, Me.Font.Size)}
AddHandler ids.Click, AddressOf mnuItemAuftrauege_Clicked
cm_FT.Items.Add(ids)
End If
If Not cm_FT.Items.ContainsKey("storno") Then
Dim ids = New ToolStripMenuItem() With {.Text = "Storno", .Name = "storno", .Font = New Font(Me.Font.FontFamily, Me.Font.Size)}
AddHandler ids.Click, AddressOf mnuItemAuftrauege_Clicked
cm_FT.Items.Add(ids)
End If
If Not cm_FT.Items.ContainsKey("test") Then
Dim ids = New ToolStripMenuItem() With {.Text = "Verbindungstest", .Name = "test", .Font = New Font(Me.Font.FontFamily, Me.Font.Size)}
AddHandler ids.Click, AddressOf mnuItemAuftrauege_Clicked
cm_FT.Items.Add(ids)
End If
If Not cm_FT.Items.ContainsKey("journal") Then
Dim ids = New ToolStripMenuItem() With {.Text = "Journal", .Name = "journal", .Font = New Font(Me.Font.FontFamily, Me.Font.Size)}
AddHandler ids.Click, AddressOf mnuItemAuftrauege_Clicked
cm_FT.Items.Add(ids)
End If
cm_FT.Show(Cursor.Position)
End Sub
Private Async Function mnuItemAuftrauege_Clicked(sender As Object, e As EventArgs) As Task(Of Object)
cm_FT.Hide()
Dim item As ToolStripMenuItem = TryCast(sender, ToolStripMenuItem)
If item IsNot Nothing Then
KASSE.LOAD(cboKassen._value)
Dim client As New cFiskaltrustClient(KASSE.rksv_FT_RestServiceURL, KASSE.rksv_FT_CashboxID, KASSE.rksv_FT_AccessToken, KASSE.rksv_FT_Country)
If item.Name = "null" Then
'beide
Dim result As String = Await client.SignNullReceiptAsync(KASSE.rksv_id)
MsgBox(result)
ElseIf item.Name = "test" Then
'beide
Dim result As String = Await client.Echo(KASSE.rksv_bez & " " & KASSE.rksv_FT_Country & " - ")
MsgBox(result)
ElseIf item.Name = "storno" Then
'beide
Dim result As String = Await client.CancelReceiptAsync_test("-1", 100, "Cash")
MsgBox(result)
ElseIf item.Name = "bar" Then
'beide
Dim result As String = Await client.SignReceiptAsync_test(KASSE.rksv_id)
MsgBox(result)
ElseIf item.Name = "monthly" Then
'beide
Dim result As String = Await client.SignClosinglReceiptAsync(item.Name, KASSE.rksv_id)
MsgBox(result)
ElseIf item.Name = "daily" Then
'Nur DE
If KASSE.rksv_FT_Country = "DE" Then
Dim result As String = Await client.SignClosinglReceiptAsync(item.Name, KASSE.rksv_id)
MsgBox(result)
Else
MsgBox("nicht für AT-Kassen möglich!")
End If
ElseIf item.Name = "yearly" Then
Dim result As String = Await client.SignClosinglReceiptAsync(item.Name, KASSE.rksv_id)
MsgBox(result)
ElseIf item.Name = "journal" Then
Dim result As String = Await client.Journal(2)
MsgBox(result)
End If
End If
End Function
End Class
Class TestRKSVW