fix:add: account names provided on command line were being ignored [#2305]

Fix suggested by Raphael (lowercasename)
This commit is contained in:
Simon Michael 2024-12-20 15:51:15 -10:00
parent efa101091c
commit eb9bb16faa

View File

@ -161,7 +161,7 @@ confirmedTransactionWizard prevInput es [] = confirmedTransactionWizard prevInpu
confirmedTransactionWizard prevInput es@EntryState{..} stack@(currentStage : _) = case currentStage of
EnterDateAndCode -> dateAndCodeWizard prevInput es >>= \case
Just (efd, code) -> do
let
let
date = fromEFDay efd
es' = es{ esArgs = drop 1 esArgs
, esDefDate = date
@ -239,7 +239,7 @@ confirmedTransactionWizard prevInput es@EntryState{..} stack@(currentStage : _)
}
amountAndCommentString = showAmount amt ++ T.unpack (if T.null comment then "" else " ;" <> comment)
prevAmountAndCmnt' = replaceNthOrAppend (length esPostings) amountAndCommentString (prevAmountAndCmnt prevInput)
es' = es{esPostings=esPostings++[p], esArgs=drop 2 esArgs}
es' = es{esPostings=esPostings++[p], esArgs=drop 1 esArgs}
confirmedTransactionWizard prevInput{prevAmountAndCmnt=prevAmountAndCmnt'} es' (EnterNewPosting txnParams (Just posting) : stack)
Nothing -> confirmedTransactionWizard prevInput es (drop 1 stack)