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

📄 costprice.cls

📁 金算盘软件代码
💻 CLS
📖 第 1 页 / 共 5 页
字号:
    ReceiptType(12).lngReceiptTypeID = 12
    ReceiptType(12).strReceiptTypeName = "销售订单"
    ReceiptType(12).lngReceiptID = 3
    
    ReceiptType(13).lngReceiptTypeID = 13
    ReceiptType(13).strReceiptTypeName = "商品销售"
    ReceiptType(13).lngReceiptID = 4

    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(1).bytGrdIDCol)) <> 0 And C2Dbl(frmName.GrdCol.TextMatrix(lngRow, 4)) <> 0 Then
        blnNotNullRow = True
    Else
        blnNotNullRow = False
    End If
End Function
'--------------------------------------
'在GRID上删除一行
'入口:行号
'--------------------------------------
Public Function blnDeleteARow(ByVal lngRow As Long) As Boolean
    Dim i As Integer
    Dim j As Integer
    
    If My.bytRegion = FGrid And Not ctrInput Is Nothing Then
        ctrInput.Visible = False
        DoEvents
    End If
    My.blnIsChanged = True
    If lngRow > frmName.GrdCol.Rows - 1 Then Exit Function
    If frmName.GrdCol.Row >= 1 And frmName.GrdCol.Rows > 2 Then
        frmName.GrdCol.RemoveItem frmName.GrdCol.Row
        setAllItemproperty
        frmName.GrdCol.col = 1
    ElseIf frmName.GrdCol.Row = 1 Then
        frmName.GrdCol.Rows = 1
        InsertARow False
        frmName.GrdCol.Row = 1
        frmName.GrdCol.col = 1
        setAllItemproperty
    End If
    If Not ctrInput Is Nothing Then
        ctrInput.Move -32000, -32000
    End If
    blnDeleteARow = True
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 strTmp 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
'
'    strTmp = strText
'    If frmName.grdCol.ColAlignment(lngCol) = flexAlignRightCenter 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
'
'        If lngCol = 4 Then
'            strTmp = Format(Abs(C2Dbl((strText))), FormatString(gclsBase.PriceDec))
'            frmName.grdCol.TextMatrix(lngRow, lngCol) = strTmp
'        ElseIf lngCol = 5 Then
'            strTmp = Format(Abs(C2Dbl((strText))), strCurDec)
'            frmName.grdCol.TextMatrix(lngRow, lngCol) = strTmp
'        Else
'            frmName.grdCol.TextMatrix(lngRow, lngCol) = Abs(C2Dbl((strText)))
'        End If
'        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
'
'        frmName.grdCol.Row = lngR
'        frmName.grdCol.col = lngC
'        My.blnCtrlBinding = blnB
'        My.blnRefresh = True
'    Else
'        frmName.grdCol.TextMatrix(lngRow, lngCol) = strText
'    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
    Select Case lngCol
    Case 4   '单价
        strText = Format(C2Dbl(strText), FormatString(gclsBase.PriceDec))

⌨️ 快捷键说明

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