Search code examples
navisiondynamics-nav

How to calculate [Remaining Amount] in Dynamics Nav report?


How to calculate [Remaining Amount] in Dynamics Nav report:

Receivables / Customers / Costomer No. / List of Ledger Entries

I reach NAV by SQL only. Which table, and column names should I take the data from?

Update. My guess of direction is that from the table [Cust_ Ledger Entry] I have to take [Open]=1 and from the table [Detailed Cust_ Ledg_ Entry] I have to take the filed [Amount].

This is additional question. How to do calculate Remaining Amount for a given date of the past. I assume for the present it is easier.


Solution

  • to get balance at date you just have to sum [Amount] in [Detailed Cust_ Ledg_ Entry] till target date without any other filters(). This table contains all operations