其他分享
首页 > 其他分享> > AX2012 调用试算平衡表获取指定日期期间内科目余额

AX2012 调用试算平衡表获取指定日期期间内科目余额

作者:互联网

 

    TransDate           startDate,endDate;    

    LedgerTrialBalanceListPageTmp       LedgerTrialBalanceListPageTmp;
    Name            primaryFocus="Account";
    boolean         includeOpening;
    boolean         includeClosing;
    OperationsTax   postingLayer = OperationsTax::Current;
    
    DimensionAttributeValueCombination  DimensionAttributeValueCombination;
    
    Amount			balance;
    ;
    startDate = mkdate(1,1,2019);
    endDate = mkdate(31,12,2019);
    
    select firstOnly RecId from LedgerTrialBalanceListPageTmp;

    LedgerTrialBalanceListPageTmp::constructBalances( LedgerTrialBalanceListPageTmp,primaryFocus,startDate,endDate, includeOpening,includeClosing,postingLayer);

    select sum(EndingBalance) from LedgerTrialBalanceListPageTmp            
    join  DimensionAttributeValueCombination
            where DimensionAttributeValueCombination.RecId ==  LedgerTrialBalanceListPageTmp.LedgerDimension
            &&DimensionAttributeValueCombination.DisplayValue == "21120";
            
    balance = LedgerTrialBalanceListPageTmp.EndingBalance;
            

  

标签:startDate,DimensionAttributeValueCombination,平衡表,endDate,mkdate,试算,LedgerTrialBa
来源: https://www.cnblogs.com/sxypeace/p/14113759.html