资源名称:ERPSYS.zip [点击查看]
上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:71k
源码类别:
企业管理
开发平台:
Visual Basic
- VERSION 5.00
- Object = "{BEEECC20-4D5F-4F8B-BFDC-5D9B6FBDE09D}#1.0#0"; "vsflex8.ocx"
- Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
- Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
- Begin VB.Form YM_FrmYmjz
- BorderStyle = 3 'Fixed Dialog
- Caption = "月末结帐"
- ClientHeight = 5910
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 8340
- Icon = "月末结帐_月末结帐.frx":0000
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 5910
- ScaleWidth = 8340
- ShowInTaskbar = 0 'False
- StartUpPosition = 2 '屏幕中心
- Begin VB.CommandButton cmdCancel1
- Caption = "关闭(&C)"
- Default = -1 'True
- Height = 300
- Left = 6975
- TabIndex = 0
- Top = 5520
- Width = 1120
- End
- Begin TabDlg.SSTab StTab
- Height = 5475
- Left = 30
- TabIndex = 1
- Top = 0
- Width = 8280
- _ExtentX = 14605
- _ExtentY = 9657
- _Version = 393216
- Style = 1
- Tabs = 4
- TabsPerRow = 4
- TabHeight = 520
- TabCaption(0) = "结帐提示"
- TabPicture(0) = "月末结帐_月末结帐.frx":1042
- Tab(0).ControlEnabled= -1 'True
- Tab(0).Control(0)= "Frame1"
- Tab(0).Control(0).Enabled= 0 'False
- Tab(0).ControlCount= 1
- TabCaption(1) = "试算平衡"
- TabPicture(1) = "月末结帐_月末结帐.frx":105E
- Tab(1).ControlEnabled= 0 'False
- Tab(1).Control(0)= "Frame2"
- Tab(1).ControlCount= 1
- TabCaption(2) = "核对帐簿"
- TabPicture(2) = "月末结帐_月末结帐.frx":107A
- Tab(2).ControlEnabled= 0 'False
- Tab(2).Control(0)= "Frame3"
- Tab(2).ControlCount= 1
- TabCaption(3) = "结帐确认"
- TabPicture(3) = "月末结帐_月末结帐.frx":1096
- Tab(3).ControlEnabled= 0 'False
- Tab(3).Control(0)= "Frame4"
- Tab(3).ControlCount= 1
- Begin VB.Frame Frame1
- Height = 5025
- Left = 120
- TabIndex = 54
- Top = 360
- Width = 8055
- Begin VB.Timer Timer2
- Enabled = 0 'False
- Interval = 500
- Left = 4050
- Top = 2070
- End
- Begin VB.CommandButton cmdNext1
- Caption = "下一步(&N)"
- Enabled = 0 'False
- Height = 300
- Left = 6810
- TabIndex = 56
- Top = 4560
- Width = 1120
- End
- Begin MSComctlLib.ListView lst_NotBook
- Height = 1575
- Left = 240
- TabIndex = 55
- Top = 2880
- Visible = 0 'False
- Width = 7695
- _ExtentX = 13573
- _ExtentY = 2778
- View = 3
- LabelWrap = -1 'True
- HideSelection = -1 'True
- _Version = 393217
- ForeColor = -2147483640
- BackColor = -2147483643
- BorderStyle = 1
- Appearance = 1
- NumItems = 3
- BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628}
- Text = "凭证日期"
- Object.Width = 3528
- EndProperty
- BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628}
- SubItemIndex = 1
- Text = "凭证摘要"
- Object.Width = 5821
- EndProperty
- BeginProperty ColumnHeader(3) {BDD1F052-858B-11D1-B16A-00C0F0283628}
- SubItemIndex = 2
- Text = "填制人员"
- Object.Width = 3528
- EndProperty
- End
- Begin VB.Label labState
- BackColor = &H00C0C0C0&
- Caption = "正在检测未记帐凭证..."
- ForeColor = &H00FF0000&
- Height = 195
- Left = 270
- TabIndex = 65
- Top = 4560
- Width = 1905
- End
- Begin VB.Label Label1
- Caption = "结帐注意事项:"
- Height = 285
- Left = 270
- TabIndex = 63
- Top = 960
- Width = 1395
- End
- Begin VB.Label Label2
- Caption = "1.已结帐月份不能再填制凭证,各会计期间只能按顺序结帐"
- Height = 255
- Index = 0
- Left = 270
- TabIndex = 62
- Top = 1380
- Width = 4665
- End
- Begin VB.Label Label2
- Caption = "2.当前会计期间如存在未记帐凭证则不能结帐"
- Height = 255
- Index = 1
- Left = 270
- TabIndex = 61
- Top = 1650
- Width = 3675
- End
- Begin VB.Label Label2
- Caption = "3.试算不平衡则不能结帐"
- Height = 195
- Index = 2
- Left = 270
- TabIndex = 60
- Top = 1920
- Visible = 0 'False
- Width = 2115
- End
- Begin VB.Label Label3
- Caption = "4.对帐不正确则不能结帐"
- Height = 285
- Left = 270
- TabIndex = 59
- Top = 2160
- Visible = 0 'False
- Width = 2235
- End
- Begin VB.Label lab_NotBookInfor
- Caption = "提示:本会计期间存在未记帐凭证"
- ForeColor = &H000000FF&
- Height = 255
- Left = 240
- TabIndex = 58
- Top = 2640
- Visible = 0 'False
- Width = 3675
- End
- Begin VB.Label Lab_jzyf
- Caption = "2003年01月月末结帐"
- BeginProperty Font
- Name = "宋体"
- Size = 12
- Charset = 134
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00000000&
- Height = 255
- Left = 2970
- TabIndex = 57
- Top = 360
- Width = 2475
- End
- End
- Begin VB.Frame Frame2
- Height = 5025
- Left = -74880
- TabIndex = 34
- Top = 360
- Width = 8055
- Begin VB.PictureBox Picture1
- Height = 4005
- Left = 210
- ScaleHeight = 3945
- ScaleWidth = 7575
- TabIndex = 38
- Top = 330
- Width = 7635
- Begin VB.Timer Timer1
- Interval = 100
- Left = 1890
- Top = 2970
- End
- Begin VB.Label Lab_CodeClass
- AutoSize = -1 'True
- Caption = "资产="
- Height = 180
- Index = 0
- Left = 1200
- TabIndex = 53
- Top = 360
- Width = 450
- End
- Begin VB.Label Lab_CodeClass
- AutoSize = -1 'True
- Caption = "负债="
- Height = 180
- Index = 1
- Left = 3750
- TabIndex = 52
- Top = 360
- Width = 450
- End
- Begin VB.Label Lab_CodeClass
- AutoSize = -1 'True
- Caption = "权益="
- Height = 180
- Index = 2
- Left = 3750
- TabIndex = 51
- Top = 870
- Width = 450
- End
- Begin VB.Label Lab_CodeClass
- AutoSize = -1 'True
- Caption = "成本="
- Height = 180
- Index = 3
- Left = 1200
- TabIndex = 50
- Top = 870
- Width = 450
- End
- Begin VB.Label Lab_CodeClass
- AutoSize = -1 'True
- Caption = "损益="
- Height = 180
- Index = 4
- Left = 3750
- TabIndex = 49
- Top = 1350
- Width = 450
- End
- Begin VB.Label Lab_CodeClass
- AutoSize = -1 'True
- Caption = "合计="
- Height = 180
- Index = 5
- Left = 1200
- TabIndex = 48
- Top = 2220
- Width = 450
- End
- Begin VB.Label Lab_CodeClass
- AutoSize = -1 'True
- Caption = "合计="
- Height = 180
- Index = 6
- Left = 3750
- TabIndex = 47
- Top = 2220
- Width = 450
- End
- Begin VB.Label Lab_Phjg
- ForeColor = &H000080FF&
- Height = 375
- Left = 1200
- TabIndex = 46
- Top = 2850
- Width = 2565
- End
- Begin VB.Label Lab_Qcyesj
- AutoSize = -1 'True
- Height = 180
- Index = 0
- Left = 1770
- TabIndex = 45
- Top = 360
- Width = 1740
- End
- Begin VB.Label Lab_Qcyesj
- AutoSize = -1 'True
- Height = 180
- Index = 1
- Left = 4380
- TabIndex = 44
- Top = 360
- Width = 2250
- End
- Begin VB.Label Lab_Qcyesj
- AutoSize = -1 'True
- Height = 180
- Index = 2
- Left = 4380
- TabIndex = 43
- Top = 870
- Width = 90
- End
- Begin VB.Label Lab_Qcyesj
- AutoSize = -1 'True
- Height = 180
- Index = 3
- Left = 1770
- TabIndex = 42
- Top = 870
- Width = 1800
- End
- Begin VB.Label Lab_Qcyesj
- AutoSize = -1 'True
- Height = 180
- Index = 4
- Left = 4380
- TabIndex = 41
- Top = 1350
- Width = 90
- End
- Begin VB.Label Lab_Qcyesj
- AutoSize = -1 'True
- Height = 180
- Index = 5
- Left = 1860
- TabIndex = 40
- Top = 2220
- Width = 90
- End
- Begin VB.Label Lab_Qcyesj
- AutoSize = -1 'True
- Height = 180
- Index = 6
- Left = 4410
- TabIndex = 39
- Top = 2220
- Width = 90
- End
- Begin VB.Line Line1
- Index = 0
- X1 = 1200
- X2 = 5760
- Y1 = 1800
- Y2 = 1800
- End
- Begin VB.Line Line2
- BorderColor = &H00FFFFFF&
- Index = 0
- X1 = 1200
- X2 = 5790
- Y1 = 1830
- Y2 = 1830
- End
- End
- Begin VB.CommandButton cmdNext2
- Caption = "下一步(&N)"
- Height = 300
- Left = 6810
- TabIndex = 37
- Top = 4560
- Width = 1120
- End
- Begin VB.CommandButton cmdPrev2
- Caption = "上一步(&P)"
- Height = 300
- Left = 5640
- TabIndex = 36
- Top = 4560
- Width = 1120
- End
- Begin VB.CommandButton cmdPingHeng
- Caption = "平衡(&E)"
- Height = 300
- Left = 4440
- TabIndex = 35
- Top = 4560
- Width = 1120
- End
- End
- Begin VB.Frame Frame3
- Height = 5025
- Left = -74880
- TabIndex = 10
- Top = 360
- Width = 8055
- Begin VB.CommandButton cmdPrev3
- Caption = "上一步(&P)"
- Height = 300
- Left = 5640
- TabIndex = 13
- Top = 4560
- Width = 1120
- End
- Begin VB.CommandButton cmdNext3
- Caption = "下一步(&N)"
- Height = 300
- Left = 6810
- TabIndex = 12
- Top = 4560
- Width = 1120
- End
- Begin VB.CommandButton cmdDuiZhang
- Caption = "对帐(&E)"
- Height = 300
- Left = 4440
- TabIndex = 11
- Top = 4560
- Width = 1120
- End
- Begin VSFlex8Ctl.VSFlexGrid CxbbGrid
- Height = 2505
- Left = 120
- TabIndex = 14
- Top = 1920
- Width = 7755
- _cx = 5080
- _cy = 5080
- Appearance = 1
- BorderStyle = 1
- Enabled = -1 'True
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "宋体"
- Size = 9
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- MousePointer = 0
- BackColor = 16777215
- ForeColor = -2147483640
- BackColorFixed = 12632256
- ForeColorFixed = -2147483630
- BackColorSel = -2147483635
- ForeColorSel = -2147483634
- BackColorBkg = -2147483636
- BackColorAlternate= 16777215
- GridColor = -2147483633
- GridColorFixed = -2147483632
- TreeColor = -2147483632
- FloodColor = 192
- SheetBorder = -2147483642
- FocusRect = 1
- HighLight = 1
- AllowSelection = -1 'True
- AllowBigSelection= -1 'True
- AllowUserResizing= 0
- SelectionMode = 0
- GridLines = 1
- GridLinesFixed = 2
- GridLineWidth = 1
- Rows = 50
- Cols = 10
- FixedRows = 1
- FixedCols = 1
- RowHeightMin = 0
- RowHeightMax = 0
- ColWidthMin = 0
- ColWidthMax = 0
- ExtendLastCol = 0 'False
- FormatString = ""
- ScrollTrack = 0 'False
- ScrollBars = 3
- ScrollTips = 0 'False
- MergeCells = 0
- MergeCompare = 0
- AutoResize = -1 'True
- AutoSizeMode = 0
- AutoSearch = 0
- AutoSearchDelay = 2
- MultiTotals = -1 'True
- SubtotalPosition= 1
- OutlineBar = 0
- OutlineCol = 0
- Ellipsis = 0
- ExplorerBar = 0
- PicturesOver = 0 'False
- FillStyle = 0
- RightToLeft = 0 'False
- PictureType = 0
- TabBehavior = 0
- OwnerDraw = 0
- Editable = 0
- ShowComboButton = 1
- WordWrap = 0 'False
- TextStyle = 0
- TextStyleFixed = 0
- OleDragMode = 0
- OleDropMode = 0
- DataMode = 0
- VirtualData = -1 'True
- DataMember = ""
- ComboSearch = 3
- AutoSizeMouse = -1 'True
- FrozenRows = 0
- FrozenCols = 0
- AllowUserFreezing= 0
- BackColorFrozen = 0
- ForeColorFrozen = 0
- WallPaperAlignment= 9
- AccessibleName = ""
- AccessibleDescription= ""
- AccessibleValue = ""
- AccessibleRole = 24
- End
- Begin MSComctlLib.ImageList ImageList1
- Left = 3840
- Top = 120
- _ExtentX = 1005
- _ExtentY = 1005
- BackColor = -2147483643
- ImageWidth = 16
- ImageHeight = 16
- MaskColor = 12632256
- _Version = 393216
- BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
- NumListImages = 26
- BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "月末结帐_月末结帐.frx":10B2
- Key = "sz"
- EndProperty
- BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "月末结帐_月末结帐.frx":144C
- Key = "dy"
- EndProperty
- BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "月末结帐_月末结帐.frx":17E6
- Key = "yl"
- EndProperty
- BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "月末结帐_月末结帐.frx":1B80
- Key = "xg"
- EndProperty
- BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "月末结帐_月末结帐.frx":1F1A
- Key = "zh"
- EndProperty
- BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "月末结帐_月末结帐.frx":22B4
- Key = "sh"
- EndProperty
- BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "月末结帐_月末结帐.frx":264E
- Key = "bc"
- EndProperty
- BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "月末结帐_月末结帐.frx":29E8
- Key = "fq"
- EndProperty
- BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "月末结帐_月末结帐.frx":2D82
- Key = "bz"
- EndProperty
- BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "月末结帐_月末结帐.frx":311C
- Key = "tc"
- EndProperty
- BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "月末结帐_月末结帐.frx":34B6
- Key = "bcgs"
- EndProperty
- BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "月末结帐_月末结帐.frx":3850
- Key = "mrlk"
- EndProperty
- BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "月末结帐_月末结帐.frx":3BEA
- Key = "xsxm"
- EndProperty
- BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "月末结帐_月末结帐.frx":3F84
- Key = "first"
- EndProperty
- BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "月末结帐_月末结帐.frx":431E
- Key = "prev"
- EndProperty
- BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "月末结帐_月末结帐.frx":46B8
- Key = "next"
- EndProperty
- BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "月末结帐_月末结帐.frx":4A52
- Key = "last"
- EndProperty
- BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "月末结帐_月末结帐.frx":4DEC
- Key = "xx"
- EndProperty
- BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "月末结帐_月末结帐.frx":5186
- Key = "define"
- EndProperty
- BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "月末结帐_月末结帐.frx":5520
- Key = "exec"
- EndProperty
- BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "月末结帐_月末结帐.frx":58BA
- Key = "xz"
- EndProperty
- BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "月末结帐_月末结帐.frx":5C54
- Key = "sc"
- EndProperty
- BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "月末结帐_月末结帐.frx":5FEE
- Key = "sx"
- EndProperty
- BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "月末结帐_月末结帐.frx":6388
- Key = "cx"
- EndProperty
- BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "月末结帐_月末结帐.frx":6722
- Key = "zd"
- EndProperty
- BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "月末结帐_月末结帐.frx":6ABC
- Key = "dz"
- EndProperty
- EndProperty
- End
- Begin MSComctlLib.Toolbar Tlb_Action
- Height = 555
- Left = 30
- TabIndex = 15
- Top = 120
- Width = 7995
- _ExtentX = 14102
- _ExtentY = 979
- ButtonWidth = 820
- ButtonHeight = 926
- AllowCustomize = 0 'False
- Wrappable = 0 'False
- Appearance = 1
- Style = 1
- ImageList = "ImageList1"
- _Version = 393216
- BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
- NumButtons = 3
- BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "设置"
- Key = "ymsz"
- Object.ToolTipText = "打印页面设置"
- ImageKey = "sz"
- EndProperty
- BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "打印"
- Key = "dy"
- Object.ToolTipText = "打印当前单据或Ctrl+P"
- ImageKey = "dy"
- EndProperty
- BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "预览"
- Key = "yl"
- ImageKey = "yl"
- EndProperty
- EndProperty
- BorderStyle = 1
- Begin MSComctlLib.Toolbar GsToolbar
- Height = 525
- Left = 5490
- TabIndex = 16
- Top = 0
- Width = 2475
- _ExtentX = 4366
- _ExtentY = 926
- ButtonWidth = 1455
- ButtonHeight = 926
- AllowCustomize = 0 'False
- Appearance = 1
- Style = 1
- ImageList = "ImageList1"
- _Version = 393216
- BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
- NumButtons = 3
- BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "保存格式"
- Key = "bcgs"
- ImageKey = "bcgs"
- EndProperty
- BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "默认列宽"
- Key = "hfmrgs"
- ImageKey = "mrlk"
- EndProperty
- BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "显示项目"
- Key = "szxsxm"
- ImageKey = "xsxm"
- EndProperty
- EndProperty
- End
- End
- Begin VB.Label Label4
- BackStyle = 0 'Transparent
- Caption = "正在核对科目:"
- Height = 255
- Left = 5670
- TabIndex = 33
- Top = 1680
- Visible = 0 'False
- Width = 1245
- End
- Begin VB.Label Lab_Check1
- BackStyle = 0 'Transparent
- Caption = "核对总帐上下级"
- Height = 285
- Index = 0
- Left = 540
- TabIndex = 32
- Top = 960
- Width = 1455
- End
- Begin VB.Label Lab_Check1
- BackStyle = 0 'Transparent
- Caption = "核对总帐与部门帐"
- Height = 285
- Index = 1
- Left = 3150
- TabIndex = 31
- Top = 960
- Width = 1455
- End
- Begin VB.Label Lab_Check1
- BackStyle = 0 'Transparent
- Caption = "核对总帐与客户往来帐"
- Height = 285
- Index = 2
- Left = 5670
- TabIndex = 30
- Top = 960
- Width = 1905
- End
- Begin VB.Label Lab_Check1
- BackStyle = 0 'Transparent
- Caption = "核对总帐与供应商往来帐"
- Height = 285
- Index = 3
- Left = 540
- TabIndex = 29
- Top = 1260
- Width = 2115
- End
- Begin VB.Label Lab_Check1
- BackStyle = 0 'Transparent
- Caption = "核对总帐与个人往来帐"
- Height = 285
- Index = 4
- Left = 3150
- TabIndex = 28
- Top = 1260
- Width = 1905
- End
- Begin VB.Label Lab_Check1
- BackStyle = 0 'Transparent
- Caption = "核对总帐与项目帐"
- Height = 285
- Index = 5
- Left = 5670
- TabIndex = 27
- Top = 1260
- Width = 1905
- End
- Begin VB.Label Lab_CheckJg
- BackStyle = 0 'Transparent
- Caption = "√"
- ForeColor = &H000000FF&
- Height = 285
- Index = 0
- Left = 240
- TabIndex = 26
- Top = 960
- Visible = 0 'False
- Width = 285
- End
- Begin VB.Label Lab_CheckJg
- BackStyle = 0 'Transparent
- Caption = "√"
- ForeColor = &H000000FF&
- Height = 285
- Index = 1
- Left = 2850
- TabIndex = 25
- Top = 960
- Visible = 0 'False
- Width = 285
- End
- Begin VB.Label Lab_CheckJg
- BackStyle = 0 'Transparent
- Caption = "√"
- ForeColor = &H000000FF&
- Height = 285
- Index = 2
- Left = 5370
- TabIndex = 24
- Top = 960
- Visible = 0 'False
- Width = 285
- End
- Begin VB.Label Lab_CheckJg
- BackStyle = 0 'Transparent
- Caption = "√"
- ForeColor = &H000000FF&
- Height = 285
- Index = 3
- Left = 240
- TabIndex = 23
- Top = 1260
- Visible = 0 'False
- Width = 285
- End
- Begin VB.Label Lab_CheckJg
- BackStyle = 0 'Transparent
- Caption = "√"
- ForeColor = &H000000FF&
- Height = 285
- Index = 4
- Left = 2850
- TabIndex = 22
- Top = 1260
- Visible = 0 'False
- Width = 285
- End
- Begin VB.Label Lab_CheckJg
- BackStyle = 0 'Transparent
- Caption = "√"
- ForeColor = &H000000FF&
- Height = 285
- Index = 5
- Left = 5370
- TabIndex = 21
- Top = 1260
- Visible = 0 'False
- Width = 285
- End
- Begin VB.Label Lab_Ccode
- ForeColor = &H00000000&
- Height = 210
- Left = 6870
- TabIndex = 20
- Top = 1680
- Visible = 0 'False
- Width = 1005
- End
- Begin VB.Label Label2
- BackStyle = 0 'Transparent
- Caption = "(下面为对帐错误记录列表)"
- ForeColor = &H000000FF&
- Height = 255
- Index = 3
- Left = -2280
- TabIndex = 19
- Top = 540
- Width = 2445
- End
- Begin VB.Label Label5
- BackColor = &H00C0C0C0&
- BackStyle = 0 'Transparent
- Caption = "[*下面为对帐错误的科目:]"
- ForeColor = &H00000000&
- Height = 210
- Left = 120
- TabIndex = 18
- Top = 1680
- Width = 2295
- End
- Begin VB.Label lab_DZ_Res
- BackStyle = 0 'Transparent
- ForeColor = &H00FF0000&
- Height = 255
- Left = 120
- TabIndex = 17
- Top = 4590
- Width = 2175
- End
- End
- Begin VB.Frame Frame4
- Height = 5025
- Left = -74880
- TabIndex = 2
- Top = 360
- Width = 8055
- Begin VB.CommandButton cmdExecute
- Caption = "结帐(&E)"
- Height = 300
- Left = 5640
- TabIndex = 4
- Top = 4560
- Width = 1120
- End
- Begin VB.CommandButton cmdPrev4
- Caption = "上一步(&P)"
- Height = 300
- Left = 6810
- TabIndex = 3
- Top = 4560
- Width = 1120
- End
- Begin VB.Label lab_SSPH
- Caption = "试算结果:平衡"
- ForeColor = &H00000000&
- Height = 255
- Left = 1680
- TabIndex = 9
- Top = 1800
- Width = 1875
- End
- Begin VB.Label lab_DZ
- Caption = "对帐结果:正确"
- ForeColor = &H00000000&
- Height = 255
- Left = 1680
- TabIndex = 8
- Top = 2160
- Width = 1875
- End
- Begin VB.Label lab_Continue
- Caption = "请确认是否继续执行?"
- ForeColor = &H00000000&
- Height = 255
- Left = 1680
- TabIndex = 7
- Top = 3000
- Width = 4635
- End
- Begin VB.Line Line2
- BorderColor = &H00FFFFFF&
- Index = 1
- X1 = 1680
- X2 = 6270
- Y1 = 2670
- Y2 = 2670
- End
- Begin VB.Line Line1
- Index = 1
- X1 = 1680
- X2 = 6240
- Y1 = 2640
- Y2 = 2640
- End
- Begin VB.Line Line2
- BorderColor = &H00FFFFFF&
- Index = 2
- X1 = 1680
- X2 = 6270
- Y1 = 1230
- Y2 = 1230
- End
- Begin VB.Line Line1
- Index = 2
- X1 = 1680
- X2 = 6240
- Y1 = 1200
- Y2 = 1200
- End
- Begin VB.Label Label6
- Caption = "本会计期间凭证:全部记帐"
- ForeColor = &H00000000&
- Height = 255
- Left = 1680
- TabIndex = 6
- Top = 1440
- Width = 2475
- End
- Begin VB.Label lab_Report
- BackStyle = 0 'Transparent
- Caption = " 结 帐 报 告"
- BeginProperty Font
- Name = "宋体"
- Size = 12
- Charset = 134
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00000000&
- Height = 255
- Index = 1
- Left = 3075
- TabIndex = 5
- Top = 630
- Width = 2040
- End
- End
- Begin VSFlex8Ctl.VSFlexGrid CzxsGrid
- Height = 5715
- Left = -74910
- TabIndex = 64
- Top = 420
- Width = 8415
- _cx = 5080
- _cy = 5080
- Appearance = 1
- BorderStyle = 1
- Enabled = -1 'True
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "宋体"
- Size = 9
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- MousePointer = 0
- BackColor = -2147483643
- ForeColor = -2147483640
- BackColorFixed = -2147483633
- ForeColorFixed = -2147483630
- BackColorSel = -2147483635
- ForeColorSel = -2147483634
- BackColorBkg = 8421504
- BackColorAlternate= -2147483643
- GridColor = -2147483633
- GridColorFixed = -2147483632
- TreeColor = -2147483632
- FloodColor = 192
- SheetBorder = -2147483642
- FocusRect = 1
- HighLight = 1
- AllowSelection = -1 'True
- AllowBigSelection= -1 'True
- AllowUserResizing= 0
- SelectionMode = 0
- GridLines = 1
- GridLinesFixed = 2
- GridLineWidth = 1
- Rows = 5000
- Cols = 10
- FixedRows = 1
- FixedCols = 0
- RowHeightMin = 0
- RowHeightMax = 0
- ColWidthMin = 0
- ColWidthMax = 0
- ExtendLastCol = 0 'False
- FormatString = ""
- ScrollTrack = 0 'False
- ScrollBars = 3
- ScrollTips = 0 'False
- MergeCells = 0
- MergeCompare = 0
- AutoResize = -1 'True
- AutoSizeMode = 0
- AutoSearch = 0
- AutoSearchDelay = 2
- MultiTotals = -1 'True
- SubtotalPosition= 1
- OutlineBar = 0
- OutlineCol = 0
- Ellipsis = 0
- ExplorerBar = 0
- PicturesOver = 0 'False
- FillStyle = 0
- RightToLeft = 0 'False
- PictureType = 0
- TabBehavior = 0
- OwnerDraw = 0
- Editable = 0
- ShowComboButton = 1
- WordWrap = 0 'False
- TextStyle = 0
- TextStyleFixed = 0
- OleDragMode = 0
- OleDropMode = 0
- DataMode = 0
- VirtualData = -1 'True
- DataMember = ""
- ComboSearch = 3
- AutoSizeMouse = -1 'True
- FrozenRows = 0
- FrozenCols = 0
- AllowUserFreezing= 0
- BackColorFrozen = 0
- ForeColorFrozen = 0
- WallPaperAlignment= 9
- AccessibleName = ""
- AccessibleDescription= ""
- AccessibleValue = ""
- AccessibleRole = 24
- End
- End
- End
- Attribute VB_Name = "YM_FrmYmjz"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- '********************************************************************
- '* 模 块 名 称 :月末结帐
- '* 功 能 描 述 :
- '* 程序员姓名 :张建忠
- '* 最后修改人 :奚俊峰
- '* 最后修改时间:2001/12/12
- '* 备 注:
- '********************************************************************
- Dim Ztxxrec As New ADODB.Recordset '帐套信息动态集
- Dim Dqkjyear As Integer '当前会计年度
- Dim Dqkjmm As Integer '当前会计期间
- Dim Int_Year As Integer '试算平衡年度
- Dim Int_Period As Integer
- Dim Int_SS_OK As Integer
- Private Int_CheckYear As Integer '核对帐目会计年度
- Private Int_CheckPeriod As Integer '核对帐目会计期间
- Private Int_DZ_OK As Integer '对帐是否正确
- Dim ReportTitle As String '报表主标题
- Dim Int_ErrorContinue As Integer '不平衡或对帐不正确是否继续
- '以下为固定使用变量
- Dim Dyymctbl As New DY_Dyymsz '打印页面窗体变量
- Dim GridCode As String '显示网格网格代码
- Dim GridInf() As Variant '整个网格设置信息
- Dim Tsxx As String '系统提示信息
- Dim Qslz As Long '网格隐藏(非操作显示)列数
- Dim Sjhgd As Double '网格数据行高度
- Dim Sfxshjwg As Boolean '是否显示合计网格
- Dim GridBoolean() As Boolean '网格列信息(布尔型)
- Dim GridStr() As String '网格列信息(字符型)
- Dim GridInt() As Integer '网格列信息(整型)
- Dim Szzls As Integer '数组总列数(网格列数-1)
- Const str_Info = "百利/ERP5.0-财务总帐"
- Private Sub cmdCancel1_Click()
- Unload Me
- End Sub
- Private Sub cmdCancel2_Click()
- Unload Me
- End Sub
- Private Sub cmdCancel3_Click()
- Unload Me
- End Sub
- '对帐过程处理
- Private Sub cmdDuiZhang_Click()
- Lab_Ccode.Visible = True
- lab_DZ_Res.Visible = False
- Label4.Visible = True
- Sub_AccCheck
- If Int_DZ_OK = 1 Then
- lab_DZ.Caption = "对帐结果:正确"
- lab_DZ_Res.Caption = "对帐结果:正确"
- lab_DZ_Res.ForeColor = vbBlue
- lab_DZ.ForeColor = vbBlue
- Else
- If Int_ErrorContinue = 0 Then
- cmdNext3.Enabled = False
- End If
- lab_DZ.Caption = "对帐结果:错误"
- lab_DZ_Res.Caption = "对帐结果:错误"
- lab_DZ_Res.ForeColor = vbRed
- lab_DZ.ForeColor = vbRed
- End If
- Lab_Ccode.Visible = False
- lab_DZ_Res.Visible = True
- Label4.Visible = False
- End Sub
- '月末结帐过程处理
- Private Sub cmdExecute_Click()
- If Fun_JzCheck Then
- Tsxx = "月末结帐完毕!"
- lab_Continue.Caption = Lab_jzyf.Caption & "完毕!"
- cmdExecute.Enabled = False
- Call Xtxxts(Tsxx, 0, 4)
- Unload Me
- End If
- End Sub
- Private Sub cmdNext1_Click()
- cmdNext2.Default = True
- StTab.TabEnabled(0) = False
- StTab.TabEnabled(1) = True
- StTab.TabEnabled(2) = False
- StTab.TabEnabled(3) = False
- StTab.Tab = 1
- cmdPingHeng_Click
- End Sub
- Private Sub cmdNext2_Click()
- cmdNext3.Default = True
- StTab.TabEnabled(0) = False
- StTab.TabEnabled(1) = False
- StTab.TabEnabled(2) = True
- StTab.TabEnabled(3) = False
- StTab.Tab = 2
- Timer1.Enabled = True
- End Sub
- Private Sub cmdNext3_Click()
- cmdExecute.Default = True
- StTab.TabEnabled(0) = False
- StTab.TabEnabled(1) = False
- StTab.TabEnabled(2) = False
- StTab.TabEnabled(3) = True
- StTab.Tab = 3
- If Int_ErrorContinue = 1 Then
- If Int_SS_OK = 0 Or Int_DZ_OK = 0 Then
- lab_Continue.Caption = "建议试算平衡并且对帐正确后结帐,确实要继续执行吗?"
- Else
- lab_Continue.Caption = "可以正常结帐,确认是否继续执行?"
- End If
- Else
- If Int_SS_OK = 0 Or Int_DZ_OK = 0 Then
- lab_Continue.Caption = "试算不平衡或对帐错误不能结帐!"
- cmdExecute.Enabled = False
- Else
- lab_Continue.Caption = "可以正常结帐,确认是否继续执行?"
- End If
- End If
- End Sub
- '试算平衡处理过程
- Private Sub cmdPingHeng_Click()
- Sub_PingHeng
- If Int_SS_OK = 0 Then
- cmdNext2.Enabled = False
- End If
- End Sub
- Private Sub cmdPrev2_Click()
- StTab.TabEnabled(0) = True
- StTab.TabEnabled(1) = False
- StTab.TabEnabled(2) = False
- StTab.TabEnabled(3) = False
- StTab.Tab = 0
- End Sub
- Private Sub cmdPrev3_Click()
- StTab.TabEnabled(0) = False
- StTab.TabEnabled(1) = True
- StTab.TabEnabled(2) = False
- StTab.TabEnabled(3) = False
- StTab.Tab = 1
- End Sub
- Private Sub cmdPrev4_Click()
- StTab.TabEnabled(0) = False
- StTab.TabEnabled(1) = False
- StTab.TabEnabled(2) = True
- StTab.TabEnabled(3) = False
- StTab.Tab = 2
- End Sub
- Private Sub Form_Load()
- Dim int_BookFlag As Integer '月末结帐标志
- cmdNext1.Default = True
- StTab.TabEnabled(0) = True
- StTab.TabEnabled(1) = False
- StTab.TabEnabled(2) = False
- StTab.TabEnabled(3) = False
- StTab.Tab = 0
- cmdPingHeng.Visible = False
- cmdDuiZhang.Visible = False
- Int_ErrorContinue = 1
- '取出当前的会计期间
- Set Ztxxrec = Cw_DataEnvi.DataConnect.Execute("Select top 1 * From gy_kjrlb Where Cwzzjzbz=0 Order by kjyear,period")
- With Ztxxrec
- If Not .EOF Then
- Dqkjyear = .Fields("kjyear")
- Dqkjmm = .Fields("period")
- int_BookFlag = IIf(IsNull(.Fields("Cwzzjzbz")), 0, .Fields("Cwzzjzbz"))
- End If
- End With
- Int_Year = Dqkjyear
- Int_Period = Dqkjmm
- Int_CheckYear = Dqkjyear
- Int_CheckPeriod = Dqkjmm
- Lab_jzyf.Caption = Trim(Str(Dqkjyear)) + "年" + Mid(Trim(Str(100 + Dqkjmm)), 2, 2) + "月月末结帐"
- '判断是否已结帐
- If int_BookFlag = 1 Then
- lab_NotBookInfor.Caption = "提示:" & Trim(Str(Dqkjyear)) + "年" + Mid(Trim(Str(100 + Dqkjmm)), 2, 2) + "月已结帐,请核实!"
- lab_NotBookInfor.Visible = True
- cmdNext1.Enabled = False
- End If
- '调入打印页面设置窗体
- XtReportCode = "Cwzz_ymjz"
- Load Dyymctbl
- ReportTitle = "帐目对帐结果"
- '调 入 网 格
- GridCode = "Cwzz_ymjz"
- Call BzWgcsh(CxbbGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
- Qslz = GridInf(1)
- Sjhgd = GridInf(2)
- Sfxshjwg = GridInf(7)
- Szzls = CxbbGrid.Cols - 1
- cmdNext1.Enabled = False
- Timer2.Enabled = True
- End Sub
- '月末结帐过程处理
- Private Function Fun_JzCheck() As Boolean '月末结帐前检查
- Dim rs As Recordset
- Dim str_Sql As String
- '判断是否试算平衡、对帐正确
- If Int_SS_OK = 0 Or Int_DZ_OK = 0 Then
- If MsgBox("试算不平衡或对帐不正确,确实要进行吗?", vbQuestion + vbYesNo, str_Info) = vbNo Then
- Cw_DataEnvi.DataConnect.RollbackTrans
- Exit Function
- End If
- End If
- On Error GoTo ErrHandle
- Cw_DataEnvi.DataConnect.BeginTrans
- If Int_Period = 1 Then
- str_Sql = "select * from cwzz_accsum where year=" & Int_Year
- Set rs = Cw_DataEnvi.DataConnect.Execute(str_Sql)
- If rs.EOF Then
- Cw_DataEnvi.DataConnect.RollbackTrans
- MsgBox "先进行" & (Int_Year - 1) & "年末结帐!", vbInformation, str_Info
- Exit Function
- End If
- End If
- '置本会计期间结帐标识为 1
- Cw_DataEnvi.DataConnect.Execute ("update gy_kjrlb set Cwzzjzbz=1 where kjYear=" & Dqkjyear & "and period=" & Dqkjmm)
- Cw_DataEnvi.DataConnect.CommitTrans
- Fun_JzCheck = True
- Exit Function
- ErrHandle:
- Fun_JzCheck = False
- Cw_DataEnvi.DataConnect.RollbackTrans
- End Function
- '试算平衡处理
- Private Sub Sub_PingHeng()
- Dim Dbl_Qcye(4) As Double '各类科目期初数据
- Dim Dbl_ZcQcye As Double '资产类科目数据合计
- Dim Dbl_FzQcye As Double '负债及所有者权益类科目数据合计
- Dim Sqlstr As String '查询字符串
- Dim RecTemp As New ADODB.Recordset '临时使用动态集
- Sqlstr = "SELECT Cwzz_AccCode.CClass, SUM(Cwzz_AccSum.Qmye) AS QcyeHj" & _
- " FROM Cwzz_AccSum LEFT OUTER JOIN Cwzz_AccCode ON Cwzz_AccSum.Ccode = Cwzz_AccCode.Ccode" & _
- " Where Cwzz_AccCode.EndFlag=1 And Year=" & Int_Year & " And Period=" & Int_Period & " GROUP BY Cclass"
- Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
- With RecTemp
- Do While Not .EOF
- Select Case Trim(.Fields("Cclass"))
- Case "资产"
- Dbl_Qcye(0) = .Fields("Qcyehj")
- Case "负债"
- Dbl_Qcye(1) = .Fields("Qcyehj")
- Case "所有者权益"
- Dbl_Qcye(2) = .Fields("Qcyehj")
- Case "成本"
- Dbl_Qcye(3) = .Fields("Qcyehj")
- Case "损益"
- Dbl_Qcye(4) = .Fields("Qcyehj")
- End Select
- .MoveNext
- Loop
- End With
- '显示数据
- For Jsqte = 0 To 4
- If Dbl_Qcye(Jsqte) > 0 Then
- Lab_Qcyesj(Jsqte).Caption = "借" & " " & Format(Dbl_Qcye(Jsqte), "##." + String(Xtjexsws, "0"))
- Else
- If Dbl_Qcye(Jsqte) = 0 Then
- Lab_Qcyesj(Jsqte).Caption = "平"
- Else
- Lab_Qcyesj(Jsqte).Caption = "贷" & " " & Format(-Dbl_Qcye(Jsqte), "##." + String(Xtjexsws, "0"))
- End If
- End If
- Next Jsqte
- '显示(资产+成本)合计数据
- Dbl_ZcQcye = Dbl_Qcye(0) + Dbl_Qcye(3)
- Dbl_FzQcye = Dbl_Qcye(1) + Dbl_Qcye(2) + Dbl_Qcye(4)
- If Dbl_ZcQcye > 0 Then
- Lab_Qcyesj(5).Caption = "借" & " " & Format(Dbl_ZcQcye, "##." + String(Xtjexsws, "0"))
- Else
- If Dbl_ZcQcye = 0 Then
- Lab_Qcyesj(5).Caption = "平"
- Else
- Lab_Qcyesj(5).Caption = "贷" & " " & Format(-Dbl_ZcQcye, "##." + String(Xtjexsws, "0"))
- End If
- End If
- If Dbl_FzQcye > 0 Then
- Lab_Qcyesj(6).Caption = "借" & " " & Format(Dbl_FzQcye, "##." + String(Xtjexsws, "0"))
- Else
- If Dbl_FzQcye = 0 Then
- Lab_Qcyesj(6).Caption = "平"
- Else
- Lab_Qcyesj(6).Caption = "贷" & " " & Format(-Dbl_FzQcye, "##." + String(Xtjexsws, "0"))
- End If
- End If
- '判断试算是否平衡
- If Format(Dbl_ZcQcye + Dbl_FzQcye, "0.00") = 0 Then
- Lab_Phjg.ForeColor = vbBlue
- Lab_Phjg.Caption = "试算结果:平衡"
- lab_SSPH.ForeColor = vbBlue
- lab_SSPH.Caption = "试算结果:平衡"
- Int_SS_OK = 1
- Else
- Lab_Phjg.ForeColor = vbRed
- Lab_Phjg.Caption = "试算结果:不平衡"
- lab_SSPH.ForeColor = vbRed
- lab_SSPH.Caption = "试算结果:不平衡"
- Int_SS_OK = 0
- End If
- End Sub
- Private Sub GsToolbar_ButtonClick(ByVal Button As MSComctlLib.Button) '网格格式调整
- Select Case Button.Key
- Case "bcgs" '保存表格格式
- Call Bcwggs(CxbbGrid, GridCode, GridStr)
- Case "hfmrgs" '恢复默认格式
- Call Hfmrgs(CxbbGrid, GridCode, GridStr)
- Case "szxsxm" '设置显示项目
- Call Szxsxm(CxbbGrid, GridCode)
- End Select
- End Sub
- Private Sub Timer1_Timer()
- Timer1.Enabled = False
- cmdDuiZhang_Click
- End Sub
- Private Sub Timer2_Timer()
- Dim str_Sql As String
- Dim RecTemp As Recordset
- Dim int_Count As Long
- Timer2.Enabled = False
- '判断是否有未记帐凭证
- 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"
- Set RecTemp = Cw_DataEnvi.DataConnect.Execute(str_Sql)
- If Not RecTemp.EOF Then
- Do While Not RecTemp.EOF
- int_Count = int_Count + 1
- lst_NotBook.ListItems.Add , , CStr(Trim(RecTemp(0) & ""))
- lst_NotBook.ListItems(int_Count).ListSubItems.Add , , CStr(Trim(RecTemp(1) & ""))
- lst_NotBook.ListItems(int_Count).ListSubItems.Add , , CStr(Trim(RecTemp(2) & ""))
- RecTemp.MoveNext
- Loop
- lab_NotBookInfor.Visible = True
- lst_NotBook.Visible = True
- cmdNext1.Enabled = False
- Else
- cmdNext1.Enabled = True
- End If
- labState.Visible = False
- End Sub
- Private Sub Tlb_Action_ButtonClick(ByVal Button As MSComctlLib.Button)
- Select Case Button.Key
- Case "ymsz" '页面设置
- Dyymctbl.Show 1
- Case "yl" '预 览
- Call bbyl(True)
- Case "dy" '打 印
- Call bbyl(False)
- Case "dz" '对 帐
- Call Sub_AccCheck
- Case "bz" '帮 助
- Call F1bz
- Case "fh" '退 出
- Unload Me
- End Select
- End Sub
- Private Sub Sub_AccCheck() '帐目核对
- Dim Int_CheckSele As Integer
- '初始化对帐结果显示
- CxbbGrid.Rows = CxbbGrid.FixedRows
- CxbbGrid.Refresh
- For Jsqte = 0 To 5
- Lab_CheckJg(Jsqte).Visible = False
- Lab_Check1(Jsqte).ForeColor = &H80000012
- Next Jsqte
- If Fun_Hdsxjkm Then
- Lab_CheckJg(0).Visible = True
- Int_DZ_OK = 1
- Else
- Int_DZ_OK = 0
- End If
- For Int_CheckSele = 1 To 5
- If Fun_HdZzFzz(Int_CheckSele) Then
- Lab_CheckJg(Int_CheckSele).Visible = True
- Int_DZ_OK = IIf(Int_DZ_OK = 1, 1, 0)
- Else
- Int_DZ_OK = 0
- End If
- Next Int_CheckSele
- Lab_Ccode = ""
- End Sub
- '核对辅助帐
- Private Function Fun_HdZzFzz(Int_CheckSele As Integer) As Boolean '核对总帐与辅助帐(客户)是否平衡
- '1-部门 2-客户 3-供应商 4-个人 5-项目
- Dim RecTemp As New ADODB.Recordset '临时使用动态集
- Dim Rec_AccSum As New ADODB.Recordset '科目总帐动态集
- Dim Sqlstr As String '临时查询字符串
- Dim Int_NotCheck As Integer '未能核对通过科目个数
- Lab_Check1(Int_CheckSele).ForeColor = &HFF&
- Int_NotCheck = 0
- Select Case Int_CheckSele
- Case 1
- 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)" & _
- " FROM Cwzz_AccCode LEFT OUTER JOIN Cwzz_AccSum ON" & _
- " Cwzz_AccCode.Ccode = Cwzz_AccSum.Ccode And Cwzz_AccSum.Year = " & Int_CheckYear & " And Period =" & Int_CheckPeriod & _
- " Where Cwzz_AccCode.DeptFlag=1 And Cwzz_AccCode.EndFlag=1"
- Case 2
- 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)" & _
- " FROM Cwzz_AccCode LEFT OUTER JOIN Cwzz_AccSum ON" & _
- " Cwzz_AccCode.Ccode = Cwzz_AccSum.Ccode And Cwzz_AccSum.Year = " & Int_CheckYear & " And Period =" & Int_CheckPeriod & _
- " Where Cwzz_AccCode.CusFlag=1 And Cwzz_AccCode.EndFlag=1"
- Case 3
- 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)" & _
- " FROM Cwzz_AccCode LEFT OUTER JOIN Cwzz_AccSum ON" & _
- " Cwzz_AccCode.Ccode = Cwzz_AccSum.Ccode And Cwzz_AccSum.Year = " & Int_CheckYear & " And Period =" & Int_CheckPeriod & _
- " Where Cwzz_AccCode.SupplierFlag=1 And Cwzz_AccCode.EndFlag=1"
- Case 4
- 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)" & _
- " FROM Cwzz_AccCode LEFT OUTER JOIN Cwzz_AccSum ON" & _
- " Cwzz_AccCode.Ccode = Cwzz_AccSum.Ccode And Cwzz_AccSum.Year = " & Int_CheckYear & " And Period =" & Int_CheckPeriod & _
- " Where Cwzz_AccCode.PersonFlag=1 And Cwzz_AccCode.EndFlag=1"
- Case 5
- 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)" & _
- " FROM Cwzz_AccCode LEFT OUTER JOIN Cwzz_AccSum ON" & _
- " Cwzz_AccCode.Ccode = Cwzz_AccSum.Ccode And Cwzz_AccSum.Year = " & Int_CheckYear & " And Period =" & Int_CheckPeriod & _
- " Where Cwzz_AccCode.ItemFlag=1 And Cwzz_AccCode.EndFlag=1"
- End Select
- Set Rec_AccSum = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
- With Rec_AccSum
- Do While Not .EOF
- Lab_Ccode.Caption = Trim(.Fields("Ccode"))
- Lab_Ccode.Refresh
- Sqlstr = "SELECT YcyeHj=IsNull(SUM(Ycye),0), QcyeHj=Isnull(SUM(Qcye),0),MjjeHj=Isnull(SUM(Mjje),0), MdjeHj=Isnull(SUM(Mdje),0)," & _
- " ByjfljjeHj=IsNull(SUM(Byjfljje),0), BydfljjeHj=IsNull(SUM(Bydfljje),0),Qmyehj=IsNull(SUM(Qmye),0)" & _
- " FROM Cwzz_AccSumAssi " & _
- " WHERE Cwzz_AccSumAssi.Ccode ='" & Trim(.Fields("Ccode")) & "' AND Year = " & Int_CheckYear & " AND Period =" & Int_CheckPeriod
- Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
- If Not RecTemp.EOF Then
- 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
- Int_NotCheck = Int_NotCheck + 1
- '填充记录错误列表
- Call Sub_AddRec(Trim(.Fields("Ccode")), "总帐", .Fields("Ycye"), .Fields("Qcye"), .Fields("Mjje"), .Fields("Mdje"), .Fields("Byjfljje"), .Fields("Bydfljje"), .Fields("Qmye"))
- Select Case Int_CheckSele
- Case 1
- 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"))
- Case 2
- 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"))
- Case 3
- 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"))
- Case 4
- 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"))
- Case 5
- 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"))
- End Select
- End If
- End If
- .MoveNext
- Loop
- End With
- If Int_NotCheck <> 0 Then
- Fun_HdZzFzz = False
- Else
- Fun_HdZzFzz = True
- Lab_Check1(Int_CheckSele).ForeColor = &H80000012
- End If
- End Function
- Private Function Fun_Hdsxjkm() As Boolean '核对总帐上下级科目是否平衡
- Dim RecTemp As New ADODB.Recordset '临时使用动态集
- Dim Rec_AccSum As New ADODB.Recordset '科目总帐动态集
- Dim Sqlstr As String '临时查询字符串
- Dim Int_NotCheck As Integer '未能核对通过科目个数
- Lab_Check1(Int_CheckSele).ForeColor = &HFF&
- Int_NotCheck = 0
- 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)" & _
- " FROM Cwzz_AccCode LEFT OUTER JOIN Cwzz_AccSum ON" & _
- " Cwzz_AccCode.Ccode = Cwzz_AccSum.Ccode And Cwzz_AccSum.Year = " & Int_CheckYear & " And Period =" & Int_CheckPeriod & _
- " Where Cwzz_AccCode.EndFlag=0"
- Set Rec_AccSum = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
- With Rec_AccSum
- Do While Not .EOF
- Lab_Ccode.Caption = Trim(.Fields("Ccode"))
- Lab_Ccode.Refresh
- Sqlstr = "SELECT SUM(Ycye) AS YcyeHj, SUM(Qcye) AS QcyeHj, SUM(Mjje) AS MjjeHj, SUM(Mdje) AS MdjeHj," & _
- " SUM(Byjfljje) AS ByjfljjeHj, SUM(Bydfljje) AS BydfljjeHj, SUM(Qmye) AS Qmyehj" & _
- " FROM Cwzz_AccSum LEFT OUTER JOIN Cwzz_AccCode ON Cwzz_AccSum.Ccode = Cwzz_AccCode.Ccode" & _
- " WHERE Cwzz_AccSum.Ccode LIKE '" & Trim(.Fields("Ccode")) & "%' AND Year = " & Int_CheckYear & " AND Period =" & Int_CheckPeriod & " AND Cwzz_AccCode.EndFlag = 1"
- Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
- If Not RecTemp.EOF Then
- 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
- Int_NotCheck = Int_NotCheck + 1
- '填充记录错误列表
- Call Sub_AddRec(Trim(.Fields("Ccode")), "总帐上级", .Fields("Ycye"), .Fields("Qcye"), .Fields("Mjje"), .Fields("Mdje"), .Fields("Byjfljje"), .Fields("Bydfljje"), .Fields("Qmye"))
- 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"))
- End If
- Else
- 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
- '填充记录错误列表
- Call Sub_AddRec(Trim(.Fields("Ccode")), "总帐上级", .Fields("Ycye"), .Fields("Qcye"), .Fields("Mjje"), .Fields("Mdje"), .Fields("Byjfljje"), .Fields("Bydfljje"), .Fields("Qmye"))
- Call Sub_AddRec(Trim(.Fields("Ccode")), "总帐下级", 0, 0, 0, 0, 0, 0, 0)
- End If
- End If
- .MoveNext
- Loop
- End With
- If Int_NotCheck <> 0 Then
- Fun_Hdsxjkm = False
- Else
- Fun_Hdsxjkm = True
- Lab_Check1(Int_CheckSele).ForeColor = &H80000012
- End If
- End Function
- Private Sub Sub_AddRec(Str_Ccode As String, CheckItem As String, Ycye#, Qcye#, Mjje#, Mdje#, Byjfljje#, Bydfljje#, Qmye#) '填充对帐错误记录
- '函数参数说明:科目编码,核对项目,年初余额,期初余额,本期借方发生,本期贷方发生,本年累计借方发生,本年累计贷方发生,期末余额
- Dim RecTemp As New ADODB.Recordset '临时使用动态集
- Dim Sqlstr As String '临时查询字符串
- Sqlstr = "SELECT Cwzz_AccCode.CName,BalanceOri From Cwzz_AccCode Where CCode='" & Str_Ccode & "'"
- Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
- With CxbbGrid
- .AddItem ""
- .RowHeight(.Rows - 1) = Sjhgd
- .TextMatrix(.Rows - 1, Sydz("001", GridStr(), Szzls)) = Str_Ccode '科目编码
- If Not RecTemp.EOF Then
- .TextMatrix(.Rows - 1, Sydz("002", GridStr(), Szzls)) = Trim(RecTemp.Fields("Cname") & "") '科目名称
- End If
- .TextMatrix(.Rows - 1, Sydz("003", GridStr(), Szzls)) = CheckItem '核对项目
- If Not RecTemp.EOF Then
- .TextMatrix(.Rows - 1, Sydz("004", GridStr(), Szzls)) = Trim(RecTemp.Fields("BalanceOri")) '余额方向
- End If
- If Ycye <> 0 Then '年初余额
- If .TextMatrix(.Rows - 1, Sydz("004", GridStr(), Szzls)) = "借" Then
- .TextMatrix(.Rows - 1, Sydz("005", GridStr(), Szzls)) = Ycye
- Else
- .TextMatrix(.Rows - 1, Sydz("005", GridStr(), Szzls)) = -Ycye
- End If
- End If
- If Qcye <> 0 Then '期初余额
- If .TextMatrix(.Rows - 1, Sydz("004", GridStr(), Szzls)) = "借" Then
- .TextMatrix(.Rows - 1, Sydz("006", GridStr(), Szzls)) = Qcye
- Else
- .TextMatrix(.Rows - 1, Sydz("006", GridStr(), Szzls)) = -Qcye
- End If
- End If
- If Mjje <> 0 Then '本期借方发生
- .TextMatrix(.Rows - 1, Sydz("007", GridStr(), Szzls)) = Mjje
- End If
- If Mdje <> 0 Then '本期贷方发生
- .TextMatrix(.Rows - 1, Sydz("008", GridStr(), Szzls)) = Mdje
- End If
- If Byjfljje <> 0 Then '本年借方累计发生
- .TextMatrix(.Rows - 1, Sydz("009", GridStr(), Szzls)) = Byjfljje
- End If
- If Bydfljje <> 0 Then '本年贷方累计发生
- .TextMatrix(.Rows - 1, Sydz("010", GridStr(), Szzls)) = Bydfljje
- End If
- If Qmye <> 0 Then '期末余额
- If .TextMatrix(.Rows - 1, Sydz("004", GridStr(), Szzls)) = "借" Then
- .TextMatrix(.Rows - 1, Sydz("011", GridStr(), Szzls)) = Qmye
- Else
- .TextMatrix(.Rows - 1, Sydz("011", GridStr(), Szzls)) = -Qmye
- End If
- End If
- End With
- End Sub
- Private Sub bbyl(bbylte As Boolean) '报表打印预览
- Dim Bbzbt$, Bbxbt() As String, bbxbtzzxs() As Integer, Bbxbtgs As Integer
- Dim Bbbwh() As String, Bbbwhzzxs() As Integer, Bbbwhgs As Integer
- Bbxbtgs = 1 '报 表 小 标 题 行 数
- Bbbwhgs = 0 '报 表 表 尾 行 数
- ReDim Bbxbt(1 To Bbxbtgs)
- ReDim bbxbtzzxs(1 To Bbxbtgs)
- If Bbbwhgs <> 0 Then
- ReDim Bbbwh(1 To Bbbwhgs)
- ReDim Bbbwhzzxs(1 To Bbbwhgs)
- End If
- Bbzbt = ReportTitle
- Bbxbt(1) = " "
- bbxbtzzxs(1) = 0 '报表行组织形式(0-居左 1-居中 2-居右)
- Call Scyxsjb(CxbbGrid) '生成报表数据
- Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, bbylte)
- If Not bbylte Then
- Unload DY_Tybbyldy
- End If
- End Sub