how to retrieve the first invoice amount
Horse06
Member Posts: 496
How to program to retrieve customers' first invoice amount and filter out the rest of the amount in the report? Thanks!
0
Comments
-
As far as I understood you want only the First Invoice of the customer.
For that you can filter the Cust. Ledger Entry for Customer, then document type as Invoice. The data will be sorted as per Entry No. (Primary Key) and you will get the desired output.CA Sandeep Singla
http://ssdynamics.co.in0 -
Thanks! I know how to filter ou the payment etc through the document type, but if customers have so many invoices, how to base on the entry no? Thanks!0
-
The entries of the customer i.e. invoices by entry number. The first invoice entry will have a lesser number assigned to it then the later invoice entry. Use the code like this
"Cust. Ledger Entry".SETRANGE("Customer No.",Cust_Code);
"Cust. Ledger Entry".SETRANGE("Document Type",Invoice);
IF "Cust. Ledger Entry".FIND('-') THEN
InvNumberCode:= "Cust. Ledger Entry"."Document No.";
Cust_Code is code variable for the customer to be filtered
InvNumberInt is a code variable for storing the Invoice Number.
( '-' ) is to find the first record.CA Sandeep Singla
http://ssdynamics.co.in0 -
It seems that it doesn't work. It retrieves one customer with first invoice of amount zero with many many pages. I want to get the all the customers with the first invoice amount.0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 611 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions