我不确定从Quick Books中检索客户余额明细的最佳方法。我尝试使用TransactionQuery,但它缺少客户付款(请参阅下面的代码)。我也尝试使用GeneralDetailReportQuery,但这种格式很难直接读入SQL,因为它需要一些操作。获取声明的客户余额详细信息的最佳方法是什么?
TransactionQuery代码:
Public Sub BuildCustomerStmtRq(ByRef inputXMLDoc As XmlDocument, ByRef qbXMLMsgsRq As XmlElement)
Dim TransactionQueryRq As XmlElement
TransactionQueryRq = inputXMLDoc.CreateElement("TransactionQueryRq")
qbXMLMsgsRq.AppendChild(TransactionQueryRq)
TransactionQueryRq.AppendChild(inputXMLDoc.CreateElement("IncludeRetElement")).InnerText = "TxnDate"
TransactionQueryRq.AppendChild(inputXMLDoc.CreateElement("IncludeRetElement")).InnerText = "Amount"
TransactionQueryRq.AppendChild(inputXMLDoc.CreateElement("IncludeRetElement")).InnerText = "Memo"
TransactionQueryRq.AppendChild(inputXMLDoc.CreateElement("IncludeRetElement")).InnerText = "EntityRef"
Dim TransactionAccountFilter As XmlElement
TransactionAccountFilter = inputXMLDoc.CreateElement("TransactionAccountFilter")
TransactionQueryRq.AppendChild(TransactionAccountFilter)
TransactionAccountFilter.AppendChild(MakeSimpleElem(inputXMLDoc, "AccountTypeFilter", "AccountsReceivable"))
End Sub
'Copied this function from Intuit example code
Private Function MakeSimpleElem(doc As XmlDocument, tagName As String, tagVal As String) As XmlElement
Dim elem As XmlElement
elem = doc.CreateElement(tagName)
elem.InnerText = tagVal
Return elem
End Function
答案 0 :(得分:0)
CustomerBalanceDetail可能是唯一可以提供所有信息的请求。如果能够满足您的需求,那么CustomerQuery只会为您提供总计。