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

企业管理

开发平台:

Visual Basic

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