FlowField For Unapplied Customer Payments

Jonathan2708
Member Posts: 552
Hi,
I want to be able to show a figure on the Customer Card for the amount of unallocated cash sitting on their account. I thought I could just copy the "Balance (LCY)" flowfield and modify it to just look at document type 'Payment' as follows :
Sum("Detailed Cust. Ledg. Entry"."Amount (LCY)" WHERE (Customer No.=FIELD(No.),Document Type=CONST(Payment),Initial Entry Global Dim. 1=FIELD(Global Dimension 1 Filter),Initial Entry Global Dim. 2=FIELD(Global Dimension 2 Filter),Currency Code=FIELD(Currency Filter)))
But this does not give the correct unapplied amount if there are several payments, some allocated some not. Is it possible to create the flowfield I am after or is the "Detailed Cust. Ledg. Entry" table just not designed to calculate this figure?
Any help appreciated,
Jonathan
I want to be able to show a figure on the Customer Card for the amount of unallocated cash sitting on their account. I thought I could just copy the "Balance (LCY)" flowfield and modify it to just look at document type 'Payment' as follows :
Sum("Detailed Cust. Ledg. Entry"."Amount (LCY)" WHERE (Customer No.=FIELD(No.),Document Type=CONST(Payment),Initial Entry Global Dim. 1=FIELD(Global Dimension 1 Filter),Initial Entry Global Dim. 2=FIELD(Global Dimension 2 Filter),Currency Code=FIELD(Currency Filter)))
But this does not give the correct unapplied amount if there are several payments, some allocated some not. Is it possible to create the flowfield I am after or is the "Detailed Cust. Ledg. Entry" table just not designed to calculate this figure?
Any help appreciated,
Jonathan
0
Comments
-
The filter for the remaining amount on the Customer Ledger Entries is
Sum("Detailed Cust. Ledg. Entry"."Amount (LCY)" WHERE (Cust. Ledger Entry No.=FIELD(Entry No.),Posting Date=FIELD(Date Filter)))
Hence by that logic, if you Filter by Customer No. and exclude date you should have it.
I.e. by omitting the Customer Ledger Entry, you should have remaining amount sum for all entries, but have to be for the specific customer.
If you try to go by dimensions as in your example, you will run into difficulties.0 -
Hi, thanks for the reply. However I am only interested in cash receipts that are unallocated, nothing else so I have to filter by Document Type=Payment. I think it is this filter that causes the problem because adding up all detailed customer ledger entry amounts for this filter does not give you the total remaining amount on all payments - it only works per customer ledger entry, not per customer.
Jonathan0 -
It is not designed to calculate that via a flowfield, at least not looking at the data in our tables. Think of the details as everything that comes in. Doesn't matter if it is applied to something or not, it has to relfect on the total balance of the customer. So every invoice, payment, credit, penny that involves that customer goes in there.
The way NAV knows if there is a remaining amount on a document is to sum these details for a specific customer ledger entry (usually one per document posted).
When a payment is made, it does make a Customer Ledger Entry, though (every detailed entry has to have a main entry). So you could look at the main table, filter on entry type = payment, applies-to doc. no. = 0 and, I believe, get the data you need.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions