From 120b3b83777cf84df3118b7cb7eba580d0b93c48 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sat, 3 May 2014 15:48:20 -0700 Subject: [PATCH] add: don't apply a default commodity to amounts on entry (fixes #138) --- hledger/Hledger/Cli/Add.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hledger/Hledger/Cli/Add.hs b/hledger/Hledger/Cli/Add.hs index 6ec2da033..40073fe33 100644 --- a/hledger/Hledger/Cli/Add.hs +++ b/hledger/Hledger/Cli/Add.hs @@ -265,7 +265,8 @@ amountAndCommentWizard EntryState{..} = do maybeRestartTransaction $ line $ green $ printf "Amount %d%s: " pnum (showDefault def) where - parseAmountAndComment = either (const Nothing) Just . parseWithCtx (jContext esJournal) amountandcommentp + parseAmountAndComment = either (const Nothing) Just . parseWithCtx nodefcommodityctx amountandcommentp + nodefcommodityctx = (jContext esJournal){ctxCommodityAndStyle=Nothing} amountandcommentp = do a <- amountp many spacenonewline