Class Index | File Index

Classes


Namespace core.finances

Anything related to budget/finances.
Defined in: <js/core/finances.js>.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
<static>  
core.finances.assesPayrollMinLuxury(cb)
Assess the payroll and apply minimum and luxury taxes.
<static>  
core.finances.getRankLastThree(t, category, item)
Gets the rank of some financial thing over the past 3 seasons, if available.
<static>  
core.finances.updateRanks(ot, type, cb)
Update the rankings of team budgets, expenses, and revenue sources.
Namespace Detail
core.finances
Method Detail
<static> core.finances.assesPayrollMinLuxury(cb)
Assess the payroll and apply minimum and luxury taxes.
Parameters:
{function()} cb
Callback function.

<static> {number} core.finances.getRankLastThree(t, category, item)
Gets the rank of some financial thing over the past 3 seasons, if available. If only 1 or 2 seasons are available, assume 15.5 (average) for the other seasons
Parameters:
{Object} t
Team object
{string} category
Currently either "expenses" or "revenues", but could be extended to allow "budget" if needed.
{string} item
Item inside the category
Returns:
{number} Rank, from 1 to 30

<static> core.finances.updateRanks(ot, type, cb)
Update the rankings of team budgets, expenses, and revenue sources. Budget ranks should be updated after *any* team updates *any* budget item. Revenue and expenses ranks should be updated any time any revenue or expense occurs - so basically, after every game.
Parameters:
{IDBObjectStore|IDBTransaction|null} ot
An IndexedDB object store or transaction on teams, readwrite; if null is passed, then a new transaction will be used.
{Array.} type
The types of ranks to update - some combination of "budget", "expenses", and "revenues"
{function()=} cb
Optional callback function.

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Apr 10 2013 23:08:31 GMT-0400 (EDT)