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

📄 takestock.cls

📁 金算盘软件代码
💻 CLS
📖 第 1 页 / 共 5 页
字号:
    ReceiptType(14).lngReceiptTypeID = 14
    ReceiptType(14).strReceiptTypeName = "直运销售"
    ReceiptType(14).lngReceiptID = 4

    ReceiptType(15).lngReceiptTypeID = 15
    ReceiptType(15).strReceiptTypeName = "委托出库"
    ReceiptType(15).lngReceiptID = 4

    ReceiptType(16).lngReceiptTypeID = 16
    ReceiptType(16).strReceiptTypeName = "委托结算"
    ReceiptType(16).lngReceiptID = 4

    ReceiptType(17).lngReceiptTypeID = 17
    ReceiptType(17).strReceiptTypeName = "加工出库"
    ReceiptType(17).lngReceiptID = 4

    ReceiptType(18).lngReceiptTypeID = 18
    ReceiptType(18).strReceiptTypeName = "分期出库"
    ReceiptType(18).lngReceiptID = 4

    ReceiptType(19).lngReceiptTypeID = 19
    ReceiptType(19).strReceiptTypeName = "分期结算"
    ReceiptType(19).lngReceiptID = 4
    
    ReceiptType(20).lngReceiptTypeID = 20
    ReceiptType(20).strReceiptTypeName = "销售发票"
    ReceiptType(20).lngReceiptID = 4
    
    ReceiptType(21).lngReceiptTypeID = 21
    ReceiptType(21).strReceiptTypeName = "领用出库"
    ReceiptType(21).lngReceiptID = 4

    ReceiptType(22).lngReceiptTypeID = 22
    ReceiptType(22).strReceiptTypeName = "成本调整"
    ReceiptType(22).lngReceiptID = 4

    ReceiptType(23).lngReceiptTypeID = 23
    ReceiptType(23).strReceiptTypeName = "盘亏出库"
    ReceiptType(23).lngReceiptID = 4

    ReceiptType(24).lngReceiptTypeID = 24
    ReceiptType(24).strReceiptTypeName = "其他出库"
    ReceiptType(24).lngReceiptID = 4

    ReceiptType(25).lngReceiptTypeID = 25
    ReceiptType(25).strReceiptTypeName = "受托调价"
    ReceiptType(25).lngReceiptID = 5

    ReceiptType(26).lngReceiptTypeID = 26
    ReceiptType(26).strReceiptTypeName = "代销调拨"
    ReceiptType(26).lngReceiptID = 6

    ReceiptType(27).lngReceiptTypeID = 27
    ReceiptType(27).strReceiptTypeName = "代销调价"
    ReceiptType(27).lngReceiptID = 7

    ReceiptType(28).lngReceiptTypeID = 28
    ReceiptType(28).strReceiptTypeName = "商品调拨"
    ReceiptType(28).lngReceiptID = 8

    ReceiptType(29).lngReceiptTypeID = 29
    ReceiptType(29).strReceiptTypeName = "商品调价"
    ReceiptType(29).lngReceiptID = 9
    
    ReceiptType(30).lngReceiptTypeID = 30
    ReceiptType(30).strReceiptTypeName = "商品组装"
    ReceiptType(30).lngReceiptID = 10

    ReceiptType(31).lngReceiptTypeID = 31
    ReceiptType(31).strReceiptTypeName = "商品拆卸"
    ReceiptType(31).lngReceiptID = 10

    ReceiptType(32).lngReceiptTypeID = 32
    ReceiptType(32).strReceiptTypeName = "入库成本"
    ReceiptType(32).lngReceiptID = 11

    ReceiptType(33).lngReceiptTypeID = 33
    ReceiptType(33).strReceiptTypeName = "商品盘点"
    ReceiptType(33).lngReceiptID = 12

    ReceiptType(34).lngReceiptTypeID = 34
    ReceiptType(34).strReceiptTypeName = "应付贷项"
    ReceiptType(34).lngReceiptID = 13

    ReceiptType(35).lngReceiptTypeID = 35
    ReceiptType(35).strReceiptTypeName = "应付借项"
    ReceiptType(35).lngReceiptID = 13

    ReceiptType(36).lngReceiptTypeID = 36
    ReceiptType(36).strReceiptTypeName = "应收借项"
    ReceiptType(36).lngReceiptID = 14
    
    ReceiptType(37).lngReceiptTypeID = 37
    ReceiptType(37).strReceiptTypeName = "应收贷项"
    ReceiptType(37).lngReceiptID = 14

    ReceiptType(38).lngReceiptTypeID = 38
    ReceiptType(38).strReceiptTypeName = "财务费用"
    ReceiptType(38).lngReceiptID = 14

    ReceiptType(39).lngReceiptTypeID = 39
    ReceiptType(39).strReceiptTypeName = "付款单"
    ReceiptType(39).lngReceiptID = 15

    ReceiptType(40).lngReceiptTypeID = 40
    ReceiptType(40).strReceiptTypeName = "收款单"
    ReceiptType(40).lngReceiptID = 16
    
    ReceiptType(41).lngReceiptTypeID = 41
    ReceiptType(41).strReceiptTypeName = "记帐凭证"
    ReceiptType(41).lngReceiptID = 17

    ReceiptType(42).lngReceiptTypeID = 42
    ReceiptType(42).strReceiptTypeName = "库存商品"
    ReceiptType(42).lngReceiptID = 18

    ReceiptType(43).lngReceiptTypeID = 43
    ReceiptType(43).strReceiptTypeName = "受托代销"
    ReceiptType(43).lngReceiptID = 18

    ReceiptType(44).lngReceiptTypeID = 44
    ReceiptType(44).strReceiptTypeName = "委托代销"
    ReceiptType(44).lngReceiptID = 18

    ReceiptType(45).lngReceiptTypeID = 45
    ReceiptType(45).strReceiptTypeName = "分期商品"
    ReceiptType(45).lngReceiptID = 18

    ReceiptType(46).lngReceiptTypeID = 46
    ReceiptType(46).strReceiptTypeName = "直运商品"
    ReceiptType(46).lngReceiptID = 18
    
    ReceiptType(47).lngReceiptTypeID = 47
    ReceiptType(47).strReceiptTypeName = "委托加工"
    ReceiptType(47).lngReceiptID = 18
    
    ReceiptType(48).lngReceiptTypeID = 48
    ReceiptType(48).strReceiptTypeName = "固资增加"
    ReceiptType(48).lngReceiptID = 19
    
    ReceiptType(49).lngReceiptTypeID = 49
    ReceiptType(49).strReceiptTypeName = "固资减少"
    ReceiptType(49).lngReceiptID = 19
    
    ReceiptType(50).lngReceiptID = 50
    ReceiptType(50).strReceiptTypeName = "其它变动"
    ReceiptType(50).lngReceiptID = 19
    
    ReceiptType(51).lngReceiptTypeID = 51
    ReceiptType(51).strReceiptTypeName = "固资卡片"
    ReceiptType(51).lngReceiptID = 20
