preloader-matrix

Alfasith

Code to print Ledger journal balance in AX

static void AlfasithPrintLedgerBalance(Args _args)

{

LedgerBalanceMainAccountAmounts balance;

MainAccountListPageBalanceParameters balanceParameters;

MainAccount mainAccount;

;

mainAccount = MainAccount::findByMainAccountId( “11120005”);

balanceParameters = MainAccountListPageBalanceParameters::construct();

balance = LedgerBalanceMainAccountAmounts::construct();

balance.parmAccountingDateRange(balanceParameters.getStartDate(),
balanceParameters
.getEndDate());

balance.parmPostingLayer(balanceParameters.getPostingLayer());

balance.parmIncludeOpeningPeriod(balanceParameters.getIncludeOpeningPeriods());

balance.parmIncludeRegularPeriod(balanceParameters.getIncludeOperatingPeriods());

balance.parmIncludeClosingPeriod(balanceParameters.getIncludeClosingPeriods());

balance.parmIncludeClosingPeriodBySystem(balanceParameters
.getIncludeClosingPeriods());

balance.calculateBalance(mainAccount);

info(strFmt(“%1”, balance.getAccountingCurrencyBalance()));

}

Leave a Reply

Your email address will not be published.