Добавить платеж в Reckon / Quickbooks рабочий стол VB.NET - PullRequest
0 голосов
/ 22 ноября 2018

Я пытаюсь добавить оплату на рабочем столе Reckon / Quickbooks, пробовал много разных способов, но все же мне не повезло.Ниже приведен код, который я нашел из справочника Quickbooks API

 Dim paymentAdd As IReceivePaymentAdd = requestMsgSet.AppendReceivePaymentAddRq()
paymentAdd.CustomerRef.ListID.SetValue("Code007")
Dim paymentLine As IAppliedToTxnAdd = paymentAdd.ORApplyPayment.AppliedToTxnAddList.Append()
''Set the invoice TxnID and amount of the payment to apply
paymentLine.TxnID.SetValue(12)
paymentLine.PaymentAmount.SetValue(5.50)
paymentAdd.Memo.SetValue("Comments")
paymentAdd.PaymentMethodRef.FullName.SetValue("Cash")
paymentAdd.DepositToAccountRef.FullName.SetValue("Funds to be deposited")
paymentAdd.TxnDate.SetValue(New Date())
paymentAdd.TotalAmount.SetValue(5.50))
''paymentAdd.ORApplyPayment.IsAutoApply.SetValue(False)

sessionManager.OpenConnection("My connection")
sessionManager.BeginSession("Beginning the Session")

''Send the request and get the response from QuickBooks
Dim responseMsgSet As IMsgSetResponse = sessionManager.DoRequests(requestMsgSet)

'End the session and close the connection to QuickBooks
sessionManager.EndSession()
sessionManager.CloseConnection()

Dim response As IResponse = responseMsgSet.ResponseList.GetAt(0)

Dim responseType As ENResponseType
responseType = CType(response.Type.GetValue(), ENResponseType)
'If (responseType = ENResponseType.rtReceivePaymentAddRs) Then
'End If

Dim paymentRet As IReceivePaymentRet = DirectCast(response.Detail, IReceivePaymentRet)

Теперь в последней строке, где я получаю ответ от quickbooks в responsece.Detail, которыйвсегда пусто и в ответе. Сообщение Я получаю следующее сообщение:

Связанный объект уже используется или не смог получить блокировку для этого объекта.

Я пытаюсь импортировать данные в ReckonAccounts Enterprise 2018 и использую библиотеку QBFC12.Использование в однопользовательском режиме и открытие только главного окна внутри приложения.

Я обнаружил одну проблему в stackoverflow для платежей, код почти такой же, но не уверен, почемуЯ не могу добавить платеж.

Любая помощь будет оценена.Благодаря.

...