add: write all amounts, don't lose price info (#283)

This commit is contained in:
Simon Michael 2015-09-27 10:24:21 -10:00
parent df4b43a2b3
commit 5404eab6c0

View File

@ -352,7 +352,8 @@ showDefault s = " [" ++ s ++ "]"
journalAddTransaction :: Journal -> CliOpts -> Transaction -> IO Journal
journalAddTransaction j@Journal{jtxns=ts} opts t = do
let f = journalFilePath j
appendToJournalFileOrStdout f $ showTransaction t
appendToJournalFileOrStdout f $ showTransactionUnelided t
-- unelided shows all amounts explicitly, in case there's a price, cf #283
when (debug_ opts > 0) $ do
putStrLn $ printf "\nAdded transaction to %s:" f
putStrLn =<< registerFromString (show t)