⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 customerinitequal.frm

📁 金算盘软件代码
💻 FRM
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Object = "{F6125AB1-8AB1-11CE-A77F-08002B2F4E98}#2.0#0"; "MSRDC20.OCX"
Object = "{81110CCB-022B-11D3-A348-0080C89152FF}#1.3#0"; "ORAGLIST.OCX"
Begin VB.Form frmARAPInitEqual 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "往来期初平衡检查"
   ClientHeight    =   4905
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   9450
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4905
   ScaleWidth      =   9450
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  '所有者中心
   Begin MSRDC.MSRDC dtaEquation 
      Height          =   330
      Left            =   4080
      Top             =   90
      Visible         =   0   'False
      Width           =   1215
      _ExtentX        =   2143
      _ExtentY        =   582
      _Version        =   393216
      Options         =   0
      CursorDriver    =   0
      BOFAction       =   0
      EOFAction       =   0
      RecordsetType   =   1
      LockType        =   3
      QueryType       =   0
      Prompt          =   3
      Appearance      =   1
      QueryTimeout    =   30
      RowsetSize      =   100
      LoginTimeout    =   15
      KeysetSize      =   0
      MaxRows         =   0
      ErrorThreshold  =   -1
      BatchSize       =   15
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Enabled         =   -1  'True
      ReadOnly        =   0   'False
      Appearance      =   -1  'True
      DataSourceName  =   ""
      RecordSource    =   ""
      UserName        =   ""
      Password        =   ""
      Connect         =   ""
      LogMessages     =   ""
      Caption         =   "MSRDC1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin ListRefer.ListText lstBalance 
      Height          =   300
      Left            =   1320
      TabIndex        =   3
      Top             =   210
      Width           =   2655
      _ExtentX        =   4683
      _ExtentY        =   529
      CodeSort        =   -1  'True
      AutoPop         =   0   'False
      BackColor       =   -2147483643
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin MSFlexGridLib.MSFlexGrid msgEquation 
      Bindings        =   "CustomerInitEqual.frx":0000
      Height          =   3735
      Left            =   120
      TabIndex        =   2
      Top             =   600
      Width           =   9195
      _ExtentX        =   16219
      _ExtentY        =   6588
      _Version        =   393216
      FixedCols       =   0
      BackColorBkg    =   -2147483643
      FocusRect       =   0
      HighLight       =   0
      AllowUserResizing=   1
   End
   Begin VB.CommandButton cmdEquation 
      Height          =   350
      Left            =   4320
      Style           =   1  'Graphical
      TabIndex        =   1
      Top             =   4440
      UseMaskColor    =   -1  'True
      Width           =   1215
   End
   Begin VB.Label lblequal 
      Caption         =   "往来科目:"
      Height          =   255
      Index           =   0
      Left            =   150
      TabIndex        =   0
      Top             =   240
      Width           =   975
   End
End
Attribute VB_Name = "frmARAPInitEqual"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim mlngID As Long

Private Sub cmdEquation_Click()
    Unload Me
End Sub

Private Sub Form_Load()
    Me.HelpContextID = 30107
    SetHelpID 30107
    Set Me.Icon = GetFormResPicture(139, vbResIcon)
    Set cmdEquation.Picture = GetFormResPicture(1022, vbResBitmap)
End Sub
 
