Allow hledger-budget to generate transactions past the end date of the last real transaction if -b/-e are supplied

This commit is contained in:
Dmitry Astapov 2017-11-17 00:29:13 +00:00 committed by Simon Michael
parent 7698d3171e
commit fbd28be6cb

View File

@ -196,7 +196,7 @@ budgetWrapper f opts' j = do
let modifier = originalTransaction . foldr (flip (.) . runModifierTransaction') id mtxns
runModifierTransaction' = fmap txnTieKnot . runModifierTransaction Any
mtxns = jmodifiertxns j
dates = jdatespan j
dates = spanUnion (jdatespan j) (periodAsDateSpan $ period_ $ reportopts_ opts')
ts' = map modifier $ jtxns j
ts'' | boolopt "no-offset" $ rawopts_ opts' = ts'
| otherwise= [makeBudget t | pt <- jperiodictxns j, t <- runPeriodicTransaction pt dates] ++ ts'