div. Änderungen, etc.
This commit is contained in:
@@ -283,7 +283,6 @@ Public Class EABeleg
|
||||
Property ECTerminalreturnCode As Object = Nothing
|
||||
Property EC_daid As Integer = 0
|
||||
Property FT_ReceiptReference As Object = Nothing
|
||||
|
||||
Property FT_ReceiptReference_Storno As Object = Nothing
|
||||
|
||||
|
||||
|
||||
@@ -740,6 +740,7 @@ Public Class cFiskaltrustSignatures
|
||||
Property ftCashBoxID As Object = Nothing
|
||||
Property cbTerminalID As Object = Nothing
|
||||
Property cbReceiptReference As Object = Nothing
|
||||
Property ftBeleg_ID As Object = Nothing
|
||||
|
||||
|
||||
Public hasEntry = False
|
||||
@@ -767,6 +768,7 @@ Public Class cFiskaltrustSignatures
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ftCashBoxID", ftCashBoxID))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("cbTerminalID", cbTerminalID))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("cbReceiptReference", cbReceiptReference))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ftBeleg_ID", ftBeleg_ID))
|
||||
|
||||
Return list
|
||||
End Function
|
||||
|
||||
@@ -27,9 +27,11 @@ End Class
|
||||
|
||||
Public Class FtChargeItemCase
|
||||
|
||||
'DE
|
||||
Public Const RevenueNormal As Long = &H4445000000000001L ' 19 %
|
||||
Public Const RevenueReduced As Long = &H4445000000000002L ' 7 %
|
||||
Public Const RevenueTaxFree As Long = &H4445000000000005L ' 0 %
|
||||
Public Const RevenueNotTaxable As Long = &H4445000000000005L 'nicht steuerbar
|
||||
Public Const RevenueTaxFree As Long = &H4445000000000006L '0%
|
||||
|
||||
End Class
|
||||
|
||||
@@ -44,6 +46,8 @@ End Class
|
||||
|
||||
Public Class FtPayItemCases
|
||||
|
||||
'DE
|
||||
|
||||
' Barzahlung
|
||||
Public Const Cash As Long = &H4445000000000001L
|
||||
|
||||
@@ -57,7 +61,7 @@ Public Class FtPayItemCases
|
||||
Public Const OnlinePayment As Long = &H4445000000000006L
|
||||
|
||||
' Gutschein
|
||||
Public Const Voucher As Long = &H444500000000000DL
|
||||
Public Const Voucher As Long = &H4445000000000007L
|
||||
|
||||
End Class
|
||||
|
||||
@@ -75,14 +79,16 @@ Public Class cFiskaltrustClient_chilkat
|
||||
_country = country
|
||||
End Sub
|
||||
|
||||
Public Function SignReceipt(amount As Decimal, vat As Decimal, POS As List(Of EABelegPositionen), kindOfPayment As String, posSystemId As String) As String
|
||||
Public Function SignReceipt(amount As Decimal, vat As Decimal, POS As List(Of EABelegPositionen), kindOfPayment As String, posSystemId As String, typOfReceiptCase As String) As String
|
||||
|
||||
Dim payload As JsonObject = BuildPayloadReceipt(amount, vat, POS, kindOfPayment, posSystemId, "Verkauf", "")
|
||||
Dim payload As JsonObject = BuildPayloadReceipt(amount, vat, POS, kindOfPayment, posSystemId, typOfReceiptCase, "")
|
||||
|
||||
Return SendChilkat(GetEndpoint("payment"), payload.Emit())
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Public Function SignReceipt_test(posSystemId As String) As String
|
||||
|
||||
Dim LIST = New List(Of EABelegPositionen)
|
||||
@@ -151,8 +157,15 @@ Public Class cFiskaltrustClient_chilkat
|
||||
Return SendChilkat(GetEndpoint("payment"), BuildPayloadNullReceipt(posSystemId, _country).Emit())
|
||||
End Function
|
||||
|
||||
Public Function SignClosingReceipt(receiptType As String, posSystemId As String, kind As String) As String
|
||||
Public Function SignOutOfOrderReceipt(posSystemId As String) As String
|
||||
Return SendChilkat(GetEndpoint("payment"), BuildPayloadOutOfOperationReceipt(posSystemId, _country).Emit())
|
||||
End Function
|
||||
|
||||
Public Function SignOInitialOperationReceipt(posSystemId As String) As String
|
||||
Return SendChilkat(GetEndpoint("payment"), BuildPayloadInitialOperationReceipt(posSystemId, _country).Emit())
|
||||
End Function
|
||||
|
||||
Public Function SignClosingReceipt(receiptType As String, posSystemId As String, kind As String) As String
|
||||
Return SendChilkat(GetEndpoint("payment"), BuildPayloadClosingReceipt(receiptType, posSystemId, kind).Emit())
|
||||
End Function
|
||||
|
||||
@@ -174,69 +187,6 @@ Public Class cFiskaltrustClient_chilkat
|
||||
Return SendChilkat(endpoint, "")
|
||||
End Function
|
||||
|
||||
'Private Function old_SendChilkat(endpoint As String, payload As String, Optional isGet As Boolean = False) As String
|
||||
|
||||
' Dim retries As Integer = 3
|
||||
' Dim lastEx As Exception = Nothing
|
||||
' VERAG_PROG_ALLGEMEIN.cChilkat_Helper.UnlockCilkat()
|
||||
' Dim rest As New Chilkat.Rest
|
||||
' Dim failureDesc As String
|
||||
' rest.VerboseLogging = True
|
||||
|
||||
|
||||
' For i As Integer = 1 To retries
|
||||
|
||||
' Try
|
||||
|
||||
' Dim uri As New Uri(_baseUrl)
|
||||
|
||||
' If Not rest.Connect(uri.Host, uri.Port, uri.Scheme = "https", True) Then
|
||||
|
||||
' Throw New Exception(rest.LastErrorText)
|
||||
' failureDesc = rest.LastErrorText
|
||||
' Return failureDesc
|
||||
|
||||
' End If
|
||||
|
||||
' rest.AddHeader("cashboxid", _cashboxId)
|
||||
' rest.AddHeader("accesstoken", _accessToken)
|
||||
|
||||
' Dim response As String
|
||||
|
||||
' If isGet Then
|
||||
' response = rest.FullRequestNoBody("GET", uri.AbsoluteUri & endpoint)
|
||||
' Else
|
||||
|
||||
|
||||
' If _country = "AT" Then
|
||||
' rest.AddHeader("Content-Type", "text/plain")
|
||||
' response = rest.FullRequestString("POST", uri.AbsoluteUri & endpoint, payload)
|
||||
' Else
|
||||
' rest.AddHeader("Content-Type", "application/json")
|
||||
' response = rest.FullRequestString("POST", uri.AbsoluteUri & endpoint, payload)
|
||||
' End If
|
||||
|
||||
|
||||
' End If
|
||||
|
||||
' If rest.ResponseStatusCode >= 200 AndAlso rest.ResponseStatusCode < 300 Then
|
||||
' Return response
|
||||
' Else
|
||||
' failureDesc = rest.LastErrorText
|
||||
' End If
|
||||
|
||||
' Throw New Exception("HTTP " & rest.ResponseStatusCode & ": " & response)
|
||||
|
||||
' Catch ex As Exception
|
||||
' lastEx = ex
|
||||
' Threading.Thread.Sleep(500)
|
||||
' End Try
|
||||
|
||||
' Next
|
||||
|
||||
' Throw lastEx
|
||||
|
||||
'End Function
|
||||
|
||||
Private Function SendChilkat(endpoint As String, payload As String, Optional isGet As Boolean = False) As String
|
||||
|
||||
@@ -277,11 +227,7 @@ Public Class cFiskaltrustClient_chilkat
|
||||
rest.AddHeader("Content-Type", "application/json")
|
||||
End If
|
||||
|
||||
response = rest.FullRequestString(
|
||||
"POST",
|
||||
uri.AbsoluteUri & endpoint,
|
||||
payload
|
||||
)
|
||||
response = rest.FullRequestString("POST", uri.AbsoluteUri & endpoint, payload)
|
||||
|
||||
End If
|
||||
|
||||
@@ -361,8 +307,8 @@ Public Class cFiskaltrustClient_chilkat
|
||||
|
||||
json.UpdateString("cbReceiptMoment", DateTime.UtcNow.ToString("o"))
|
||||
|
||||
Dim receipCase
|
||||
|
||||
Dim receipCase = FtReceiptCases.PosReceipt Or FtReceiptCases.ReversalReceipt Or FtReceiptCases.ImplicitTransaction
|
||||
|
||||
If _receiptCase = "Storno" Then
|
||||
|
||||
@@ -381,7 +327,18 @@ Public Class cFiskaltrustClient_chilkat
|
||||
json.UpdateString("cbReceiptReference", Guid.NewGuid().ToString())
|
||||
|
||||
' Normal sale
|
||||
|
||||
'Select Case _receiptCase
|
||||
' Case "Eingang"
|
||||
' receipCase = FtReceiptCases.CashIn Or FtReceiptCases.ImplicitTransaction
|
||||
' Case "Ausgang"
|
||||
' receipCase = FtReceiptCases.CashOut Or FtReceiptCases.ImplicitTransaction
|
||||
' Case Else
|
||||
receipCase = FtReceiptCases.PosReceipt Or FtReceiptCases.ImplicitTransaction
|
||||
'End Select
|
||||
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
@@ -467,7 +424,7 @@ Public Class cFiskaltrustClient_chilkat
|
||||
json.UpdateString("ftPosSystemId", getVersion(posSystemId))
|
||||
json.UpdateString("cbTerminalID", posSystemId)
|
||||
json.UpdateString("cbReceiptMoment", DateTime.UtcNow.ToString("o"))
|
||||
json.UpdateString("ftReceiptCase", (FtReceiptCases.InitialOperation).ToString())
|
||||
json.UpdateString("ftReceiptCase", (FtReceiptCases.InitialOperation Or FtReceiptCases.ImplicitTransaction).ToString())
|
||||
json.UpdateString("cbReceiptReference", "INIT")
|
||||
|
||||
json.UpdateString("cbUser", "Admin")
|
||||
@@ -489,7 +446,7 @@ Public Class cFiskaltrustClient_chilkat
|
||||
json.UpdateString("ftPosSystemId", getVersion(posSystemId))
|
||||
json.UpdateString("cbTerminalID", posSystemId)
|
||||
json.UpdateString("cbReceiptMoment", DateTime.UtcNow.ToString("o"))
|
||||
json.UpdateString("ftReceiptCase", (FtReceiptCases.OutOfOperation).ToString())
|
||||
json.UpdateString("ftReceiptCase", (FtReceiptCases.OutOfOperation Or FtReceiptCases.ImplicitTransaction).ToString())
|
||||
json.UpdateString("cbReceiptReference", "OutOfOperation")
|
||||
json.UpdateString("cbUser", "Admin")
|
||||
json.UpdateString("ftReceiptCaseData", "")
|
||||
@@ -573,7 +530,7 @@ Public Class cFiskaltrustClient_chilkat
|
||||
End Function
|
||||
|
||||
Private Function getVersion(Terminal_ID As String) As String
|
||||
Return Terminal_ID & "_" & Application.ProductVersion
|
||||
Return Terminal_ID '& "_" & Application.ProductVersion
|
||||
End Function
|
||||
|
||||
Public Function saveRKSV_FT(ByRef result_zahlung As String, ByRef QR_CodeString As String, ByRef beleg_temp As EABeleg, ByRef isStorno As Boolean) As Boolean
|
||||
@@ -615,17 +572,19 @@ Public Class cFiskaltrustClient_chilkat
|
||||
.ftCashBoxIdentification = json.StringOf("ftCashBoxIdentification")
|
||||
.ftReceiptIdentification = json.StringOf("ftReceiptIdentification")
|
||||
.ftReceiptMoment = ftReceiptMoment.GetAsTimestamp(getAsLocal)
|
||||
.ftState = json.StringOf("ftState")
|
||||
saved = .SAVE()
|
||||
.ftState = json.StringOf("ftState")
|
||||
.ftBeleg_ID = beleg_temp.BelegNr
|
||||
saved = .SAVE()
|
||||
|
||||
If saved AndAlso beleg_temp IsNot Nothing Then
|
||||
If saved AndAlso beleg_temp IsNot Nothing Then
|
||||
|
||||
If isStorno Then
|
||||
beleg_temp.FT_ReceiptReference_Storno = .cbReceiptReference
|
||||
beleg_temp.SAVE()
|
||||
Else
|
||||
beleg_temp.FT_ReceiptReference = .cbReceiptReference
|
||||
End If
|
||||
beleg_temp.FT_ReceiptReference = .cbReceiptReference
|
||||
beleg_temp.SAVE()
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
@@ -634,11 +593,12 @@ Public Class cFiskaltrustClient_chilkat
|
||||
|
||||
|
||||
Dim num As Integer = json.SizeOfArray("ftSignatures")
|
||||
If num = 0 Then
|
||||
Return False
|
||||
End If
|
||||
If num = 0 Then
|
||||
MsgBox("Signatureinheit liefert keine (gültige) Signatur, Signatureinheit ausgefallen!")
|
||||
Return True
|
||||
End If
|
||||
|
||||
Dim Signatures As Chilkat.JsonArray = json.ArrayOf("ftSignatures")
|
||||
Dim Signatures As Chilkat.JsonArray = json.ArrayOf("ftSignatures")
|
||||
If (json.LastMethodSuccess = False) Then
|
||||
Return False
|
||||
End If
|
||||
@@ -657,9 +617,7 @@ Public Class cFiskaltrustClient_chilkat
|
||||
.ftSignatureFormat = SignObj.StringOf("ftSignatureFormat")
|
||||
.ftSignatureType = SignObj.StringOf("ftSignatureType")
|
||||
saved = .SAVE()
|
||||
'If IsNumeric(.ftSignatureType) AndAlso CInt(.ftSignatureType) = IIf(VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = True, 0, 3) Then
|
||||
' QR_CodeString = .ftData
|
||||
'End If
|
||||
|
||||
|
||||
|
||||
End With
|
||||
|
||||
@@ -89,7 +89,7 @@ Public Class cRKSV
|
||||
End Function
|
||||
|
||||
|
||||
Shared Function insertRKSVFiskaltrustAsync(ByVal kasse As cRKSV_Kasse, beleg_temp As EABeleg, ByVal RKSV_Beleg_Id As Integer, ByVal summeBRUTTO As Double, TEST As Boolean, ByRef QR_CodeString As String, ByRef LastJWS As String) As Boolean
|
||||
Shared Function insertRKSVFiskaltrustAsync(ByVal kasse As cRKSV_Kasse, beleg_temp As EABeleg, ByVal RKSV_Beleg_Id As Integer, ByVal summeBRUTTO As Double, TEST As Boolean, ByRef QR_CodeString As String, ByRef LastJWS As String, ByRef typOfReceiptCase As String) As Boolean
|
||||
Try
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ Public Class cRKSV
|
||||
'End If
|
||||
Else
|
||||
Dim client As New cFiskaltrustClient_chilkat(kasse.rksv_FT_RestServiceURL, kasse.rksv_FT_CashboxID, kasse.rksv_FT_AccessToken, kasse.rksv_FT_Country)
|
||||
Dim result = client.SignReceipt(summeBRUTTO, steuersatz, beleg_temp.POS, kindOfPayment, kasse.rksv_id)
|
||||
Dim result = client.SignReceipt(summeBRUTTO, steuersatz, beleg_temp.POS, kindOfPayment, kasse.rksv_id, typOfReceiptCase)
|
||||
If result <> "" Then
|
||||
Return client.saveRKSV_FT(result, QR_CodeString, beleg_temp, False)
|
||||
Else
|
||||
@@ -1015,7 +1015,7 @@ Public Class cRKSV
|
||||
Dim client As New cFiskaltrustClient_chilkat(kasse.rksv_FT_RestServiceURL, kasse.rksv_FT_CashboxID, kasse.rksv_FT_AccessToken, kasse.rksv_FT_Country)
|
||||
Dim result = client.ChancelReceipt(beleg_temp.FT_ReceiptReference, beleg_temp.rksv_umsatz, steuersatz, beleg_temp.POS, kindOfPayment, kasse.rksv_id)
|
||||
If result <> "" Then
|
||||
Return client.saveRKSV_FT(result, QR_CodeString, beleg_temp, True)
|
||||
client.saveRKSV_FT(result, QR_CodeString, beleg_temp, True)
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
@@ -1325,7 +1325,7 @@ Public Class cRKSV
|
||||
rpt.picVERAG.Image = My.Resources.FrontOfficeSUB
|
||||
rpt.lblFirma_Name.Text = "Front-Office Suben eG"
|
||||
rpt.lblFirma_Details.Text = "A 4975 Suben | Suben 14" & vbNewLine & "UID: ATU74813856 "
|
||||
Case "FT DE-KLIPPHAUSEN"
|
||||
Case "FT DE-KLIPPHAUSEN", "TEST-KASSE FT DE"
|
||||
'Default Werte:
|
||||
rpt.picVERAG.Image = My.Resources.Klipphausen_Logo
|
||||
rpt.lblFirma_Name.Text = "Front-Office Klipphausen GmbH"
|
||||
|
||||
@@ -32,6 +32,10 @@ Public Class cRKSV_Kasse
|
||||
|
||||
Property rksv_FT_ZeroReceiptCreated As Object = Nothing
|
||||
|
||||
Property rksv_FT_InitialStartCreated As Object = Nothing
|
||||
|
||||
Property rksv_FT_OutOfOrderCreated As Object = Nothing
|
||||
|
||||
|
||||
Dim SQL As New SQL
|
||||
|
||||
@@ -202,6 +206,38 @@ Public Class cRKSV_Kasse
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Public Function SET_OUTOFORDERBELEG() As Boolean
|
||||
Try
|
||||
Using conn As SqlConnection = cSqlDb.GetNewOpenConnectionFMZOLL()
|
||||
Using cmd As New SqlCommand(" UPDATE [tblRKSV_Kassen] SET rksv_FT_OutOfOrderCreated = getDate() WHERE rksv_id=@rksv_id", conn)
|
||||
cmd.Parameters.AddWithValue("@rksv_id", rksv_id)
|
||||
Dim dr = cmd.ExecuteReader()
|
||||
dr.Close()
|
||||
End Using
|
||||
End Using
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
|
||||
End Try
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Public Function SET_INITIALSTARTBELEG() As Boolean
|
||||
Try
|
||||
Using conn As SqlConnection = cSqlDb.GetNewOpenConnectionFMZOLL()
|
||||
Using cmd As New SqlCommand(" UPDATE [tblRKSV_Kassen] SET rksv_FT_InitialStartCreated = getDate() WHERE rksv_id=@rksv_id", conn)
|
||||
cmd.Parameters.AddWithValue("@rksv_id", rksv_id)
|
||||
Dim dr = cmd.ExecuteReader()
|
||||
dr.Close()
|
||||
End Using
|
||||
End Using
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
|
||||
End Try
|
||||
Return False
|
||||
End Function
|
||||
|
||||
|
||||
Public Function SAVE() As Boolean 'obj As Object, tablename As String, where As String) As Boolean
|
||||
Dim list As List(Of VERAG_PROG_ALLGEMEIN.MyListItem2) = getParameterList()
|
||||
@@ -250,6 +286,8 @@ Public Class cRKSV_Kasse
|
||||
Me.rksv_FT_RestServiceURL = cSqlDb.checkNullReturnValue(dr.Item("rksv_FT_RestServiceURL"), Nothing)
|
||||
Me.rksv_FT_Country = cSqlDb.checkNullReturnValue(dr.Item("rksv_FT_Country"), Nothing)
|
||||
Me.rksv_FT_ZeroReceiptCreated = cSqlDb.checkNullReturnValue(dr.Item("rksv_FT_ZeroReceiptCreated"), Nothing)
|
||||
Me.rksv_FT_OutOfOrderCreated = cSqlDb.checkNullReturnValue(dr.Item("rksv_FT_OutOfOrderCreated"), Nothing)
|
||||
Me.rksv_FT_InitialStartCreated = cSqlDb.checkNullReturnValue(dr.Item("rksv_FT_InitialStartCreated"), Nothing)
|
||||
|
||||
End If
|
||||
dr.Close()
|
||||
@@ -292,6 +330,8 @@ Public Class cRKSV_Kasse
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.MyListItem2("rksv_FT_RestServiceURL", rksv_FT_RestServiceURL))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.MyListItem2("rksv_FT_Country", rksv_FT_Country))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.MyListItem2("rksv_FT_ZeroReceiptCreated", rksv_FT_ZeroReceiptCreated))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.MyListItem2("rksv_FT_InitialStartCreated", rksv_FT_InitialStartCreated))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.MyListItem2("rksv_FT_OutOfOrderCreated", rksv_FT_OutOfOrderCreated))
|
||||
|
||||
|
||||
Return list
|
||||
|
||||
Reference in New Issue
Block a user