How to create a field "Time credit" in accounts?

How to create a field "Time credit" in accounts?

Hello, 

My problem: All our accounts ( customers ) have time credit that we had to them for exemple we can had 1 day, or 1/2 day on their time credit. In "Cases" every case have a field "Duration in minutes"            
I want to create a field "Time credit" in Accounts which display how many time-in-minutes it left.
Then when i will create a case, the field "Time credit" in account should be upgraded following the formula :
                 
                                      "Time credit = Time credit - Duration"

And when the field "Time credit" will be 0, we will send an invoice to our customers.
Thx in advance