NAV 2013 Posting Journal

ara3nara3n Member Posts: 9,256
Hello in CU 13 MS has added a new line
// Check balance
SETCURRENTKEY("Document No.");

This causes the journals to be sorted by document no and then posted.
Usually this is not an issue but for users who posts invoices and then payment applied to them all at once will get an error that the payment cannot be applied to the invoice. The error is cannot find open Vendor ledger ledger entry for document type invoice, document no, and open = Yes.

Anybody knows why?

The fix
  // Post lines
  LineCount := 0;
  LastDocNo := '';
  LastPostedDocNo := '';
  TempGenJnlLine4.DELETEALL;
  NoOfReversingRecords := 0;
  //T01 Start
  Setcurrentkey("Journal Template Name","Journal Batch Name","Line No.");
  //T01 End
  FINDSET(TRUE,FALSE);
Ahmed Rashed Amini
Independent Consultant/Developer


blog: https://dynamicsuser.net/nav/b/ara3n
Sign In or Register to comment.