📄 +
字号:
VERSION 5.00
Begin VB.Form JC_FrmQcyessph
Caption = "期初余额试算平衡表"
ClientHeight = 3315
ClientLeft = 60
ClientTop = 345
ClientWidth = 5295
Icon = "基础设置_期初余额录入试算平衡.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3315
ScaleWidth = 5295
StartUpPosition = 1 '所有者中心
Begin VB.Frame Frame1
Height = 3195
Left = 60
TabIndex = 0
Top = 60
Width = 5175
Begin VB.CommandButton BcCommand
Caption = "确定(&O)"
Height = 300
Left = 3750
TabIndex = 16
Top = 2550
Width = 915
End
Begin VB.Label Lab_CodeClass
AutoSize = -1 'True
Caption = "资产="
Height = 180
Index = 0
Left = 240
TabIndex = 15
Top = 270
Width = 450
End
Begin VB.Label Lab_CodeClass
AutoSize = -1 'True
Caption = "负债="
Height = 180
Index = 1
Left = 2790
TabIndex = 14
Top = 270
Width = 450
End
Begin VB.Label Lab_CodeClass
AutoSize = -1 'True
Caption = "权益="
Height = 180
Index = 2
Left = 2790
TabIndex = 13
Top = 780
Width = 450
End
Begin VB.Label Lab_CodeClass
AutoSize = -1 'True
Caption = "成本="
Height = 180
Index = 3
Left = 240
TabIndex = 12
Top = 780
Width = 450
End
Begin VB.Label Lab_CodeClass
AutoSize = -1 'True
Caption = "损益="
Height = 180
Index = 4
Left = 2790
TabIndex = 11
Top = 1260
Width = 450
End
Begin VB.Line Line1
X1 = 270
X2 = 4830
Y1 = 1740
Y2 = 1740
End
Begin VB.Line Line2
BorderColor = &H00FFFFFF&
X1 = 270
X2 = 4860
Y1 = 1770
Y2 = 1770
End
Begin VB.Label Lab_CodeClass
AutoSize = -1 'True
Caption = "合计="
Height = 180
Index = 5
Left = 240
TabIndex = 10
Top = 2130
Width = 450
End
Begin VB.Label Lab_CodeClass
AutoSize = -1 'True
Caption = "合计="
Height = 180
Index = 6
Left = 2790
TabIndex = 9
Top = 2130
Width = 450
End
Begin VB.Label Lab_Phjg
ForeColor = &H000080FF&
Height = 255
Left = 540
TabIndex = 8
Top = 2640
Width = 2205
End
Begin VB.Label Lab_Qcyesj
AutoSize = -1 'True
Height = 180
Index = 0
Left = 810
TabIndex = 7
Top = 270
Width = 90
End
Begin VB.Label Lab_Qcyesj
AutoSize = -1 'True
Height = 180
Index = 1
Left = 3420
TabIndex = 6
Top = 270
Width = 90
End
Begin VB.Label Lab_Qcyesj
AutoSize = -1 'True
Height = 180
Index = 2
Left = 3420
TabIndex = 5
Top = 780
Width = 90
End
Begin VB.Label Lab_Qcyesj
AutoSize = -1 'True
Height = 180
Index = 3
Left = 810
TabIndex = 4
Top = 780
Width = 90
End
Begin VB.Label Lab_Qcyesj
AutoSize = -1 'True
Height = 180
Index = 4
Left = 3420
TabIndex = 3
Top = 1260
Width = 90
End
Begin VB.Label Lab_Qcyesj
AutoSize = -1 'True
Height = 180
Index = 5
Left = 900
TabIndex = 2
Top = 2130
Width = 90
End
Begin VB.Label Lab_Qcyesj
AutoSize = -1 'True
Height = 180
Index = 6
Left = 3450
TabIndex = 1
Top = 2130
Width = 90
End
End
End
Attribute VB_Name = "JC_FrmQcyessph"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'************************************************************
'* 模 块 名 称 :期初余额录入试算平衡
'* 功 能 描 述 :
'* 程序员姓名 :张建忠
'* 最后修改人 :张建忠
'* 最后修改时间:2001/11/26
'* 备 注:
'************************************************************
Dim Int_Year As Integer '试算平衡年度
Private Sub Form_Load()
Dim Dbl_Qcye(4) As Double '各类科目期初数据
Dim Dbl_ZcQcye As Double '资产类科目数据合计
Dim Dbl_FzQcye As Double '负债及所有者权益类科目数据合计
Dim SqlStr As String '查询字符串
Dim RecTemp As New ADODB.Recordset '临时使用动态集
Int_Year = Val(Xtcdcs)
SqlStr = "SELECT Cwzz_AccCode.CClass, SUM(Cwzz_AccSum.Qmye) AS QcyeHj" & _
" FROM Cwzz_AccSum LEFT OUTER JOIN Cwzz_AccCode ON Cwzz_AccSum.Ccode = Cwzz_AccCode.Ccode" & _
" Where Cwzz_AccCode.EndFlag=1 And Year=" & Int_Year & " And Period=1 GROUP BY Cclass"
Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SqlStr)
With RecTemp
Do While Not .EOF
Select Case Trim(.Fields("Cclass"))
Case "资产"
Dbl_Qcye(0) = .Fields("Qcyehj")
Case "负债"
Dbl_Qcye(1) = .Fields("Qcyehj")
Case "所有者权益"
Dbl_Qcye(2) = .Fields("Qcyehj")
Case "成本"
Dbl_Qcye(3) = .Fields("Qcyehj")
Case "损益"
Dbl_Qcye(4) = .Fields("Qcyehj")
End Select
.MoveNext
Loop
End With
'显示数据
For Jsqte = 0 To 4
If Dbl_Qcye(Jsqte) > 0 Then
Lab_Qcyesj(Jsqte).Caption = "借" & " " & Format(Dbl_Qcye(Jsqte), "##." + String(Xtjexsws, "0"))
Else
If Dbl_Qcye(Jsqte) = 0 Then
Lab_Qcyesj(Jsqte).Caption = "平"
Else
Lab_Qcyesj(Jsqte).Caption = "贷" & " " & Format(-Dbl_Qcye(Jsqte), "##." + String(Xtjexsws, "0"))
End If
End If
Next Jsqte
'显示(资产+成本)合计数据
Dbl_ZcQcye = Dbl_Qcye(0) + Dbl_Qcye(3)
Dbl_FzQcye = Dbl_Qcye(1) + Dbl_Qcye(2) + Dbl_Qcye(4)
If Dbl_ZcQcye > 0 Then
Lab_Qcyesj(5).Caption = "借" & " " & Format(Dbl_ZcQcye, "##." + String(Xtjexsws, "0"))
Else
If Dbl_ZcQcye = 0 Then
Lab_Qcyesj(5).Caption = "平"
Else
Lab_Qcyesj(5).Caption = "贷" & " " & Format(-Dbl_ZcQcye, "##." + String(Xtjexsws, "0"))
End If
End If
If Dbl_FzQcye > 0 Then
Lab_Qcyesj(6).Caption = "借" & " " & Format(Dbl_FzQcye, "##." + String(Xtjexsws, "0"))
Else
If Dbl_FzQcye = 0 Then
Lab_Qcyesj(6).Caption = "平"
Else
Lab_Qcyesj(6).Caption = "贷" & " " & Format(-Dbl_FzQcye, "##." + String(Xtjexsws, "0"))
End If
End If
'判断试算是否平衡
If Dbl_ZcQcye + Dbl_FzQcye = 0 Then
Lab_Phjg.ForeColor = &HFF0000
Lab_Phjg.Caption = "试算结果平衡!"
Else
Lab_Phjg.ForeColor = &H80FF&
Lab_Phjg.Caption = "试算结果不平衡!"
End If
End Sub
Private Sub BcCommand_Click() '确定
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -