select sum(AmountMST) from _ledgerTrans where _ledgerTrans.PeriodCode == PeriodCode::Closing && _ledgerTrans.AccountNum == _ledgerTable.AccountNum