Resource modules

algorithm for resource decrement in billing/accounting system
