I'm making a spending / revenue control system, and I want to know how to make the revenue or expense amounts add up to the balance just after the payment confirmation. Ex: register a light bill to pay in the amount of $ 100.00 in a week from now. My current balance is $ 200, but I just want the light bill amount to be deducted from the balance only when I mark the light bill as paid. How can I do this using only PHP?