1

QBFC13 を使用して、他の流動資産タイプの口座から銀行口座に預金を作成するプログラムを作成しています。ただし、depositadd メソッドが実行されると、受取人は銀行口座に記入されません。受取人の情報を入力するにはどうすればよいですか? 私は写真を投稿するほどの評判を持っていないので、これは記入が必要なフィールドの写真へのリンクです: http://i.stack.imgur.com/nqWOh.jpg

これが私の現在のコードです:

    Public Sub CreateDeposit()
    On Error GoTo Errs
    Dim depositadd As IDepositAdd
    depositadd = msgSetRequest.AppendDepositAddRq()
    depositadd.DepositToAccountRef.FullName.SetValue("checking")

    depositadd.Memo.SetValue("newdeposit test")
    depositadd.TxnDate.SetValue(Date.Today)



    Dim depositLineAdd As IDepositLineAdd
    depositLineAdd = depositadd.DepositLineAddList.Append()
    depositLineAdd.ORDepositLineAdd.DepositInfo.AccountRef.ListID.SetValue("1EE0000-943382783")
    depositLineAdd.ORDepositLineAdd.DepositInfo.EntityRef.ListID.SetValue("80002534-1335362979")
    depositLineAdd.ORDepositLineAdd.DepositInfo.Amount.SetValue(150.0)
    depositLineAdd.ORDepositLineAdd.DepositInfo.Memo.SetValue("test memo lineitem")


    ' send the request to QB
    Dim msgSetResponse As IMsgSetResponse
    msgSetResponse = qbSessionManager.DoRequests(msgSetRequest)

    ' check to make sure we have objects to access first
    ' and that there are responses in the list
    If (msgSetResponse Is Nothing) Or _
        (msgSetResponse.ResponseList Is Nothing) Or _
        (msgSetResponse.ResponseList.Count <= 0) Then
        Exit Sub
    End If

    ' Start parsing the response list
    Dim responseList As IResponseList
    responseList = msgSetResponse.ResponseList
    MsgBox(msgSetRequest.ToXMLString())
    ' go thru each response and process the response.
    ' this example will only have one response in the list
    ' so we will look at index=0
    Dim response As IResponse
    response = responseList.GetAt(1)
    If (Not response Is Nothing) Then
        If response.StatusCode <> "0" Then
            MsgBox("DepositFunds unexpexcted Error - " & vbCrLf & "StatusCode = " & response.StatusCode & vbCrLf & vbCrLf & response.StatusMessage)
        Else
            MsgBox("The funds were successfully deposited in Checking")
            MsgBox(msgSetResponse.ToXMLString())
        End If
    End If

    Exit Sub

Errs:
        MsgBox("HRESULT = " & Err.Number & " (" & Hex(Err.Number) & ") " & vbCrLf & vbCrLf & Err.Description, _
                MsgBoxStyle.Critical, _
                "Error in DepositFunds")



End Sub
4

1 に答える 1

0

これは、QuickBooks の設計方法であるため、実際には SDK の問題ではありません。QuickBooks の預金取引には複数の行を含めることができるため、行が 1 つしかない場合でも、銀行のレジスターには名前が表示されません。手動で銀行のレジスターに移動して名前を追加することはできますが、SDK を介してそれを行う方法はありません。預金を作成し、レジスターで編集するQuickBooksでも2段階のプロセスです。

SDK を使用してトランザクションからこの情報を表示する必要がある場合は、Deposit トランザクションの代わりに Journal Entries を使用する必要がある場合があります。

于 2014-05-23T17:03:11.097 に答える