Monday, August 28, 2017

Get voucher Transactions Original documents

Originaldocuments           originaldocuments;
    TmpLedgerBase               tmpLedgerBase;
    Common                      common;
    GeneralJournalAccountEntry  accountEntry;
    LedgerTransModule           ledgerTransModule;
    ;
    accountEntry = GeneralJournalAccountEntry::find(this.RecId,false);
    common = accountEntry;
    //Consider first - original documents
    originaldocuments   = new Originaldocuments(common);
    originaldocuments.findRelations();
    tmpLedgerBase.setTmpData(originaldocuments.relations());
   
    if(!tmpLedgerBase)//if it Original Document is not There means  - then as per requested considering Transaction Origin
    {
        ledgerTransModule=new LedgerTransModule();
        ledgerTransModule.createTransModule(accountEntry.RecId);
        tmpLedgerBase.setTmpData(ledgerTransModule.transModule());
    }
    return tmpLedgerBase;

No comments:

Post a Comment

Copy Markup charges while posting purchase invoice using X++

 Copy Markup charges while posting purchase invoice using X++ Class: Important: Code logic is just for Reference.  New class => Duplicate...