帐单支付检查 - 无法找到请求中指定的对象

时间:2015-03-05 21:41:09

标签: quickbooks qbfc

我正在使用C#和QBFC13连接到QB Enterprise 13的桌面版。我正在创建Bills然后创建账单支付支票以支付这些账单。我一直收到错误“无法找到请求中指定的对象48E-1425590500”。该数字是支票支付的账单的TxnID。我100%肯定我正在使用正确的TxnID,因为我直接从比尔那里得到了它。相关代码如下。非常感谢任何帮助。

billPaymentCheck.PayeeEntityRef.FullName.SetValue(payee);
billPaymentCheck.BankAccountRef.FullName.SetValue(reader["BankAccount"].ToString());
billPaymentCheck.APAccountRef.FullName.SetValue(reader["APAccount"].ToString());
billPaymentCheck.Memo.SetValue(reader["Memo"].ToString());
billPaymentCheck.ORCheckPrint.IsToBePrinted.SetValue(false);

IAppliedToTxnAdd txn = billPaymentCheck.AppliedToTxnAddList.Append();
txn.TxnID.SetValue(bill.TxnID.GetValue());
txn.PaymentAmount.SetValue((double)reader["Amount"]);

1 个答案:

答案 0 :(得分:1)

首先检查账单的应付账款账户是否与账单支付相同。您可以更改代码以使用Bill的AP帐户而不是读者,并查看是否有效。

billPaymentCheck.APAccountRef.FullName.SetValue(bill.APAccountRef.FullName.GetValue());

要检查的另一件事是收款人与账单和账单付款完全相同。

billPaymentCheck.PayeeEntityRef.FullName.SetValue(bill.VendorRef.FullName.GetValue());