使用IPP的Java 2.0.9的devkit(也试图与2.0.6),我已经实现了一个包装方法供客户ID QBO查找特定发票和发生在某个日期之前。我正与一个特定的客户谁拥有跨越〜16个月65张发票测试,但查询总是返回前dateFinish(endTransactionDate)发生的10“最新”的发票。我已经试过各种排列以及:仅包括客户ID标准,只包括endTransactionDate,增加一个“真正的早期” startTransactionDate,开发版和量产版。就好像API正在剔除结果列表并仅包含前10条记录,似乎没有一个好的理由。发票查询总是返回不超过10个结果
public static List<QBInvoice> findInvoices(PlatformSessionContext context, String dataSource, Calendar dateFinish, List<String> customerIds) throws QBInvalidContextException, Exception {
QBInvoiceService invoiceService = QBServiceFactory.getService(context, QBInvoiceService.class);
QBInvoiceQuery invoiceQuery = new QBInvoiceQuery(context);
invoiceQuery.setEndTransactionDate(QuickbooksUtil.dateToQbDate(dateFinish));
if (!customerIds.isEmpty()) {
IdSet idSet = QuickbooksUtil.stringListToIdSet(context, dataSource, customerIds);
invoiceQuery.setContactIdSet(idSet);
}
return invoiceService.getInvoices(context, invoiceQuery);
}
工作正常!谢谢。在QBInvoiceQuery对象上调用setStartPage和setChunkSize。 – user2096827 2013-02-21 21:15:08