U8應收管理Co單據
阿新 • • 發佈:2020-09-23
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#例子請加微信