From ebf42046d8df35592e2795594a33f51b97b88ea1 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Mon, 3 Mar 2014 12:18:10 -0800 Subject: [PATCH] add: keep using historical txn accounts as defaults even after a custom amount is entered --- hledger/Hledger/Cli/Add.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hledger/Hledger/Cli/Add.hs b/hledger/Hledger/Cli/Add.hs index 7db70f8e6..54ed43694 100644 --- a/hledger/Hledger/Cli/Add.hs +++ b/hledger/Hledger/Cli/Add.hs @@ -231,7 +231,7 @@ amountAndCommentWizard EntryState{..} = do case esSimilarTransaction of Nothing -> (Nothing,False) Just Transaction{tpostings=ps} -> (if length ps >= pnum then Just (ps !! (pnum-1)) else Nothing - ,all (\(a,b) -> paccount a == paccount b && pamount a == pamount b) $ zip esPostings ps) + ,all (\(a,b) -> pamount a == pamount b) $ zip esPostings ps) def = case (esArgs, mhistoricalp, followedhistoricalsofar) of (d:_,_,_) -> d (_,Just hp,True) -> showamt $ pamount hp