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 : How to determine if a customer is past due by X daysSearch Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC SQL Sample Scripts Forum

 New Topic 
 
 Post Reply 
[1]  
 How to determine if a customer is past due by X days 
 Author   Message 
  WizWare Technologies 
  
 Group: Members 
 Posts: 2 
 Joined: 2007-04-06 
 Profile
 Posted : 2007-04-06 04:44:34
I am writing this code in vbscript and need to be able to determine, for a given customer name, how much they are past due for X number of days.

pseudocode:
    pastdue_amount = pastdue_lookup(customer name, days past due)

How could I do this easily or would I need to pull a report and then try and parse that information from it?

Thanks, and sorry about my inexperience here, any help is much appreciated. 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-04-06 11:24:35

A customer has invoices that are past due and isn't past due itself. So you need to extract the information out of the invoice table or the collections report.

Using the Invoice table, change 'Handy Builders'  to the name of the customer you are interested in:

SELECT TxnDate as Date, RefNumber, PONumber, DueDate, {fn CURDATE()}-DueDate as "Aging" , BalanceRemaining
FROM Invoice where IsPaid = 0 and DueDate <= {fn CURDATE()}
and CustomerRefFullName = 'Handy Builders'

Or using the Collection Report, change 'Handy Builders'  to the name of the customer you are interested in:

sp_report CollectionsReport show TxnType, Date, RefNumber,
PONumber, Terms, DueDate, Aging, OpenBalance
parameters DateMacro = 'Today', AgingAsOf = 'ReportEndDate',
EntityFilterFullNameWithChildren = 'Handy Builders'
where RowType='DataRow'

Note: The different aging values are because the QuickBooks sample company files set the QuickBooks date as December 15, 2007, while the current date (curdate) uses the system date of my computer which was April 6, 2007.

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to