From 5404eab6c0dc27f25e8e99ff865858f0b1e652e3 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sun, 27 Sep 2015 10:24:21 -1000 Subject: [PATCH] add: write all amounts, don't lose price info (#283) --- 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 c5905b038..e1b6bfd81 100644 --- a/hledger/Hledger/Cli/Add.hs +++ b/hledger/Hledger/Cli/Add.hs @@ -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)