U8应收管理Co单据
增加
Dim oVouch As New UFAPBO.clsAPVouch
oVouch.Init oLogin, m_conn, "AR“
oVouch.First = bStartFlag
AddSingle = oVouch.VouchCheck(oDomH, oDomB, sRet)
If AddSingle Then
AddSingle = oVouch.SaveVouch(oDomH, oDomB, sRet)
End If
审核
Dim oDom As New DOMDocument
Dim oElm As IXMLDOMElement
Dim sTemp As String
oDom.loadXML "<condition/>"
Set oElm = oDom.documentElement
oElm.setAttribute "type", 0
getFldValueFromDom oDomH, "cLink", sTemp
oElm.setAttribute "cLink", sTemp
getFldValueFromDom oDomH, "cVouchType", sTemp
oElm.setAttribute "cVouchType", sTemp
getFldValueFromDom oDomH, "cVouchID", sTemp
oElm.setAttribute "cVouchID", sTemp
oElm.setAttribute "bFirst", True
AddSingle = oVouch.Sign(oElm.xml, sRet)
弃审
Dim oDom As New DOMDocument
Dim oElm As IXMLDOMElement
Dim sTemp As String
Dim oPub As New UFAPBO.clsPub_AP
oDom.loadXML "<condition/>"
Set oElm = oDom.documentElement
oElm.setAttribute "type", 0
oElm.setAttribute cLinkFld, cLink
oElm.setAttribute "cVouchType", cVouchType
oElm.setAttribute "cVouchID", cVouchID
oElm.setAttribute "bneedcheck", "1"
oPub.Init oLogin, oCn, oAcc
CancelSign = oPub.CancelSign_ApVouch(oElm.xml, xmlMsg)
删除
Dim XmlCondition As String
Dim bBeginTrans As Boolean
Dim m_oVouch As Object
Dim cLink As String
Set m_oVouch = New UFAPBO.clsAPVouch
getFldValueFromDom oHead,) "cLink", cLink
XmlCondition = "<condition keytype='1' " & cLinkFld & "='" & cLink & "'/>"
DeleteVouch = oVouch.DeleteVouch(XmlCondition, xmlMsg)
应收应付管理Co单据
Select Case m_VouchClass
Case "应收单", "应付单"
Set m_oVouch = New UFAPBO.clsAPVouch
m_oVouch.Init oLogin, oCn, oAcc
Case "收款单", "付款单"
Set m_oVouch = New UFAPBO.clsCloseBill
m_oVouch.Init oLogin, oCn, oAcc
End Select
Select Case m_VouchClass
Case "应收单", "应付单"
cLinkFld = "cLink"
cVouchTypeFld = "cVouchType"
cVouchIdFld = "cVouchID"
Case "收款单", "付款单"
cLinkFld = "iID"
cVouchTypeFld = "cVouchType"
cVouchIdFld = "cVouchID"
Case "销售发票"
cLinkFld = "SBVID"
cVouchTypeFld = "cVouchType"
cVouchIdFld = "cSBVCode"
Case "采购发票"
cLinkFld = "PBVID"
cVouchTypeFld = "cPBVBillType"
cVouchIdFld = "cPBVCode"
End Select
If m_VouchClass = "应收单" Or m_VouchClass = "应付单" Then
XmlCondition = "<condition keytype='1' " & cLinkFld & "='" & cLink & "'/>"
Else
XmlCondition = "<condition keytype='2' " & cLinkFld & "='" & cLink & "'/>"
End If
Select Case m_VouchClass
Case "应收单", "应付单"
Sign = oPub.Sign_ApVouch(oElm.xml, xmlMsg)
Case "收款单", "付款单"
Sign = oPub.Sign_CloseBill(oElm.xml, xmlMsg)
Case "销售发票"
Sign = oPub.Sign_SaleBill(oElm.xml, xmlMsg)
Case "采购发票"
Sign = oPub.Sign_PurBill(oElm.xml, xmlMsg)
End Select
Select Case m_VouchClass
Case "应收单", "应付单"
CancelSign = oPub.CancelSign_ApVouch(oElm.xml, xmlMsg)
Case "收款单", "付款单"
CancelSign = oPub.CancelSign_CloseBill(oElm.xml, xmlMsg)
Case "销售发票"
CancelSign = oPub.CancelSign_SaleBill(oElm.xml, xmlMsg)
Case "采购发票"
CancelSign = oPub.CancelSign_PurBill(oElm.xml, xmlMsg)
End Select
核销
Dim oCancel As Object
Set oCancel = CreateObject("U8ApCancel.cLsCancel")
oCancel.Init Login1, SysId
…..
errMsg = oDom.xml
bRet = oCancel.save(errMsg)
如需C#例子请加微信