使用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