For things like this, InvoiceNinja allows you to create an invoice, then apply a payment to to that invoice. If the invoice amount is less than the prepayment, it deducts from the payment, leaving a "partially applied" state to the payment so that it can be used.
We use this for functionality for clients that buy blocks of time, and work is billed against that prepaid time as it's handled. It works well for tracking time purchased, and who has billed against that time (multiple techs all working with the same client).