Aged Accounts Receivable

Get our Free Newletter

Don't you have the time to be online here at DUG every day? So how do you follow what is going on in the Dynamics industry and community?
If you subscribe to the DUG Newsletter then you can relax! We will make sure that you don't miss the big news!

Check out our
Newsletter Subscription Center
page a complete list of our different newsletters.

Not Answered This post has 0 verified solutions | 9 Replies | 2 Followers

4 Posts
45 Points
Joined: 2011-6-21
Last Online:
2011-6-23 18:34
Location: Aberdeen
Robert Buchan posted on 2011-6-21 20:17

Apologies if this has been covered previously, this is my first post.

I am trying to recreate the Aged Accounts Receviable report in a PHP script, I am able to query the SQL database to acces the tables Cust Ledg_ Entry and Details Cust_ Ledger Entry and it appears that beween the 2 tables I have the correct details, my issue is knowing when I use the values from the detailed table and when not to.

I have been told I need to check the balance at the time the report ends, so I have a report that ends 30th of April so I have the following SQL.

SUM(CASE WHEN([company$Detailed Cust_ Ledg_ Entry.[Initial Entry Due Date] < '2011-04-30' THEN ['Amount (LCY)] END) AS BAL

If the balance is 0 then the customer entry ledger info is not included in the report. This is the point I am going wrong, any help greatly appreciated.

Thanks

All Replies

Male
660 Posts
7,560 Points
Joined: 2007-1-2
Last Online:
2013-5-16 12:27
Location: India
Manish replied on 2011-6-22 7:07

There is no need of customer ledger table, you can only use the detail table to build the report.

"Verify Solution" to post that helped you solve the problem.

4 Posts
45 Points
Joined: 2011-6-21
Last Online:
2011-6-23 18:34
Location: Aberdeen
Robert Buchan replied on 2011-6-22 10:32

Thanks for that, if I stick to the detailed table it doesnt appear to match the hard copy I have from Navision. I am using the following SQL statement for a report ending 30-04-2011 for the current month, most of the time this appears correct but in some cases it doesnt match,

SUM(CASE WHEN ([$Detailed Cust_ Ledg_ Entry].[Initial Entry Due Date] between '2011-04-01' AND '2011-04-30') THEN [Amount (LCY)] END) as currentm

Is this incorrect, am I missing something?

Thanks for you help.

Male
660 Posts
7,560 Points
Joined: 2007-1-2
Last Online:
2013-5-16 12:27
Location: India
Manish replied on 2011-6-23 7:37

Instead of initial entry due date why don't you try with posting date.

"Verify Solution" to post that helped you solve the problem.

4 Posts
45 Points
Joined: 2011-6-21
Last Online:
2011-6-23 18:34
Location: Aberdeen
Robert Buchan replied on 2011-6-23 10:14

The values using Posting Date appear more wrong than when using the initial entry due date. Is there any point that I should take the value from the cust ledge entry table rather than the detailed cust entry table, a combination of them both appear the most correct.

1 example I have gets £205 not due from the detailed table but gets £602 from the cust ledger table, the 602 is the correct one according to the hard copy I have received.

Is there any example code you can give me for creating the report?

Thanks.

Male
1,432 Posts
34,823 Points
Joined: 2007-3-2
Last Online:
2013-5-24 12:42
Location: Houston, TX, USA
DynamicsNAVMVP
Moderator
Matt Traxinger replied on 2011-6-23 13:09

Have you looked at the code of the actual NAV report to see what fields it is using? I understand you're doing this in another language, but you should be able to get some information from the report code.

Male
660 Posts
7,560 Points
Joined: 2007-1-2
Last Online:
2013-5-16 12:27
Location: India
Manish replied on 2011-6-23 13:12

You can check navision reports like thr customer trial balance to check the fields used to calculate the balance amount.

"Verify Solution" to post that helped you solve the problem.

4 Posts
45 Points
Joined: 2011-6-21
Last Online:
2011-6-23 18:34
Location: Aberdeen
Robert Buchan replied on 2011-6-23 17:44

Sorry, I am really new to this and have never seen Navision in use, how do I access the code behind the reports?

Thnaks

Male
660 Posts
7,560 Points
Joined: 2007-1-2
Last Online:
2013-5-16 12:27
Location: India
Manish replied on 2011-6-24 6:54

You need to design the report (Ctrl+F2) and in there use the C/AL code to see the code.

"Verify Solution" to post that helped you solve the problem.

33 Posts
210 Points
Joined: 2012-1-21
Last Online:
2013-5-23 15:22
Location: Hyderabad India
mohammed sami replied on 2012-9-27 11:12

Dear All,

i want to display Aged Account Receivable report in fixed slot wise

 

0-3days 4-7days 8-12days 13-16days 17-21days above 21days

 

shall i need to hardcode it or we can do this by standard report.

 

 

 

Page 1 of 1 (10 items) | Get this RSS feed | Bookmark and Share