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
0
Answers
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?
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
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03