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

📄 bos_othermatcompzero.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_OtherMatCompZero"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
'''''''''''''''''''''''''''''''''''''''''''''''
''备品备件/小辅料结算单(零库存备件)
''建立日期:2006-02-20
''建立人:倪树祥
'''''''''''''''''''''''''''''''''''''''''''''''''
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_AfterSave(bCancel As Boolean)
'保存以后对结算结果进行汇总
    Dim strTemp As String
    strTemp = "exec IC_Sp_SumInvResultZero " & m_BillInterface.CurBillID
    m_BillInterface.K3Lib.UpdateData strTemp
    m_BillInterface.RefreshBill
    
End Sub

Private Sub m_BillInterface_AfterSelBill(ByVal lSelBillType As Long)
''选单之后触发,因为"入库数量"字段无法从单据转换流程中得到,在这里实现!
    Dim lngCurrRow As Long
    Dim strTemp As String
    Dim rsRec As New Recordset
    Dim lngFInterID As Long
    Dim lngFEntryID As Long
    Dim dblFTaxRate As Double
    
On Error GoTo Errhandle

    lngCurrRow = 1
    While (1)
        
        strTemp = "exec IC_Sp_GetContractMsgZero " & m_BillInterface.GetFieldValue("FID_SRC", lngCurrRow) & " ," & m_BillInterface.GetFieldValue("FEntryID_SRC", lngCurrRow)
        Set rsRec = m_BillInterface.K3Lib.GetData(strTemp)
        If Not rsRec.EOF Then
            dblFTaxRate = CDbl(rsRec("FTaxRate")) ' 如果没有税率,则设定为17
            If dblFTaxRate = 0 Then dblFTaxRate = 17
            m_BillInterface.SetFieldValue "FOrderCode", rsRec("FOrderBillNo"), lngCurrRow
            m_BillInterface.SetFieldValue "FInStockBillNo", m_BillInterface.GetFieldValue("FBillNo_SRC", lngCurrRow), lngCurrRow
            m_BillInterface.SetFieldValue "FTaxPrice", rsRec("FTaxPrice"), lngCurrRow
            m_BillInterface.SetFieldValue "FTaxRate", dblFTaxRate, lngCurrRow
            m_BillInterface.SetFieldValue "FAmount", rsRec("FTaxPrice") * m_BillInterface.GetFieldValue("FQty", lngCurrRow), lngCurrRow
            m_BillInterface.SetFieldValue "FTaxAmount", rsRec("FPrice") * dblFTaxRate * m_BillInterface.GetFieldValue("FQty", lngCurrRow) / 100, lngCurrRow
            m_BillInterface.SetFieldValue "FNoTaxAmount", rsRec("FPrice") * m_BillInterface.GetFieldValue("FQty", lngCurrRow), lngCurrRow
            m_BillInterface.SetFieldValue "FSumAmount", rsRec("FTaxPrice") * m_BillInterface.GetFieldValue("FQty", lngCurrRow), lngCurrRow
            m_BillInterface.SetFieldValue "FOrderPrice", rsRec("FPrice"), lngCurrRow
            m_BillInterface.SetFieldValue "FContractCode", rsRec("FContractCode"), lngCurrRow
            If rsRec("FPrice") <> rsRec("FInstockPrice") Then
                m_BillInterface.SetFieldValue "FSamePrice", "N", lngCurrRow
            Else
                m_BillInterface.SetFieldValue "FSamePrice", "Y", lngCurrRow
            End If
        End If
        
        lngCurrRow = lngCurrRow + 1
    Wend
    
Errhandle:
    Exit Sub
End Sub


⌨️ 快捷键说明

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