Member Login

Username
Password
Forget Password
New Sign Up
Search Forum

Buy Support
Incidents

If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:

Click Here
If you can't login and post questions or you are having trouble viewing forum posts:
Click Here
Callback
Support

If you live in USA, UK, Canada, Australia or New Zealand, you can leave us details on your question and request us to call you back and discuss them with you personally  (charges apply).

Click Here
 
Buy Support
Incidents
If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:
Click Here

Forum : Customer Payment HistorySearch Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC v8 Forum

 New Topic 
 
 Post Reply 
[1]  
 Customer Payment History 
 Author   Message 
  Billy 
  
 Group: Members 
 Posts: 4 
 Joined: 2008-03-22 
 Profile
 Posted : 2008-03-25 04:33:13

What table do I read to find all payments. I have tried these but get a different total then if I add up all the Payment lines on a “Transaction List by Customer”

 

 

select sum(TotalAmount) from ReceivePayment

select sum(TotalAmount-UnusedPayment) from ReceivePayment

select sum(TotalAmount) from ReceivePaymentLine

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-03-26 12:18:19

Try starting here:

SELECT ReceivePaymentLine.TxnDate as "Date",
Invoice.CustomerRefFullName as "Job",ReceivePaymentLine.AppliedToTxnRefNumber as "Inv No.",
Invoice.SubTotal as "Orig. Amt.", ReceivePaymentLine.AppliedToTxnDiscountAmount as "Discount",
ReceivePaymentLine.AppliedToTxnAmount as "Payment" FROM ReceivePaymentLine, Invoice
where ReceivePaymentLine.AppliedToTxnTxnID= Invoice.TxnID
and (ReceivePaymentLine.TxnDate >= {d '2007-06-01'} and ReceivePaymentLine.TxnDate < {d '2008-07-01'})
order by Invoice.CustomerRefFullName

 

 

  Top 
  Billy 
  
 Group: Members 
 Posts: 4 
 Joined: 2008-03-22 
 Profile
 Posted : 2008-03-26 12:47:13
Sorry, no. I tried this in three different companies of the same Quick Books and one is good and 2 don't agree with themselfs.

Here is an example from one of the companies

TxnListByCustomer: Payment  = 14896134.46

SELECT     sum(AppliedToTxnAmount) FROM qbReceivePaymentLine = 14824297.07

SELECT     sum(TotalAmount) FROM qbReceivePayment  = 14912145.76 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-03-26 13:44:35

Of course they most likely will not match as some payments may not be applied, should be:

SELECT     sum(TotalAmount) - sum(UnusedPayment) FROM ReceivePayment

 

  Top 
  Billy 
  
 Group: Members 
 Posts: 4 
 Joined: 2008-03-22 
 Profile
 Posted : 2008-03-27 00:54:39

I still get the wrong answer. Please tell me the select statement behind the TxnListByCustomer

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-03-27 08:16:30

The SQL for the TnxListByCustomer report is:

sp_report TxnListByCustomer show  RowData, TxnType, Date, RefNumber, Memo, Account, ClearedStatus, SplitAccount, Amount
parameters DateMacro = 'All' where RowType = 'DataRow'

however this also shows Sales Order, General Journals and Credit Memos not seen in the ReceivePayment table.

 

  Top 
  Billy 
  
 Group: Members 
 Posts: 4 
 Joined: 2008-03-22 
 Profile
 Posted : 2008-03-27 09:47:42

Yes, clearly I understand the sp_report TxnListByCustomer, I need to learn what tables this report reads so I can also read the same data and get the same answer. The sp_report is inadequate for my needs. I am asking what TABLES the sp_report SELECTS and what columns it gets the amounts from!

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-03-28 07:45:49

The QODBC tables are virtual, they don't exist in QuickBooks. sp_report directly calls the same QuickBooks reporting engine used in the QuickBooks User Interface via Intuit's qbXML SDK. There are no direct equivalents between many of reports and tables. Most reports comprise of data seen in multiple QODBC "virtual" tables and in some cases, only reports contain some data as Intuit have not provided full access to all data areas within QuickBooks.

The TnxListByCustomer report reads data from Sales Order, Invoice, General Journal, Credit Memo, ReceivePayment and their revalent LinkedTxn tables.

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to