It’s quite hard to understand exactly what’s happening here and the code can definitely be simplified to make it more readable. However, you should never get
and set
the same reactive variable in an autorun
. You do that at least for budget_used
and profit
in this example.
Perhaps you could create a minimal repro so I can understand better?