+
上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:9k
源码类别:

企业管理

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Begin VB.Form JC_FrmQcyessph 
  3.    Caption         =   "期初余额试算平衡表"
  4.    ClientHeight    =   3315
  5.    ClientLeft      =   60
  6.    ClientTop       =   345
  7.    ClientWidth     =   5295
  8.    Icon            =   "基础设置_期初余额录入试算平衡.frx":0000
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    MinButton       =   0   'False
  12.    ScaleHeight     =   3315
  13.    ScaleWidth      =   5295
  14.    StartUpPosition =   1  '所有者中心
  15.    Begin VB.Frame Frame1 
  16.       Height          =   3195
  17.       Left            =   60
  18.       TabIndex        =   0
  19.       Top             =   60
  20.       Width           =   5175
  21.       Begin VB.CommandButton BcCommand 
  22.          Caption         =   "确定(&O)"
  23.          Height          =   300
  24.          Left            =   3750
  25.          TabIndex        =   16
  26.          Top             =   2550
  27.          Width           =   915
  28.       End
  29.       Begin VB.Label Lab_CodeClass 
  30.          AutoSize        =   -1  'True
  31.          Caption         =   "资产="
  32.          Height          =   180
  33.          Index           =   0
  34.          Left            =   240
  35.          TabIndex        =   15
  36.          Top             =   270
  37.          Width           =   450
  38.       End
  39.       Begin VB.Label Lab_CodeClass 
  40.          AutoSize        =   -1  'True
  41.          Caption         =   "负债="
  42.          Height          =   180
  43.          Index           =   1
  44.          Left            =   2790
  45.          TabIndex        =   14
  46.          Top             =   270
  47.          Width           =   450
  48.       End
  49.       Begin VB.Label Lab_CodeClass 
  50.          AutoSize        =   -1  'True
  51.          Caption         =   "权益="
  52.          Height          =   180
  53.          Index           =   2
  54.          Left            =   2790
  55.          TabIndex        =   13
  56.          Top             =   780
  57.          Width           =   450
  58.       End
  59.       Begin VB.Label Lab_CodeClass 
  60.          AutoSize        =   -1  'True
  61.          Caption         =   "成本="
  62.          Height          =   180
  63.          Index           =   3
  64.          Left            =   240
  65.          TabIndex        =   12
  66.          Top             =   780
  67.          Width           =   450
  68.       End
  69.       Begin VB.Label Lab_CodeClass 
  70.          AutoSize        =   -1  'True
  71.          Caption         =   "损益="
  72.          Height          =   180
  73.          Index           =   4
  74.          Left            =   2790
  75.          TabIndex        =   11
  76.          Top             =   1260
  77.          Width           =   450
  78.       End
  79.       Begin VB.Line Line1 
  80.          X1              =   270
  81.          X2              =   4830
  82.          Y1              =   1740
  83.          Y2              =   1740
  84.       End
  85.       Begin VB.Line Line2 
  86.          BorderColor     =   &H00FFFFFF&
  87.          X1              =   270
  88.          X2              =   4860
  89.          Y1              =   1770
  90.          Y2              =   1770
  91.       End
  92.       Begin VB.Label Lab_CodeClass 
  93.          AutoSize        =   -1  'True
  94.          Caption         =   "合计="
  95.          Height          =   180
  96.          Index           =   5
  97.          Left            =   240
  98.          TabIndex        =   10
  99.          Top             =   2130
  100.          Width           =   450
  101.       End
  102.       Begin VB.Label Lab_CodeClass 
  103.          AutoSize        =   -1  'True
  104.          Caption         =   "合计="
  105.          Height          =   180
  106.          Index           =   6
  107.          Left            =   2790
  108.          TabIndex        =   9
  109.          Top             =   2130
  110.          Width           =   450
  111.       End
  112.       Begin VB.Label Lab_Phjg 
  113.          ForeColor       =   &H000080FF&
  114.          Height          =   255
  115.          Left            =   540
  116.          TabIndex        =   8
  117.          Top             =   2640
  118.          Width           =   2205
  119.       End
  120.       Begin VB.Label Lab_Qcyesj 
  121.          AutoSize        =   -1  'True
  122.          Height          =   180
  123.          Index           =   0
  124.          Left            =   810
  125.          TabIndex        =   7
  126.          Top             =   270
  127.          Width           =   90
  128.       End
  129.       Begin VB.Label Lab_Qcyesj 
  130.          AutoSize        =   -1  'True
  131.          Height          =   180
  132.          Index           =   1
  133.          Left            =   3420
  134.          TabIndex        =   6
  135.          Top             =   270
  136.          Width           =   90
  137.       End
  138.       Begin VB.Label Lab_Qcyesj 
  139.          AutoSize        =   -1  'True
  140.          Height          =   180
  141.          Index           =   2
  142.          Left            =   3420
  143.          TabIndex        =   5
  144.          Top             =   780
  145.          Width           =   90
  146.       End
  147.       Begin VB.Label Lab_Qcyesj 
  148.          AutoSize        =   -1  'True
  149.          Height          =   180
  150.          Index           =   3
  151.          Left            =   810
  152.          TabIndex        =   4
  153.          Top             =   780
  154.          Width           =   90
  155.       End
  156.       Begin VB.Label Lab_Qcyesj 
  157.          AutoSize        =   -1  'True
  158.          Height          =   180
  159.          Index           =   4
  160.          Left            =   3420
  161.          TabIndex        =   3
  162.          Top             =   1260
  163.          Width           =   90
  164.       End
  165.       Begin VB.Label Lab_Qcyesj 
  166.          AutoSize        =   -1  'True
  167.          Height          =   180
  168.          Index           =   5
  169.          Left            =   900
  170.          TabIndex        =   2
  171.          Top             =   2130
  172.          Width           =   90
  173.       End
  174.       Begin VB.Label Lab_Qcyesj 
  175.          AutoSize        =   -1  'True
  176.          Height          =   180
  177.          Index           =   6
  178.          Left            =   3450
  179.          TabIndex        =   1
  180.          Top             =   2130
  181.          Width           =   90
  182.       End
  183.    End
  184. End
  185. Attribute VB_Name = "JC_FrmQcyessph"
  186. Attribute VB_GlobalNameSpace = False
  187. Attribute VB_Creatable = False
  188. Attribute VB_PredeclaredId = True
  189. Attribute VB_Exposed = False
  190. '************************************************************
  191. '*    模 块 名 称 :期初余额录入试算平衡
  192. '*    功 能 描 述 :
  193. '*    程序员姓名  :张建忠
  194. '*    最后修改人  :张建忠
  195. '*    最后修改时间:2001/11/26
  196. '*    备        注:
  197. '************************************************************
  198. Dim Int_Year As Integer                '试算平衡年度
  199. Private Sub Form_Load()
  200.     Dim Dbl_Qcye(4) As Double              '各类科目期初数据
  201.     Dim Dbl_ZcQcye As Double               '资产类科目数据合计
  202.     Dim Dbl_FzQcye As Double               '负债及所有者权益类科目数据合计
  203.     Dim SqlStr As String                   '查询字符串
  204.     Dim RecTemp As New ADODB.Recordset     '临时使用动态集
  205.     
  206.     Int_Year = Val(Xtcdcs)
  207.     
  208.     SqlStr = "SELECT Cwzz_AccCode.CClass, SUM(Cwzz_AccSum.Qmye) AS QcyeHj" & _
  209.     " FROM Cwzz_AccSum LEFT OUTER JOIN Cwzz_AccCode ON Cwzz_AccSum.Ccode = Cwzz_AccCode.Ccode" & _
  210.     " Where Cwzz_AccCode.EndFlag=1 And Year=" & Int_Year & " And Period=1 GROUP BY Cclass"
  211.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SqlStr)
  212.     
  213.     With RecTemp
  214.         
  215.         Do While Not .EOF
  216.             
  217.             Select Case Trim(.Fields("Cclass"))
  218.             Case "资产"
  219.                 Dbl_Qcye(0) = .Fields("Qcyehj")
  220.             Case "负债"
  221.                 Dbl_Qcye(1) = .Fields("Qcyehj")
  222.             Case "所有者权益"
  223.                 Dbl_Qcye(2) = .Fields("Qcyehj")
  224.             Case "成本"
  225.                 Dbl_Qcye(3) = .Fields("Qcyehj")
  226.             Case "损益"
  227.                 Dbl_Qcye(4) = .Fields("Qcyehj")
  228.             End Select
  229.             
  230.             .MoveNext
  231.         Loop
  232.         
  233.     End With
  234.     
  235.     '显示数据
  236.     For Jsqte = 0 To 4
  237.         If Dbl_Qcye(Jsqte) > 0 Then
  238.             Lab_Qcyesj(Jsqte).Caption = "借" & " " & Format(Dbl_Qcye(Jsqte), "##." + String(Xtjexsws, "0"))
  239.         Else
  240.             If Dbl_Qcye(Jsqte) = 0 Then
  241.                 Lab_Qcyesj(Jsqte).Caption = "平"
  242.             Else
  243.                 Lab_Qcyesj(Jsqte).Caption = "贷" & " " & Format(-Dbl_Qcye(Jsqte), "##." + String(Xtjexsws, "0"))
  244.             End If
  245.         End If
  246.     Next Jsqte
  247.     
  248.     '显示(资产+成本)合计数据
  249.     
  250.     Dbl_ZcQcye = Dbl_Qcye(0) + Dbl_Qcye(3)
  251.     Dbl_FzQcye = Dbl_Qcye(1) + Dbl_Qcye(2) + Dbl_Qcye(4)
  252.     
  253.     If Dbl_ZcQcye > 0 Then
  254.         Lab_Qcyesj(5).Caption = "借" & " " & Format(Dbl_ZcQcye, "##." + String(Xtjexsws, "0"))
  255.     Else
  256.         If Dbl_ZcQcye = 0 Then
  257.             Lab_Qcyesj(5).Caption = "平"
  258.         Else
  259.             Lab_Qcyesj(5).Caption = "贷" & " " & Format(-Dbl_ZcQcye, "##." + String(Xtjexsws, "0"))
  260.         End If
  261.     End If
  262.     
  263.     If Dbl_FzQcye > 0 Then
  264.         Lab_Qcyesj(6).Caption = "借" & " " & Format(Dbl_FzQcye, "##." + String(Xtjexsws, "0"))
  265.     Else
  266.         If Dbl_FzQcye = 0 Then
  267.             Lab_Qcyesj(6).Caption = "平"
  268.         Else
  269.             Lab_Qcyesj(6).Caption = "贷" & " " & Format(-Dbl_FzQcye, "##." + String(Xtjexsws, "0"))
  270.         End If
  271.     End If
  272.     
  273.     '判断试算是否平衡
  274.     If Dbl_ZcQcye + Dbl_FzQcye = 0 Then
  275.         Lab_Phjg.ForeColor = &HFF0000
  276.         Lab_Phjg.Caption = "试算结果平衡!"
  277.     Else
  278.         Lab_Phjg.ForeColor = &H80FF&
  279.         Lab_Phjg.Caption = "试算结果不平衡!"
  280.     End If
  281.     
  282. End Sub
  283. Private Sub BcCommand_Click()             '确定
  284.     Unload Me
  285. End Sub