journal: fill unassignable list from account names.

This commit is contained in:
Jesse Rosenthal 2018-10-18 15:26:13 -04:00 committed by Simon Michael
parent 597b1b8ccd
commit 07d0a003a3

View File

@ -642,7 +642,7 @@ journalBalanceTransactionsST assrt j createStore storeIn extract =
(storeIn txStore) (storeIn txStore)
assrt assrt
(Just $ journalCommodityStyles j) (Just $ journalCommodityStyles j)
S.empty (getModifierAccountNames j)
flip R.runReaderT env $ do flip R.runReaderT env $ do
dated <- fmap snd . sortBy (comparing fst) . concat dated <- fmap snd . sortBy (comparing fst) . concat
<$> mapM' discriminateByDate (jtxns j) <$> mapM' discriminateByDate (jtxns j)
@ -651,6 +651,14 @@ journalBalanceTransactionsST assrt j createStore storeIn extract =
where where
size = genericLength $ journalPostings j size = genericLength $ journalPostings j
-- | Collect account names in account modifiers into a set
getModifierAccountNames :: Journal -> S.Set AccountName
getModifierAccountNames j = S.fromList $
map paccount $
concatMap tmpostingrules $
jtxnmodifiers j
-- | Monad transformer stack with a reference to a mutable hashtable -- | Monad transformer stack with a reference to a mutable hashtable
-- of current account balances and a mutable array of finished -- of current account balances and a mutable array of finished
-- transactions in original parsing order. -- transactions in original parsing order.