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

企业管理

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Object = "{D76D7128-4A96-11D3-BD95-D296DC2DD072}#1.0#0"; "VSOCX7.OCX"
  3. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
  4. Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "tabctl32.ocx"
  5. Begin VB.Form JC_FrmQclrwc 
  6.    BorderStyle     =   3  'Fixed Dialog
  7.    Caption         =   "总帐期初录入完成"
  8.    ClientHeight    =   5910
  9.    ClientLeft      =   45
  10.    ClientTop       =   330
  11.    ClientWidth     =   8340
  12.    Icon            =   "基础设置_总帐期初录入完成.frx":0000
  13.    LinkTopic       =   "Form1"
  14.    MaxButton       =   0   'False
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   5910
  17.    ScaleWidth      =   8340
  18.    ShowInTaskbar   =   0   'False
  19.    StartUpPosition =   2  '屏幕中心
  20.    Begin VB.CommandButton cmdCancel1 
  21.       Caption         =   "关闭(&C)"
  22.       Default         =   -1  'True
  23.       Height          =   300
  24.       Left            =   6975
  25.       TabIndex        =   0
  26.       Top             =   5520
  27.       Width           =   1120
  28.    End
  29.    Begin TabDlg.SSTab StTab 
  30.       Height          =   5475
  31.       Left            =   30
  32.       TabIndex        =   1
  33.       Top             =   0
  34.       Width           =   8280
  35.       _ExtentX        =   14605
  36.       _ExtentY        =   9657
  37.       _Version        =   393216
  38.       Style           =   1
  39.       Tabs            =   4
  40.       TabsPerRow      =   4
  41.       TabHeight       =   520
  42.       TabCaption(0)   =   "信息提示"
  43.       TabPicture(0)   =   "基础设置_总帐期初录入完成.frx":1042
  44.       Tab(0).ControlEnabled=   -1  'True
  45.       Tab(0).Control(0)=   "Frame1"
  46.       Tab(0).Control(0).Enabled=   0   'False
  47.       Tab(0).ControlCount=   1
  48.       TabCaption(1)   =   "平衡校验"
  49.       TabPicture(1)   =   "基础设置_总帐期初录入完成.frx":105E
  50.       Tab(1).ControlEnabled=   0   'False
  51.       Tab(1).Control(0)=   "Frame2"
  52.       Tab(1).ControlCount=   1
  53.       TabCaption(2)   =   "核对帐簿"
  54.       TabPicture(2)   =   "基础设置_总帐期初录入完成.frx":107A
  55.       Tab(2).ControlEnabled=   0   'False
  56.       Tab(2).Control(0)=   "Frame3"
  57.       Tab(2).ControlCount=   1
  58.       TabCaption(3)   =   "初始完成"
  59.       TabPicture(3)   =   "基础设置_总帐期初录入完成.frx":1096
  60.       Tab(3).ControlEnabled=   0   'False
  61.       Tab(3).Control(0)=   "Frame4"
  62.       Tab(3).Control(0).Enabled=   0   'False
  63.       Tab(3).ControlCount=   1
  64.       Begin VB.Frame Frame1 
  65.          Height          =   5025
  66.          Left            =   120
  67.          TabIndex        =   49
  68.          Top             =   360
  69.          Width           =   8055
  70.          Begin VB.CommandButton cmdNext1 
  71.             Caption         =   "下一步(&N)"
  72.             Height          =   300
  73.             Left            =   6810
  74.             TabIndex        =   50
  75.             Top             =   4560
  76.             Width           =   1120
  77.          End
  78.          Begin VB.Label Label3 
  79.             Caption         =   "3.选择期初录入完成后,如果为第一次初始化总帐系统,则系统将自动生成对应期初累计数据的   明细凭证"
  80.             Height          =   615
  81.             Index           =   1
  82.             Left            =   300
  83.             TabIndex        =   55
  84.             Top             =   1620
  85.             Width           =   7455
  86.          End
  87.          Begin VB.Label Label1 
  88.             Caption         =   "期初录入完成注意事项:"
  89.             Height          =   285
  90.             Left            =   330
  91.             TabIndex        =   53
  92.             Top             =   510
  93.             Width           =   1965
  94.          End
  95.          Begin VB.Label Label2 
  96.             Caption         =   "1.试算不平衡则不能期初录入完成"
  97.             Height          =   195
  98.             Index           =   2
  99.             Left            =   300
  100.             TabIndex        =   52
  101.             Top             =   960
  102.             Width           =   2805
  103.          End
  104.          Begin VB.Label Label3 
  105.             Caption         =   "2.对帐不正确则不能期初录入完成"
  106.             Height          =   285
  107.             Index           =   0
  108.             Left            =   300
  109.             TabIndex        =   51
  110.             Top             =   1290
  111.             Width           =   2805
  112.          End
  113.       End
  114.       Begin VB.Frame Frame2 
  115.          Height          =   5025
  116.          Left            =   -74880
  117.          TabIndex        =   29
  118.          Top             =   360
  119.          Width           =   8055
  120.          Begin VB.PictureBox Picture1 
  121.             Height          =   4005
  122.             Left            =   150
  123.             ScaleHeight     =   3945
  124.             ScaleWidth      =   7695
  125.             TabIndex        =   33
  126.             Top             =   330
  127.             Width           =   7755
  128.             Begin VB.Timer Timer1 
  129.                Interval        =   1
  130.                Left            =   6870
  131.                Top             =   840
  132.             End
  133.             Begin VB.Label Lab_ljjg 
  134.                Caption         =   "借贷平衡结果"
  135.                ForeColor       =   &H000080FF&
  136.                Height          =   255
  137.                Left            =   1200
  138.                TabIndex        =   61
  139.                Top             =   3510
  140.                Width           =   2385
  141.             End
  142.             Begin VB.Label Lab_Dflj 
  143.                Caption         =   "贷方累计:"
  144.                Height          =   165
  145.                Left            =   3780
  146.                TabIndex        =   60
  147.                Top             =   2700
  148.                Width           =   2505
  149.             End
  150.             Begin VB.Label Lab_Jflj 
  151.                Caption         =   "借方累计:"
  152.                Height          =   165
  153.                Left            =   1200
  154.                TabIndex        =   59
  155.                Top             =   2730
  156.                Width           =   2385
  157.             End
  158.             Begin VB.Label Lab_CodeClass 
  159.                AutoSize        =   -1  'True
  160.                Caption         =   "资产="
  161.                Height          =   180
  162.                Index           =   0
  163.                Left            =   1200
  164.                TabIndex        =   48
  165.                Top             =   360
  166.                Width           =   450
  167.             End
  168.             Begin VB.Label Lab_CodeClass 
  169.                AutoSize        =   -1  'True
  170.                Caption         =   "负债="
  171.                Height          =   180
  172.                Index           =   1
  173.                Left            =   3750
  174.                TabIndex        =   47
  175.                Top             =   360
  176.                Width           =   450
  177.             End
  178.             Begin VB.Label Lab_CodeClass 
  179.                AutoSize        =   -1  'True
  180.                Caption         =   "权益="
  181.                Height          =   180
  182.                Index           =   2
  183.                Left            =   3750
  184.                TabIndex        =   46
  185.                Top             =   870
  186.                Width           =   450
  187.             End
  188.             Begin VB.Label Lab_CodeClass 
  189.                AutoSize        =   -1  'True
  190.                Caption         =   "成本="
  191.                Height          =   180
  192.                Index           =   3
  193.                Left            =   1200
  194.                TabIndex        =   45
  195.                Top             =   870
  196.                Width           =   450
  197.             End
  198.             Begin VB.Label Lab_CodeClass 
  199.                AutoSize        =   -1  'True
  200.                Caption         =   "损益="
  201.                Height          =   180
  202.                Index           =   4
  203.                Left            =   3750
  204.                TabIndex        =   44
  205.                Top             =   1350
  206.                Width           =   450
  207.             End
  208.             Begin VB.Label Lab_CodeClass 
  209.                AutoSize        =   -1  'True
  210.                Caption         =   "合计="
  211.                Height          =   180
  212.                Index           =   5
  213.                Left            =   1200
  214.                TabIndex        =   43
  215.                Top             =   2220
  216.                Width           =   450
  217.             End
  218.             Begin VB.Label Lab_CodeClass 
  219.                AutoSize        =   -1  'True
  220.                Caption         =   "合计="
  221.                Height          =   180
  222.                Index           =   6
  223.                Left            =   3750
  224.                TabIndex        =   42
  225.                Top             =   2220
  226.                Width           =   450
  227.             End
  228.             Begin VB.Label Lab_Phjg 
  229.                Caption         =   "余额平衡结果"
  230.                ForeColor       =   &H000080FF&
  231.                Height          =   255
  232.                Left            =   1200
  233.                TabIndex        =   41
  234.                Top             =   3180
  235.                Width           =   2385
  236.             End
  237.             Begin VB.Label Lab_Qcyesj 
  238.                AutoSize        =   -1  'True
  239.                Height          =   180
  240.                Index           =   0
  241.                Left            =   1770
  242.                TabIndex        =   40
  243.                Top             =   360
  244.                Width           =   1740
  245.             End
  246.             Begin VB.Label Lab_Qcyesj 
  247.                AutoSize        =   -1  'True
  248.                Height          =   180
  249.                Index           =   1
  250.                Left            =   4380
  251.                TabIndex        =   39
  252.                Top             =   360
  253.                Width           =   2250
  254.             End
  255.             Begin VB.Label Lab_Qcyesj 
  256.                AutoSize        =   -1  'True
  257.                Height          =   180
  258.                Index           =   2
  259.                Left            =   4380
  260.                TabIndex        =   38
  261.                Top             =   870
  262.                Width           =   90
  263.             End
  264.             Begin VB.Label Lab_Qcyesj 
  265.                AutoSize        =   -1  'True
  266.                Height          =   180
  267.                Index           =   3
  268.                Left            =   1770
  269.                TabIndex        =   37
  270.                Top             =   870
  271.                Width           =   1800
  272.             End
  273.             Begin VB.Label Lab_Qcyesj 
  274.                AutoSize        =   -1  'True
  275.                Height          =   180
  276.                Index           =   4
  277.                Left            =   4380
  278.                TabIndex        =   36
  279.                Top             =   1350
  280.                Width           =   90
  281.             End
  282.             Begin VB.Label Lab_Qcyesj 
  283.                AutoSize        =   -1  'True
  284.                Height          =   180
  285.                Index           =   5
  286.                Left            =   1860
  287.                TabIndex        =   35
  288.                Top             =   2220
  289.                Width           =   90
  290.             End
  291.             Begin VB.Label Lab_Qcyesj 
  292.                AutoSize        =   -1  'True
  293.                Height          =   180
  294.                Index           =   6
  295.                Left            =   4410
  296.                TabIndex        =   34
  297.                Top             =   2220
  298.                Width           =   90
  299.             End
  300.             Begin VB.Line Line1 
  301.                Index           =   0
  302.                X1              =   1200
  303.                X2              =   5760
  304.                Y1              =   1800
  305.                Y2              =   1800
  306.             End
  307.             Begin VB.Line Line2 
  308.                BorderColor     =   &H00FFFFFF&
  309.                Index           =   0
  310.                X1              =   1200
  311.                X2              =   5790
  312.                Y1              =   1830
  313.                Y2              =   1830
  314.             End
  315.          End
  316.          Begin VB.CommandButton cmdNext2 
  317.             Caption         =   "下一步(&N)"
  318.             Height          =   300
  319.             Left            =   6810
  320.             TabIndex        =   32
  321.             Top             =   4560
  322.             Width           =   1120
  323.          End
  324.          Begin VB.CommandButton cmdPrev2 
  325.             Caption         =   "上一步(&P)"
  326.             Height          =   300
  327.             Left            =   5640
  328.             TabIndex        =   31
  329.             Top             =   4560
  330.             Width           =   1120
  331.          End
  332.          Begin VB.CommandButton cmdPingHeng 
  333.             Caption         =   "平衡(&E)"
  334.             Height          =   300
  335.             Left            =   4440
  336.             TabIndex        =   30
  337.             Top             =   4560
  338.             Width           =   1120
  339.          End
  340.       End
  341.       Begin VB.Frame Frame3 
  342.          Height          =   5025
  343.          Left            =   -74880
  344.          TabIndex        =   5
  345.          Top             =   360
  346.          Width           =   8055
  347.          Begin VB.CommandButton cmdPrev3 
  348.             Caption         =   "上一步(&P)"
  349.             Height          =   300
  350.             Left            =   5640
  351.             TabIndex        =   8
  352.             Top             =   4560
  353.             Width           =   1120
  354.          End
  355.          Begin VB.CommandButton cmdNext3 
  356.             Caption         =   "下一步(&N)"
  357.             Height          =   300
  358.             Left            =   6810
  359.             TabIndex        =   7
  360.             Top             =   4560
  361.             Width           =   1120
  362.          End
  363.          Begin VB.CommandButton cmdDuiZhang 
  364.             Caption         =   "对帐(&E)"
  365.             Height          =   300
  366.             Left            =   4440
  367.             TabIndex        =   6
  368.             Top             =   4560
  369.             Width           =   1120
  370.          End
  371.          Begin VSFlex8Ctl.VSFlexGrid CxbbGrid 
  372.             Height          =   2505
  373.             Left            =   120
  374.             TabIndex        =   9
  375.             Top             =   1920
  376.             Width           =   7755
  377.             _ExtentX        =   13679
  378.             _ExtentY        =   4419
  379.             Appearance      =   1
  380.             BorderStyle     =   1
  381.             Enabled         =   -1  'True
  382.             BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  383.                Name            =   "宋体"
  384.                Size            =   9
  385.                Charset         =   134
  386.                Weight          =   400
  387.                Underline       =   0   'False
  388.                Italic          =   0   'False
  389.                Strikethrough   =   0   'False
  390.             EndProperty
  391.             MousePointer    =   0
  392.             BackColor       =   16777215
  393.             ForeColor       =   -2147483640
  394.             BackColorFixed  =   12632256
  395.             ForeColorFixed  =   -2147483630
  396.             BackColorSel    =   -2147483635
  397.             ForeColorSel    =   -2147483634
  398.             BackColorBkg    =   -2147483636
  399.             BackColorAlternate=   16777215
  400.             GridColor       =   -2147483633
  401.             GridColorFixed  =   -2147483632
  402.             TreeColor       =   -2147483632
  403.             FloodColor      =   192
  404.             SheetBorder     =   -2147483642
  405.             FocusRect       =   1
  406.             HighLight       =   1
  407.             AllowSelection  =   -1  'True
  408.             AllowBigSelection=   -1  'True
  409.             AllowUserResizing=   0
  410.             SelectionMode   =   0
  411.             GridLines       =   1
  412.             GridLinesFixed  =   2
  413.             GridLineWidth   =   1
  414.             Rows            =   50
  415.             Cols            =   10
  416.             FixedRows       =   1
  417.             FixedCols       =   1
  418.             RowHeightMin    =   0
  419.             RowHeightMax    =   0
  420.             ColWidthMin     =   0
  421.             ColWidthMax     =   0
  422.             ExtendLastCol   =   0   'False
  423.             FormatString    =   ""
  424.             ScrollTrack     =   0   'False
  425.             ScrollBars      =   3
  426.             ScrollTips      =   0   'False
  427.             MergeCells      =   0
  428.             MergeCompare    =   0
  429.             AutoResize      =   -1  'True
  430.             AutoSizeMode    =   0
  431.             AutoSearch      =   0
  432.             MultiTotals     =   -1  'True
  433.             SubtotalPosition=   1
  434.             OutlineBar      =   0
  435.             OutlineCol      =   0
  436.             Ellipsis        =   0
  437.             ExplorerBar     =   0
  438.             PicturesOver    =   0   'False
  439.             FillStyle       =   0
  440.             RightToLeft     =   0   'False
  441.             PictureType     =   0
  442.             TabBehavior     =   0
  443.             OwnerDraw       =   0
  444.             Editable        =   0   'False
  445.             ShowComboButton =   -1  'True
  446.             WordWrap        =   0   'False
  447.             TextStyle       =   0
  448.             TextStyleFixed  =   0
  449.             OleDragMode     =   0
  450.             OleDropMode     =   0
  451.             DataMode        =   0
  452.             VirtualData     =   -1  'True
  453.          End
  454.          Begin MSComctlLib.ImageList ImageList1 
  455.             Left            =   3840
  456.             Top             =   120
  457.             _ExtentX        =   1005
  458.             _ExtentY        =   1005
  459.             BackColor       =   -2147483643
  460.             ImageWidth      =   16
  461.             ImageHeight     =   16
  462.             MaskColor       =   12632256
  463.             _Version        =   393216
  464.             BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  465.                NumListImages   =   26
  466.                BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  467.                   Picture         =   "基础设置_总帐期初录入完成.frx":10B2
  468.                   Key             =   "sz"
  469.                EndProperty
  470.                BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  471.                   Picture         =   "基础设置_总帐期初录入完成.frx":144C
  472.                   Key             =   "dy"
  473.                EndProperty
  474.                BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  475.                   Picture         =   "基础设置_总帐期初录入完成.frx":17E6
  476.                   Key             =   "yl"
  477.                EndProperty
  478.                BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  479.                   Picture         =   "基础设置_总帐期初录入完成.frx":1B80
  480.                   Key             =   "xg"
  481.                EndProperty
  482.                BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  483.                   Picture         =   "基础设置_总帐期初录入完成.frx":1F1A
  484.                   Key             =   "zh"
  485.                EndProperty
  486.                BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  487.                   Picture         =   "基础设置_总帐期初录入完成.frx":22B4
  488.                   Key             =   "sh"
  489.                EndProperty
  490.                BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  491.                   Picture         =   "基础设置_总帐期初录入完成.frx":264E
  492.                   Key             =   "bc"
  493.                EndProperty
  494.                BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  495.                   Picture         =   "基础设置_总帐期初录入完成.frx":29E8
  496.                   Key             =   "fq"
  497.                EndProperty
  498.                BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  499.                   Picture         =   "基础设置_总帐期初录入完成.frx":2D82
  500.                   Key             =   "bz"
  501.                EndProperty
  502.                BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  503.                   Picture         =   "基础设置_总帐期初录入完成.frx":311C
  504.                   Key             =   "tc"
  505.                EndProperty
  506.                BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  507.                   Picture         =   "基础设置_总帐期初录入完成.frx":34B6
  508.                   Key             =   "bcgs"
  509.                EndProperty
  510.                BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  511.                   Picture         =   "基础设置_总帐期初录入完成.frx":3850
  512.                   Key             =   "mrlk"
  513.                EndProperty
  514.                BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  515.                   Picture         =   "基础设置_总帐期初录入完成.frx":3BEA
  516.                   Key             =   "xsxm"
  517.                EndProperty
  518.                BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  519.                   Picture         =   "基础设置_总帐期初录入完成.frx":3F84
  520.                   Key             =   "first"
  521.                EndProperty
  522.                BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  523.                   Picture         =   "基础设置_总帐期初录入完成.frx":431E
  524.                   Key             =   "prev"
  525.                EndProperty
  526.                BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  527.                   Picture         =   "基础设置_总帐期初录入完成.frx":46B8
  528.                   Key             =   "next"
  529.                EndProperty
  530.                BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  531.                   Picture         =   "基础设置_总帐期初录入完成.frx":4A52
  532.                   Key             =   "last"
  533.                EndProperty
  534.                BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  535.                   Picture         =   "基础设置_总帐期初录入完成.frx":4DEC
  536.                   Key             =   "xx"
  537.                EndProperty
  538.                BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  539.                   Picture         =   "基础设置_总帐期初录入完成.frx":5186
  540.                   Key             =   "define"
  541.                EndProperty
  542.                BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  543.                   Picture         =   "基础设置_总帐期初录入完成.frx":5520
  544.                   Key             =   "exec"
  545.                EndProperty
  546.                BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  547.                   Picture         =   "基础设置_总帐期初录入完成.frx":58BA
  548.                   Key             =   "xz"
  549.                EndProperty
  550.                BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  551.                   Picture         =   "基础设置_总帐期初录入完成.frx":5C54
  552.                   Key             =   "sc"
  553.                EndProperty
  554.                BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  555.                   Picture         =   "基础设置_总帐期初录入完成.frx":5FEE
  556.                   Key             =   "sx"
  557.                EndProperty
  558.                BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  559.                   Picture         =   "基础设置_总帐期初录入完成.frx":6388
  560.                   Key             =   "cx"
  561.                EndProperty
  562.                BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  563.                   Picture         =   "基础设置_总帐期初录入完成.frx":6722
  564.                   Key             =   "zd"
  565.                EndProperty
  566.                BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  567.                   Picture         =   "基础设置_总帐期初录入完成.frx":6ABC
  568.                   Key             =   "dz"
  569.                EndProperty
  570.             EndProperty
  571.          End
  572.          Begin MSComctlLib.Toolbar Tlb_Action 
  573.             Height          =   570
  574.             Left            =   30
  575.             TabIndex        =   10
  576.             Top             =   120
  577.             Width           =   7995
  578.             _ExtentX        =   14102
  579.             _ExtentY        =   1005
  580.             ButtonWidth     =   820
  581.             ButtonHeight    =   953
  582.             AllowCustomize  =   0   'False
  583.             Wrappable       =   0   'False
  584.             Appearance      =   1
  585.             Style           =   1
  586.             ImageList       =   "ImageList1"
  587.             _Version        =   393216
  588.             BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  589.                NumButtons      =   3
  590.                BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  591.                   Caption         =   "设置"
  592.                   Key             =   "ymsz"
  593.                   Object.ToolTipText     =   "打印页面设置"
  594.                   ImageKey        =   "sz"
  595.                EndProperty
  596.                BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  597.                   Caption         =   "打印"
  598.                   Key             =   "dy"
  599.                   Object.ToolTipText     =   "打印当前单据或Ctrl+P"
  600.                   ImageKey        =   "dy"
  601.                EndProperty
  602.                BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  603.                   Caption         =   "预览"
  604.                   Key             =   "yl"
  605.                   ImageKey        =   "yl"
  606.                EndProperty
  607.             EndProperty
  608.             BorderStyle     =   1
  609.             Begin MSComctlLib.Toolbar GsToolbar 
  610.                Height          =   540
  611.                Left            =   5490
  612.                TabIndex        =   11
  613.                Top             =   0
  614.                Width           =   2475
  615.                _ExtentX        =   4366
  616.                _ExtentY        =   953
  617.                ButtonWidth     =   1455
  618.                ButtonHeight    =   953
  619.                AllowCustomize  =   0   'False
  620.                Appearance      =   1
  621.                Style           =   1
  622.                ImageList       =   "ImageList1"
  623.                _Version        =   393216
  624.                BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  625.                   NumButtons      =   3
  626.                   BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  627.                      Caption         =   "保存格式"
  628.                      Key             =   "bcgs"
  629.                      ImageKey        =   "bcgs"
  630.                   EndProperty
  631.                   BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  632.                      Caption         =   "默认列宽"
  633.                      Key             =   "hfmrgs"
  634.                      ImageKey        =   "mrlk"
  635.                   EndProperty
  636.                   BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  637.                      Caption         =   "显示项目"
  638.                      Key             =   "szxsxm"
  639.                      ImageKey        =   "xsxm"
  640.                   EndProperty
  641.                EndProperty
  642.             End
  643.          End
  644.          Begin VB.Label Label4 
  645.             BackStyle       =   0  'Transparent
  646.             Caption         =   "正在核对科目:"
  647.             Height          =   255
  648.             Left            =   5670
  649.             TabIndex        =   28
  650.             Top             =   1680
  651.             Visible         =   0   'False
  652.             Width           =   1245
  653.          End
  654.          Begin VB.Label Lab_Check1 
  655.             BackStyle       =   0  'Transparent
  656.             Caption         =   "核对总帐上下级"
  657.             Height          =   285
  658.             Index           =   0
  659.             Left            =   540
  660.             TabIndex        =   27
  661.             Top             =   960
  662.             Width           =   1455
  663.          End
  664.          Begin VB.Label Lab_Check1 
  665.             BackStyle       =   0  'Transparent
  666.             Caption         =   "核对总帐与部门帐"
  667.             Height          =   285
  668.             Index           =   1
  669.             Left            =   3150
  670.             TabIndex        =   26
  671.             Top             =   960
  672.             Width           =   1455
  673.          End
  674.          Begin VB.Label Lab_Check1 
  675.             BackStyle       =   0  'Transparent
  676.             Caption         =   "核对总帐与客户往来帐"
  677.             Height          =   285
  678.             Index           =   2
  679.             Left            =   5670
  680.             TabIndex        =   25
  681.             Top             =   960
  682.             Width           =   1905
  683.          End
  684.          Begin VB.Label Lab_Check1 
  685.             BackStyle       =   0  'Transparent
  686.             Caption         =   "核对总帐与供应商往来帐"
  687.             Height          =   285
  688.             Index           =   3
  689.             Left            =   540
  690.             TabIndex        =   24
  691.             Top             =   1260
  692.             Width           =   2115
  693.          End
  694.          Begin VB.Label Lab_Check1 
  695.             BackStyle       =   0  'Transparent
  696.             Caption         =   "核对总帐与个人往来帐"
  697.             Height          =   285
  698.             Index           =   4
  699.             Left            =   3150
  700.             TabIndex        =   23
  701.             Top             =   1260
  702.             Width           =   1905
  703.          End
  704.          Begin VB.Label Lab_Check1 
  705.             BackStyle       =   0  'Transparent
  706.             Caption         =   "核对总帐与项目帐"
  707.             Height          =   285
  708.             Index           =   5
  709.             Left            =   5670
  710.             TabIndex        =   22
  711.             Top             =   1260
  712.             Width           =   1905
  713.          End
  714.          Begin VB.Label Lab_CheckJg 
  715.             BackStyle       =   0  'Transparent
  716.             Caption         =   "√"
  717.             ForeColor       =   &H000000FF&
  718.             Height          =   285
  719.             Index           =   0
  720.             Left            =   240
  721.             TabIndex        =   21
  722.             Top             =   960
  723.             Visible         =   0   'False
  724.             Width           =   285
  725.          End
  726.          Begin VB.Label Lab_CheckJg 
  727.             BackStyle       =   0  'Transparent
  728.             Caption         =   "√"
  729.             ForeColor       =   &H000000FF&
  730.             Height          =   285
  731.             Index           =   1
  732.             Left            =   2850
  733.             TabIndex        =   20
  734.             Top             =   960
  735.             Visible         =   0   'False
  736.             Width           =   285
  737.          End
  738.          Begin VB.Label Lab_CheckJg 
  739.             BackStyle       =   0  'Transparent
  740.             Caption         =   "√"
  741.             ForeColor       =   &H000000FF&
  742.             Height          =   285
  743.             Index           =   2
  744.             Left            =   5370
  745.             TabIndex        =   19
  746.             Top             =   960
  747.             Visible         =   0   'False
  748.             Width           =   285
  749.          End
  750.          Begin VB.Label Lab_CheckJg 
  751.             BackStyle       =   0  'Transparent
  752.             Caption         =   "√"
  753.             ForeColor       =   &H000000FF&
  754.             Height          =   285
  755.             Index           =   3
  756.             Left            =   240
  757.             TabIndex        =   18
  758.             Top             =   1260
  759.             Visible         =   0   'False
  760.             Width           =   285
  761.          End
  762.          Begin VB.Label Lab_CheckJg 
  763.             BackStyle       =   0  'Transparent
  764.             Caption         =   "√"
  765.             ForeColor       =   &H000000FF&
  766.             Height          =   285
  767.             Index           =   4
  768.             Left            =   2850
  769.             TabIndex        =   17
  770.             Top             =   1260
  771.             Visible         =   0   'False
  772.             Width           =   285
  773.          End
  774.          Begin VB.Label Lab_CheckJg 
  775.             BackStyle       =   0  'Transparent
  776.             Caption         =   "√"
  777.             ForeColor       =   &H000000FF&
  778.             Height          =   285
  779.             Index           =   5
  780.             Left            =   5370
  781.             TabIndex        =   16
  782.             Top             =   1260
  783.             Visible         =   0   'False
  784.             Width           =   285
  785.          End
  786.          Begin VB.Label Lab_Ccode 
  787.             ForeColor       =   &H00000000&
  788.             Height          =   210
  789.             Left            =   6870
  790.             TabIndex        =   15
  791.             Top             =   1680
  792.             Visible         =   0   'False
  793.             Width           =   1005
  794.          End
  795.          Begin VB.Label Label2 
  796.             BackStyle       =   0  'Transparent
  797.             Caption         =   "(下面为对帐错误记录列表)"
  798.             ForeColor       =   &H000000FF&
  799.             Height          =   255
  800.             Index           =   3
  801.             Left            =   -2280
  802.             TabIndex        =   14
  803.             Top             =   540
  804.             Width           =   2445
  805.          End
  806.          Begin VB.Label Label5 
  807.             BackColor       =   &H00C0C0C0&
  808.             BackStyle       =   0  'Transparent
  809.             Caption         =   "[*下面为对帐错误的科目:]"
  810.             ForeColor       =   &H00000000&
  811.             Height          =   210
  812.             Left            =   120
  813.             TabIndex        =   13
  814.             Top             =   1680
  815.             Width           =   2295
  816.          End
  817.          Begin VB.Label lab_DZ_Res 
  818.             BackStyle       =   0  'Transparent
  819.             ForeColor       =   &H00FF0000&
  820.             Height          =   255
  821.             Left            =   120
  822.             TabIndex        =   12
  823.             Top             =   4590
  824.             Width           =   2175
  825.          End
  826.       End
  827.       Begin VB.Frame Frame4 
  828.          Height          =   5025
  829.          Left            =   -74880
  830.          TabIndex        =   2
  831.          Top             =   360
  832.          Width           =   8055
  833.          Begin VB.CommandButton cmdExecute 
  834.             Caption         =   "初始完成(&E)"
  835.             Height          =   300
  836.             Left            =   5640
  837.             TabIndex        =   4
  838.             Top             =   4560
  839.             Width           =   1120
  840.          End
  841.          Begin VB.CommandButton cmdPrev4 
  842.             Caption         =   "上一步(&P)"
  843.             Height          =   300
  844.             Left            =   6810
  845.             TabIndex        =   3
  846.             Top             =   4560
  847.             Width           =   1120
  848.          End
  849.          Begin VB.Label Lab_ShowCode 
  850.             Height          =   315
  851.             Left            =   4590
  852.             TabIndex        =   58
  853.             Top             =   2130
  854.             Width           =   1155
  855.          End
  856.          Begin VB.Label Lab_Wait 
  857.             Caption         =   "正在生成对应凭证,请稍后..."
  858.             Height          =   285
  859.             Left            =   2130
  860.             TabIndex        =   57
  861.             Top             =   2160
  862.             Visible         =   0   'False
  863.             Width           =   2415
  864.          End
  865.          Begin VB.Label Label6 
  866.             Caption         =   "帐簿核对正确,请确认是否执行期初录入完成?"
  867.             Height          =   285
  868.             Left            =   2100
  869.             TabIndex        =   56
  870.             Top             =   1500
  871.             Width           =   3795
  872.          End
  873.       End
  874.       Begin VSFlex8Ctl.VSFlexGrid CzxsGrid 
  875.          Height          =   5715
  876.          Left            =   -74910
  877.          TabIndex        =   54
  878.          Top             =   420
  879.          Width           =   8415
  880.          _ExtentX        =   14843
  881.          _ExtentY        =   10081
  882.          Appearance      =   1
  883.          BorderStyle     =   1
  884.          Enabled         =   -1  'True
  885.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  886.             Name            =   "宋体"
  887.             Size            =   9
  888.             Charset         =   134
  889.             Weight          =   400
  890.             Underline       =   0   'False
  891.             Italic          =   0   'False
  892.             Strikethrough   =   0   'False
  893.          EndProperty
  894.          MousePointer    =   0
  895.          BackColor       =   -2147483643
  896.          ForeColor       =   -2147483640
  897.          BackColorFixed  =   -2147483633
  898.          ForeColorFixed  =   -2147483630
  899.          BackColorSel    =   -2147483635
  900.          ForeColorSel    =   -2147483634
  901.          BackColorBkg    =   8421504
  902.          BackColorAlternate=   -2147483643
  903.          GridColor       =   -2147483633
  904.          GridColorFixed  =   -2147483632
  905.          TreeColor       =   -2147483632
  906.          FloodColor      =   192
  907.          SheetBorder     =   -2147483642
  908.          FocusRect       =   1
  909.          HighLight       =   1
  910.          AllowSelection  =   -1  'True
  911.          AllowBigSelection=   -1  'True
  912.          AllowUserResizing=   0
  913.          SelectionMode   =   0
  914.          GridLines       =   1
  915.          GridLinesFixed  =   2
  916.          GridLineWidth   =   1
  917.          Rows            =   5000
  918.          Cols            =   10
  919.          FixedRows       =   1
  920.          FixedCols       =   0
  921.          RowHeightMin    =   0
  922.          RowHeightMax    =   0
  923.          ColWidthMin     =   0
  924.          ColWidthMax     =   0
  925.          ExtendLastCol   =   0   'False
  926.          FormatString    =   ""
  927.          ScrollTrack     =   0   'False
  928.          ScrollBars      =   3
  929.          ScrollTips      =   0   'False
  930.          MergeCells      =   0
  931.          MergeCompare    =   0
  932.          AutoResize      =   -1  'True
  933.          AutoSizeMode    =   0
  934.          AutoSearch      =   0
  935.          MultiTotals     =   -1  'True
  936.          SubtotalPosition=   1
  937.          OutlineBar      =   0
  938.          OutlineCol      =   0
  939.          Ellipsis        =   0
  940.          ExplorerBar     =   0
  941.          PicturesOver    =   0   'False
  942.          FillStyle       =   0
  943.          RightToLeft     =   0   'False
  944.          PictureType     =   0
  945.          TabBehavior     =   0
  946.          OwnerDraw       =   0
  947.          Editable        =   0   'False
  948.          ShowComboButton =   -1  'True
  949.          WordWrap        =   0   'False
  950.          TextStyle       =   0
  951.          TextStyleFixed  =   0
  952.          OleDragMode     =   0
  953.          OleDropMode     =   0
  954.          DataMode        =   0
  955.          VirtualData     =   -1  'True
  956.       End
  957.    End
  958. End
  959. Attribute VB_Name = "JC_FrmQclrwc"
  960. Attribute VB_GlobalNameSpace = False
  961. Attribute VB_Creatable = False
  962. Attribute VB_PredeclaredId = True
  963. Attribute VB_Exposed = False
  964. '********************************************************************
  965. '*    模 块 名 称 :总帐期初录入完成
  966. '*    功 能 描 述 :
  967. '*    程序员姓名  :张建忠
  968. '*    最后修改人  :张建忠
  969. '*    最后修改时间:2001/11/27
  970. '*    备        注:
  971. '********************************************************************
  972. Dim Ztxxrec As New ADODB.Recordset       '帐套信息动态集
  973. Dim Int_Year As Integer                  '初始化完成会计年度
  974. Dim Int_Period As Integer                '会计期间(默认为1会计期间)
  975. Dim Int_SS_OK As Integer                 '试算是否平衡
  976. Private Int_DZ_OK As Integer             '对帐是否正确
  977. Dim ReportTitle As String                '报表主标题
  978. '以下为固定使用变量
  979. Dim Dyymctbl As New DY_Dyymsz            '打印页面窗体变量
  980. Dim GridCode As String                   '显示网格网格代码
  981. Dim GridInf() As Variant                 '整个网格设置信息
  982. Dim Tsxx As String                       '系统提示信息
  983. Dim Qslz As Long                         '网格隐藏(非操作显示)列数
  984. Dim Sjhgd As Double                      '网格数据行高度
  985. Dim Sfxshjwg As Boolean                  '是否显示合计网格
  986. Dim GridBoolean() As Boolean             '网格列信息(布尔型)
  987. Dim GridStr()  As String                 '网格列信息(字符型)
  988. Dim GridInt() As Integer                 '网格列信息(整型)
  989. Dim Szzls As Integer                     '数组总列数(网格列数-1)
  990. Private Sub Form_Load()
  991.     
  992.     '初始化各种值
  993.     cmdNext1.Default = True
  994.     StTab.TabEnabled(0) = True
  995.     StTab.TabEnabled(1) = False
  996.     StTab.TabEnabled(2) = False
  997.     StTab.TabEnabled(3) = False
  998.     StTab.Tab = 0
  999.     cmdPingHeng.Visible = False
  1000.     cmdDuiZhang.Visible = False
  1001.     
  1002.     '取出当前初始化完成年度
  1003.     Set Ztxxrec = Cw_DataEnvi.DataConnect.Execute("Select top 1 * From Gy_kjrlb Where Cwzzjzbz=0 Order by kjyear,period")
  1004.     With Ztxxrec
  1005.         If Not .EOF Then
  1006.             Dqkjyear = .Fields("Kjyear")
  1007.         End If
  1008.     End With
  1009.     Int_Year = Dqkjyear
  1010.     Int_Period = 1
  1011.     
  1012.     
  1013.     '调入打印页面设置窗体
  1014.     XtReportCode = "Cwzz_ymjz"
  1015.     Load Dyymctbl
  1016.     ReportTitle = "帐目对帐结果"
  1017.     
  1018.     '调 入 网 格
  1019.     GridCode = "Cwzz_ymjz"
  1020.     Call BzWgcsh(CxbbGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
  1021.     
  1022.     Qslz = GridInf(1)
  1023.     Sjhgd = GridInf(2)
  1024.     Sfxshjwg = GridInf(7)
  1025.     Szzls = CxbbGrid.Cols - 1
  1026. End Sub
  1027. '===================以下为向导按钮状态处理过程===================='
  1028. Private Sub cmdCancel1_Click()
  1029.     Unload Me
  1030. End Sub
  1031. Private Sub cmdCancel2_Click()
  1032.     Unload Me
  1033. End Sub
  1034. Private Sub cmdCancel3_Click()
  1035.     Unload Me
  1036. End Sub
  1037. '对帐过程处理
  1038. Private Sub Timer1_Timer()
  1039.     Timer1.Enabled = False
  1040.     cmdDuiZhang_Click
  1041. End Sub
  1042. Private Sub cmdDuiZhang_Click()
  1043.     Lab_Ccode.Visible = True
  1044.     lab_DZ_Res.Visible = False
  1045.     Label4.Visible = True
  1046.     Sub_AccCheck
  1047.     
  1048.     If Int_DZ_OK = 0 Then
  1049.         cmdNext3.Enabled = False
  1050.     End If
  1051.     
  1052.     Lab_Ccode.Visible = False
  1053.     lab_DZ_Res.Visible = True
  1054.     Label4.Visible = False
  1055. End Sub
  1056. Private Sub cmdNext1_Click()
  1057.     cmdNext2.Default = True
  1058.     
  1059.     StTab.TabEnabled(0) = False
  1060.     StTab.TabEnabled(1) = True
  1061.     StTab.TabEnabled(2) = False
  1062.     StTab.TabEnabled(3) = False
  1063.     StTab.Tab = 1
  1064.     cmdPingHeng_Click
  1065. End Sub
  1066. Private Sub cmdNext2_Click()
  1067.     cmdNext3.Default = True
  1068.     
  1069.     StTab.TabEnabled(0) = False
  1070.     StTab.TabEnabled(1) = False
  1071.     StTab.TabEnabled(2) = True
  1072.     StTab.TabEnabled(3) = False
  1073.     StTab.Tab = 2
  1074.     Timer1.Enabled = True
  1075. End Sub
  1076. Private Sub cmdNext3_Click()
  1077.     cmdExecute.Default = True
  1078.     
  1079.     StTab.TabEnabled(0) = False
  1080.     StTab.TabEnabled(1) = False
  1081.     StTab.TabEnabled(2) = False
  1082.     StTab.TabEnabled(3) = True
  1083.     StTab.Tab = 3
  1084.     
  1085. End Sub
  1086. '试算平衡处理过程
  1087. Private Sub cmdPingHeng_Click()
  1088.     Sub_PingHeng
  1089.     
  1090.     If Int_SS_OK = 0 Then
  1091.         cmdNext2.Enabled = False
  1092.     End If
  1093. End Sub
  1094. Private Sub cmdPrev2_Click()
  1095.     StTab.TabEnabled(0) = True
  1096.     StTab.TabEnabled(1) = False
  1097.     StTab.TabEnabled(2) = False
  1098.     StTab.TabEnabled(3) = False
  1099.     StTab.Tab = 0
  1100. End Sub
  1101. Private Sub cmdPrev3_Click()
  1102.     StTab.TabEnabled(0) = False
  1103.     StTab.TabEnabled(1) = True
  1104.     StTab.TabEnabled(2) = False
  1105.     StTab.TabEnabled(3) = False
  1106.     StTab.Tab = 1
  1107. End Sub
  1108. Private Sub cmdPrev4_Click()
  1109.     StTab.TabEnabled(0) = False
  1110.     StTab.TabEnabled(1) = False
  1111.     StTab.TabEnabled(2) = True
  1112.     StTab.TabEnabled(3) = False
  1113.     StTab.Tab = 2
  1114. End Sub
  1115. '试算平衡处理
  1116. Private Sub Sub_PingHeng()
  1117.     Dim Dbl_Qcye(4) As Double              '各类科目期初数据
  1118.     Dim Dbl_ZcQcye As Double               '资产类科目数据合计
  1119.     Dim Dbl_FzQcye As Double               '负债及所有者权益类科目数据合计
  1120.     Dim Dbl_Jflj As Double                 '借方累计
  1121.     Dim Dbl_Dflj As Double                 '贷方累计
  1122.     Dim Sqlstr As String                   '查询字符串
  1123.     Dim RecTemp As New ADODB.Recordset     '临时使用动态集
  1124.     
  1125.     
  1126.     Sqlstr = "SELECT Cwzz_AccCode.CClass, isnull(SUM(Cwzz_AccSum.Qcye),0) AS QcyeHj" & _
  1127.     " FROM Cwzz_AccSum LEFT OUTER JOIN Cwzz_AccCode ON Cwzz_AccSum.Ccode = Cwzz_AccCode.Ccode" & _
  1128.     " Where Cwzz_AccCode.EndFlag=1 And Year=" & Int_Year & " And Period=" & Int_Period & " GROUP BY Cclass"
  1129.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1130.     
  1131.     With RecTemp
  1132.         
  1133.         Do While Not .EOF
  1134.             
  1135.             Select Case Trim(.Fields("Cclass"))
  1136.             Case "资产"
  1137.                 Dbl_Qcye(0) = .Fields("Qcyehj")
  1138.             Case "负债"
  1139.                 Dbl_Qcye(1) = .Fields("Qcyehj")
  1140.             Case "所有者权益"
  1141.                 Dbl_Qcye(2) = .Fields("Qcyehj")
  1142.             Case "成本"
  1143.                 Dbl_Qcye(3) = .Fields("Qcyehj")
  1144.             Case "损益"
  1145.                 Dbl_Qcye(4) = .Fields("Qcyehj")
  1146.             End Select
  1147.             
  1148.             .MoveNext
  1149.         Loop
  1150.         
  1151.     End With
  1152.     
  1153.     '显示数据
  1154.     For Jsqte = 0 To 4
  1155.         If Dbl_Qcye(Jsqte) > 0 Then
  1156.             Lab_Qcyesj(Jsqte).Caption = "借" & " " & Format(Dbl_Qcye(Jsqte), "##." + String(Xtjexsws, "0"))
  1157.         Else
  1158.             If Dbl_Qcye(Jsqte) = 0 Then
  1159.                 Lab_Qcyesj(Jsqte).Caption = "平"
  1160.             Else
  1161.                 Lab_Qcyesj(Jsqte).Caption = "贷" & " " & Format(-Dbl_Qcye(Jsqte), "##." + String(Xtjexsws, "0"))
  1162.             End If
  1163.         End If
  1164.     Next Jsqte
  1165.     
  1166.     '显示(资产+成本)合计数据
  1167.     
  1168.     Dbl_ZcQcye = Dbl_Qcye(0) + Dbl_Qcye(3)
  1169.     Dbl_FzQcye = Dbl_Qcye(1) + Dbl_Qcye(2) + Dbl_Qcye(4)
  1170.     
  1171.     If Dbl_ZcQcye > 0 Then
  1172.         Lab_Qcyesj(5).Caption = "借" & " " & Format(Dbl_ZcQcye, "##." + String(Xtjexsws, "0"))
  1173.     Else
  1174.         If Dbl_ZcQcye = 0 Then
  1175.             Lab_Qcyesj(5).Caption = "平"
  1176.         Else
  1177.             Lab_Qcyesj(5).Caption = "贷" & " " & Format(-Dbl_ZcQcye, "##." + String(Xtjexsws, "0"))
  1178.         End If
  1179.     End If
  1180.     
  1181.     If Dbl_FzQcye > 0 Then
  1182.         Lab_Qcyesj(6).Caption = "借" & " " & Format(Dbl_FzQcye, "##." + String(Xtjexsws, "0"))
  1183.     Else
  1184.         If Dbl_FzQcye = 0 Then
  1185.             Lab_Qcyesj(6).Caption = "平"
  1186.         Else
  1187.             Lab_Qcyesj(6).Caption = "贷" & " " & Format(-Dbl_FzQcye, "##." + String(Xtjexsws, "0"))
  1188.         End If
  1189.     End If
  1190.     
  1191.     '判断余额是否平衡
  1192.     If Format(Dbl_ZcQcye + Dbl_FzQcye, "0.00") = 0 Then
  1193.         Lab_Phjg.ForeColor = vbBlue
  1194.         Lab_Phjg.Caption = "试算结果:年初余额平衡"
  1195.         
  1196.         Int_SS_OK = 1
  1197.     Else
  1198.         Lab_Phjg.ForeColor = vbRed
  1199.         Lab_Phjg.Caption = "试算结果:年初余额不平衡"
  1200.         
  1201.         Int_SS_OK = 0
  1202.     End If
  1203.     
  1204.     '计算科目借贷方累计数据
  1205.     Sqlstr = "SELECT isnull(SUM(Cwzz_AccSum.Byjfljje),0) as Ljjfje,isnull(SUM(Cwzz_AccSum.Bydfljje),0) As Ljdfje FROM Cwzz_AccSum " & _
  1206.     " LEFT OUTER JOIN Cwzz_AccCode ON Cwzz_AccSum.Ccode = Cwzz_AccCode.Ccode" & _
  1207.     " Where Cwzz_AccCode.EndFlag=1 And Year=" & Int_Year & " And Period=" & Int_Period
  1208.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1209.     
  1210.     Dbl_Jflj = RecTemp.Fields("Ljjfje")
  1211.     Dbl_Dflj = RecTemp.Fields("Ljdfje")
  1212.     
  1213.     Lab_Jflj.Caption = "借方累计:" & " " & Format(Dbl_Jflj, "##." + String(Xtjexsws, "0"))
  1214.     Lab_Dflj.Caption = "贷方累计:" & " " & Format(Dbl_Dflj, "##." + String(Xtjexsws, "0"))
  1215.     
  1216.     '判断借贷是否平衡
  1217.     If Abs(Dbl_Jflj - Dbl_Dflj) >= 0.01 Then
  1218.         Lab_ljjg.ForeColor = vbRed
  1219.         Lab_ljjg.Caption = "试算结果:借贷不平衡"
  1220.         
  1221.         Int_SS_OK = 0
  1222.     Else
  1223.         Lab_ljjg.ForeColor = vbBlue
  1224.         Lab_ljjg.Caption = "试算结果:借贷平衡"
  1225.         
  1226.         Int_SS_OK = 1
  1227.     End If
  1228. End Sub
  1229. Private Sub cmdExecute_Click()                               '总帐初始化完成
  1230.     Dim RecTemp As New ADODB.Recordset              '临时使用动态集
  1231.     Dim Rec_AccSum As New ADODB.Recordset           '总帐动态集
  1232.     Dim Rec_AccSumAssi As New ADODB.Recordset       '辅助帐动态集
  1233.     Dim Rec_AccVouchMain As New ADODB.Recordset     '凭证主表动态集
  1234.     Dim Rec_AccVouch As New ADODB.Recordset         '凭证子表动态集
  1235.     Dim Dtm_DDate As Date                           '凭证制单日期
  1236.     Dim Str_VouchClassCode As String                '凭证类别编码
  1237.     Dim Rowjsq As Long                              '凭证记录计数器
  1238.     Dim Lng_VouchId As Long                         '凭证ID
  1239.     
  1240.     '判断当前年度是否为第一次建帐年度,如非第一次建帐年度则不生成凭证
  1241.     Set Ztxxrec = Cw_DataEnvi.DataConnect.Execute("Select top 1 * From Gy_kjrlb Order by kjyear,period")
  1242.     
  1243.     If Ztxxrec.Fields("Kjyear") = Int_Year Then
  1244.         
  1245.         '读取凭证制单日期
  1246.         Set RecTemp = Cw_DataEnvi.DataConnect.Execute("Select Qsrq From Gy_kjrlb Where Period=1 And KjYear='" & Int_Year & "'")
  1247.         If Not RecTemp.EOF Then
  1248.             Dtm_DDate = RecTemp.Fields("Qsrq")
  1249.         End If
  1250.         
  1251.         '读取凭证类别
  1252.         Set RecTemp = Cw_DataEnvi.DataConnect.Execute("Select Top 1 VouchClassCode From Cwzz_VouchClass ")
  1253.         If Not RecTemp.EOF Then
  1254.             Str_VouchClassCode = RecTemp.Fields("VouchClassCode")
  1255.         Else
  1256.             Tsxx = "请先设置凭证类别!"
  1257.             Call Xtxxts(Tsxx, 0, 4)
  1258.             Exit Sub
  1259.         End If
  1260.         
  1261.          '显示等候信息
  1262.         Lab_Wait.Visible = True
  1263.         
  1264.         '从总帐中读取所有 末级没有辅助核算初始化会计年度 1会计期间各累计发生数有一个不为零的科目数据生成凭证的一部分.
  1265.         Sqlstr = "SELECT Cwzz_AccSum.*,Cwzz_AccCode.ForeignCurrCode,Gy_ForeignCurrency.AccRate FROM Cwzz_AccSum Left JOIN Cwzz_AccCode ON " & _
  1266.         " Cwzz_AccSum.Ccode = Cwzz_AccCode.Ccode Left JOIN Gy_ForeignCurrency ON " & _
  1267.         " Cwzz_AccCode.ForeignCurrCode = Gy_ForeignCurrency.ForeignCurrCode WHERE " & _
  1268.         " (Cwzz_AccCode.EndFlag = 1 And Cwzz_AccCode.PersonFlag = 0 AND Cwzz_AccCode.CusFlag = 0 AND Cwzz_AccCode.SupplierFlag = 0 AND Cwzz_AccCode.DeptFlag = 0 AND Cwzz_AccCode.ItemFlag = 0) " & _
  1269.         "  AND (Cwzz_AccSum.Year =" & Int_Year & " AND Cwzz_AccSum.Period = 1) AND " & _
  1270.         " (Cwzz_AccSum.Byjfljje <> 0 OR Cwzz_AccSum.Bydfljje <> 0 OR Cwzz_AccSum.Byjfljsl <> 0 OR Cwzz_AccSum.Bydfljsl <> 0 OR Cwzz_AccSum.Byjfljwb <> 0 OR Cwzz_AccSum.Bydfljwb <> 0) " & _
  1271.         " Order By Cwzz_AccSum.Ccode"
  1272.         Set Rec_AccSum = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1273.         
  1274.         '从总帐辅助帐中读取所有 初始化会计年度 1会计期间各累计发生数有一个不为零的科目数据生成凭证的一部分.
  1275.         Sqlstr = "SELECT Cwzz_AccSumAssi.*,Cwzz_AccCode.ForeignCurrCode,Gy_ForeignCurrency.AccRate FROM Cwzz_AccSumAssi Left JOIN Cwzz_AccCode ON " & _
  1276.         " Cwzz_AccSumAssi.Ccode = Cwzz_AccCode.Ccode Left JOIN Gy_ForeignCurrency ON " & _
  1277.         " Cwzz_AccCode.ForeignCurrCode = Gy_ForeignCurrency.ForeignCurrCode WHERE " & _
  1278.         "  (Cwzz_AccSumAssi.Year =" & Int_Year & " AND Cwzz_AccSumAssi.Period = 1) AND " & _
  1279.         " (Cwzz_AccSumAssi.Byjfljje <> 0 OR Cwzz_AccSumAssi.Bydfljje <> 0 OR Cwzz_AccSumAssi.Byjfljsl <> 0 OR Cwzz_AccSumAssi.Bydfljsl <> 0 OR Cwzz_AccSumAssi.Byjfljwb <> 0 OR Cwzz_AccSumAssi.Bydfljwb <> 0 OR " & _
  1280.         "  Cwzz_AccSumAssi.ItemByljjfsl <> 0 OR Cwzz_AccSumAssi.ItemByljdfsl <> 0) " & _
  1281.         " Order By Cwzz_AccSumAssi.Ccode"
  1282.         Set Rec_AccSumAssi = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1283.         
  1284.         On Error GoTo Swcwcl
  1285.         
  1286.         Cw_DataEnvi.DataConnect.BeginTrans
  1287.         
  1288.         '如果动态集不为空则生成凭证
  1289.         If (Not Rec_AccSum.EOF) And (Not Rec_AccSumAssi.EOF) Then
  1290.             
  1291.             '生成凭证主表
  1292.             If Rec_AccVouchMain.State = 1 Then Rec_AccVouchMain.Close
  1293.             Rec_AccVouchMain.Open "Select * From Cwzz_AccVouchMain Where 1=2", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  1294.             
  1295.             With Rec_AccVouchMain
  1296.                 .AddNew
  1297.                 .Fields("VouchID") = CreatBillID("0101")
  1298.                 .Fields("Year") = Int_Year                                                                   '会计年度
  1299.                 .Fields("Period") = Int_Period                                                               '会计期间
  1300.                 .Fields("Ddate") = Dtm_DDate                                                                 '制单日期
  1301.                 .Fields("VouchClassCode") = Str_VouchClassCode                                               '凭证类别
  1302.                 .Fields("VouchNo") = 1                                                                       '凭证号
  1303.                 .Fields("Doc") = 0                                                                           '附单据数
  1304.                 .Fields("Bill") = Xtczy                                                                      '制单人
  1305.                 .Fields("CheckFlag") = 1                                                                     '审核标志置"1"
  1306.                 .Fields("BookFlag") = 1                                                                      '记帐标志置"1"
  1307.                 .Update
  1308.                 
  1309.                 Lng_VouchId = .Fields("VouchID")
  1310.                 
  1311.             End With
  1312.             
  1313.             '生成凭证子表
  1314.             Rowjsq = 0
  1315.             
  1316.             If Rec_AccVouch.State = 1 Then Rec_AccVouch.Close
  1317.             Rec_AccVouch.Open "Select * From Cwzz_AccVouchSub Where 1=2", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  1318.             
  1319.             '1.总帐生成凭证
  1320.             Do While Not Rec_AccSum.EOF
  1321.                 
  1322.                 '显示当前生成凭证会计科目
  1323.                 Lab_ShowCode.Caption = Trim(Rec_AccSum.Fields("Ccode"))
  1324.                 Lab_ShowCode.Refresh
  1325.                 
  1326.                 With Rec_AccVouch
  1327.                     
  1328.                     If Rec_AccSum.Fields("Byjfljje") <> 0 Or Rec_AccSum.Fields("Byjfljsl") <> 0 Or Rec_AccSum.Fields("Byjfljwb") <> 0 Then
  1329.                         
  1330.                         Rowjsq = Rowjsq + 1
  1331.                         .AddNew
  1332.                         .Fields("SerialID") = Rowjsq
  1333.                         .Fields("VouchID") = Lng_VouchId                                                             '凭证ID
  1334.                         .Fields("Digest") = "期初录入"                                                               '摘要
  1335.                         .Fields("Ccode") = Trim(Rec_AccSum.Fields("Ccode"))                                          '会计科目
  1336.                         .Fields("Jfje") = Rec_AccSum.Fields("Byjfljje") + 0                                          '借方金额
  1337.                         .Fields("Jfsl") = Rec_AccSum.Fields("Byjfljsl") + 0                                          '借方数量
  1338.                         If Len(Trim(Rec_AccSum.Fields("ForeignCurrCode") & "")) = 0 Then
  1339.                             .Fields("ForeignCurrCode") = XtSCurrCode                                                 '原币编码
  1340.                             .Fields("AccRate") = 1                                                                   '记帐汇率
  1341.                             .Fields("Wbjfje") = Rec_AccSum.Fields("Byjfljje") + 0                                    '外币借方金额
  1342.                         Else
  1343.                             .Fields("ForeignCurrCode") = Rec_AccSum.Fields("ForeignCurrCode")                        '原币编码
  1344.                             .Fields("AccRate") = Rec_AccSum.Fields("AccRate") + 0                                    '记帐汇率
  1345.                             .Fields("Wbjfje") = Rec_AccSum.Fields("Byjfljwb") + 0                                    '外币借方金额
  1346.                         End If
  1347.                         .Update
  1348.                     End If
  1349.                     
  1350.                     If Rec_AccSum.Fields("Bydfljje") <> 0 Or Rec_AccSum.Fields("Bydfljsl") <> 0 Or Rec_AccSum.Fields("Bydfljwb") <> 0 Then
  1351.                         
  1352.                         Rowjsq = Rowjsq + 1
  1353.                         .AddNew
  1354.                         .Fields("SerialID") = Rowjsq
  1355.                         .Fields("VouchID") = Lng_VouchId                                                             '凭证ID
  1356.                         .Fields("Digest") = "期初录入"                                                               '摘要
  1357.                         .Fields("Ccode") = Trim(Rec_AccSum.Fields("Ccode"))                                          '会计科目
  1358.                         .Fields("Dfje") = Rec_AccSum.Fields("Bydfljje") + 0                                          '贷方金额
  1359.                         .Fields("Dfsl") = Rec_AccSum.Fields("Bydfljsl") + 0                                          '贷方数量
  1360.                         If Len(Trim(Rec_AccSum.Fields("ForeignCurrCode") & "")) = 0 Then
  1361.                             .Fields("ForeignCurrCode") = XtSCurrCode                                                 '原币编码
  1362.                             .Fields("AccRate") = 1                                                                   '记帐汇率
  1363.                             .Fields("WbDfje") = Rec_AccSum.Fields("Bydfljje") + 0                                    '外币贷方金额
  1364.                         Else
  1365.                             .Fields("ForeignCurrCode") = Rec_AccSum.Fields("ForeignCurrCode")                        '原币编码
  1366.                             .Fields("AccRate") = Rec_AccSum.Fields("AccRate") + 0                                    '记帐汇率
  1367.                             .Fields("WbDfje") = Rec_AccSum.Fields("Bydfljwb") + 0                                    '外币贷方金额
  1368.                         End If
  1369.                         .Update
  1370.                     End If
  1371.                     
  1372.                 End With
  1373.                 
  1374.                 Rec_AccSum.MoveNext
  1375.             Loop
  1376.             
  1377.             '1.辅助帐生成凭证
  1378.             Do While Not Rec_AccSumAssi.EOF
  1379.                 
  1380.                 '显示当前生成凭证会计科目
  1381.                 Lab_ShowCode.Caption = Trim(Rec_AccSumAssi.Fields("Ccode"))
  1382.                 Lab_ShowCode.Refresh
  1383.                 
  1384.                 With Rec_AccVouch
  1385.                     
  1386.                     If Rec_AccSumAssi.Fields("Byjfljje") <> 0 Or Rec_AccSumAssi.Fields("Byjfljsl") <> 0 Or Rec_AccSumAssi.Fields("Byjfljwb") <> 0 Then
  1387.                         
  1388.                         Rowjsq = Rowjsq + 1
  1389.                         .AddNew
  1390.                         .Fields("SerialID") = Rowjsq
  1391.                         .Fields("VouchID") = Lng_VouchId                                                             '凭证ID
  1392.                         .Fields("Digest") = "期初录入"                                                               '摘要
  1393.                         .Fields("Ccode") = Trim(Rec_AccSumAssi.Fields("Ccode"))                                      '会计科目
  1394.                         .Fields("Jfje") = Rec_AccSumAssi.Fields("Byjfljje") + 0                                      '借方金额
  1395.                         .Fields("Jfsl") = Rec_AccSumAssi.Fields("Byjfljsl") + 0                                      '借方数量
  1396.                         If Len(Trim(Rec_AccSumAssi.Fields("ForeignCurrCode") & "")) = 0 Then
  1397.                             .Fields("ForeignCurrCode") = XtSCurrCode                                                 '原币编码
  1398.                             .Fields("AccRate") = 1                                                                   '记帐汇率
  1399.                             .Fields("Wbjfje") = Rec_AccSumAssi.Fields("Byjfljje") + 0                                '外币借方金额
  1400.                         Else
  1401.                             .Fields("ForeignCurrCode") = Rec_AccSumAssi.Fields("ForeignCurrCode")                    '原币编码
  1402.                             .Fields("AccRate") = Rec_AccSumAssi.Fields("AccRate") + 0                                '记帐汇率
  1403.                             .Fields("Wbjfje") = Rec_AccSumAssi.Fields("Byjfljwb") + 0                                '外币借方金额
  1404.                         End If
  1405.                         
  1406.                         .Fields("PersonCode") = Trim(Rec_AccSumAssi.Fields("PersonCode") & "")                         '职员编码
  1407.                         
  1408.                         .Fields("DeptCode") = Trim(Rec_AccSumAssi.Fields("DeptCode") & "")                             '部门编码
  1409.                         
  1410.                         .Fields("CusCode") = Trim(Rec_AccSumAssi.Fields("CusCode") & "")                               '往来客户编码
  1411.                         
  1412.                         .Fields("SupplierCode") = Trim(Rec_AccSumAssi.Fields("SupplierCode") & "")                     '往来供应商编码
  1413.                         
  1414.                         .Fields("ItemClassCode") = Trim(Rec_AccSumAssi.Fields("ItemClassCode") & "")                   '项目大类编码
  1415.                         
  1416.                         .Fields("ItemCode") = Trim(Rec_AccSumAssi.Fields("ItemCode") & "")                             '项目编码
  1417.                         
  1418.                         .Fields("ItemJfsl") = Rec_AccSumAssi.Fields("ItemByljjfsl") + 0                                '项目借方数量
  1419.                         
  1420.                         .Update
  1421.                     End If
  1422.                     
  1423.                     If Rec_AccSumAssi.Fields("Bydfljje") <> 0 Or Rec_AccSumAssi.Fields("Bydfljsl") <> 0 Or Rec_AccSumAssi.Fields("Bydfljwb") <> 0 Then
  1424.                         
  1425.                         Rowjsq = Rowjsq + 1
  1426.                         .AddNew
  1427.                         .Fields("SerialID") = Rowjsq
  1428.                         .Fields("VouchID") = Lng_VouchId                                                             '凭证ID
  1429.                         .Fields("Digest") = "期初录入"                                                               '摘要
  1430.                         .Fields("Ccode") = Trim(Rec_AccSumAssi.Fields("Ccode"))                                          '会计科目
  1431.                         .Fields("Dfje") = Rec_AccSumAssi.Fields("Bydfljje") + 0                                          '贷方金额
  1432.                         .Fields("Dfsl") = Rec_AccSumAssi.Fields("Bydfljsl") + 0                                          '贷方数量
  1433.                         If Len(Trim(Rec_AccSumAssi.Fields("ForeignCurrCode") & "")) = 0 Then
  1434.                             .Fields("ForeignCurrCode") = XtSCurrCode                                                 '原币编码
  1435.                             .Fields("AccRate") = 1                                                                   '记帐汇率
  1436.                             .Fields("WbDfje") = Rec_AccSumAssi.Fields("Bydfljje") + 0                                    '外币贷方金额
  1437.                         Else
  1438.                             .Fields("ForeignCurrCode") = Rec_AccSumAssi.Fields("ForeignCurrCode")                        '原币编码
  1439.                             .Fields("AccRate") = Rec_AccSumAssi.Fields("AccRate") + 0                                    '记帐汇率
  1440.                             .Fields("WbDfje") = Rec_AccSumAssi.Fields("Bydfljwb") + 0                                    '外币贷方金额
  1441.                         End If
  1442.                         
  1443.                         .Fields("PersonCode") = Trim(Rec_AccSumAssi.Fields("PersonCode") & "")                       '职员编码
  1444.                         
  1445.                         .Fields("DeptCode") = Trim(Rec_AccSumAssi.Fields("DeptCode") & "")                             '部门编码
  1446.                         
  1447.                         .Fields("CusCode") = Trim(Rec_AccSumAssi.Fields("CusCode") & "")                               '往来客户编码
  1448.                         
  1449.                         .Fields("SupplierCode") = Trim(Rec_AccSumAssi.Fields("SupplierCode") & "")                     '往来供应商编码
  1450.                         
  1451.                         .Fields("ItemClassCode") = Trim(Rec_AccSumAssi.Fields("ItemClassCode") & "")                   '项目大类编码
  1452.                         
  1453.                         .Fields("ItemCode") = Trim(Rec_AccSumAssi.Fields("ItemCode") & "")                             '项目编码
  1454.                         
  1455.                         .Fields("ItemDfsl") = Rec_AccSumAssi.Fields("ItemByljdfsl") + 0                                '项目借方数量
  1456.                         
  1457.                         .Update
  1458.                     End If
  1459.                     
  1460.                 End With
  1461.                 
  1462.                 Rec_AccSumAssi.MoveNext
  1463.                 
  1464.             Loop
  1465.         End If
  1466.         
  1467.         '将期初录入标志置1
  1468.         Cw_DataEnvi.DataConnect.Execute ("Update Gy_AccInformation Set ItemValue=1 Where ItemCode='Cwzz_Qclrwc'")
  1469.         
  1470.         Cw_DataEnvi.DataConnect.CommitTrans
  1471.         
  1472.     Else
  1473.         
  1474.         '将期初录入标志置1
  1475.         Cw_DataEnvi.DataConnect.Execute ("Update Gy_AccInformation Set ItemValue=1 Where ItemCode='Cwzz_Qclrwc'")
  1476.         
  1477.     End If
  1478.     
  1479.     Tsxx = "总帐系统已成功初始化完成!"
  1480.     Call Xtxxts(Tsxx, 0, 4)
  1481.     Unload Me
  1482.     Exit Sub
  1483. Swcwcl:
  1484.     Cw_DataEnvi.DataConnect.RollbackTrans
  1485.     Tsxx = "生成凭证过程中出现错误,程序自动恢复生成前状态!"
  1486.     Call Xtxxts(Tsxx, 0, 1)
  1487.     Exit Sub
  1488.     
  1489. End Sub
  1490. Private Sub GsToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)       '网格格式调整
  1491.     Select Case Button.Key
  1492.     Case "bcgs"                                          '保存表格格式
  1493.         Call Bcwggs(CxbbGrid, GridCode, GridStr)
  1494.     Case "hfmrgs"                                        '恢复默认格式
  1495.         Call Hfmrgs(CxbbGrid, GridCode, GridStr)
  1496.     Case "szxsxm"                                        '设置显示项目
  1497.         Call Szxsxm(CxbbGrid, GridCode)
  1498.     End Select
  1499. End Sub
  1500. Private Sub Tlb_Action_ButtonClick(ByVal Button As MSComctlLib.Button)
  1501.     Select Case Button.Key
  1502.     Case "ymsz"                                          '页面设置
  1503.         Dyymctbl.Show 1
  1504.     Case "yl"                                            '预 览
  1505.         Call bbyl(True)
  1506.     Case "dy"                                            '打 印
  1507.         Call bbyl(False)
  1508.     Case "dz"                                            '对 帐
  1509.         Call Sub_AccCheck
  1510.     Case "bz"                                            '帮 助
  1511.         Call F1bz
  1512.     Case "fh"                                            '退 出
  1513.         Unload Me
  1514.     End Select
  1515. End Sub
  1516. Private Sub Sub_AccCheck()                                                                  '帐目核对
  1517.     Dim Int_CheckSele As Integer
  1518.     
  1519.     '初始化对帐结果显示
  1520.     CxbbGrid.Rows = CxbbGrid.FixedRows
  1521.     CxbbGrid.Refresh
  1522.     For Jsqte = 0 To 5
  1523.         Lab_CheckJg(Jsqte).Visible = False
  1524.         Lab_Check1(Jsqte).ForeColor = &H80000012
  1525.     Next Jsqte
  1526.     If Fun_Hdsxjkm Then
  1527.         Lab_CheckJg(0).Visible = True
  1528.         Int_DZ_OK = 1
  1529.     Else
  1530.         Int_DZ_OK = 0
  1531.     End If
  1532.     
  1533.     For Int_CheckSele = 1 To 5
  1534.         If Fun_HdZzFzz(Int_CheckSele) Then
  1535.             Lab_CheckJg(Int_CheckSele).Visible = True
  1536.             Int_DZ_OK = IIf(Int_DZ_OK = 1, 1, 0)
  1537.         Else
  1538.             Int_DZ_OK = 0
  1539.         End If
  1540.     Next Int_CheckSele
  1541.     
  1542.     Lab_Ccode = ""
  1543. End Sub
  1544. '核对辅助帐
  1545. Private Function Fun_HdZzFzz(Int_CheckSele As Integer) As Boolean                                                    '核对总帐与辅助帐(客户)是否平衡
  1546.     
  1547.     '1-部门 2-客户 3-供应商 4-个人 5-项目
  1548.     
  1549.     Dim RecTemp As New ADODB.Recordset                   '临时使用动态集
  1550.     Dim Rec_AccSum As New ADODB.Recordset                '科目总帐动态集
  1551.     Dim Sqlstr As String                                 '临时查询字符串
  1552.     Dim Int_NotCheck As Integer                          '未能核对通过科目个数
  1553.     
  1554.     Lab_Check1(Int_CheckSele).ForeColor = &HFF&
  1555.     Int_NotCheck = 0
  1556.     
  1557.     Select Case Int_CheckSele
  1558.     Case 1
  1559.         Sqlstr = "SELECT Cwzz_AccCode.Ccode, Ycye=ISNULL(Ycye,0), Qcye=IsNULL(Qcye,0), Mjje=ISNULL(Mjje,0), Mdje=ISNULL(Mdje,0), Byjfljje=ISNULL(Byjfljje,0), Bydfljje=ISNULL(Bydfljje,0), Qmye=ISNULL(Qmye,0)" & _
  1560.         " FROM  Cwzz_AccCode LEFT OUTER JOIN Cwzz_AccSum ON" & _
  1561.         " Cwzz_AccCode.Ccode = Cwzz_AccSum.Ccode And Cwzz_AccSum.Year = " & Int_Year & " And Period =" & Int_Period & _
  1562.         " Where Cwzz_AccCode.DeptFlag=1 And Cwzz_AccCode.EndFlag=1"
  1563.     Case 2
  1564.         Sqlstr = "SELECT Cwzz_AccCode.Ccode, Ycye=ISNULL(Ycye,0), Qcye=IsNULL(Qcye,0), Mjje=ISNULL(Mjje,0), Mdje=ISNULL(Mdje,0), Byjfljje=ISNULL(Byjfljje,0), Bydfljje=ISNULL(Bydfljje,0), Qmye=ISNULL(Qmye,0)" & _
  1565.         " FROM  Cwzz_AccCode LEFT OUTER JOIN Cwzz_AccSum ON" & _
  1566.         " Cwzz_AccCode.Ccode = Cwzz_AccSum.Ccode And Cwzz_AccSum.Year = " & Int_Year & " And Period =" & Int_Period & _
  1567.         " Where Cwzz_AccCode.CusFlag=1 And Cwzz_AccCode.EndFlag=1"
  1568.     Case 3
  1569.         Sqlstr = "SELECT Cwzz_AccCode.Ccode, Ycye=ISNULL(Ycye,0), Qcye=IsNULL(Qcye,0), Mjje=ISNULL(Mjje,0), Mdje=ISNULL(Mdje,0), Byjfljje=ISNULL(Byjfljje,0), Bydfljje=ISNULL(Bydfljje,0), Qmye=ISNULL(Qmye,0)" & _
  1570.         " FROM  Cwzz_AccCode LEFT OUTER JOIN Cwzz_AccSum ON" & _
  1571.         " Cwzz_AccCode.Ccode = Cwzz_AccSum.Ccode And Cwzz_AccSum.Year = " & Int_Year & " And Period =" & Int_Period & _
  1572.         " Where Cwzz_AccCode.SupplierFlag=1 And Cwzz_AccCode.EndFlag=1"
  1573.     Case 4
  1574.         Sqlstr = "SELECT Cwzz_AccCode.Ccode, Ycye=ISNULL(Ycye,0), Qcye=IsNULL(Qcye,0), Mjje=ISNULL(Mjje,0), Mdje=ISNULL(Mdje,0), Byjfljje=ISNULL(Byjfljje,0), Bydfljje=ISNULL(Bydfljje,0), Qmye=ISNULL(Qmye,0)" & _
  1575.         " FROM  Cwzz_AccCode LEFT OUTER JOIN Cwzz_AccSum ON" & _
  1576.         " Cwzz_AccCode.Ccode = Cwzz_AccSum.Ccode And Cwzz_AccSum.Year = " & Int_Year & " And Period =" & Int_Period & _
  1577.         " Where Cwzz_AccCode.PersonFlag=1 And Cwzz_AccCode.EndFlag=1"
  1578.     Case 5
  1579.         Sqlstr = "SELECT Cwzz_AccCode.Ccode,Cwzz_AccCode.ItemClassCode,Ycye=ISNULL(Ycye,0), Qcye=IsNULL(Qcye,0), Mjje=ISNULL(Mjje,0), Mdje=ISNULL(Mdje,0), Byjfljje=ISNULL(Byjfljje,0), Bydfljje=ISNULL(Bydfljje,0), Qmye=ISNULL(Qmye,0)" & _
  1580.         " FROM  Cwzz_AccCode LEFT OUTER JOIN Cwzz_AccSum ON" & _
  1581.         " Cwzz_AccCode.Ccode = Cwzz_AccSum.Ccode And Cwzz_AccSum.Year = " & Int_Year & " And Period =" & Int_Period & _
  1582.         " Where Cwzz_AccCode.ItemFlag=1 And Cwzz_AccCode.EndFlag=1"
  1583.     End Select
  1584.     Set Rec_AccSum = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1585.     With Rec_AccSum
  1586.         Do While Not .EOF
  1587.             Lab_Ccode.Caption = Trim(.Fields("Ccode"))
  1588.             Lab_Ccode.Refresh
  1589.             
  1590.             Sqlstr = "SELECT YcyeHj=IsNull(SUM(Ycye),0), QcyeHj=Isnull(SUM(Qcye),0),MjjeHj=Isnull(SUM(Mjje),0), MdjeHj=Isnull(SUM(Mdje),0)," & _
  1591.             " ByjfljjeHj=IsNull(SUM(Byjfljje),0), BydfljjeHj=IsNull(SUM(Bydfljje),0),Qmyehj=IsNull(SUM(Qmye),0)" & _
  1592.             " FROM Cwzz_AccSumAssi " & _
  1593.             " WHERE Cwzz_AccSumAssi.Ccode ='" & Trim(.Fields("Ccode")) & "' AND Year = " & Int_Year & " AND Period =" & Int_Period
  1594.             Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1595.             If Not RecTemp.EOF Then
  1596.                 If .Fields("Ycye") <> RecTemp.Fields("YcyeHj") Or .Fields("Qcye") <> RecTemp.Fields("Qcyehj") Or .Fields("Mjje") <> RecTemp.Fields("MjjeHj") Or .Fields("Mdje") <> RecTemp.Fields("MdjeHj") Or .Fields("Byjfljje") <> RecTemp.Fields("Byjfljjehj") Or .Fields("Bydfljje") <> RecTemp.Fields("Bydfljjehj") Or .Fields("Qmye") <> RecTemp.Fields("Qmyehj") Then
  1597.                     Int_NotCheck = Int_NotCheck + 1
  1598.                     '填充记录错误列表
  1599.                     Call Sub_AddRec(Trim(.Fields("Ccode")), "总帐", .Fields("Ycye"), .Fields("Qcye"), .Fields("Mjje"), .Fields("Mdje"), .Fields("Byjfljje"), .Fields("Bydfljje"), .Fields("Qmye"))
  1600.                     Select Case Int_CheckSele
  1601.                     Case 1
  1602.                         Call Sub_AddRec(Trim(.Fields("Ccode")), "部门帐", RecTemp.Fields("Ycyehj"), RecTemp.Fields("Qcyehj"), RecTemp.Fields("Mjjehj"), RecTemp.Fields("Mdjehj"), RecTemp.Fields("Byjfljjehj"), RecTemp.Fields("Bydfljjehj"), RecTemp.Fields("Qmyehj"))
  1603.                     Case 2
  1604.                         Call Sub_AddRec(Trim(.Fields("Ccode")), "客户帐", RecTemp.Fields("Ycyehj"), RecTemp.Fields("Qcyehj"), RecTemp.Fields("Mjjehj"), RecTemp.Fields("Mdjehj"), RecTemp.Fields("Byjfljjehj"), RecTemp.Fields("Bydfljjehj"), RecTemp.Fields("Qmyehj"))
  1605.                     Case 3
  1606.                         Call Sub_AddRec(Trim(.Fields("Ccode")), "供应商帐", RecTemp.Fields("Ycyehj"), RecTemp.Fields("Qcyehj"), RecTemp.Fields("Mjjehj"), RecTemp.Fields("Mdjehj"), RecTemp.Fields("Byjfljjehj"), RecTemp.Fields("Bydfljjehj"), RecTemp.Fields("Qmyehj"))
  1607.                     Case 4
  1608.                         Call Sub_AddRec(Trim(.Fields("Ccode")), "个人帐", RecTemp.Fields("Ycyehj"), RecTemp.Fields("Qcyehj"), RecTemp.Fields("Mjjehj"), RecTemp.Fields("Mdjehj"), RecTemp.Fields("Byjfljjehj"), RecTemp.Fields("Bydfljjehj"), RecTemp.Fields("Qmyehj"))
  1609.                     Case 5
  1610.                         Call Sub_AddRec(Trim(.Fields("Ccode")), "项目帐", RecTemp.Fields("Ycyehj"), RecTemp.Fields("Qcyehj"), RecTemp.Fields("Mjjehj"), RecTemp.Fields("Mdjehj"), RecTemp.Fields("Byjfljjehj"), RecTemp.Fields("Bydfljjehj"), RecTemp.Fields("Qmyehj"))
  1611.                     End Select
  1612.                 End If
  1613.             End If
  1614.             
  1615.             .MoveNext
  1616.         Loop
  1617.     End With
  1618.     If Int_NotCheck <> 0 Then
  1619.         Fun_HdZzFzz = False
  1620.     Else
  1621.         Fun_HdZzFzz = True
  1622.         Lab_Check1(Int_CheckSele).ForeColor = &H80000012
  1623.     End If
  1624. End Function
  1625. Private Function Fun_Hdsxjkm() As Boolean                                                   '核对总帐上下级科目是否平衡
  1626.     Dim RecTemp As New ADODB.Recordset                   '临时使用动态集
  1627.     Dim Rec_AccSum As New ADODB.Recordset                '科目总帐动态集
  1628.     Dim Sqlstr As String                                 '临时查询字符串
  1629.     Dim Int_NotCheck As Integer                          '未能核对通过科目个数
  1630.     
  1631.     Lab_Check1(Int_CheckSele).ForeColor = &HFF&
  1632.     Int_NotCheck = 0
  1633.     
  1634.     Sqlstr = "SELECT Cwzz_AccCode.Ccode, Ycye=ISNULL(Ycye,0), Qcye=IsNULL(Qcye,0), Mjje=ISNULL(Mjje,0), Mdje=ISNULL(Mdje,0), Byjfljje=ISNULL(Byjfljje,0), Bydfljje=ISNULL(Bydfljje,0), Qmye=ISNULL(Qmye,0)" & _
  1635.     " FROM  Cwzz_AccCode LEFT OUTER JOIN Cwzz_AccSum ON" & _
  1636.     " Cwzz_AccCode.Ccode = Cwzz_AccSum.Ccode And Cwzz_AccSum.Year = " & Int_Year & " And Period =" & Int_Period & _
  1637.     " Where Cwzz_AccCode.EndFlag=0"
  1638.     Set Rec_AccSum = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1639.     With Rec_AccSum
  1640.         Do While Not .EOF
  1641.             Lab_Ccode.Caption = Trim(.Fields("Ccode"))
  1642.             Lab_Ccode.Refresh
  1643.             
  1644.             Sqlstr = "SELECT SUM(Ycye) AS YcyeHj, SUM(Qcye) AS QcyeHj, SUM(Mjje) AS MjjeHj, SUM(Mdje) AS MdjeHj," & _
  1645.             " SUM(Byjfljje) AS ByjfljjeHj, SUM(Bydfljje) AS BydfljjeHj, SUM(Qmye) AS Qmyehj" & _
  1646.             " FROM Cwzz_AccSum LEFT OUTER JOIN Cwzz_AccCode ON Cwzz_AccSum.Ccode = Cwzz_AccCode.Ccode" & _
  1647.             " WHERE Cwzz_AccSum.Ccode LIKE '" & Trim(.Fields("Ccode")) & "%' AND Year = " & Int_Year & " AND Period =" & Int_Period & " AND Cwzz_AccCode.EndFlag = 1"
  1648.             Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1649.             If Not RecTemp.EOF Then
  1650.                 If .Fields("Ycye") <> RecTemp.Fields("YcyeHj") Or .Fields("Qcye") <> RecTemp.Fields("Qcyehj") Or .Fields("Mjje") <> RecTemp.Fields("MjjeHj") Or .Fields("Mdje") <> RecTemp.Fields("MdjeHj") Or .Fields("Byjfljje") <> RecTemp.Fields("Byjfljjehj") Or .Fields("Bydfljje") <> RecTemp.Fields("Bydfljjehj") Or .Fields("Qmye") <> RecTemp.Fields("Qmyehj") Then
  1651.                     Int_NotCheck = Int_NotCheck + 1
  1652.                     
  1653.                     '填充记录错误列表
  1654.                     Call Sub_AddRec(Trim(.Fields("Ccode")), "总帐上级", .Fields("Ycye"), .Fields("Qcye"), .Fields("Mjje"), .Fields("Mdje"), .Fields("Byjfljje"), .Fields("Bydfljje"), .Fields("Qmye"))
  1655.                     Call Sub_AddRec(Trim(.Fields("Ccode")), "总帐下级", RecTemp.Fields("Ycyehj"), RecTemp.Fields("Qcyehj"), RecTemp.Fields("Mjjehj"), RecTemp.Fields("Mdjehj"), RecTemp.Fields("Byjfljjehj"), RecTemp.Fields("Bydfljjehj"), RecTemp.Fields("Qmyehj"))
  1656.                     
  1657.                 End If
  1658.             Else
  1659.                 If .Fields("Ycye") <> 0 Or .Fields("Qcye") <> 0 Or .Fields("Mjje") <> 0 Or .Fields("Mdje") <> 0 Or .Fields("Byjfljje") <> 0 Or .Fields("Bydfljje") <> 0 Or .Fields("Qmye") <> 0 Then
  1660.                     '填充记录错误列表
  1661.                     Call Sub_AddRec(Trim(.Fields("Ccode")), "总帐上级", .Fields("Ycye"), .Fields("Qcye"), .Fields("Mjje"), .Fields("Mdje"), .Fields("Byjfljje"), .Fields("Bydfljje"), .Fields("Qmye"))
  1662.                     Call Sub_AddRec(Trim(.Fields("Ccode")), "总帐下级", 0, 0, 0, 0, 0, 0, 0)
  1663.                 End If
  1664.             End If
  1665.             .MoveNext
  1666.         Loop
  1667.     End With
  1668.     If Int_NotCheck <> 0 Then
  1669.         Fun_Hdsxjkm = False
  1670.     Else
  1671.         Fun_Hdsxjkm = True
  1672.         Lab_Check1(Int_CheckSele).ForeColor = &H80000012
  1673.     End If
  1674. End Function
  1675. Private Sub Sub_AddRec(Str_Ccode As String, CheckItem As String, Ycye#, Qcye#, Mjje#, Mdje#, Byjfljje#, Bydfljje#, Qmye#)            '填充对帐错误记录
  1676.     '函数参数说明:科目编码,核对项目,年初余额,期初余额,本期借方发生,本期贷方发生,本年累计借方发生,本年累计贷方发生,期末余额
  1677.     
  1678.     Dim RecTemp As New ADODB.Recordset                   '临时使用动态集
  1679.     Dim Sqlstr As String                                 '临时查询字符串
  1680.     Sqlstr = "SELECT Cwzz_AccCode.CName,BalanceOri From Cwzz_AccCode Where CCode='" & Str_Ccode & "'"
  1681.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1682.     With CxbbGrid
  1683.         .AddItem ""
  1684.         .RowHeight(.Rows - 1) = Sjhgd
  1685.         .TextMatrix(.Rows - 1, Sydz("001", GridStr(), Szzls)) = Str_Ccode                                   '科目编码
  1686.         If Not RecTemp.EOF Then
  1687.             .TextMatrix(.Rows - 1, Sydz("002", GridStr(), Szzls)) = Trim(RecTemp.Fields("Cname") & "")       '科目名称
  1688.         End If
  1689.         .TextMatrix(.Rows - 1, Sydz("003", GridStr(), Szzls)) = CheckItem                                   '核对项目
  1690.         If Not RecTemp.EOF Then
  1691.             .TextMatrix(.Rows - 1, Sydz("004", GridStr(), Szzls)) = Trim(RecTemp.Fields("BalanceOri"))       '余额方向
  1692.         End If
  1693.         If Ycye <> 0 Then                                                                                   '年初余额
  1694.             If .TextMatrix(.Rows - 1, Sydz("004", GridStr(), Szzls)) = "借" Then
  1695.                 .TextMatrix(.Rows - 1, Sydz("005", GridStr(), Szzls)) = Ycye
  1696.             Else
  1697.                 .TextMatrix(.Rows - 1, Sydz("005", GridStr(), Szzls)) = -Ycye
  1698.             End If
  1699.         End If
  1700.         If Qcye <> 0 Then                                                                                   '期初余额
  1701.             If .TextMatrix(.Rows - 1, Sydz("004", GridStr(), Szzls)) = "借" Then
  1702.                 .TextMatrix(.Rows - 1, Sydz("006", GridStr(), Szzls)) = Qcye
  1703.             Else
  1704.                 .TextMatrix(.Rows - 1, Sydz("006", GridStr(), Szzls)) = -Qcye
  1705.             End If
  1706.         End If
  1707.         If Mjje <> 0 Then                                                                                   '本期借方发生
  1708.             .TextMatrix(.Rows - 1, Sydz("007", GridStr(), Szzls)) = Mjje
  1709.         End If
  1710.         If Mdje <> 0 Then                                                                                   '本期贷方发生
  1711.             .TextMatrix(.Rows - 1, Sydz("008", GridStr(), Szzls)) = Mdje
  1712.         End If
  1713.         If Byjfljje <> 0 Then                                                                               '本年借方累计发生
  1714.             .TextMatrix(.Rows - 1, Sydz("009", GridStr(), Szzls)) = Byjfljje
  1715.         End If
  1716.         If Bydfljje <> 0 Then                                                                               '本年贷方累计发生
  1717.             .TextMatrix(.Rows - 1, Sydz("010", GridStr(), Szzls)) = Bydfljje
  1718.         End If
  1719.         If Qmye <> 0 Then                                                                                   '期末余额
  1720.             If .TextMatrix(.Rows - 1, Sydz("004", GridStr(), Szzls)) = "借" Then
  1721.                 .TextMatrix(.Rows - 1, Sydz("011", GridStr(), Szzls)) = Qmye
  1722.             Else
  1723.                 .TextMatrix(.Rows - 1, Sydz("011", GridStr(), Szzls)) = -Qmye
  1724.             End If
  1725.         End If
  1726.     End With
  1727. End Sub
  1728. Private Sub bbyl(bbylte As Boolean)                    '报表打印预览
  1729.     Dim Bbzbt$, Bbxbt() As String, bbxbtzzxs() As Integer, Bbxbtgs As Integer
  1730.     Dim Bbbwh() As String, Bbbwhzzxs() As Integer, Bbbwhgs As Integer
  1731.     Bbxbtgs = 1                                          '报 表 小 标 题 行 数
  1732.     Bbbwhgs = 0                                          '报 表 表 尾 行 数
  1733.     ReDim Bbxbt(1 To Bbxbtgs)
  1734.     ReDim bbxbtzzxs(1 To Bbxbtgs)
  1735.     If Bbbwhgs <> 0 Then
  1736.         ReDim Bbbwh(1 To Bbbwhgs)
  1737.         ReDim Bbbwhzzxs(1 To Bbbwhgs)
  1738.     End If
  1739.     Bbzbt = ReportTitle
  1740.     Bbxbt(1) = " "
  1741.     bbxbtzzxs(1) = 0                                     '报表行组织形式(0-居左 1-居中 2-居右)
  1742.     Call Scyxsjb(CxbbGrid)                               '生成报表数据
  1743.     Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, bbylte)
  1744.     If Not bbylte Then
  1745.         Unload DY_Tybbyldy
  1746.     End If
  1747. End Sub