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 : Another way to get balance forward for a customerSearch Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC SQL Support Forum

 New Topic 
 
 Post Reply 
[1]  
 Another way to get balance forward for a customer 
 Author   Message 
  jrademan 
  
 Group: Members 
 Posts: 29 
 Joined: 2007-01-27 
 Profile
 Posted : 2008-09-13 00:12:43
Hi,

I am having problems calling sp_reports (on my side, not qodbc)
Is there another way to calculate balance forward for a customer

I am creating custom statements and need the balance forward to complete statement.

thanks

Johan 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-09-14 17:03:54

You can start by using this to see transactions, simply change the name to the customer full name you want to see:

SELECT CustomerRefFullName as RowData, Type, TxnDate as Date, RefNumber as Num,
ARAccountRefFullName as Account, Remaining as Amount FROM Sales NOSYNC
where CustomerRefFullName = 'ABC Test Company'and IsPaid = 0
or (CustomerRefFullName = 'ABC Test Company' and Type = 'CreditMemo')
Order by CustomerRefFullName, TxnDate, RefNumber

but if you simply just want the balance of a customer, do:

SELECT Fullname, TotalBalance from customer unoptimized where FullName = 'ABC Test Company'

 

  Top 
  jrademan 
  
 Group: Members 
 Posts: 29 
 Joined: 2007-01-27 
 Profile
 Posted : 2008-09-14 20:05:08
Hi Tom

Thanks for the info,

If I run the queries eg. on the 15th of the month but want to see what the customers balance was at a certain date in the past, eg. the beginning of the month.
Is there a way to specify the date?

Trouble I have currently is that a current payment has closed an invoice in the past and that changes by balance calculation.

TIA

Johan

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-09-15 07:43:51
Then you're going to have to use something like this:

sp_report CustomerBalanceDetail show Blank, TxnType, Date,
RefNumber, Amount, RunningBalance
parameters DateMacro = 'LastMonth',
EntityFilterFullNameWithChildren = 'ABC Test Company'

All the predefined DateMacro options available to you are:
|All|Today|ThisWeek|ThisWeekToDate|ThisMonth|ThisMonthToDate|ThisQuarter|ThisQuarterToDate
|ThisYear|ThisYearToDate|Yesterday|LastWeek|LastWeekToDate|LastMonth|LastMonthToDate|LastQuarter
|LastQuarterToDate|LastYear|LastYearToDate|NextWeek|NextFourWeeks|NextMonth|NextQuarter|NextYear|

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to