From 1a726d351e44c52c35127ba9e49b2dfe33d53c2d Mon Sep 17 00:00:00 2001 From: "d.breimaier" Date: Wed, 9 Sep 2026 14:41:05 +0200 Subject: [PATCH] Fiskaltrust, Kassenbuch, Gestellungen-DAKOSY, --- SDL/Classes/cFiskaltrustClient_chilkat.vb | 4 +- SDL/Classes/cRKSV.vb | 5 + SDL/Classes/cRKSV_Kasse.vb | 21 +- SDL/My Project/Resources.Designer.vb | 10 + SDL/My Project/Resources.resx | 3 + SDL/Resources/Klipphausen_Logo.jpg | Bin 0 -> 6700 bytes SDL/SDL.vbproj | 1 + .../EXGestellung/usrCntlATLAS_EXGestellung.vb | 13 +- SDL/kassenbuch/frmBelegNeu.Designer.vb | 4 +- SDL/kassenbuch/frmBelegNeu.vb | 136 ++++--- SDL/kassenbuch/frmKassenbuch.Designer.vb | 262 +++++++++++- SDL/kassenbuch/frmKassenbuch.resx | 3 + SDL/kassenbuch/frmKassenbuch.vb | 372 +++++++++++++++++- 13 files changed, 759 insertions(+), 75 deletions(-) create mode 100644 SDL/Resources/Klipphausen_Logo.jpg diff --git a/SDL/Classes/cFiskaltrustClient_chilkat.vb b/SDL/Classes/cFiskaltrustClient_chilkat.vb index af0b4158..e3570208 100644 --- a/SDL/Classes/cFiskaltrustClient_chilkat.vb +++ b/SDL/Classes/cFiskaltrustClient_chilkat.vb @@ -1,5 +1,6 @@ Imports Chilkat Imports QRCoder +Imports VERAG_PROG_ALLGEMEIN Public Class FtReceiptCases @@ -327,6 +328,7 @@ Public Class cFiskaltrustClient_chilkat rest.ResponseStatusCode < 500 Then Throw + VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name, ERROR_OP.MAIL) End If @@ -552,7 +554,7 @@ Public Class cFiskaltrustClient_chilkat Case "journal" Select Case _country - Case "DE" : Return "/json/v0/Journal" + Case "DE" : Return "/json/v1/Journal" Case "AT" : Return "/json/Journal" End Select diff --git a/SDL/Classes/cRKSV.vb b/SDL/Classes/cRKSV.vb index fb781b8e..f2fc2954 100644 --- a/SDL/Classes/cRKSV.vb +++ b/SDL/Classes/cRKSV.vb @@ -1325,6 +1325,11 @@ 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" + 'Default Werte: + rpt.picVERAG.Image = My.Resources.Klipphausen_Logo + rpt.lblFirma_Name.Text = "Front-Office Klipphausen GmbH" + rpt.lblFirma_Details.Text = "D 01665 Klipphausen | Am Bahndamm 3" End Select If KASSE.rksv_aktiv Or KASSE.rksvDE_aktiv Then diff --git a/SDL/Classes/cRKSV_Kasse.vb b/SDL/Classes/cRKSV_Kasse.vb index f76d0f02..9c139262 100644 --- a/SDL/Classes/cRKSV_Kasse.vb +++ b/SDL/Classes/cRKSV_Kasse.vb @@ -30,6 +30,8 @@ Public Class cRKSV_Kasse Property rksv_FT_RestServiceURL As Object = Nothing Property rksv_FT_Country As Object = Nothing + Property rksv_FT_ZeroReceiptCreated As Object = Nothing + Dim SQL As New SQL @@ -184,6 +186,22 @@ Public Class cRKSV_Kasse Return False End Function + Public Function SET_NULLBELEG() As Boolean + Try + Using conn As SqlConnection = cSqlDb.GetNewOpenConnectionFMZOLL() + Using cmd As New SqlCommand(" UPDATE [tblRKSV_Kassen] SET rksv_FT_ZeroReceiptCreated = 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() @@ -208,7 +226,6 @@ Public Class cRKSV_Kasse Me.rksv_id = cSqlDb.checkNullReturnValue(dr.Item("rksv_id"), Nothing) Me.rksv_bez = cSqlDb.checkNullReturnValue(dr.Item("rksv_bez"), Nothing) Me.rksv_CompanyGUID = cSqlDb.checkNullReturnValue(dr.Item("rksv_CompanyGUID"), Nothing) - Me.rksv_firma = cSqlDb.checkNullReturnValue(dr.Item("rksv_firma"), Nothing) Me.rksv_startdatum = cSqlDb.checkNullReturnValue(dr.Item("rksv_startdatum"), Nothing) Me.rksv_aktiv = cSqlDb.checkNullReturnValue(dr.Item("rksv_aktiv"), Nothing) @@ -232,6 +249,7 @@ Public Class cRKSV_Kasse Me.rksv_FT_AccessToken = cSqlDb.checkNullReturnValue(dr.Item("rksv_FT_AccessToken"), Nothing) 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) End If dr.Close() @@ -273,6 +291,7 @@ Public Class cRKSV_Kasse list.Add(New VERAG_PROG_ALLGEMEIN.MyListItem2("rksv_FT_AccessToken", rksv_FT_AccessToken)) 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)) Return list diff --git a/SDL/My Project/Resources.Designer.vb b/SDL/My Project/Resources.Designer.vb index 067d6a67..5873bba6 100644 --- a/SDL/My Project/Resources.Designer.vb +++ b/SDL/My Project/Resources.Designer.vb @@ -1104,6 +1104,16 @@ Namespace My.Resources End Get End Property + ''' + ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + ''' + Friend ReadOnly Property Klipphausen_Logo() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("Klipphausen_Logo", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + ''' ''' Sucht eine lokalisierte Ressource vom Typ System.Byte[]. ''' diff --git a/SDL/My Project/Resources.resx b/SDL/My Project/Resources.resx index acabd60d..83fe8fd8 100644 --- a/SDL/My Project/Resources.resx +++ b/SDL/My Project/Resources.resx @@ -997,4 +997,7 @@ ..\Resources\Ustveu_Rechnungsanlagen_BE.xlsx;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ..\Resources\Klipphausen_Logo.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/SDL/Resources/Klipphausen_Logo.jpg b/SDL/Resources/Klipphausen_Logo.jpg new file mode 100644 index 0000000000000000000000000000000000000000..aacb80482da24892d2942d44685f35829b142eb8 GIT binary patch literal 6700 zcmbVwX;>54_hzw)fNTOHAf#Q*(s~>21)|-@Hk8^G01g-G3L6Q$W5^R8mn=QqfgcQ`h}}Zt!1# z_Ilum+*Sp-ZGgPCoPxF-+yA3wUst*-FJAMj>mcBZ4tWr6CXZbzx_yMi{7ao{*D8I*KVq)ZqnauV7POa z>Fzy0TUj5pIrOWo<58z$$DLhVJ^%1J?S1B~Ptb*nmx3>cghob1UymWg#@)JoCn@=E zN@_;tqsLFOo<7SiEP7E~Qu^{$*}JOhn%cVe^$j0d+u9i&A3Oi3E+DEtpt|3UV@;L=8L$tx-F+y2D$xZTo5lRE|fLi_K?{_lX@{QpAsA7K9z z*D$a_K@RzO3fce$5Zed~rSFJF;yo?}rD^8Yc9rEX#@%N5Mbd7H#Ginbpo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Ct^v-qOdAjjoZA-^XscS{U2Y{xrnZs z9+>)k?0jKj3}D|_`ui5r`bIJo|BtAEiv?1z_WK2qgGVZOpZE6D(7=zC_~u-X<( z-I`&PV=h?zGb>?)vwCPG-)zP{vd`+Aw`==pvJG9ZC9>uGbk`!$w9^t1n&0@5C9Q0- zR?sEp3PSdRhUIdM@cidx7K-569x)fgo^Nf43*rCes`yOX*oHna)m)`pUtan&aGn^s zKi&Iwa;w7Mw2j1dy(H~<+MX}f+#^5ca9X3%vZ&mOHc%*^=x>QIP4W|zZj)vi6m&8_ z-q&tMQkSiej1z@X)e@aQuCF-jojc9-6{UauT)IAfM|0mJC}slLACnEe61yO)y6X*5 z+t$Cx{XPoT_|e;#H?lFvikl(NHt#`EZB~FWg;{q~zR_5OU!Cv&1PBYxkv)!3(Il|i zGu*UsERZ``o#=E3vE31tuhH0sZXI97UqS1T&@_Vghpd;b&PJGom` z94GCuZK!u0cdWtNr$J5g@p;!CZgD!^w*TehG0gq+U#ZraGL^weWp_IN5g|E-`V56o z0?s$Q=p5s6=~MPAi!=XR>-w`M`jO_=I%!_@8AOqXF>ZM@+a}#9sd%yOt5r!DX|H++bRh6We^(2c+zFrM<^)HAYWK zQ^ZWjIDV%^i(g0Vlx^u>QcI5>`{O0nD+_;y#ZiS#?W#PNn4*OfXkKS;76Vj>0=M`R zlBO2dgeumJVPPS}WRJ?N3A0rK>hFa&?9)et(S1pI?ASemDdMKJ72PF?fD~M z1ln~Lxy0gvWL^ztxmcp Mk@5eSGCcI(0M6b6M*si- literal 0 HcmV?d00001 diff --git a/SDL/SDL.vbproj b/SDL/SDL.vbproj index 8587163d..a83a30e9 100644 --- a/SDL/SDL.vbproj +++ b/SDL/SDL.vbproj @@ -5528,6 +5528,7 @@ Always + Always diff --git a/SDL/ZOLLSYSTEM/DAKOSY/ATLAS/EXGestellung/usrCntlATLAS_EXGestellung.vb b/SDL/ZOLLSYSTEM/DAKOSY/ATLAS/EXGestellung/usrCntlATLAS_EXGestellung.vb index fc4c1b3d..5fcabf14 100644 --- a/SDL/ZOLLSYSTEM/DAKOSY/ATLAS/EXGestellung/usrCntlATLAS_EXGestellung.vb +++ b/SDL/ZOLLSYSTEM/DAKOSY/ATLAS/EXGestellung/usrCntlATLAS_EXGestellung.vb @@ -139,7 +139,7 @@ Public Class usrCntlATLAS_EXGestellung For Each l In rtbMRN.Lines If l.Trim <> "" Then - If Not sendEXP_MRN(l.Trim.ToUpper, sbAbgangZollstelle._value, cnt, exg_list) Then + If Not sendEXP_MRN(l.Trim.ToUpper, sbAbgangZollstelle._value, cnt, exg_list, FIRMA_DY) Then MsgBox("Sendefehler bei " & l) err = True End If @@ -254,7 +254,7 @@ Public Class usrCntlATLAS_EXGestellung Me.Cursor = Cursors.Default End Sub - Function sendEXP_MRN(MRN As String, Zollstelle As String, zeile As String, ByRef exg_list As List(Of Integer)) As Boolean + Function sendEXP_MRN(MRN As String, Zollstelle As String, zeile As String, ByRef exg_list As List(Of Integer), Optional FIRMA_DY_TEMP As String = "") As Boolean Me.Refresh() @@ -284,8 +284,15 @@ Public Class usrCntlATLAS_EXGestellung 'EXG.exg_ObjectName = AVISO.AvisoID & "_EXP_" & EXG.exg_MRN.ToString().Substring(0, 4) & EXG.exg_MRN.ToString.Substring(14) & zusatz '---> >>> MRN KÜRZEN!!!! 'EXG.exg_ObjectName = AVISO.AvisoID & "_EXP_" & EXG.exg_MRN + + Dim FIRMA_DY = VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA - FIRMA_DY = DAKOSY_Worker.cDakosyFunftions.getFirma_DY(SENDUNG.FilialenNr, Me.FindForm, "EXG") + FIRMA_DY = DAKOSY_Worker.cDakosyFunftions.getFirma_DY(SENDUNG.FilialenNr, Me.FindForm, "EXG") ' -> hier liegt vermutlich der Fehler, die Firma wird hier nochmals gesetzt + + If FIRMA_DY_TEMP <> "" Then + FIRMA_DY = FIRMA_DY_TEMP + End If + Dim saveFile = "" If EXG.SAVE_ALL Then diff --git a/SDL/kassenbuch/frmBelegNeu.Designer.vb b/SDL/kassenbuch/frmBelegNeu.Designer.vb index 22caeabb..077620ca 100644 --- a/SDL/kassenbuch/frmBelegNeu.Designer.vb +++ b/SDL/kassenbuch/frmBelegNeu.Designer.vb @@ -1256,7 +1256,7 @@ Partial Class frmBelegNeu Me.Button4.Padding = New System.Windows.Forms.Padding(0, 0, 5, 0) Me.Button4.Size = New System.Drawing.Size(70, 21) Me.Button4.TabIndex = 49 - Me.Button4.Text = "TEST FT" + Me.Button4.Text = "Fiskaltrust" Me.Button4.TextAlign = System.Drawing.ContentAlignment.MiddleRight Me.Button4.UseVisualStyleBackColor = True Me.Button4.Visible = False @@ -1782,7 +1782,7 @@ Partial Class frmBelegNeu 'cm_FT ' Me.cm_FT.Name = "ContextMenuStrip1" - Me.cm_FT.Size = New System.Drawing.Size(181, 26) + Me.cm_FT.Size = New System.Drawing.Size(61, 4) ' 'frmBelegNeu ' diff --git a/SDL/kassenbuch/frmBelegNeu.vb b/SDL/kassenbuch/frmBelegNeu.vb index 396a5833..801876a5 100644 --- a/SDL/kassenbuch/frmBelegNeu.vb +++ b/SDL/kassenbuch/frmBelegNeu.vb @@ -1900,6 +1900,22 @@ Public Class frmBelegNeu Private Sub Button4_ClickAsync(sender As Object, e As EventArgs) Handles Button4.Click + If VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM Then + 'nur im Testsystem! + 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 + + End If + 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) @@ -1924,20 +1940,8 @@ Public Class frmBelegNeu 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)} + Dim ids = New ToolStripMenuItem() With {.Text = "Verbindungstest", .Name = "verbindungstest", .Font = New Font(Me.Font.FontFamily, Me.Font.Size)} AddHandler ids.Click, AddressOf mnuItemAuftrauege_Clicked cm_FT.Items.Add(ids) End If @@ -1986,26 +1990,27 @@ Public Class frmBelegNeu 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) Dim client_chilkat As New cFiskaltrustClient_chilkat(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) - Dim result As String = client_chilkat.SignNullReceipt(KASSE.rksv_id) + If vbYes = MsgBox("Möchten Sie wirklich einen 0-Beleg an die TSE schicken?", vbYesNoCancel) Then + + Dim result As String = client_chilkat.SignNullReceipt(KASSE.rksv_id) - If result <> "" Then + If result <> "" Then - MsgBox(client_chilkat.PrettyPrintJson(result)) + MsgBox(client_chilkat.PrettyPrintJson(result)) + + End If End If - ElseIf item.Name = "test" Then - 'beide - 'Dim result As String = Await client.Echo(KASSE.rksv_bez & " " & KASSE.rksv_FT_Country & " - ") + + ElseIf item.Name = "verbindungstest" Then + Dim result As String = client_chilkat.Echo(KASSE.rksv_bez & " " & KASSE.rksv_FT_Country & " - ") If result <> "" Then @@ -2016,53 +2021,75 @@ Public Class frmBelegNeu ElseIf item.Name = "storno" Then - 'beide - 'Dim result As String = Await client.CancelReceiptAsync_test("-1", 100, "Cash", KASSE.rksv_id) - Dim result As String = client_chilkat.ChancelReceipt_test("-1", KASSE.rksv_id) + If VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM Then - If result <> "" Then + If vbYes = MsgBox("Möchten Sie wirklich einen Teststorno durchführen?", vbYesNoCancel) Then - MsgBox(client_chilkat.PrettyPrintJson(result)) + Dim result As String = client_chilkat.ChancelReceipt_test("-1", KASSE.rksv_id) + If result <> "" Then + + MsgBox(client_chilkat.PrettyPrintJson(result)) + + End If + + End If + + Else + MsgBox("ACHTUNG, im Produktivsystem nicht möglich!") End If + ElseIf item.Name = "bar" Then - 'beide - 'Dim result As String = Await client.SignReceiptAsync_test(KASSE.rksv_id) - Dim result As String = client_chilkat.SignReceipt_test(KASSE.rksv_id) - If result <> "" Then + If VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM Then - If vbYes = MsgBox(result & vbNewLine & vbNewLine & "Testdaten in DB speichern?", vbYesNoCancel) Then - Dim QR_CodeString As String = "" - client_chilkat.saveRKSV_FT(result, QR_CodeString, Nothing, False) + If vbYes = MsgBox("Möchten Sie wirklich einen Testzahlung durchführen?", vbYesNoCancel) Then + + Dim result As String = client_chilkat.SignReceipt_test(KASSE.rksv_id) + + If result <> "" Then + + If vbYes = MsgBox(result & vbNewLine & vbNewLine & "Testdaten in DB speichern?", vbYesNoCancel) Then + Dim QR_CodeString As String = "" + client_chilkat.saveRKSV_FT(result, QR_CodeString, Nothing, False) + End If + Else + Return False + End If + + + If result <> "" Then + + MsgBox(client_chilkat.PrettyPrintJson(result)) + + End If End If Else - Return False - End If - - - If result <> "" Then - - MsgBox(client_chilkat.PrettyPrintJson(result)) + MsgBox("ACHTUNG, im Produktivsystem nicht möglich!") End If + + ElseIf item.Name = "monthly" Then - 'beide - 'Dim result As String = Await client.SignClosinglReceiptAsync(item.Name, KASSE.rksv_id) - Dim result As String = client_chilkat.SignClosingReceipt(item.Name, KASSE.rksv_id, item.Name) - If result <> "" Then + If vbYes = MsgBox("Möchten Sie wirklich einen Monatsbeleg an die TSE schicken, anschließend kann dieses Monat kein Beleg mehr signiert werden!", vbYesNoCancel) Then - MsgBox(client_chilkat.PrettyPrintJson(result)) + Dim result As String = client_chilkat.SignClosingReceipt(item.Name, KASSE.rksv_id, item.Name) + + If result <> "" Then + + MsgBox(client_chilkat.PrettyPrintJson(result)) + + End If End If + 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) Dim result As String = client_chilkat.SignClosingReceipt(item.Name, KASSE.rksv_id, item.Name) If result <> "" Then @@ -2077,17 +2104,20 @@ Public Class frmBelegNeu ElseIf item.Name = "yearly" Then - ' Dim result As String = Await client.SignClosinglReceiptAsync(item.Name, KASSE.rksv_id) - Dim result As String = client_chilkat.SignClosingReceipt(item.Name, KASSE.rksv_id, item.Name) - If result <> "" Then + If vbYes = MsgBox("Möchten Sie wirklich einen Jahresbeleg an die TSE schicken, anschließend kann in diesem Jahr kein Beleg mehr signiert werden!", vbYesNoCancel) Then - MsgBox(client_chilkat.PrettyPrintJson(result)) + + Dim result As String = client_chilkat.SignClosingReceipt(item.Name, KASSE.rksv_id, item.Name) + If result <> "" Then + + MsgBox(client_chilkat.PrettyPrintJson(result)) + + End If End If - ElseIf (item.Name = "version" Or item.Name = "action" Or item.Name = "signatures" Or item.Name = "queueitem" Or item.Name = "exportJournal") Then - 'Dim result As String = Await client.Journal(2) + ElseIf (item.Name = "version" Or item.Name = "action" Or item.Name = "signatures" Or item.Name = "queueitem" Or item.Name = "exportJournal") Then Dim result As String = "" Select Case item.Name diff --git a/SDL/kassenbuch/frmKassenbuch.Designer.vb b/SDL/kassenbuch/frmKassenbuch.Designer.vb index eb297dcd..035940eb 100644 --- a/SDL/kassenbuch/frmKassenbuch.Designer.vb +++ b/SDL/kassenbuch/frmKassenbuch.Designer.vb @@ -66,6 +66,20 @@ Partial Class frmKassenbuch Me.Label14 = New System.Windows.Forms.Label() Me.Label13 = New System.Windows.Forms.Label() Me.pnlMain = New System.Windows.Forms.Panel() + Me.picTSEOnline = New System.Windows.Forms.PictureBox() + Me.lblTSEOnline = New System.Windows.Forms.Label() + Me.picNULLbeleg = New System.Windows.Forms.PictureBox() + Me.lblNullBeleg = New System.Windows.Forms.Label() + Me.lblJahres = New System.Windows.Forms.Label() + Me.lblMonats = New System.Windows.Forms.Label() + Me.lblTages = New System.Windows.Forms.Label() + Me.picJahres = New System.Windows.Forms.PictureBox() + Me.picMonats = New System.Windows.Forms.PictureBox() + Me.picTages = New System.Windows.Forms.PictureBox() + Me.lblWarning = New System.Windows.Forms.Label() + Me.Button11 = New System.Windows.Forms.Button() + Me.Button17 = New System.Windows.Forms.Button() + Me.lbldailyCashboxClosing = New System.Windows.Forms.Label() Me.Button10 = New System.Windows.Forms.Button() Me.btnBelegGSKunde = New System.Windows.Forms.Button() Me.pnl = New System.Windows.Forms.Panel() @@ -79,6 +93,8 @@ Partial Class frmKassenbuch Me.btnBelegLeihgeld = New System.Windows.Forms.Button() Me.UsrCntlTestsystem1 = New VERAG_PROG_ALLGEMEIN.usrCntlTestsystem() Me.Button1 = New System.Windows.Forms.Button() + Me.cm_FT = New System.Windows.Forms.ContextMenuStrip(Me.components) + Me.lblFiskaltrustHeader = New System.Windows.Forms.Label() CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.DataGridView2, System.ComponentModel.ISupportInitialize).BeginInit() Me.pnlTop.SuspendLayout() @@ -86,6 +102,11 @@ Partial Class frmKassenbuch Me.pnlSuche.SuspendLayout() Me.pnlSearch.SuspendLayout() Me.pnlMain.SuspendLayout() + CType(Me.picTSEOnline, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.picNULLbeleg, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.picJahres, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.picMonats, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.picTages, System.ComponentModel.ISupportInitialize).BeginInit() Me.pnl.SuspendLayout() Me.SuspendLayout() ' @@ -130,7 +151,7 @@ Partial Class frmKassenbuch Me.Label5.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.Label5.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label5.ForeColor = System.Drawing.Color.White - Me.Label5.Location = New System.Drawing.Point(603, 31) + Me.Label5.Location = New System.Drawing.Point(613, 31) Me.Label5.Name = "Label5" Me.Label5.Size = New System.Drawing.Size(151, 20) Me.Label5.TabIndex = 1 @@ -184,7 +205,7 @@ Partial Class frmKassenbuch Me.DataGridView2.ReadOnly = True Me.DataGridView2.RowHeadersVisible = False Me.DataGridView2.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect - Me.DataGridView2.Size = New System.Drawing.Size(766, 145) + Me.DataGridView2.Size = New System.Drawing.Size(776, 158) Me.DataGridView2.TabIndex = 5 ' 'datVon @@ -307,7 +328,7 @@ Partial Class frmKassenbuch Me.Label9.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.Label9.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label9.ForeColor = System.Drawing.Color.White - Me.Label9.Location = New System.Drawing.Point(451, 9) + Me.Label9.Location = New System.Drawing.Point(461, 9) Me.Label9.Name = "Label9" Me.Label9.Size = New System.Drawing.Size(305, 20) Me.Label9.TabIndex = 9 @@ -419,7 +440,7 @@ Partial Class frmKassenbuch Me.Button5.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button5.ForeColor = System.Drawing.Color.Black Me.Button5.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft - Me.Button5.Location = New System.Drawing.Point(458, 36) + Me.Button5.Location = New System.Drawing.Point(394, 36) Me.Button5.Name = "Button5" Me.Button5.Size = New System.Drawing.Size(184, 42) Me.Button5.TabIndex = 19 @@ -477,7 +498,7 @@ Partial Class frmKassenbuch Me.btnStorno.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btnStorno.ForeColor = System.Drawing.Color.Black Me.btnStorno.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft - Me.btnStorno.Location = New System.Drawing.Point(458, 84) + Me.btnStorno.Location = New System.Drawing.Point(394, 84) Me.btnStorno.Name = "btnStorno" Me.btnStorno.Size = New System.Drawing.Size(184, 42) Me.btnStorno.TabIndex = 420 @@ -498,7 +519,7 @@ Partial Class frmKassenbuch Me.pnlTop.Dock = System.Windows.Forms.DockStyle.Top Me.pnlTop.Location = New System.Drawing.Point(0, 0) Me.pnlTop.Name = "pnlTop" - Me.pnlTop.Size = New System.Drawing.Size(768, 60) + Me.pnlTop.Size = New System.Drawing.Size(778, 60) Me.pnlTop.TabIndex = 421 ' 'Label15 @@ -526,7 +547,7 @@ Partial Class frmKassenbuch ' Me.Label7.AutoSize = True Me.Label7.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.Label7.Location = New System.Drawing.Point(455, 20) + Me.Label7.Location = New System.Drawing.Point(391, 20) Me.Label7.Name = "Label7" Me.Label7.Size = New System.Drawing.Size(58, 13) Me.Label7.TabIndex = 422 @@ -542,9 +563,9 @@ Partial Class frmKassenbuch Me.pnlSuche.Controls.Add(Me.Label8) Me.pnlSuche.Controls.Add(Me.DataGridView1) Me.pnlSuche.Dock = System.Windows.Forms.DockStyle.Fill - Me.pnlSuche.Location = New System.Drawing.Point(0, 470) + Me.pnlSuche.Location = New System.Drawing.Point(0, 493) Me.pnlSuche.Name = "pnlSuche" - Me.pnlSuche.Size = New System.Drawing.Size(768, 205) + Me.pnlSuche.Size = New System.Drawing.Size(778, 218) Me.pnlSuche.TabIndex = 423 ' 'pnlSearch @@ -566,7 +587,7 @@ Partial Class frmKassenbuch Me.pnlSearch.Dock = System.Windows.Forms.DockStyle.Top Me.pnlSearch.Location = New System.Drawing.Point(0, 0) Me.pnlSearch.Name = "pnlSearch" - Me.pnlSearch.Size = New System.Drawing.Size(766, 58) + Me.pnlSearch.Size = New System.Drawing.Size(776, 58) Me.pnlSearch.TabIndex = 420 ' 'btnExcel @@ -602,6 +623,21 @@ Partial Class frmKassenbuch ' 'pnlMain ' + Me.pnlMain.Controls.Add(Me.lblFiskaltrustHeader) + Me.pnlMain.Controls.Add(Me.picTSEOnline) + Me.pnlMain.Controls.Add(Me.lblTSEOnline) + Me.pnlMain.Controls.Add(Me.picNULLbeleg) + Me.pnlMain.Controls.Add(Me.lblNullBeleg) + Me.pnlMain.Controls.Add(Me.lblJahres) + Me.pnlMain.Controls.Add(Me.lblMonats) + Me.pnlMain.Controls.Add(Me.lblTages) + Me.pnlMain.Controls.Add(Me.picJahres) + Me.pnlMain.Controls.Add(Me.picMonats) + Me.pnlMain.Controls.Add(Me.picTages) + Me.pnlMain.Controls.Add(Me.lblWarning) + Me.pnlMain.Controls.Add(Me.Button11) + Me.pnlMain.Controls.Add(Me.Button17) + Me.pnlMain.Controls.Add(Me.lbldailyCashboxClosing) Me.pnlMain.Controls.Add(Me.Button10) Me.pnlMain.Controls.Add(Me.btnBelegGSKunde) Me.pnlMain.Controls.Add(Me.pnl) @@ -624,9 +660,171 @@ Partial Class frmKassenbuch Me.pnlMain.Dock = System.Windows.Forms.DockStyle.Top Me.pnlMain.Location = New System.Drawing.Point(0, 60) Me.pnlMain.Name = "pnlMain" - Me.pnlMain.Size = New System.Drawing.Size(768, 410) + Me.pnlMain.Size = New System.Drawing.Size(778, 433) Me.pnlMain.TabIndex = 425 ' + 'picTSEOnline + ' + Me.picTSEOnline.BackgroundImage = Global.SDL.My.Resources.Resources.ok + Me.picTSEOnline.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom + Me.picTSEOnline.Location = New System.Drawing.Point(614, 46) + Me.picTSEOnline.Name = "picTSEOnline" + Me.picTSEOnline.Size = New System.Drawing.Size(27, 20) + Me.picTSEOnline.TabIndex = 449 + Me.picTSEOnline.TabStop = False + Me.picTSEOnline.Visible = False + ' + 'lblTSEOnline + ' + Me.lblTSEOnline.AutoSize = True + Me.lblTSEOnline.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblTSEOnline.ForeColor = System.Drawing.Color.Black + Me.lblTSEOnline.Location = New System.Drawing.Point(655, 50) + Me.lblTSEOnline.Name = "lblTSEOnline" + Me.lblTSEOnline.Size = New System.Drawing.Size(75, 16) + Me.lblTSEOnline.TabIndex = 448 + Me.lblTSEOnline.Text = "TSE Online" + Me.lblTSEOnline.Visible = False + ' + 'picNULLbeleg + ' + Me.picNULLbeleg.BackgroundImage = Global.SDL.My.Resources.Resources.ok + Me.picNULLbeleg.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom + Me.picNULLbeleg.Location = New System.Drawing.Point(614, 72) + Me.picNULLbeleg.Name = "picNULLbeleg" + Me.picNULLbeleg.Size = New System.Drawing.Size(27, 20) + Me.picNULLbeleg.TabIndex = 447 + Me.picNULLbeleg.TabStop = False + Me.picNULLbeleg.Visible = False + ' + 'lblNullBeleg + ' + Me.lblNullBeleg.AutoSize = True + Me.lblNullBeleg.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblNullBeleg.ForeColor = System.Drawing.Color.Black + Me.lblNullBeleg.Location = New System.Drawing.Point(655, 76) + Me.lblNullBeleg.Name = "lblNullBeleg" + Me.lblNullBeleg.Size = New System.Drawing.Size(81, 16) + Me.lblNullBeleg.TabIndex = 446 + Me.lblNullBeleg.Text = "NULL-Beleg" + Me.lblNullBeleg.Visible = False + ' + 'lblJahres + ' + Me.lblJahres.AutoSize = True + Me.lblJahres.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblJahres.ForeColor = System.Drawing.Color.Black + Me.lblJahres.Location = New System.Drawing.Point(655, 154) + Me.lblJahres.Name = "lblJahres" + Me.lblJahres.Size = New System.Drawing.Size(109, 16) + Me.lblJahres.TabIndex = 445 + Me.lblJahres.Text = "Jahresabschluss" + Me.lblJahres.Visible = False + ' + 'lblMonats + ' + Me.lblMonats.AutoSize = True + Me.lblMonats.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblMonats.ForeColor = System.Drawing.Color.Black + Me.lblMonats.Location = New System.Drawing.Point(655, 128) + Me.lblMonats.Name = "lblMonats" + Me.lblMonats.Size = New System.Drawing.Size(112, 16) + Me.lblMonats.TabIndex = 444 + Me.lblMonats.Text = "Monatsabschluss" + Me.lblMonats.Visible = False + ' + 'lblTages + ' + Me.lblTages.AutoSize = True + Me.lblTages.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblTages.ForeColor = System.Drawing.Color.Black + Me.lblTages.Location = New System.Drawing.Point(655, 102) + Me.lblTages.Name = "lblTages" + Me.lblTages.Size = New System.Drawing.Size(108, 16) + Me.lblTages.TabIndex = 443 + Me.lblTages.Text = "Tagesabschluss" + Me.lblTages.Visible = False + ' + 'picJahres + ' + Me.picJahres.BackgroundImage = Global.SDL.My.Resources.Resources.ok + Me.picJahres.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom + Me.picJahres.Location = New System.Drawing.Point(614, 150) + Me.picJahres.Name = "picJahres" + Me.picJahres.Size = New System.Drawing.Size(27, 20) + Me.picJahres.TabIndex = 442 + Me.picJahres.TabStop = False + Me.picJahres.Visible = False + ' + 'picMonats + ' + Me.picMonats.BackgroundImage = Global.SDL.My.Resources.Resources.ok + Me.picMonats.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom + Me.picMonats.Location = New System.Drawing.Point(614, 124) + Me.picMonats.Name = "picMonats" + Me.picMonats.Size = New System.Drawing.Size(27, 20) + Me.picMonats.TabIndex = 441 + Me.picMonats.TabStop = False + Me.picMonats.Visible = False + ' + 'picTages + ' + Me.picTages.BackgroundImage = Global.SDL.My.Resources.Resources.ok + Me.picTages.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom + Me.picTages.Location = New System.Drawing.Point(614, 98) + Me.picTages.Name = "picTages" + Me.picTages.Size = New System.Drawing.Size(27, 20) + Me.picTages.TabIndex = 440 + Me.picTages.TabStop = False + Me.picTages.Visible = False + ' + 'lblWarning + ' + Me.lblWarning.AutoSize = True + Me.lblWarning.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblWarning.ForeColor = System.Drawing.Color.Red + Me.lblWarning.Location = New System.Drawing.Point(368, 175) + Me.lblWarning.Name = "lblWarning" + Me.lblWarning.Size = New System.Drawing.Size(0, 16) + Me.lblWarning.TabIndex = 439 + ' + 'Button11 + ' + Me.Button11.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.Button11.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Button11.ForeColor = System.Drawing.Color.Black + Me.Button11.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft + Me.Button11.Location = New System.Drawing.Point(394, 130) + Me.Button11.Name = "Button11" + Me.Button11.Size = New System.Drawing.Size(184, 42) + Me.Button11.TabIndex = 438 + Me.Button11.Text = "Fiskaltrust" + Me.Button11.TextAlign = System.Drawing.ContentAlignment.MiddleLeft + Me.Button11.UseVisualStyleBackColor = True + ' + 'Button17 + ' + Me.Button17.BackgroundImage = Global.SDL.My.Resources.Resources.fragezeichen + Me.Button17.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom + Me.Button17.FlatAppearance.BorderSize = 0 + Me.Button17.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.Button17.Location = New System.Drawing.Point(742, 24) + Me.Button17.Name = "Button17" + Me.Button17.Size = New System.Drawing.Size(25, 20) + Me.Button17.TabIndex = 437 + Me.Button17.UseVisualStyleBackColor = True + ' + 'lbldailyCashboxClosing + ' + Me.lbldailyCashboxClosing.AutoSize = True + Me.lbldailyCashboxClosing.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lbldailyCashboxClosing.ForeColor = System.Drawing.Color.Red + Me.lbldailyCashboxClosing.Location = New System.Drawing.Point(361, 5) + Me.lbldailyCashboxClosing.Name = "lbldailyCashboxClosing" + Me.lbldailyCashboxClosing.Size = New System.Drawing.Size(410, 16) + Me.lbldailyCashboxClosing.TabIndex = 436 + Me.lbldailyCashboxClosing.Text = "Täglicher Kassenabschluss dieser Kasse ist verpflichtend!" + ' 'Button10 ' Me.Button10.FlatStyle = System.Windows.Forms.FlatStyle.Flat @@ -669,7 +867,7 @@ Partial Class frmKassenbuch Me.pnl.Controls.Add(Me.Button8) Me.pnl.Controls.Add(Me.cboKassen) Me.pnl.Controls.Add(Me.Label18) - Me.pnl.Location = New System.Drawing.Point(442, 132) + Me.pnl.Location = New System.Drawing.Point(378, 201) Me.pnl.Name = "pnl" Me.pnl.Size = New System.Drawing.Size(287, 223) Me.pnl.TabIndex = 430 @@ -799,7 +997,7 @@ Partial Class frmKassenbuch Me.Button1.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button1.ForeColor = System.Drawing.Color.Black Me.Button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft - Me.Button1.Location = New System.Drawing.Point(458, 197) + Me.Button1.Location = New System.Drawing.Point(400, 197) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(260, 42) Me.Button1.TabIndex = 434 @@ -807,12 +1005,27 @@ Partial Class frmKassenbuch Me.Button1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft Me.Button1.UseVisualStyleBackColor = True ' + 'cm_FT + ' + Me.cm_FT.Name = "ContextMenuStrip1" + Me.cm_FT.Size = New System.Drawing.Size(61, 4) + ' + 'lblFiskaltrustHeader + ' + Me.lblFiskaltrustHeader.AutoSize = True + Me.lblFiskaltrustHeader.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblFiskaltrustHeader.Location = New System.Drawing.Point(611, 20) + Me.lblFiskaltrustHeader.Name = "lblFiskaltrustHeader" + Me.lblFiskaltrustHeader.Size = New System.Drawing.Size(65, 13) + Me.lblFiskaltrustHeader.TabIndex = 450 + Me.lblFiskaltrustHeader.Text = "Fiskaltrust" + ' 'frmKassenbuch ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.BackColor = System.Drawing.Color.White - Me.ClientSize = New System.Drawing.Size(768, 675) + Me.ClientSize = New System.Drawing.Size(778, 711) Me.Controls.Add(Me.pnlSuche) Me.Controls.Add(Me.pnlMain) Me.Controls.Add(Me.pnlTop) @@ -831,6 +1044,11 @@ Partial Class frmKassenbuch Me.pnlSearch.PerformLayout() Me.pnlMain.ResumeLayout(False) Me.pnlMain.PerformLayout() + CType(Me.picTSEOnline, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.picNULLbeleg, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.picJahres, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.picMonats, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.picTages, System.ComponentModel.ISupportInitialize).EndInit() Me.pnl.ResumeLayout(False) Me.pnl.PerformLayout() Me.ResumeLayout(False) @@ -891,4 +1109,20 @@ Partial Class frmKassenbuch Friend WithEvents Button7 As System.Windows.Forms.Button Friend WithEvents Button10 As Button Friend WithEvents btnPosTerminal As Button + Friend WithEvents lbldailyCashboxClosing As Label + Friend WithEvents Button17 As Button + Friend WithEvents Button11 As Button + Friend WithEvents cm_FT As ContextMenuStrip + Friend WithEvents lblWarning As Label + Friend WithEvents lblJahres As Label + Friend WithEvents lblMonats As Label + Friend WithEvents lblTages As Label + Friend WithEvents picJahres As PictureBox + Friend WithEvents picMonats As PictureBox + Friend WithEvents picTages As PictureBox + Friend WithEvents picNULLbeleg As PictureBox + Friend WithEvents lblNullBeleg As Label + Friend WithEvents picTSEOnline As PictureBox + Friend WithEvents lblTSEOnline As Label + Friend WithEvents lblFiskaltrustHeader As Label End Class diff --git a/SDL/kassenbuch/frmKassenbuch.resx b/SDL/kassenbuch/frmKassenbuch.resx index 66ac4fbc..a293f9f1 100644 --- a/SDL/kassenbuch/frmKassenbuch.resx +++ b/SDL/kassenbuch/frmKassenbuch.resx @@ -142,6 +142,9 @@ SNw4kn9U62ALlUplLU5qtVoaZwrCC9FnbaaC0/EHAAAAAElFTkSuQmCC + + 25, 8 + AAABAAEAgIAAAAEAGAAoyAAAFgAAACgAAACAAAAAAAEAAAEAGAAAAAAAAMgAAMQOAADEDgAAAAAAAAAA diff --git a/SDL/kassenbuch/frmKassenbuch.vb b/SDL/kassenbuch/frmKassenbuch.vb index 63020d7b..802b94c2 100644 --- a/SDL/kassenbuch/frmKassenbuch.vb +++ b/SDL/kassenbuch/frmKassenbuch.vb @@ -1,4 +1,5 @@ -Imports SDL.RKSVServer +Imports GrapeCity.DataVisualization.TypeScript +Imports SDL.RKSVServer Public Class frmKassenbuch Dim SQL As New SQL @@ -13,6 +14,11 @@ Public Class frmKassenbuch Dim loginAfterSeconds = 10 Public master_Kasse As Boolean = False Dim FMZOLL_SQL As New FMZOLL_SQL + Dim tagesabschlussIsSet As Boolean = False + Dim monatsabschlussIsSet As Boolean = False + Dim jahresabschlussIsSet As Boolean = False + Dim NULLBelegIsCreated As Boolean = True + Dim TSEIsOnline As Boolean = False Public Sub New(PERSONAL As cPersonal, PERSONAL_LG As cPersonal) ' Dieser Aufruf ist für den Designer erforderlich. @@ -87,10 +93,47 @@ Public Class frmKassenbuch End If + + + End Sub + + Private Sub InitFiskaltrust(isOnline As Boolean, tagesabschluss As Boolean, Montagsabschluss As Boolean, Jahresabschluss As Boolean, NULLBeleg As Boolean) + + lblTSEOnline.Visible = True + lblTages.Visible = True + lblMonats.Visible = True + lblJahres.Visible = True + lblNullBeleg.Visible = True + + picJahres.Visible = True + picMonats.Visible = True + picTages.Visible = True + picNULLbeleg.Visible = True + picTSEOnline.Visible = True + + showPic(isOnline, picTSEOnline) + showPic(tagesabschluss, picTages) + showPic(monatsabschlussIsSet, picMonats) + showPic(Jahresabschluss, picJahres) + showPic(NULLBeleg, picNULLbeleg) + + + End Sub + + Sub showPic(ok As Boolean, pic As PictureBox) + pic.Visible = True + If ok Then + pic.BackgroundImage = My.Resources.ok + Else + pic.BackgroundImage = My.Resources.del + End If + End Sub Sub init() Dim sqlstr = "" + lblWarning.Text = "" + If master_Kasse Then Label9.Text = "ADMIN" pnlTop.BackColor = Color.Red @@ -153,6 +196,62 @@ Public Class frmKassenbuch End If + If PERSONAL.cRKSV_Kasse.rksv_FT_CashboxID IsNot Nothing AndAlso PERSONAL.cRKSV_Kasse.rksv_FT_Country = "DE" AndAlso PERSONAL.cRKSV_Kasse.rksv_FT_RestServiceURL IsNot Nothing AndAlso PERSONAL.cRKSV_Kasse.rksv_FT_AccessToken IsNot Nothing Then + lbldailyCashboxClosing.Visible = True + Button11.Visible = True + + Dim tagesabschluss As Integer = CInt(SQL.getValueTxtBySql("SELECT count(*) FROM [VERAG].[dbo].[tblRKSV_FT] where Day(ftReceiptMoment) = Day(GETDATE()) and ftEndOfDayReceipt is not null and ftCashBoxID = '" & PERSONAL.cRKSV_Kasse.rksv_FT_CashboxID & "'", "FMZOLL")) + If tagesabschluss > 0 Then tagesabschlussIsSet = True + + Dim monatsabschluss As Integer = CInt(SQL.getValueTxtBySql("SELECT count(*) FROM [VERAG].[dbo].[tblRKSV_FT] where Day(ftReceiptMoment) = Month(GETDATE()) and ftEndOfMonthReceipt is not null and ftCashBoxID = '" & PERSONAL.cRKSV_Kasse.rksv_FT_CashboxID & "'", "FMZOLL")) + If monatsabschluss > 0 Then monatsabschlussIsSet = True + + Dim jahresabschluss As Integer = CInt(SQL.getValueTxtBySql("SELECT count(*) FROM [VERAG].[dbo].[tblRKSV_FT] where Year(ftReceiptMoment) = Year(GETDATE()) and ftEndOfYearReceipt is not null and ftCashBoxID = '" & PERSONAL.cRKSV_Kasse.rksv_FT_CashboxID & "'", "FMZOLL")) + If jahresabschluss > 0 Then jahresabschlussIsSet = True + If PERSONAL.cRKSV_Kasse.rksv_FT_ZeroReceiptCreated Is Nothing OrElse IsDBNull(PERSONAL.cRKSV_Kasse.rksv_FT_ZeroReceiptCreated) Then + NULLBelegIsCreated = False + End If + + Dim client_chilkat As New cFiskaltrustClient_chilkat(PERSONAL.cRKSV_Kasse.rksv_FT_RestServiceURL, PERSONAL.cRKSV_Kasse.rksv_FT_CashboxID, PERSONAL.cRKSV_Kasse.rksv_FT_AccessToken, PERSONAL.cRKSV_Kasse.rksv_FT_Country) + Dim result As String = client_chilkat.Echo(PERSONAL.cRKSV_Kasse.rksv_bez & " " & PERSONAL.cRKSV_Kasse.rksv_FT_Country & " - ") + + If result.Contains("VERBINDUNG OK") Then + TSEIsOnline = True + End If + + InitFiskaltrust(TSEIsOnline, tagesabschlussIsSet, monatsabschlussIsSet, jahresabschlussIsSet, NULLBelegIsCreated) + + If Not NULLBelegIsCreated Then + lblWarning.Text = "" '"Es wurde noch kein NULL-Beleg über FT erstellt!" + btnBelegKunde.Enabled = False + btnBelegAusgang.Enabled = False + btnBelegEingang.Enabled = False + btnBelegGSKunde.Enabled = False + btnBelegLeihgeld.Enabled = False + btnStorno.Enabled = False + ElseIf tagesabschlussIsSet Then + lbldailyCashboxClosing.Text = "Tagesabschluss für heute wurde bereits durchgeführt!" + btnBelegKunde.Enabled = False + btnBelegAusgang.Enabled = False + btnBelegEingang.Enabled = False + btnBelegGSKunde.Enabled = False + btnBelegLeihgeld.Enabled = False + btnStorno.Enabled = False + Else + If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("KASSE", Me) Then + btnBelegKunde.Enabled = True + btnBelegAusgang.Enabled = True + btnBelegEingang.Enabled = True + btnBelegGSKunde.Enabled = True + btnBelegLeihgeld.Enabled = True + btnStorno.Enabled = True + End If + End If + Else + lbldailyCashboxClosing.Visible = False + Button11.Visible = False + End If + ' Label9.Text = PERSONAL.Name DataGridView2.ClearSelection() @@ -1391,4 +1490,275 @@ Public Class frmKassenbuch f.Show() End Sub + + Private Sub Button17_Click(sender As Object, e As EventArgs) Handles Button17.Click + + Dim webAddress As String = "https://wiki.verag.ag/e/de/software/aviso/howtos/Barverkauf" + Process.Start(webAddress) + End Sub + + Private Sub Button11_Click_1(sender As Object, e As EventArgs) Handles Button11.Click + + If VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM Then + 'nur im Testsystem! + 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 + + End If + + 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") AndAlso Not monatsabschlussIsSet 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") AndAlso Not tagesabschlussIsSet 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") AndAlso Not jahresabschlussIsSet 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("verbindungstest") Then + Dim ids = New ToolStripMenuItem() With {.Text = "Verbindungstest", .Name = "verbindungstest", .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("version") Then + Dim ids = New ToolStripMenuItem() With {.Text = "Journal - Version", .Name = "version", .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("signatures") Then + Dim ids = New ToolStripMenuItem() With {.Text = "Journal - Signaturen", .Name = "signatures", .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("action") Then + Dim ids = New ToolStripMenuItem() With {.Text = "Journal - Action", .Name = "action", .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("queueitem") Then + Dim ids = New ToolStripMenuItem() With {.Text = "Journal - Queue", .Name = "queueitem", .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("exportJournal") Then + Dim ids = New ToolStripMenuItem() With {.Text = "Journal - EXPORT", .Name = "exportJournal", .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 + + 'PERSONAL.cRKSV_Kasse.LOAD(cboKassen._value) + + Dim client_chilkat As New cFiskaltrustClient_chilkat(PERSONAL.cRKSV_Kasse.rksv_FT_RestServiceURL, PERSONAL.cRKSV_Kasse.rksv_FT_CashboxID, PERSONAL.cRKSV_Kasse.rksv_FT_AccessToken, PERSONAL.cRKSV_Kasse.rksv_FT_Country) + + If item.Name = "null" Then + + If vbYes = MsgBox("Möchten Sie einen 0-Beleg an die TSE schicken?", vbYesNoCancel) Then + + Dim result As String = client_chilkat.SignNullReceipt(PERSONAL.cRKSV_Kasse.rksv_id) + + + If result <> "" Then + + MsgBox(client_chilkat.PrettyPrintJson(result)) + + Dim rksv As New cRKSV_Kasse(PERSONAL.cRKSV_Kasse.rksv_id) + rksv.SET_NULLBELEG() + init() + End If + + End If + + + + ElseIf item.Name = "verbindungstest" Then + + Dim result As String = client_chilkat.Echo(PERSONAL.cRKSV_Kasse.rksv_bez & " " & PERSONAL.cRKSV_Kasse.rksv_FT_Country & " - ") + + If result <> "" Then + + MsgBox(client_chilkat.PrettyPrintJson(result)) + + End If + + + ElseIf item.Name = "storno" Then + If VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM Then + + If vbYes = MsgBox("Möchten Sie wirklich einen Teststorno durchführen?" & vbNewLine & "NIEMALS auf einer produktiven TSE durchführen!", vbYesNoCancel) Then + + Dim result As String = client_chilkat.ChancelReceipt_test("-1", PERSONAL.cRKSV_Kasse.rksv_id) + + If result <> "" Then + + MsgBox(client_chilkat.PrettyPrintJson(result)) + + End If + + End If + + Else + MsgBox("ACHTUNG, im Produktivsystem nicht möglich!") + End If + + + ElseIf item.Name = "bar" Then + + If VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM Then + + If vbYes = MsgBox("Möchten Sie wirklich einen Testzahlung durchführen?" & vbNewLine & "NIEMALS auf einer produktiven TSE durchführen!", vbYesNoCancel) Then + + Dim result As String = client_chilkat.SignReceipt_test(PERSONAL.cRKSV_Kasse.rksv_id) + + If result <> "" Then + + If vbYes = MsgBox(result & vbNewLine & vbNewLine & "Testdaten in DB speichern?", vbYesNoCancel) Then + Dim QR_CodeString As String = "" + client_chilkat.saveRKSV_FT(result, QR_CodeString, Nothing, False) + End If + Else + Return False + End If + + + If result <> "" Then + + MsgBox(client_chilkat.PrettyPrintJson(result)) + + End If + End If + Else + MsgBox("ACHTUNG, im Produktivsystem nicht möglich!") + + End If + + + + ElseIf item.Name = "monthly" Then + + If vbYes = MsgBox("Möchten Sie einen Monatsbeleg an die TSE schicken, anschließend kann in diesem Monat kein Beleg mehr signiert werden!", vbYesNoCancel) Then + + Dim result As String = client_chilkat.SignClosingReceipt(item.Name, PERSONAL.cRKSV_Kasse.rksv_id, item.Name) + + If result <> "" Then + + MsgBox(client_chilkat.PrettyPrintJson(result)) + + SQL.doSQL("UPDATE [tblRKSV_FT] set ftEndOfMonthReceipt = getDate() where Month(ftReceiptMoment) = Month(GETDATE()) and ftEndOfMonthReceipt is null and ftCashBoxID = '" & PERSONAL.cRKSV_Kasse.rksv_FT_CashboxID & "' ", "FMZOLL") + + End If + + End If + + + ElseIf item.Name = "daily" And Not tagesabschlussIsSet Then + 'Nur DE + If vbYes = MsgBox("Möchten Sie einen Tagesabschluss durchführen, anschließend kann heute kein Beleg mehr signiert werden!", vbYesNoCancel) Then + If PERSONAL.cRKSV_Kasse.rksv_FT_Country = "DE" Then + Dim result As String = client_chilkat.SignClosingReceipt(item.Name, PERSONAL.cRKSV_Kasse.rksv_id, item.Name) + + If result <> "" Then + + MsgBox(client_chilkat.PrettyPrintJson(result)) + + SQL.doSQL("UPDATE [tblRKSV_FT] set ftEndOfDayReceipt = getDate() where Day(ftReceiptMoment) = Day(GETDATE()) and ftEndOfDayReceipt is null and ftCashBoxID = '" & PERSONAL.cRKSV_Kasse.rksv_FT_CashboxID & "' ", "FMZOLL") + init() + End If + Else + MsgBox("nicht für AT-Kassen möglich!") + End If + End If + + + + ElseIf item.Name = "yearly" Then + + If vbYes = MsgBox("Möchten Sie einen Jahresbeleg an die TSE schicken, anschließend kann in diesem Jahr kein Beleg mehr signiert werden!", vbYesNoCancel) Then + + + Dim result As String = client_chilkat.SignClosingReceipt(item.Name, PERSONAL.cRKSV_Kasse.rksv_id, item.Name) + If result <> "" Then + + MsgBox(client_chilkat.PrettyPrintJson(result)) + + SQL.doSQL("UPDATE [tblRKSV_FT] set ftEndOfYearReceipt = getDate() where Year(ftReceiptMoment) = Year(GETDATE()) and ftEndOfYearReceipt is null and ftCashBoxID = '" & PERSONAL.cRKSV_Kasse.rksv_FT_CashboxID & "' ", "FMZOLL") + + End If + + End If + + + ElseIf (item.Name = "version" Or item.Name = "action" Or item.Name = "signatures" Or item.Name = "queueitem" Or item.Name = "exportJournal") Then + + Dim result As String = "" + Select Case item.Name + Case "version" : result = client_chilkat.Journal(FtJournalType.VersionInformation) + Case "action" : result = client_chilkat.Journal(FtJournalType.ActionJournal) + Case "signatures" : result = client_chilkat.Journal(FtJournalType.ReceiptJournal) + Case "queueitem" : result = client_chilkat.Journal(FtJournalType.QueueItemJournal) + Case "exportJournal" : result = client_chilkat.Journal(FtJournalType.ReceiptJournal) + End Select + + If result <> "" Then + + MsgBox(client_chilkat.PrettyPrintJson(result)) + + If item.Name = "exportJournal" Then + client_chilkat.exportJournal(result) + End If + + End If + + + + End If + + + End If + + + + End Function + + End Class \ No newline at end of file