Balance Tracker
Balance Tracker creates a balance sheet to display account credits and debits belonging to users. It also provides UI tools and an API to allow the site administrators or other modules to credit or debit a user's account. This is intended for any website or service which credits users for accounts, sales, or other activities, and needs to track payouts.
#D7CX: Balance Tracker will have a full Drupal 7 release on the day that Drupal 7 is released.
Important: Alpha-quality integration code for Views has been committed to CVS in preparation for full views integration as part of the next release. Any testing or improvement of the views integration code would be very welcomed!
Frontend
User balance sheets can be viewed at user/balance or user/%uid/balance. Please note that the 'view all balances' and 'view own balances' must be set accordingly.
A report for all user's balances may be viewed at admin/reports/balances.
All date, time & currency formats are configurable by the admin for international usage.
Invite Commissions
'Invite Commissions' is a module packaged with Balance Tracker since 6.x-1.4. Invite commissions integrates Ubercart, Invite, and Balance tracker. It automatically credits a user with a configurable commission percentage of any sales made by other users whom the user has invited. This is intended both to provide a useful functionality as well as demonstrate how BT can be used on a production site.
You will need to set up a new Ubercart Conditional Action to use the 'Pay commissions to inviting user' action. Best used on the 'Order status updated' trigger.
API
Balance Tracker provides a simple API to credit and debit charges. Once I have a handbook page set up, it will be described better. For now, the API functions are below:
- balance_tracker_credit_account($uid, $amount, $message)
- Credit a user's account.
- balance_tracker_debit_account($uid, $amount, $message)
- Debit a user's account.
- balance_tracker_get_balance($uid)
- Get the user's current balance
- hook_balance_prewrite($uid, $type, &$amount, &$message)
- Hook called prior to a balance item being written. Can be used to modify the amount or the message prior to saving.
- hook_balance_write($uid, $type, $amount, $message)
- Hook called after a balance item is written.
Future Plans
The near future hold the development of a 'Simple Statistics' module to provide some simple monthly credit & debit statistics for users. This will be developed as an optional sub-module, as many implementations will likely implement their own statistics for their own specific needs.
Sponsor
Module developed by Brian Vuyk Web Design & Development. We are happy to quote any Balance Tracker-related development work.
Releases
| Official releases | Date | Size | Links | Status | |
|---|---|---|---|---|---|
| 6.x-1.4 | 2009-Jul-15 | 15.77 KB | Download · Release notes | Recommended for 6.x | |
| Development snapshots | Date | Size | Links | Status | |
|---|---|---|---|---|---|
| 6.x-1.x-dev | 2009-Jul-21 | 16.52 KB | Download · Release notes | Development snapshot | |
