Redesign and simplify the logic in WithdrawalForecast.update_available to ensure that the amount withdrawn does not exceed the account_transactions value for each account. Currently, withdrawals are likely to exceed the amount dictated by withdrawal_strategy if there's even a minor mismatch in, say, the timings of income and living expenses (e.g. if income is recorded mid-month and living expenses are recorded at the start of the month, which is the current default setting).
It's fine to prefer withdrawing at times when cashflow is negative, but we shouldn't be increasing withdrawals as default behaviour. Consider whether we want to enable this behaviour with a flag (that defaults to off, of course).
Redesign and simplify the logic in
WithdrawalForecast.update_available
to ensure that the amount withdrawn does not exceed theaccount_transactions
value for each account. Currently, withdrawals are likely to exceed the amount dictated bywithdrawal_strategy
if there's even a minor mismatch in, say, the timings of income and living expenses (e.g. if income is recorded mid-month and living expenses are recorded at the start of the month, which is the current default setting).It's fine to prefer withdrawing at times when cashflow is negative, but we shouldn't be increasing withdrawals as default behaviour. Consider whether we want to enable this behaviour with a flag (that defaults to off, of course).