📄 frmbankdetail.frm
字号:
VERSION 5.00
Object = "{D252F124-F62C-11D1-9ABD-444553540000}#1.0#0"; "GADATE.DLL"
Object = "{9C4B12C2-D5CE-11D1-9ABC-444553540000}#1.0#0"; "GACEDIT.DLL"
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Object = "{0D452EE1-E08F-101A-852E-02608C4D0BB4}#2.0#0"; "FM20.DLL"
Object = "{F42BDC2B-FC9B-11D1-9ABD-444553540000}#3.4#0"; "ATLEDIT1.OCX"
Object = "{F6125AB1-8AB1-11CE-A77F-08002B2F4E98}#2.0#0"; "MSRDC20.OCX"
Object = "{81110CCB-022B-11D3-A348-0080C89152FF}#1.3#0"; "ORAGLIST.OCX"
Begin VB.Form frmBankDetail
Caption = "银行对帐单"
ClientHeight = 4620
ClientLeft = 60
ClientTop = 2295
ClientWidth = 7275
HelpContextID = 60011
KeyPreview = -1 'True
LinkTopic = "Form1"
LockControls = -1 'True
MDIChild = -1 'True
ScaleHeight = 4620
ScaleWidth = 7275
Begin ListRefer.ListText lstInput
Height = 345
Left = -50000
TabIndex = 10
TabStop = 0 'False
Top = 2760
Width = 1155
_ExtentX = 2037
_ExtentY = 609
CodeSort = -1 'True
BackColor = -2147483643
Appearance = 0
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin MSRDC.MSRDC DATA1
Height = 330
Left = 720
Top = 1560
Visible = 0 'False
Width = 1335
_ExtentX = 2355
_ExtentY = 582
_Version = 393216
Options = 0
CursorDriver = 0
BOFAction = 0
EOFAction = 0
RecordsetType = 1
LockType = 3
QueryType = 0
Prompt = 3
Appearance = 1
QueryTimeout = 30
RowsetSize = 100
LoginTimeout = 15
KeysetSize = 0
MaxRows = 0
ErrorThreshold = -1
BatchSize = 15
BackColor = -2147483643
ForeColor = -2147483640
Enabled = -1 'True
ReadOnly = 0 'False
Appearance = -1 'True
DataSourceName = ""
RecordSource = ""
UserName = ""
Password = ""
Connect = ""
LogMessages = ""
Caption = "MSRDC1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin GATLCTRLLibCtl.CalEdit txtCal
Height = 255
Left = 3840
OleObjectBlob = "frmBankDetail.frx":0000
TabIndex = 9
Top = 2850
Visible = 0 'False
Width = 735
End
Begin AtlEdit.TEdit txtInput
Height = 345
Left = 2460
TabIndex = 7
Top = 2790
Visible = 0 'False
Width = 915
_ExtentX = 1614
_ExtentY = 609
maxchar = 15
RBmenu = 0 'False
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Text = ""
Appearance = 0
End
Begin GACALENDARLibCtl.Calendar dteInput
Height = 345
Left = -50000
OleObjectBlob = "frmBankDetail.frx":0081
TabIndex = 8
TabStop = 0 'False
Top = 2070
Width = 1515
End
Begin VB.ComboBox cboBill
Height = 300
Index = 0
ItemData = "frmBankDetail.frx":010A
Left = 732
List = "frmBankDetail.frx":0114
Style = 2 'Dropdown List
TabIndex = 2
Top = 60
Width = 2472
End
Begin VB.ComboBox cboBill
Height = 300
Index = 1
Left = 5670
Style = 2 'Dropdown List
TabIndex = 4
Top = 90
Width = 1515
End
Begin MSFlexGridLib.MSFlexGrid msgBill
Bindings = "frmBankDetail.frx":0134
Height = 3690
Left = 30
TabIndex = 0
Top = 450
Width = 7170
_ExtentX = 12647
_ExtentY = 6509
_Version = 393216
Rows = 6
Cols = 11
FixedCols = 0
RowHeightMin = 300
BackColorBkg = 16777215
GridLines = 0
AllowUserResizing= 1
Appearance = 0
FormatString = "||对帐| 日期 | 摘要 | 票据号 |付款方式| 借方 | 贷方 | 余额 |"
End
Begin MSForms.CommandButton cmdBill
Height = 345
Index = 1
Left = 1290
TabIndex = 6
Tag = "1018"
Top = 4230
Width = 1215
Caption = "报表"
PicturePosition = 196613
Size = "2143;617"
FontName = "宋体"
FontHeight = 180
FontCharSet = 134
FontPitchAndFamily= 34
ParagraphAlign = 3
End
Begin MSForms.CommandButton cmdBill
Height = 345
Index = 0
Left = 60
TabIndex = 5
Tag = "1018"
Top = 4230
Width = 1215
Caption = "编辑"
PicturePosition = 196613
Size = "2143;609"
FontName = "宋体"
FontHeight = 180
FontCharSet = 134
FontPitchAndFamily= 34
ParagraphAlign = 3
End
Begin VB.Label lblBill
AutoSize = -1 'True
Caption = "科目(&A)"
Height = 180
Index = 0
Left = 48
TabIndex = 1
Top = 120
Width = 648
End
Begin VB.Label lblBill
AutoSize = -1 'True
Caption = "币种(&C)"
Height = 180
Index = 1
Left = 4950
TabIndex = 3
Top = 120
Width = 645
End
End
Attribute VB_Name = "frmBankDetail"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
''''''''''''''''''''''''''''''''''''''
'
'银行对帐单编辑窗体
'
'作者:苏涛
'
'日期:1998-07-02
'
'接口:引入:银行对帐主界面的AccountID,CurrencyID
'
''''''''''''''''''''''''''''''''''''''
Option Explicit
Option Compare Text
Private Const mintViewId = 32
Private mblnIsHide As Boolean
Private mblnIsAdd As Boolean
Private mblnIsSort As Boolean
'Private mblnIsScroll As Boolean
Private mblnIsInit As Boolean
Private mblnIsChanged As Boolean
Private mblnDateOK As Boolean
Private mblnRowValid As Boolean
Private mbytDec As Byte
Private mdblAmount As Double
Private mintCheckCol As Integer
Private mintDateCol As Integer
Private mintPayMethodCol As Integer
Private mintRemarkCol As Integer
Private mintBillNOCol As Integer
Private mintDebitCol As Integer
Private mintCreditCol As Integer
Private mintBalCol As Integer
Private mintDCBCol As Integer
Private mlngAcnID As Long
Private mlngCurID As Long
Private mlngNO As Long
Private WithEvents mclsGrid As Grid
Attribute mclsGrid.VB_VarHelpID = -1
Private mdblDebit As Double
Private mdblCredit As Double
Private mintDire As Integer
Private mintCol As Integer
Private mintRow As Integer
Private mintPCol As Integer
Private mintPRow As Integer
Private mstrCheckCol As String
Private mstrDateCol As String
Private mstrRemarkCol As String
Private mstrDebitCol As String
Private mstrPayMethodCol As String
Private mstrCreditCol As String
Private mstrBillNOCol As String
Private mstrBalCol As String
Private mstrAcnName As String
Private mstrCurName As String
Private mstrBillNO As String
Private mstrDate As String
Private mstrStartDate As String
Private mrecBankAccount As rdoResultset
Private WithEvents mclsMainControl As MainControl '主控对象
Attribute mclsMainControl.VB_VarHelpID = -1
Private WithEvents mclsSubClassform As SubClass32.SubClass
Attribute mclsSubClassform.VB_VarHelpID = -1
'引入银行对帐单
Public Function AddBankDetail(ByVal strBankDetail As String) As Integer
Dim lngAcnID As Long, lngCurID As Long, lngPaymentMethodID As Long
Dim lngOperatorID As Long, dblAmount As Double, dblBalance As Double
Dim intIsMatch As Integer, intDirection As Integer, strDate As String
Dim strRemark As String, strCheckNumber As String, strTemp As String
Dim strSql As String, recBankInfo As rdoResultset, strStartDate As String
Dim strEndDate As String, recBankDetail As rdoResultset
On Error GoTo ErrHandle
gclsBase.BaseWorkSpace.BeginTrans
AddBankDetail = 0
If Not GetString(strBankDetail, strTemp, 1) Then GoTo ErrHandle
lngAcnID = CLng(strTemp)
If Not GetString(strBankDetail, strTemp, 2) Then GoTo ErrHandle
lngCurID = CLng(strTemp)
strSql = "SELECT * FROM BankInfo WHERE lngAccountID=" & lngAcnID & " AND " _
& "lngCurrencyID=" & lngCurID
Set recBankInfo = gclsBase.BaseDB.OpenResultset(strSql, rdOpenStatic)
If recBankInfo.EOF Then
recBankInfo.Close
AddBankDetail = 2
GoTo ErrHandle
Else
strStartDate = recBankInfo("strStartDate")
strEndDate = recBankInfo("strEndDate")
recBankInfo.Close
End If
If Not GetString(strBankDetail, strDate, 3) Then GoTo ErrHandle
If Trim(strDate) = "" Then GoTo ErrHandle
If Not GetString(strBankDetail, strRemark, 4) Then GoTo ErrHandle
If Not GetString(strBankDetail, strTemp, 5) Then GoTo ErrHandle
intDirection = CInt(strTemp)
If Abs(intDirection) <> 1 Then GoTo ErrHandle
If Not GetString(strBankDetail, strTemp, 6) Then GoTo ErrHandle
dblAmount = CDbl(strTemp)
' If Not GetString(strBankDetail, strTemp, 7) Then GoTo ErrHandle
' dblBalance = CDbl(strTemp)
If Not GetString(strBankDetail, strTemp, 8) Then GoTo ErrHandle
lngPaymentMethodID = CLng(strTemp)
If Not ItemIsExist("PaymentMethod", "lngPaymentMethodID", lngPaymentMethodID) Then
lngPaymentMethodID = 0
End If
If Not GetString(strBankDetail, strCheckNumber, 9) Then GoTo ErrHandle
If Not GetString(strBankDetail, strTemp, 10) Then GoTo ErrHandle
lngOperatorID = CLng(strTemp)
If Not ItemIsExist("Operator", "lngOperatorID", lngOperatorID) Then GoTo ErrHandle
If Not GetString(strBankDetail, strTemp, 11) Then GoTo ErrHandle
intIsMatch = strTemp
strSql = "INSERT INTO BankDetail(lngBankDetailID,lngAccountID,lngCurrencyID,strDate,strRemark," _
& "intDirection,dblAmount,lngPaymentMethodID,strCheckNumber," _
& "lngOperatorID,blnIsMatch) VALUES(" & GetNewID("BankDetail") & "," & lngAcnID & "," & lngCurID & ",'" _
& strDate & "','" & strRemark & "'," & intDirection & "," & dblAmount & "," _
& lngPaymentMethodID & ",'" & strCheckNumber & "'," & lngOperatorID & "," _
& intIsMatch & ")"
If Not gclsBase.ExecSQL(strSql) Then GoTo ErrHandle
If strDate >= strStartDate Then
strSql = "SELECT * FROM BankDetail WHERE lngAccountID=" & lngAcnID & " AND " _
& "lngCurrencyID=" & lngCurID & " AND strDate<'" & strDate _
& "' ORDER BY strDate,lngBankDetailID"
Set recBankDetail = gclsBase.BaseDB.OpenResultset(strSql, rdOpenStatic)
If Not recBankDetail.EOF Then
recBankDetail.MoveLast
dblBalance = recBankDetail("dblBalance")
Else
dblBalance = 0
End If
recBankDetail.Close
If Not AdaptBalance(lngAcnID, lngCurID, strDate, dblBalance) Then GoTo ErrHandle
If strDate > strEndDate Then
strSql = "UPDATE BankInfo SET strEndDate='" & strDate & "',dblEndBalance=" _
& dblBalance & " WHERE lngAccountID=" & lngAcnID & " AND lngCurrencyID=" & lngCurID
Else
strSql = "UPDATE BankInfo SET dblEndBalance=" & dblBalance _
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -