Wednesday, April 16, 2014

Sorting cheque printing by LineNum for Payment journals

Often we have the requirement for printing the cheque/check report in a specific sequence say line number or account number etc so that it is easy to validate and match with the payments report:

Below is the class and method to modify for doing this:

Class: CustVendSumForPaym
Method: prepareOutQuery()

Add the following line of code at the end to sort the cheque number assignment basis line number:

queryrun.query().dataSourceTable(tablenum(LedgerJournalTrans)).addSortField(fieldnum(LedgerJournalTrans, LineNum), SortOrder::Ascending);

Hope this helps.

No comments:

Post a Comment