I should also mention that there should be able to be an unlimited number of deposits. Currently I am displaying the Deposit table as a portal on the Invoice layout.
I suggest that you set up a table of payments linked to your invoice table. The invoice total minus the total payments will be your balance due. Since it is a table of records, this can support an unlimited number of payments and a deposit is just one type of payment that you might log in such a table.