📄 帐户余额日报表.frm
字号:
VERSION 5.00
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "comctl32.ocx"
Object = "{BA5441C3-11E6-11D2-89E1-000021886118}#8.0#0"; "UFRTPrn.ocx"
Object = "{3733D281-9649-11D2-B757-0080C8883C6B}#1.0#0"; "UFGRIDDB.OCX"
Begin VB.Form frmRzhye
Caption = "账户余额日报表"
ClientHeight = 5280
ClientLeft = 2835
ClientTop = 2310
ClientWidth = 7905
HelpContextID = 88000065
Icon = "帐户余额日报表.frx":0000
KeyPreview = -1 'True
LinkTopic = "Form2"
LockControls = -1 'True
MDIChild = -1 'True
ScaleHeight = 5280
ScaleWidth = 7905
WindowState = 2 'Maximized
Begin ComctlLib.Toolbar Toolbar1
Align = 1 'Align Top
Height = 630
Left = 0
TabIndex = 0
Top = 0
Width = 7905
_ExtentX = 13944
_ExtentY = 1111
ButtonWidth = 826
ButtonHeight = 804
AllowCustomize = 0 'False
Wrappable = 0 'False
Appearance = 1
ImageList = "ImageList1"
_Version = 327682
BeginProperty Buttons {0713E452-850A-101B-AFC0-4210102A8DA7}
NumButtons = 9
BeginProperty Button1 {0713F354-850A-101B-AFC0-4210102A8DA7}
Caption = "打印"
Key = "Print"
Object.Tag = ""
EndProperty
BeginProperty Button2 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = "Preview"
Object.Tag = ""
EndProperty
BeginProperty Button3 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = "Dataout"
Object.Tag = ""
EndProperty
BeginProperty Button4 {0713F354-850A-101B-AFC0-4210102A8DA7}
Object.Tag = ""
Style = 3
MixedState = -1 'True
EndProperty
BeginProperty Button5 {0713F354-850A-101B-AFC0-4210102A8DA7}
Caption = "recx"
Key = "Recx"
Object.Tag = ""
EndProperty
BeginProperty Button6 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = "UnionFind"
Object.Tag = ""
EndProperty
BeginProperty Button7 {0713F354-850A-101B-AFC0-4210102A8DA7}
Object.Tag = ""
Style = 3
MixedState = -1 'True
EndProperty
BeginProperty Button8 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = "Help"
Object.Tag = ""
EndProperty
BeginProperty Button9 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = "Exit"
Object.Tag = ""
EndProperty
EndProperty
End
Begin UFGRIDADOLib.UfGridADO UfGridADO1
Height = 1572
Left = 480
TabIndex = 9
Top = 2280
Width = 2892
_Version = 65536
_ExtentX = 5101
_ExtentY = 2773
_StockProps = 253
End
Begin VB.PictureBox Picture1
Appearance = 0 'Flat
BackColor = &H80000005&
Enabled = 0 'False
ForeColor = &H80000008&
Height = 945
Left = 0
ScaleHeight = 915
ScaleWidth = 7875
TabIndex = 1
Top = 610
Width = 7905
Begin RTPrnLib.RTPrn RTPrn1
Left = 5550
Top = 435
_Version = 524288
_ExtentX = 1085
_ExtentY = 503
_StockProps = 4
m_lngrtpFitRows = 30
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "账户余额日报表"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = -1 'True
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 285
Index = 0
Left = 3090
TabIndex = 8
Top = 180
Width = 2115
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Height = 180
Index = 1
Left = 6840
TabIndex = 7
Top = 660
Width = 90
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "账 户 号:"
Height = 180
Index = 2
Left = 210
TabIndex = 6
Top = 450
Width = 900
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "账户名称:"
Height = 180
Index = 3
Left = 210
TabIndex = 5
Top = 660
Width = 900
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Height = 180
Index = 0
Left = 1230
TabIndex = 4
Top = 450
Width = 90
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Height = 180
Index = 1
Left = 1230
TabIndex = 3
Top = 660
Width = 90
End
Begin VB.Label Label0
AutoSize = -1 'True
BackStyle = 0 'Transparent
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = -1 'True
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H8000000D&
Height = 285
Left = 3960
TabIndex = 2
Top = 360
Width = 150
End
End
Begin ComctlLib.ImageList ImageList1
Left = 3660
Top = 2400
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
MaskColor = 12632256
_Version = 327682
End
End
Attribute VB_Name = "frmRzhye"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'软件著作权: 北京用友软件集团有限公司
'系统名称: 资金管理8.0
'功能说明: 账户余额日报表
'作者: 赵春立
Option Explicit
Public strAccID As String
Public datDate As Date
Public dzdMb As Double
'***最大显示行,MSFLXGRD容量受限
Private nMaxRows As Long
'***标题行数
Private nFixRows As Long
Private rsDisplay As New UfRecordset
Public iDataSource As Integer
Private aTemp As clsAllInput
Private ZhDir As Long
'联查外部凭证
Private pzZhye As LcwbPzInfo
Private cItemClass() As String
'********************************************************************
'*函数说明: 内部账户的SQL语句 *
'*参 数: *
'* *
'*返回值 : 内部账户 SQL 语句 *
'*********************************************************************
Private Function Nbzh_sql() As String
Dim sqlItem As String
sqlItem = "SELECT transactions_id,cCreID AS Field0, cDigest AS Field1, " & _
"mmoney AS Field2, 0 AS Field3,cBookCode AS fColor FROM " & _
"FD_Cred WHERE cAccID='" & strAccID & "' AND dbill_date='" & _
FormatDate(datDate) & "' "
sqlItem = sqlItem & "UNION ALL SELECT transactions_id,cRetID, cDigest, 0, mmoney, cBookCode FROM " & _
"FD_Return WHERE cAccID='" & strAccID & "' AND dbill_date='" & _
FormatDate(datDate) & "' "
sqlItem = sqlItem & "UNION ALL SELECT transactions_id, cCraID, cDigest, 0, mmoney, cBookCode FROM " & _
"FD_CreAcrRcp WHERE cAccID='" & strAccID & "' AND dbill_date='" & _
FormatDate(datDate) & "' "
sqlItem = sqlItem & "UNION ALL SELECT transactions_id, cUnwID, cDigest, mmoney, 0, cBookCode FROM " & _
"FD_UnwDeb WHERE cGAccID='" & strAccID & "' AND dbill_date='" & _
FormatDate(datDate) & "' "
sqlItem = sqlItem & "UNION ALL SELECT transactions_id, cUnwID, cDigest, 0, mmoney, cBookCode FROM " & _
"FD_UnwDeb WHERE cPAccID='" & strAccID & "' AND dbill_date='" & _
FormatDate(datDate) & "' "
sqlItem = sqlItem & "UNION ALL SELECT transactions_id, cRetID, cDigest, mmoney, 0, cBookCode FROM " & _
"FD_UnwRet WHERE cGAccID='" & strAccID & "' AND dbill_date='" & _
FormatDate(datDate) & "' "
sqlItem = sqlItem & "UNION ALL SELECT transactions_id, cRetID, cDigest, 0, mmoney, cBookCode FROM " & _
"FD_UnwRet WHERE cPAccID='" & strAccID & "' AND dbill_date='" & _
FormatDate(datDate) & "' "
sqlItem = sqlItem & "UNION ALL SELECT transactions_id, cUnaID, cDigest, mmoney, 0, cBookCode FROM " & _
"FD_UnwAcrRcp WHERE cGAccID='" & strAccID & "' AND dbill_date='" & _
FormatDate(datDate) & "' "
sqlItem = sqlItem & "UNION ALL SELECT transactions_id, cUnaID, cDigest, 0, mmoney, cBookCode FROM " & _
"FD_UnwAcrRcp WHERE cPAccID='" & strAccID & "' AND dbill_date='" & _
FormatDate(datDate) & "' "
sqlItem = sqlItem & "UNION ALL SELECT transactions_id, cSetID, cDigest, mmoney, 0, cBookCode FROM " & _
"FD_SettAcc WHERE cGAccID='" & strAccID & "' AND dbill_date='" & _
FormatDate(datDate) & "' AND Left(cSetID,2)='15' "
sqlItem = sqlItem & "UNION ALL SELECT transactions_id, cSetID, cDigest, 0, mmoney, cBookCode FROM " & _
"FD_SettAcc WHERE cPAccID='" & strAccID & "' AND dbill_date='" & _
FormatDate(datDate) & "' AND Left(cSetID,2)='15' "
sqlItem = sqlItem & "UNION ALL SELECT transactions_id, cSetID, cDigest, Case When igp_flag = 0 Then mmoney Else 0 End, Case When igp_flag = 0 Then 0 Else mmoney End, cBookCode FROM " & _
"FD_SettAcc WHERE cGAccID='" & strAccID & "' AND dbill_date='" & _
FormatDate(datDate) & "' AND Left(cSetID,2)='14' "
sqlItem = sqlItem & "UNION ALL SELECT transactions_id, cSetID, cDigest, Case When igp_flag = 0 Then mmoney Else 0 End, Case When igp_flag = 0 Then 0 Else mmoney End, cBookCode FROM " & _
"FD_SettAcc WHERE cPAccID='" & strAccID & "' AND dbill_date='" & _
FormatDate(datDate) & "' AND Left(cSetID,2)='14' "
sqlItem = sqlItem & "UNION ALL SELECT transactions_id, cCarID, cDigest, mmoney, 0, cBookCode FROM " & _
"FD_CadAcr WHERE cGAccID='" & strAccID & "' AND dbill_date='" & _
FormatDate(datDate) & "' AND iDanType=0 "
sqlItem = sqlItem & "UNION ALL SELECT transactions_id, cCarID, cDigest, 0, mmoney, cBookCode FROM " & _
"FD_CadAcr WHERE cPAccID='" & strAccID & "' AND dbill_date='" & _
FormatDate(datDate) & "' AND iDanType=0 "
sqlItem = sqlItem & "UNION ALL SELECT transactions_id, cSavID, cDigest, mmoney, 0, cBookCode FROM " & _
"FD_Sav WHERE cAccID='" & strAccID & "' AND dbill_date='" & _
FormatDate(datDate) & "' "
sqlItem = sqlItem & "UNION ALL SELECT transactions_id, cFetID, cDigest, 0, mmoney, cBookCode FROM " & _
"FD_Fetch WHERE cAccID='" & strAccID & "' AND dbill_date='" & _
FormatDate(datDate) & "' "
Nbzh_sql = sqlItem
End Function
'********************************************************************
'*函数说明: 准备数据 *
'*参 数: mAccID : 账户号 *
'* mRecordset : 记录集结果 *
'*返回值 : *
'*********************************************************************
Public Sub PrepareData(Optional IncludeUnCheck As Boolean = False)
Dim sqlQc As String
Dim rsQc As New UfRecordset
Dim sqlItem As String
sqlItem = Nbzh_sql
If iDataSource = 0 Then '资金系统
'求期初余额+发生
sqlQc = "SELECT mb FROM FD_AccDef WHERE cAccID='" & strAccID & "'"
Set rsQc = dbsZJ.OpenRecordset(sqlQc, dbOpenSnapshot)
dzdMb = IIf(IsNull(rsQc!Mb), 0, rsQc!Mb)
dzdMb = dzdMb + GetZhYe(strAccID, datDate, IncludeUnCheck)
Else '账务系统
dzdMb = Cal_Wbzh(sqlItem)
End If
If Not mID(sqlItem, 1, 6) = " ORDER" Then
Set rsDisplay = dbsZJ.OpenRecordset(sqlItem, dbOpenSnapshot)
End If
End Sub
'********************************************************************
'*函数说明: 从总账账户取数 *
'*参 数: sqlX : SQL 语句 *
'* *
'*返回值 : 期初余额 *
'*********************************************************************
Private Function Cal_Wbzh(sqlX As String) As Double
Dim sqlCale As String
Dim strUnion As String
Dim rsCale As New UfRecordset
Dim sqlItem As String
Dim rsItem As New UfRecordset
Dim bPropty As Boolean
Dim sPropty As String
Dim mQc As Double
Dim lngZhPrp As Long
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -