add: keep using historical txn accounts as defaults even after a custom amount is entered

This commit is contained in:
Simon Michael 2014-03-03 12:18:10 -08:00
parent baf16ab755
commit ebf42046d8

View File

@ -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