📄 bos_othermatcomp.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_OtherMatComp"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
'''''''''''''''''''''''''''''''''''''''''''''''
''备品备件/小辅料结算单(非零库存备件)
''建立日期:2005-09-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_SumInvResult " & 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
On Error GoTo Errhandle
lngCurrRow = 1
While (1)
strTemp = "exec IC_Sp_GetContractMsg " & m_BillInterface.GetFieldValue("FID_SRC", lngCurrRow) & " ," & m_BillInterface.GetFieldValue("FEntryID_SRC", lngCurrRow)
Set rsRec = m_BillInterface.K3Lib.GetData(strTemp)
If Not rsRec.EOF Then
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", rsRec("FTaxRate"), lngCurrRow
m_BillInterface.SetFieldValue "FAmount", rsRec("FTaxPrice") * m_BillInterface.GetFieldValue("FQty", lngCurrRow), lngCurrRow
m_BillInterface.SetFieldValue "FTaxAmount", rsRec("FPrice") * rsRec("FTaxRate") * 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 + -