mirror of
https://github.com/simonmichael/hledger.git
synced 2024-11-07 19:41:47 +03:00
add: keep using historical txn accounts as defaults even after a custom amount is entered
This commit is contained in:
parent
baf16ab755
commit
ebf42046d8
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user