Public Sub EditCard(ByVal intYear As Integer, ByVal strDate As String, strDec As String)
    Dim intCount As Integer
    Dim strSql As String
    Dim intFlag As Integer
    
    strSql = "SELECT lngAccountID,strAccountCode,strAccountName FROM Account WHERE lngAccountNatureID IN (3,4)" _
        & " AND blnIsDetail=1 AND blnIsInActive=0 UNION SELECT -1,'所有','' FROM Currencys WHERE lngCurrencyID=1 ORDER BY lngAccountID"
    With lstBalance
        .ClearRefer
        Set .Recordset = gclsBase.BaseDB.OpenResultset(strSql, rdOpenStatic)
        .SeekCol = "1,2,3"
        .SeekId -1
        .ColWidth(2) = .width / 2
        .ColWidth(3) = .width / 2
        .ReferWidth = .width
    End With
    
    strSql = "SELECT AccountDaily.lngAccountID, AccountDaily.lngCurrencyID," & _
            "AccountDaily.lngCustomerID,Max(strAccountName) As 科目,Max(strCurrencyCode) || ' ' || Max(strCurrencyName)  As 币种,Max(strCustomerName) As 单位," & _
            "Decode(SUM(intDirection*(dblCurrencyPostedDebit-dblCurrencyPostedCredit)),0,'',SUM(intDirection*(dblCurrencyPostedDebit-dblCurrencyPostedCredit))) AS 原币科目期初," & _
            "Decode(SUM(intDirection*(dblCurrencyUnVoucherDebit-dblCurrencyUnVoucherCredit)),0,'',SUM(intDirection*(dblCurrencyUnVoucherDebit-dblCurrencyUnVoucherCredit))) AS 原币往来期初," & _
            "Decode(SUM(intDirection*(dblCurrencyPostedDebit-dblCurrencyPostedCredit))-SUM(intDirection*(dblCurrencyUnVoucherDebit-dblCurrencyUnVoucherCredit)),0,'',SUM(intDirection*(dblCurrencyPostedDebit-dblCurrencyPostedCredit))-SUM(intDirection*(dblCurrencyUnVoucherDebit-dblCurrencyUnVoucherCredit))) As 原币差额," & _
            "Decode(SUM(intDirection*(dblPostedDebit-dblPostedCredit)),0,'',SUM(intDirection*(dblPostedDebit-dblPostedCredit))) AS 本币科目期初," & _
            "Decode(SUM(intDirection*(dblUnVoucherDebit-dblUnVoucherCredit)),0,'',SUM(intDirection*(dblUnVoucherDebit-dblUnVoucherCredit))) AS 本币往来期初," & _
            "Decode(SUM(intDirection*(dblPostedDebit-dblPostedCredit))-SUM(intDirection*(dblUnVoucherDebit-dblUnVoucherCredit)),0,'',SUM(intDirection*(dblPostedDebit-dblPostedCredit))-SUM(intDirection*(dblUnVoucherDebit-dblUnVoucherCredit))) As 本币差额," & _
            "Decode(SUM(intDirection*(dblPostedDebit-dblPostedCredit))-SUM(intDirection*(dblUnVoucherDebit-dblUnVoucherCredit)),0,'平衡','不平衡') As 检查结果" & _
            " From AccountDaily,Account,Currencys,Customer" & _
            " Where " & _
            " AccountDaily.lngAccountID=Account.lngAccountID" & _
            " And AccountDaily.lngCurrencyID=Currencys.lngCurrencyID" & _
            " And AccountDaily.lngCustomerID=Customer.lngCustomerID" & _
            " And strDate<'" & gclsBase.BeginDate & "' AND lngAccountNatureID IN (3,4)" & _
            " AND NOT (dblUnVoucherCredit=0 AND dblPostedCredit=0 AND dblUnVoucherDebit=0 AND dblPostedDebit=0 AND dblCurrencyUnVoucherDebit=0 AND dblCurrencyUnVoucherCredit=0 AND dblCurrencyPostedCredit=0 AND dblCurrencyPostedDebit=0)" & _
            " GROUP BY AccountDaily.lngAccountID, AccountDaily.lngCurrencyID, AccountDaily.lngCustomerID"
    
    Set dtaEquation.Resultset = gclsBase.BaseDB.OpenResultset(strSql, rdOpenStatic)
    With msgEquation
        .ColWidth(0) = 0
        .ColWidth(1) = 0
        .ColWidth(2) = 0
        .ColWidth(3) = 1440
        .ColWidth(4) = 1200
        .ColWidth(5) = 1920
        .ColWidth(6) = 1800
        .ColWidth(7) = 1800
        .ColWidth(8) = 1200
        .ColWidth(9) = 1800
        .ColWidth(10) = 1800
        .ColWidth(11) = 1200
        .ColAlignment(6) = 7
        .ColAlignment(7) = 7
        .ColAlignment(8) = 7
        .ColAlignment(9) = 7
        .ColAlignment(10) = 7
        .ColAlignment(11) = 7
        .ColAlignment(12) = 4
        intFlag = 0
        For intCount = 1 To .Rows - 1
            If .TextMatrix(intCount, 0) <> intFlag Then
                intFlag = .TextMatrix(intCount, 0)
            Else
                .TextMatrix(intCount, 3) = ""
            End If
            If .TextMatrix(intCount, 12) = "不平衡" Then
                .Row = intCount
                .col = 12
                .CellForeColor = RGB(255, 0, 0)
            End If
        Next
    End With
    Show vbModal
End Sub

Private Sub Form_Unload(Cancel As Integer)
    Utility.RemoveFormResPicture 139
    Utility.RemoveFormResPicture 1022
End Sub

Private Sub lstBalance_Choose()
    Dim intCount As Integer
    Dim intRowheight As Integer
    Dim lngID As Long
    
    lngID = lstBalance.ID
    If lngID = 0 Then
        ShowMsg Me.hwnd, "往来科目不存在,请重新选择!", vbInformation, Me.Caption
        lstBalance.SeekId mlngID
    End If
    If mlngID <> lngID Then
        With msgEquation
            intRowheight = .RowHeight(0)
            For intCount = 1 To .Rows - 1
                If lngID = -1 Then
                    .RowHeight(intCount) = intRowheight
                Else
                    If .TextMatrix(intCount, 0) = lngID Then
                        .RowHeight(intCount) = intRowheight
                    Else
                        .RowHeight(intCount) = 0
                    End If
                End If
            Next
        End With
        mlngID = lngID
    End If
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -