refactor: clarify, note issues (#893)
This commit is contained in:
parent
6e4ba1106f
commit
d1f122f15e
@ -255,21 +255,23 @@ parseAndFinaliseJournal parser iopts f txt = do
|
|||||||
-- the options for checking assertions.
|
-- the options for checking assertions.
|
||||||
let fj = if auto_ iopts && (not . null . jtxnmodifiers) pj
|
let fj = if auto_ iopts && (not . null . jtxnmodifiers) pj
|
||||||
|
|
||||||
-- with transaction modifiers
|
-- transaction modifiers are active
|
||||||
then
|
then
|
||||||
-- first pass
|
-- first pass, doing most of the work
|
||||||
journalModifyTransactions <$>
|
(
|
||||||
(journalBalanceTransactions False $
|
(journalModifyTransactions <$>) $ -- add auto postings after balancing ? #893b fails
|
||||||
|
journalBalanceTransactions False $
|
||||||
|
-- journalModifyTransactions <$> -- add auto postings before balancing ? probably #893a, #928, #938 fail
|
||||||
journalReverse $
|
journalReverse $
|
||||||
journalAddFile (f, txt) $
|
journalAddFile (f, txt) $
|
||||||
journalApplyCommodityStyles pj)
|
journalApplyCommodityStyles pj)
|
||||||
-- second pass
|
-- second pass, checking balance assertions
|
||||||
>>= (\j ->
|
>>= (\j ->
|
||||||
journalBalanceTransactions (not $ ignore_assertions_ iopts) $
|
journalBalanceTransactions (not $ ignore_assertions_ iopts) $
|
||||||
journalSetLastReadTime t $
|
journalSetLastReadTime t $
|
||||||
j)
|
j)
|
||||||
|
|
||||||
-- without transaction modifiers
|
-- transaction modifiers are not active
|
||||||
else journalBalanceTransactions (not $ ignore_assertions_ iopts) $
|
else journalBalanceTransactions (not $ ignore_assertions_ iopts) $
|
||||||
journalReverse $
|
journalReverse $
|
||||||
journalAddFile (f, txt) $
|
journalAddFile (f, txt) $
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user