Hi everyone,
I have to write a batch that will work through the old vendor ledger entries, vendor by vendor, applying the oldest payments and credit memos to invoices.
This way, users don't have to do it manually.
Can someone give me some hints on how to start?
Thanks in advance
Answers
Do you know field “Application Method” in Vendor master? One option value of that is "Apply to Oldest", I think it is for system to apply automatically when post payment. You can check how system deal with that field as a start.
Create a processing only report with the below filters then you will get only payment and Credit Memo Entries
Field Type Value
Open CONST Yes
Document Type CONST Payment
Document Type CONST Credit Memo
in VeendorLedgerEntry OnAfterGetRecord
write code for apply and post the application