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

📄 bos_aprepayinfo.cls

📁 金蝶地磅称重插件
💻 CLS
字号:
VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "BOS_APRepayInfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
'''''''''''''''''''''''''''''''''''''''''''''''
''应付退款单
''建立日期:2005-07-28
''建立人:倪树祥
'''''''''''''''''''''''''''''''''''''''''''''''''
Option Explicit
'定义 BillEvent 接口. 必须具有的声明, 以此来获得事件
Private WithEvents m_BillInterface  As BillEvent
Attribute m_BillInterface.VB_VarHelpID = -1
'定义 ListEvents 接口. 必须具有的声明, 以此来获得事件
Private WithEvents m_ListInterface  As ListEvents
Attribute m_ListInterface.VB_VarHelpID = -1
 
Public Sub Show(ByVal oBosInterface As Object)
    'BillEvent 接口实现
    '注意: 此方法必须存在, 请勿修改
    Select Case VBA.TypeName(oBosInterface)
        Case "BillEvent"
            Set m_BillInterface = oBosInterface
        Case "ListEvents"
            Set m_ListInterface = oBosInterface
    End Select
End Sub

Private Sub Class_Terminate()
    '释放接口对象
    '注意: 此方法必须存在, 请勿修改
    Set m_BillInterface = Nothing
    Set m_ListInterface = Nothing
End Sub

Private Sub m_BillInterface_AfterSelBill(ByVal lSelBillType As Long)
    Dim lngCurrRow As Long
    Dim dblCurrAmount As Double
    Dim dblSumAmount As Double
    dblCurrAmount = 0
    dblSumAmount = 0
    lngCurrRow = 1
    
On Error GoTo Errhandle

   Do
        dblCurrAmount = m_BillInterface.GetFieldValue("FApplyAmountFor", lngCurrRow)
        If dblCurrAmount > 0 Then
            dblSumAmount = dblSumAmount + dblCurrAmount
        Else
            Exit Do
        End If
        
        lngCurrRow = lngCurrRow + 1
    Loop While 1
    
Errhandle:
    m_BillInterface.SetFieldValue "FAmountFor", dblSumAmount
    
End Sub

Private Sub m_BillInterface_Change(ByVal dct As KFO.IDictionary, ByVal dctFld As KFO.IDictionary, ByVal Col As Long, ByVal Row As Long, Cancel As Boolean)
    If dct.GetValue("FFieldName") = "FApplyAmountFor" Then
        m_BillInterface.SetFieldValue "FAmountFor", m_BillInterface.Sum(dct, 1)
    End If
    
    Dim iFItemClassID As Integer
    Dim strSql As String
    Dim rsRec As New Recordset
    If UCase(dct.GetValue("FFieldName")) = "FCUSTOMER" Then
        iFItemClassID = m_BillInterface.GetFieldValue("FItemClassID")
        strSql = m_BillInterface.GetFieldValue("FCustomer")
        If iFItemClassID = 1 And strSql <> "" Then  '是客户类型的
            Set rsRec = m_BillInterface.K3Lib.GetData("select FAddress from t_Organization  where FItemID = " & strSql & " and FAddress is not null ")
            If rsRec.EOF = False Then
                m_BillInterface.SetFieldValue "FAddr", rsRec("FAddress")
            End If
        End If
    End If
    
End Sub



⌨️ 快捷键说明

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