End Sub
Private Sub InitTabName()
            TabName(1) = "Customer"        '单位
    TabName(2) = "Department"        '部门
    TabName(3) = "Employee"        '业务员
    TabName(4) = "Class1"        '统计
    TabName(5) = "Currencys"        '币种
    TabName(6) = "Term"        '付款条件
    TabName(7) = "Account"        '科目
    TabName(8) = "Item"        '商品
    TabName(9) = "Job"        '工程
    TabName(10) = "Position"        '货位
    TabName(11) = "Remark"        '摘要
    TabName(12) = "Custom1"        '自定义项目1
    TabName(13) = "Custom2"        '自定义项目2
    TabName(14) = "Custom3"        '自定义项目3
    TabName(15) = "Custom4"        '自定义项目4
    TabName(16) = "Custom5"        '自定义项目5
    TabName(17) = "Class2"        '项目
    TabName(18) = "Rate"        '汇率
    TabName(19) = "VoucherType"        '凭证类型
    TabName(20) = "Custom0"        '自定义项目0
    TabName(21) = "Template"        '单据模版
    TabName(22) = "AccountType"        '科目类型
    TabName(23) = ""
    TabName(24) = "CustomerAddress"     '单位发货地址
    TabName(25) = "CustomerBank"        '单位开户银行
    TabName(26) = "BusinessAddress"     '企业发货地址
    TabName(27) = "BusinessBank"        '企业开户银行
    TabName(28) = "ItemUnit"            '商品单位表
    TabName(29) = "Tax"                 '税率
    TabName(30) = "TransVoucher"        '转帐凭证
    TabName(31) = "Paymentmethod"       '付款方式
    TabName(32) = ""                    '发票类型
    TabName(33) = "Item"                '特殊的商品
    TabName(34) = "Operator"            '操作员
End Sub


Private Sub Class_Initialize()
    intGrdBorderWidth = Screen.TwipsPerPixelX
    intGrdBorderHeight = Screen.TwipsPerPixelY
    InitTabName
    InitReceiptArray
End Sub
'---------------------------------
'确定GRID上的某一行是否为空行
'出口:为TRUE时不是空行,为FALSE时是空行
'---------------------------------
Public Function blnNotNullRow(ByVal lngRow As Long) As Boolean
    If C2lng(frmName.GrdCol.TextMatrix(lngRow, ColProperty(xlngColNo(1)).bytGrdIDCol)) <> 0 And _
       C2lng(frmName.GrdCol.TextMatrix(lngRow, ColProperty(xlngColNo(2)).bytGrdIDCol)) <> 0 Then
       blnNotNullRow = True
    Else
        blnNotNullRow = False
    End If
End Function

