0
A
回答
0
您將需要使用CreditMemoQuery。
請參閱屏幕參考指南 - http://developer-static.intuit.com/qbsdk-current/common/newosr/index.html或查看其他請求的樣本並對其進行修改。
https://developer.intuit.com/docs/0250_qb/0050_documentation/sample_code
0
使用ICreditMemoQuery
對象檢索從QuickBooks信用記錄表。下面是一個示例C#代碼來獲取信用記錄表使用QuickBooks的SDK 13.0:
using QBXMLRP2Lib;
using Interop.QBFC13;
public class SDKApp
{
private QBSessionManager sessionMgr;
public SDKApp()
{
// in the class constructor - sessionMgr is a member variable
sessionMgr = new QBSessionManager();
}
public void GetCreditMemoData()
{
// open connection and begin session before data fetch - intentionally skipped this code
IMsgSetRequest msgset = null;
ICreditMemoQuery creditMemoQuery = null;
try
{
// during data fetch
msgset = sessionMgr.CreateMsgSetRequest("US", 13, 0);
creditMemoQuery = msgset.AppendCreditMemoQueryRq();
creditMemoQuery.ORTxnQuery.TxnFilter.ORDateRangeFilter.ModifiedDateRangeFilter.FromModifiedDate.SetValue(new DateTime(2012, 3, 31), false); // you can apply filters too
IMsgSetResponse msgRes = sessionMgr.DoRequests(msgset);
IResponseList responseList = msgRes.ResponseList;
if (responseList.Count > 0)
{
IResponse response = responseList.GetAt(0);
ICreditMemoRetList creditMemoList = response.Detail as ICreditMemoRetList;
if (creditMemoList == null)
{
return;
}
for (int i = 0; i <= creditMemoList.Count - 1; i++)
{
ICreditMemoRet qbCreditMemo = creditMemoList.GetAt(i);
Console.WriteLine("Credit no.:" + qbCreditMemo.TxnNumber.GetValue() + " Customer:" + qbCreditMemo.CustomerRef.FullName.GetValue() + " Total:" + qbCreditMemo.TotalAmount.GetValue());
}
}
}
catch (Exception ex)
{
//handle exception here
}
finally
{
if (msgset != null)
{
Marshal.FinalReleaseComObject(msgset);
}
if (creditMemoQuery != null)
{
Marshal.FinalReleaseComObject(creditMemoQuery);
}
}
// end session and close connection after data fetch - intentionally skipped this code
}
}
希望這有助於。
相關問題
- 1. 從GitHub桌面恢復
- 2. 重構並從此備忘錄代碼刪除重複
- 3. 的Quickbooks桌面C#集成
- 4. 使用C#使用信用備忘錄Magento API使用C#
- 5. 通過java代碼備份和恢復Hsqldb數據庫
- 6. QuickBooks Online從桌面應用程序
- 7. Php Quickbooks桌面:登錄失敗
- 8. 如何使用java通過qbxmlrp連接到Quickbooks premier桌面版?
- 9. C#MySqL恢復代碼
- 10. 恢復Emacs會話/桌面
- 11. 從通過C#代碼
- 12. 使用C#代碼恢復失敗
- 13. 連接到QuickBooks桌面
- 14. Gmail API可恢復上傳C#桌面應用程序草稿
- 15. Pimping scalaz備忘錄
- 16. 長度備忘錄
- 17. 如何恢復用戶忘記密碼,如果密碼是saltedhash?
- 18. 用於MAC的Quickbooks桌面集成
- 19. 用Java通過Facebook登錄從桌面刪除權限框
- 20. 如何從SQL備份恢復我的TFS源代碼?
- 21. Quickbooks Desktop通過REST API發送信息
- 22. 通過COM將複雜的信息從Delphi代碼傳遞到C#
- 23. 1個彈出菜單和2個備忘錄,其中備忘錄是從
- 24. 流星 - 從備忘錄列表中顯示單個備忘錄頁
- 25. 通過C#代碼
- 26. 通過C#代碼
- 27. 通過本地網絡從iOS設備瀏覽桌面文件
- 28. 從C#6重構/恢復代碼回到C#5
- 29. Javascript代碼簡化備忘單
- 30. 通過MySQL(phpmyadmin)恢復密碼?
我用上面提到的方式,但我只想從Quickbooks中檢索所有的貸項通知單。因爲我是quickbooks集成的新手,所以我很難理解CreditMemoQuery()。如果您使用相關代碼幫助我僅從QB中檢索貸項憑證,那將非常棒。 – Shyam