There are two fields that TCR uses when a job is invoiced: Deposit Amount (shown) and Deposit Balance (hidden from user). If there is an amount in Deposit Balance it is used and reduced by the invoice amount. The balance field is updated again if someone manually changes the deposit field amount.
If the balance is not applying correctly to the invoice, try changing the Deposit Amount field (even by 1 cent) and changing it back to the original amount. This should reset the field and the invoice should calculate correctly.