You can get Vendor or Customer account from following ways:
1- VendTable = VendTable::findByLedgerDimension(ledgerJournalTrans.LedgerDimension);
2- MainAccount MainAccount = MainAccount::findByLedgerDimension(LedgerDefaultAccountHelper::getDefaultAccountFromLedgerDimension(ledgerJournalTrans.LedgerDimension));
vendTable = VendTable::find(MainAccount.MainAccountId);
3- MainAccount MainAccount = LedgerDimensionFacade::getMainAccountFromLedgerDimension(ledgerJournalTrans.LedgerDimension);
vendTable = VendTable::find(MainAccount.MainAccountId);
No comments:
Post a Comment