Customer Deposits to Liability Account

How do I enter customer deposits to the liability account, then deduct it from their final bill to debit the liability? There dosen't seem to be an easy way to enter, apply, and deduct in billing or accounts receivable.

I figured out how to enter a customer deposit in AR through cash receipts and it posted to the correct liability account. My dilemma is now how to deduct the deposit from the final invoice, to debit the liability account.

Also, the cash receipt isn't posted to JC, but the invoice for the revenue/final bill is. How can I have the "billed to date" correct, with a deduction for the deposit?