?? 夜審操作.frm
字號:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form 夜審
BorderStyle = 1 'Fixed Single
Caption = "夜間處理"
ClientHeight = 2400
ClientLeft = 45
ClientTop = 330
ClientWidth = 7560
LinkTopic = "Form2"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2400
ScaleWidth = 7560
StartUpPosition = 2 '屏幕中心
Begin MSAdodcLib.Adodc Adodc3
Height = 330
Left = 180
Top = 1935
Visible = 0 'False
Width = 1575
_ExtentX = 2778
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc3"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin MSAdodcLib.Adodc Adodc2
Height = 330
Left = 210
Top = 1590
Visible = 0 'False
Width = 1350
_ExtentX = 2381
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc2"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin MSAdodcLib.Adodc Adodc1
Height = 345
Left = 195
Top = 1230
Visible = 0 'False
Width = 1740
_ExtentX = 3069
_ExtentY = 609
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.CommandButton Command2
Caption = "關閉"
Height = 300
Left = 4455
TabIndex = 2
Top = 1710
Width = 1245
End
Begin VB.CommandButton Command1
Caption = "開始"
Height = 300
Left = 1770
TabIndex = 1
Top = 1710
Width = 1245
End
Begin MSComctlLib.ProgressBar ProgressBar1
Height = 270
Left = 270
TabIndex = 0
Top = 645
Width = 6960
_ExtentX = 12277
_ExtentY = 476
_Version = 393216
BorderStyle = 1
Appearance = 0
End
End
Attribute VB_Name = "夜審"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'歡迎你下載使用本代碼,本份代碼由程序太平洋提供下載學習之用
'聲明:
'1.本站所有代碼的版權歸原作者所有,如果你使用了在本站下載的源代碼
' 引起的一切糾紛(后果)與本站無關,請您尊重原作者的勞動成果!
'2.若本站在代碼上有侵權之處請您與站長聯(lián)系,站長會及時更正。
'網(wǎng)站:http://www.dapha.net
'論壇:http://www.5ivb.net
'Email:dapha@etang.com
'CopyRight 2001-2005 By dapha.net
'整理時間:2003-12-8 12:22:14
Dim FAccount_id As String
Dim FAccount_line As Long
Dim Account_Line2 As Long
Dim KM_Number As String
Dim KM_Name As String
Dim KR_Name As String
Dim JF_jiner, JF_jiner2, JF_jiner3, JF_jiner4, JF_jiner5 As Currency
Dim BiZhong, Pay_Type As String
Dim JieZhang_Type As String
Dim KM_NumberLen As Integer
Private Sub Command1_Click()
Adodc1.ConnectionString = My_PROVIDER
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "select * from 參數(shù)"
Adodc1.Refresh
Adodc1.Recordset.Fields("系統(tǒng)狀態(tài)") = "夜審"
Adodc1.Recordset.Update
Adodc1.Recordset.Close
'房費結轉(zhuǎn)
Adodc1.ConnectionString = My_PROVIDER
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "select * from 住宿情況 where 當前狀態(tài) like '入住'"
Adodc1.Refresh
Me.ProgressBar1.Max = Adodc1.Recordset.RecordCount
While Not Adodc1.Recordset.EOF
Me.ProgressBar1.Value = Adodc1.Recordset.AbsolutePosition
FAccount_id = Adodc1.Recordset.Fields("帳號")
FAccount_line = Adodc1.Recordset.Fields("帳務筆數(shù)") + 1
RoomNO = Adodc1.Recordset.Fields("房號")
Room_Rate = Adodc1.Recordset.Fields("房價")
KR_Name = Adodc1.Recordset.Fields("姓名")
If Room_Rate <> 0 Then
Adodc3.ConnectionString = My_PROVIDER
Adodc3.CommandType = adCmdText
Adodc3.RecordSource = "select * from 帳務記錄 where 帳號 like '" & FAccount_id & "' order by 行"
Adodc3.Refresh
Adodc3.Recordset.AddNew
Adodc3.Recordset.Fields("帳號") = FAccount_id
Adodc3.Recordset.Fields("行") = FAccount_line
Adodc3.Recordset.Fields("日期") = System_Date
Adodc3.Recordset.Fields("時間") = Left(Time, 5)
Adodc3.Recordset.Fields("房號") = RoomNO
Adodc3.Recordset.Fields("科目編碼") = "300101"
Adodc3.Recordset.Fields("科目名稱") = "房 費"
Adodc3.Recordset.Fields("借方") = Room_Rate
Adodc3.Recordset.Fields("支付方式") = "預付款扣"
Adodc3.Recordset.Fields("操作員") = "夜審"
Adodc3.Recordset.Fields("幣種") = "RMB"
Adodc3.Recordset.Fields("姓名") = KR_Name
Adodc3.Recordset.Update
Account_Line2 = Adodc3.Recordset.RecordCount
Adodc3.Recordset.Close
Adodc1.Recordset.Fields("平衡金額") = Adodc1.Recordset.Fields("平衡金額") + Room_Rate
Adodc1.Recordset.Fields("費用類") = Adodc1.Recordset.Fields("費用類") + Room_Rate
Adodc1.Recordset.Fields("房租") = Adodc1.Recordset.Fields("房租") + Room_Rate
Adodc1.Recordset.Fields("全日房") = Adodc1.Recordset.Fields("全日房") + Room_Rate
Adodc1.Recordset.Fields("帳務筆數(shù)") = Adodc1.Recordset.Fields("帳務筆數(shù)") + 1
Adodc1.Recordset.Update
If Account_Line2 <> facount_line Then
Adodc1.Recordset.Fields("標志") = "帳務筆數(shù)不符"
Adodc1.Recordset.Update
End If
End If
Adodc1.Recordset.MoveNext
Wend
Adodc1.Recordset.Close
'日營業(yè)匯總(發(fā)生額) 清零
Adodc1.ConnectionString = My_PROVIDER
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "select * from 日營業(yè)收入報表"
Adodc1.Refresh
While Not Adodc1.Recordset.EOF
Adodc1.Recordset.Fields("當日發(fā)生額") = 0
Adodc1.Recordset.Fields("現(xiàn)金") = 0
Adodc1.Recordset.Fields("信用卡") = 0
Adodc1.Recordset.Fields("掛帳") = 0
Adodc1.Recordset.Fields("未結帳") = 0
Adodc1.Recordset.Update
Adodc1.Recordset.MoveNext
Wend
Adodc1.Recordset.Close
Adodc3.ConnectionString = My_PROVIDER
Adodc3.CommandType = adCmdText
Adodc3.RecordSource = "select * from 帳務記錄 where 借方<>0 and 日期 like '" & System_Date & "'"
Adodc3.Refresh
Adodc3.Recordset.MoveFirst
Me.ProgressBar1.Max = Adodc3.Recordset.RecordCount
While Not Adodc3.Recordset.EOF
Me.ProgressBar1.Value = Adodc3.Recordset.AbsolutePosition
KM_Number = Trim(Adodc3.Recordset.Fields("科目編碼"))
KM_Name = Adodc3.Recordset.Fields("科目名稱")
JF_jiner = Adodc3.Recordset.Fields("借方")
BiZhong = Adodc3.Recordset.Fields("幣種")
Pay_Type = Adodc3.Recordset.Fields("支付方式")
JieZhang_Type = IIf(IsNull(Adodc3.Recordset.Fields("結帳狀態(tài)")), "", Adodc3.Recordset.Fields("結帳狀態(tài)"))
KM_NumberLen = Len(Trim(KM_Number))
Select Case KM_NumberLen
Case 2
Call Account2
Case 4
Call Account4
Case 6
Call Account6
Case Else
End Select
Adodc3.Recordset.MoveNext
Wend
Adodc3.Recordset.Close
'日營業(yè)匯總(結帳)
Adodc3.ConnectionString = My_PROVIDER
Adodc3.CommandType = adCmdText
Adodc3.RecordSource = "select * from 帳務記錄 where 借方<>0 and 結帳日期 like '" & System_Date & "'"
Adodc3.Refresh
If Adodc3.Recordset.RecordCount > 0 Then
Adodc3.Recordset.MoveFirst
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -