How can I skip entries with vat amount on page?
undy0602
Member Posts: 67
Dear developers,
I want to show entries without vat amount from GL entry on page. How to skip these entries
Group by document no. and filter vat Amount
I tried onOpenpage
Glentry.setfilter(docno,docno)
Glentry. Setfilter(amount,’<>%1’,0)
If Glentry.findset then repeat
Skip;
Until glentry.next=0
I want to show entries without vat amount from GL entry on page. How to skip these entries
Group by document no. and filter vat Amount
I tried onOpenpage
Glentry.setfilter(docno,docno)
Glentry. Setfilter(amount,’<>%1’,0)
If Glentry.findset then repeat
Skip;
Until glentry.next=0
0
Best Answer
-
Hi,
Technically Juhl is correct - a simple filter is enough to exclude entries which have no Vat Amount. The example you have posted shows 3 entries all having an non-zero amount in VAT amount.
I'm guessing that you want to exclude on a page all G/L entries where VAT amount adds up to zero within one document.
Unfortunately, it is not possible in NAV to have a filter which could do that.
Not without a modification.
What you can do is to add a flowfield which will sum up VAT Amount field in G/L entries having the same document number. Having that flowfields added to the G/L Entry table you can use a simple filter on a page to exclude all entries with zero amount in this new flowfield.
It is possible to use a code on the G/L Entries page giving you the similar result but you would have to add lots of code in OnFind and OnNext triggers, and it will not be a simple nor efficient method.
Slawek
Slawek Guzek - www.yitron.co.uk
Business Central, MS SQL Server, Wherescape RED;5
Answers
-
Example
Docno vatAmnt VatPostgroup
Aa1 200
Aa1 -200
Aa1 400 Reverse
Dont show these entries on page. How to set filter Multiple lines with one document No.s on the dataitem?0 -
Hi,
Technically Juhl is correct - a simple filter is enough to exclude entries which have no Vat Amount. The example you have posted shows 3 entries all having an non-zero amount in VAT amount.
I'm guessing that you want to exclude on a page all G/L entries where VAT amount adds up to zero within one document.
Unfortunately, it is not possible in NAV to have a filter which could do that.
Not without a modification.
What you can do is to add a flowfield which will sum up VAT Amount field in G/L entries having the same document number. Having that flowfields added to the G/L Entry table you can use a simple filter on a page to exclude all entries with zero amount in this new flowfield.
It is possible to use a code on the G/L Entries page giving you the similar result but you would have to add lots of code in OnFind and OnNext triggers, and it will not be a simple nor efficient method.
Slawek
Slawek Guzek - www.yitron.co.uk
Business Central, MS SQL Server, Wherescape RED;5
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
