commodity & amount style parser cleanups, part 2

This commit is contained in:
Simon Michael 2014-07-02 17:41:33 -07:00
parent 9b4b85b4bf
commit 330dfe6891
2 changed files with 2 additions and 2 deletions

View File

@ -133,7 +133,7 @@ nulljournal = Journal { jmodifiertxns = []
}
nullctx :: JournalContext
nullctx = Ctx { ctxYear = Nothing, ctxCommodityAndStyle = Nothing, ctxAccount = [], ctxAliases = [] }
nullctx = Ctx { ctxYear = Nothing, ctxDefaultCommodityAndStyle = Nothing, ctxAccount = [], ctxAliases = [] }
journalFilePath :: Journal -> FilePath
journalFilePath = fst . mainfile

View File

@ -266,7 +266,7 @@ amountAndCommentWizard EntryState{..} = do
line $ green $ printf "Amount %d%s: " pnum (showDefault def)
where
parseAmountAndComment = either (const Nothing) Just . parseWithCtx nodefcommodityctx amountandcommentp
nodefcommodityctx = (jContext esJournal){ctxCommodityAndStyle=Nothing}
nodefcommodityctx = (jContext esJournal){ctxDefaultCommodityAndStyle=Nothing}
amountandcommentp = do
a <- amountp
many spacenonewline