Report 393 - Suggest Vendor Payments
When trying to run the report for a Vendor that already has unposted applications (Eg. "Applies-to ID" field is populated by some other application in another journal batch) this results in an error due to code:
Function: MakeGenJnlLines()
..
VendLedgEntry.TESTFIELD("Applies-to ID",'');
..
:?: What is the reasoning for not filtering these type of records out before creating the journal lines (something similar to below):
Eg.
Function: GetVendLedgEntries(Positive : Boolean;Future : Boolean)
VendLedgEntry.RESET;
VendLedgEntry.SETCURRENTKEY("Vendor No.",Open,Positive,"Due Date");
VendLedgEntry.SETRANGE("Vendor No.",Vendor."No.");
VendLedgEntry.SETRANGE(Open,TRUE);
VendLedgEntry.SETRANGE(Positive,Positive);
//Skip entries already applied
IF SummarizePerVend THEN
VendLedgEntry.SETFILTER("Applies-to ID",'=%1','')
ELSE
VendLedgEntry.SETFILTER("Applies-to Doc. No.",'=%1','');
Any comments?
0
Comments
I beleieve the theory here is to warn in multi payment run scenarios. As there is another applies-to in the range it stops you as a journal maybe open and being worked upon. This will mean that there could be open transactions in a journal being juggled for payment with no applies to ID's that if there was no prevention you could bring in, then you have the chance two users are trying to apply payment to the same line.
There are a lot of times where the user will create a journal batch, and forget about it.
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book