Very Easy. You bill your client the entire invoice. You then get payment and enter the payment, making that invoice paid.
Then you go into your paid invoice each time you do any pre-paid work, list out the date, enter your service performed, and 0.00 for the charges
If you deduct any amounts (vs 0.00) it removes them and will then show as OWING AND NO LONGER PAID! Leaving the invoice outstanding and owed
This way inside the paid invoice, it keeps track of everything you do with that client/internally. Which can always then be printed to provide a trail to the client (if ever need be)
In your internal comment section, you keep track of any time remaining each time you make a deduction/addition for work performed