fix Kassenbuch

This commit is contained in:
2026-10-23 10:39:30 +02:00
parent 119ff9973d
commit 85c794053e

View File

@@ -216,10 +216,10 @@ Public Class frmKassenbuch
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"))
Dim tagesabschluss As Integer = CInt(SQL.getValueTxtBySql("SELECT count(*) FROM [VERAG].[dbo].[tblRKSV_FT] where ftReceiptMoment >= CAST(GETDATE() AS DATE) AND ftReceiptMoment < DATEADD(DAY, 1, CAST(GETDATE() AS DATE)) 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 Month(ftReceiptMoment) = Month(GETDATE()) and ftEndOfMonthReceipt is not null and ftCashBoxID = '" & PERSONAL.cRKSV_Kasse.rksv_FT_CashboxID & "'", "FMZOLL"))
Dim monatsabschluss As Integer = CInt(SQL.getValueTxtBySql("SELECT count(*) FROM [VERAG].[dbo].[tblRKSV_FT] where Month(ftReceiptMoment) = Month(GETDATE()) and Year(ftReceiptMoment) = Year(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"))