Public Member Functions |
| __construct () |
| Constructor, only test if finance is enabled.
|
| index () |
| Index redirect to show all.
|
| show_all ($group=1, $limit_results=500, $order_by= 'id', $order_by_direction= 'asc', $page_word=null, $page=1) |
| It shows all double-entry accounts.
|
| add_project () |
| Adds new project account.
|
| edit ($acc_id=NULL) |
| Function edits double-entry account.
|
| recalculate_account_balances () |
| Goes through all double-entry accounts and calculates their balance from their transfers.
|
| recalculate_fees ($account_id=NULL) |
| Recalculates all fees of account.
|
| is_user_in_group ($aro_group_id, $aro_id) |
| Checks if user is in ARO group.
|
| acl_check_view ($axo_section, $axo_value, $member_id=NULL, $force_own=FALSE) |
| Fuction checks access rights Return true if currently logged user (stored in $_SESSION['user_id']) may view own $axo_value object in $axo_section (and in variable $member_id is his own id of member) or if currently logged user may view all $axo_value object in $axo_section else return false.
|
| acl_check_edit ($axo_section, $axo_value, $member_id=NULL, $force_own=FALSE) |
| Fuction checks access rights Return true if currently logged user (stored in $_SESSION['user_id']) may view own $axo_value object in $axo_section (and in variable $member_id is his own id of member) or if currently logged user may edit all $axo_value object in $axo_section else return false.
|
| acl_check_new ($axo_section, $axo_value, $member_id=NULL, $force_own=FALSE) |
| Fuction checks access rights Return true if currently logged user (stored in $_SESSION['user_id']) may view own $axo_value object in $axo_section (and in variable $member_id is his own id of member) or if currently logged user may add all $axo_value object in $axo_section else return false.
|
| acl_check_delete ($axo_section, $axo_value, $member_id=NULL, $force_own=FALSE) |
| Fuction checks access rights Return true if currently logged user (stored in $_SESSION['user_id']) may view own $axo_value object in $axo_section (and in variable $member_id is his own id of member) or if currently logged user may delete all $axo_value object in $axo_section else return false.
|
| build_menu () |
| Build menu.
|
| url () |
| Return URL for controller and method.
|
| redirect ($uri=NULL, $id=NULL, $glue= '/') |
| Redirects to uri according to attribute noredirect.
|
Static Public Member Functions |
static | recalculate_entrance_fees ($account_id=NULL) |
| Recalculates entrance fees of account.
|
static | recalculate_member_fees ($account_id) |
| Recalculates member fees of account.
|
static | recalculate_device_fees ($account_id=NULL) |
| Recalculates device fees of account.
|
static & | instance () |
| Singleton instance of Controller.
|
static | error ($message_type, $content=NULL) |
| Function shows error of given message number.
|
static | warning ($message_type, $content=NULL) |
| Function shows warning of given message number.
|
Accounts_Controller::recalculate_account_balances |
( |
| ) |
|
Goes through all double-entry accounts and calculates their balance from their transfers.
All transfers are primary information about cash flow. Calculating balance of account is creating redundant information, but it speeds up all money calculating operations in system. This method should be used only in special cases, like changing version of Freenetis to version containing this method, or when some data are corrupted. The user is familiar with result, when no change to balance is made, then everything is ok. In other case user is informed about count of accounts, which transfers are not corresponding to its balance
- Author
- Jiri Svitak