我正在开发一个程序,它将使用一组发票编号查询 Quickbooks,然后针对每个发票编号。将获得发票,发票号码将主要来自文件。并且存在问题的号码,即他们在快速簿中没有匹配记录的号码将保存在另一个文件中。
现在我在 RefNumberList 中添加了所有发票编号,因为我在以下示例中硬编码了两个数字
IInvoiceQuery Invoices = msgset.AppendInvoiceQueryRq();
Invoices.ORInvoiceQuery.RefNumberList.Add("144");
Invoices.ORInvoiceQuery.RefNumberList.Add("9999");
msgset.Attributes.OnError = ENRqOnError.roeContinue;
if (sessionMgr.doRequests(ref msgset))
{
MessageBox.Show("An error was detected while processing the request. Please check the log files");
return;
}
主要问题是,即使任何一个发票号码在快速簿中都没有记录,整个查询也会失败。