Tuesday, 7 January 2014

Get Opening Balance in ax 2009 through X++

real getOpeningBalance(LedgerAccount _accountNum)

{

    DimensionCriteria   dimensionCriteriaEmpty;
    Transdate           periodEnd;
    transdate periodStart = LedgerPeriod::findOpeningDate(fromDate);
    LedgerBalanceSum_CurrentMST   ledgerBalance;
    ;
    periodEnd = fromDate - 1;

    ledgerBalance= new LedgerBalanceSum_CurrentMST(periodStart,
                                                   periodEnd,
                                                   dimensionCriteriaEmpty,
                                                   NoYes::Yes,
                                                   Noyes::Yes,
                                                   NoYes::Yes,
                                                   OperationsTax::Current,
                                                   DebCredProposal::None,
                                                   NoYes::Yes,
                                                   NoYes::Yes);
    return ledgerBalance.balance(_accountNum);


}

No comments:

Post a Comment

SQL/SSRS Interview questions I thought of blogging some SQL/SSRS interview questions.

Below are some. I will add more, when I complete the compilation 1. What is OLTP(Online Transaction Processing)? OLTP stands ...