'------------------------------
'在GRID上写红字
'------------------------------
Public Sub WriteGrd(ByVal strText As String, ByVal lngRow As Long, ByVal lngCol As Long, Optional blnBackRowCol As Boolean = True)
'    Dim lngR As Long, lngC As Long
'    Dim blnB As Boolean
'    Dim strNew As String
'    If lngRow > frmName.grdCol.Rows - 1 Or lngCol > frmName.grdCol.Cols - 1 Or _
'       lngRow < 0 Or lngCol < 0 Then
'        Exit Sub
'    End If
'    strText = Trim(strText)
'    If lngCol = xlngColNo(4) Or lngCol = xlngColNo(5) Or lngCol = xlngColNo(6) Or lngCol = xlngColNo(7) And Len(strText) > 0 Then
'        blnB = My.blnCtrlBinding
'        My.blnRefresh = False
'        My.blnCtrlBinding = False
'        lngR = frmName.grdCol.Row
'        lngC = frmName.grdCol.col
'        frmName.grdCol.Row = lngRow
'        frmName.grdCol.col = lngCol
'        strNew = Left(strText, 1)
'        If Val(strText) < 0 Then
'            frmName.grdCol.CellForeColor = RGB(255, 0, 0)
'            frmName.grdCol.TextMatrix(lngRow, lngCol) = IIf(Mid(Mid(strText, 2), 1, 1) = ".", "0" & Mid(strText, 2), Mid(strText, 2))
'        ElseIf Val(strText) = 0 Then
'            frmName.grdCol.CellForeColor = RGB(0, 0, 0)
'            frmName.grdCol.TextMatrix(lngRow, lngCol) = ""
'        Else
'            frmName.grdCol.TextMatrix(lngRow, lngCol) = IIf(Mid(strText, 1, 1) = ".", "0" & strText, strText)
'            frmName.grdCol.CellForeColor = RGB(0, 0, 0)
'        End If
'        If lngCol = xlngColNo(4) Then '金额类小数位调整
'            frmName.grdCol.TextMatrix(lngRow, lngCol) = Format(frmName.grdCol.TextMatrix(lngRow, lngCol), FormatString(gclsBase.PriceDec))
'        End If
'        frmName.grdCol.Row = lngR
'        frmName.grdCol.col = lngC
'        My.blnCtrlBinding = blnB
'        My.blnRefresh = True
'    Else
'        If lngCol = xlngColNo(12) Then
'            frmName.grdCol.TextMatrix(lngRow, lngCol) = IIf(C2lng(strText) = 0, "", C2lng(strText))
'        Else
'            frmName.grdCol.TextMatrix(lngRow, lngCol) = strText
'        End If
'    End If
    Dim lngR As Long, lngC As Long
    Dim blnB As Boolean
    Dim blnRefreshBak As Boolean
    Dim strNew As String
    
    blnRefreshBak = My.blnRefresh
    If lngRow > frmName.GrdCol.Rows - 1 Or lngCol > frmName.GrdCol.Cols - 1 Or _
       lngRow < 0 Or lngCol < 0 Then
        Exit Sub
    End If
    strText = Trim(strText)
    If blnBackRowCol Then
        lngR = frmName.GrdCol.Row
        lngC = frmName.GrdCol.col
    Else
        lngR = 0
        lngC = 0
    End If
    My.blnRefresh = False
    If lngCol = xlngColNo(4) Then
        If C2Dbl(strText) <> 0 Then
            strText = Format(C2Dbl(strText), FormatString(gclsBase.PriceDec))
        Else
            strText = ""
        End If
    End If
'    Select Case lngCol
'    Case 6, 7   '单价
'        strText = Format(C2Dbl(strText), FormatString(gclsBase.PriceDec))
'    Case 8      '扣率
'        strText = Format(C2Dbl(strText), "0.00")
'    Case 9, 12, 14  '原币
'        strText = Format(C2Dbl(strText), FormatString(intCurDec))
'    Case 10, 13, 15, 16 '本币
'        strText = Format(C2Dbl(strText), FormatString(gclsBase.NaturalCurDec))
'    Case Else
'    End Select
    With frmName.GrdCol
        If .ColAlignment(lngCol) = flexAlignRightCenter And Len(strText) > 0 Then
            If lngR <> lngRow Then
                .Row = lngRow
            End If
            If lngC <> lngCol Then
                .col = lngCol
            End If
            strNew = Left(strText, 1)
            If strNew = "-" Then
                If C2lng(.CellForeColor) <> C2lng(RGB(255, 0, 0)) Then
                    .CellForeColor = RGB(255, 0, 0)
                End If
                .TextMatrix(lngRow, lngCol) = Mid(strText, 2)
            ElseIf Val(strText) = 0 Then
                If C2lng(.CellForeColor) <> C2lng(RGB(0, 0, 0)) Then
                    .CellForeColor = RGB(0, 0, 0)
                End If
                .TextMatrix(lngRow, lngCol) = ""
            Else
                If C2lng(.CellForeColor) <> C2lng(RGB(0, 0, 0)) Then
                    .CellForeColor = RGB(0, 0, 0)
                End If
                .TextMatrix(lngRow, lngCol) = strText
            End If
            If blnBackRowCol Then
                If lngR <> lngRow Then
                    .Row = lngR
                End If

⌨️ 快捷键说明

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