This contribution will add an additional customer attribute called ?account balance?. The customer can view his/her balance by clicking the link ?view/change my account settings?. The store owner can change an individual's account balance through the customer edit function.
This module is activated as an order total module. The way I setup this module is so that it is calculated after tax, shipping, low order fees have been added. The account balance is subtracted from this subtotal to determine a billable total. After the sale, the customer's account balance is adjusted accordingly.