Skip to content

Instantly share code, notes, and snippets.

@elranu
Created September 17, 2012 22:37
Show Gist options
  • Save elranu/3740214 to your computer and use it in GitHub Desktop.
Save elranu/3740214 to your computer and use it in GitHub Desktop.
How a General Journal Line is related with a Ledger post (GeneralJournalEntry)
LedgerJournalTable jourTable, origJornalTable;
LedgerJournalTrans jourTrans, origJournalTrans;
SubledgerVoucherGeneralJournalEntry jourLink;
;
origJornalTable = LedgerJournalTable::findByGeneralJournalEntry(journalEntry);
if(origJornalTable){
select * from origJournalTrans where origJournalTrans.JournalNum == origJornalTable.JournalNum
join jourLink where jourLink.GeneralJournalEntry == journalEntry.RecId && origJournalTrans.Voucher == jourLink.Voucher;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment