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
|
|
Another way to get balance forward for a customer |
Author |
Message |
|
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 |
|
|
|
Tom |
|
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' |
|
|
|
|
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
|
|
|
|
Tom |
|
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| |
|
|
|
|