Public Member Functions | |
__construct ($id=NULL) | |
Contruct of app, shutdown action logs by default. | |
get_accounts ($limit_from=0, $limit_results=20, $order_by= 'id', $order_by_direction= 'asc', $filter_sql= '', $date_sql= '', $group=4) | |
It gets double-entry accounts of given group. | |
get_accounts_count ($filter_sql= '', $group=4) | |
It gets count of double-entry accounts of given group. | |
get_some_doubleentry_account_names ($origin=null, $account_attribute_id=null) | |
Function gets some double-entry accounts. | |
select_some_list ($origin=NULL, $account_attribute_id=NULL) | |
Select some double entry accounts for select. | |
get_account_balance ($account_id) | |
It gets balance of account. | |
get_accounts_to_deduct ($date) | |
Returns all accounts to deduct fee in date. | |
get_accounts_to_deduct_entrance_fees ($deduct_date) | |
Function gets all members to deduct entrance fees. | |
get_amount_of_entrance_fees ($account_id) | |
Gets amount of deducted entrance fees of member's credit account. | |
get_account_to_recalculate_entrance_fees ($account_id) | |
Gets information about one credit account, used for recounting entrance fee with or without instalment. | |
delete_deduct_transfers_of_account ($account_id) | |
Function deletes member fee deducting transfers of given account. | |
delete_entrance_deduct_transfers_of_account ($account_id) | |
Function deletes entrance fee deducting transfers of given account. | |
delete_device_deduct_transfers_of_account ($account_id) | |
Function deletes device fee deducting transfers of given account. | |
get_accounts_to_deduct_device_fees ($deduct_date) | |
Finds accounts of members who have at least one device to repay. | |
get_amount_of_device_fees ($account_id) | |
Gets actually repaied amount of prices of all member's devices. | |
get_devices_of_account ($account_id) | |
Gets list of devices with repayments. | |
recalculate_account_balances () | |
Recalculates all account balances. | |
recalculate_account_balance_of_account ($account_id) | |
Recalculates account balance of single account. | |
get_comments () | |
Get comment of this object. | |
get_account_by_account_attribute_and_member ($account_attribute_id, $member_id) | |
Returns account by given attribute and member. | |
get_account_by_attribute ($account_attribute_id) | |
Gets account by account attribute ID. | |
select_list_without_types ($account_attribute_id) | |
Select list of accounts without accounts whose attribute IDs are in passed argument. |
Static Public Member Functions | |
static | create ($attribute_id, $name, $member_id) |
This function creates new record in the table "accounts". |
Public Attributes | |
const | ACCOUNTING_SYSTEM = 1 |
Accounting system. | |
const | CREDIT = 2 |
Credit subaccounts grop. | |
const | PROJECT = 3 |
Project subaccounts group. | |
const | OTHER = 4 |
Other accounts group. |
Protected Attributes | |
$has_many = array('transfers','variable_symbols') | |
$belongs_to = array('member', 'account_attribute', 'comments_thread') | |
$has_and_belongs_to_many = array('bank_accounts') |
Account_Model::__construct | ( | $id = NULL | ) |
Contruct of app, shutdown action logs by default.
type | $id |
|
static |
This function creates new record in the table "accounts".
ineteger | $attribute_id | |
string | $name | |
integer | $member_id |
Account_Model::delete_deduct_transfers_of_account | ( | $account_id | ) |
Function deletes member fee deducting transfers of given account.
integer | $account_id |
Exception | On error |
Account_Model::delete_device_deduct_transfers_of_account | ( | $account_id | ) |
Function deletes device fee deducting transfers of given account.
integer | $account_id |
Exception | On error |
Account_Model::delete_entrance_deduct_transfers_of_account | ( | $account_id | ) |
Function deletes entrance fee deducting transfers of given account.
integer | $account_id |
Exception | On error |
Account_Model::get_account_balance | ( | $account_id | ) |
It gets balance of account.
It subtracts all outbound transfers from all incoming transfers.
integer | $account_id |
Account_Model::get_account_by_account_attribute_and_member | ( | $account_attribute_id, | |
$member_id | |||
) |
Returns account by given attribute and member.
integer | $account_attribute_id | |
integer | $member_id |
Account_Model::get_account_by_attribute | ( | $account_attribute_id | ) |
Gets account by account attribute ID.
Creates new instance.
integer | $account_attribute_id |
Account_Model::get_account_to_recalculate_entrance_fees | ( | $account_id | ) |
Gets information about one credit account, used for recounting entrance fee with or without instalment.
integer | $account_id |
Account_Model::get_accounts | ( | $limit_from = 0 , |
|
$limit_results = 20 , |
|||
$order_by = 'id' , |
|||
$order_by_direction = 'asc' , |
|||
$filter_sql = '' , |
|||
$date_sql = '' , |
|||
$group = 4 |
|||
) |
It gets double-entry accounts of given group.
Groups are all credit, all project and other accounts of association.
Account_Model::get_accounts_count | ( | $filter_sql = '' , |
|
$group = 4 |
|||
) |
It gets count of double-entry accounts of given group.
Account_Model::get_accounts_to_deduct | ( | $date | ) |
Returns all accounts to deduct fee in date.
string | $date |
Account_Model::get_accounts_to_deduct_device_fees | ( | $deduct_date | ) |
Finds accounts of members who have at least one device to repay.
Account_Model::get_accounts_to_deduct_entrance_fees | ( | $deduct_date | ) |
Function gets all members to deduct entrance fees.
Account_Model::get_amount_of_device_fees | ( | $account_id | ) |
Gets actually repaied amount of prices of all member's devices.
integer | $account_id |
Account_Model::get_amount_of_entrance_fees | ( | $account_id | ) |
Gets amount of deducted entrance fees of member's credit account.
Used for deducting entrance fees with instalment.
integer | $account_id |
Account_Model::get_comments | ( | ) |
Get comment of this object.
Account_Model::get_devices_of_account | ( | $account_id | ) |
Gets list of devices with repayments.
Devices are ordered ascending by their buy date.
unknown_type | $account_id |
Account_Model::get_some_doubleentry_account_names | ( | $origin = null , |
|
$account_attribute_id = null |
|||
) |
Function gets some double-entry accounts.
Used in dropdown to select destination account.
integer | $origin | |
integer | $account_attribute_id |
Account_Model::recalculate_account_balance_of_account | ( | $account_id | ) |
Recalculates account balance of single account.
integer | $account_id |
Account_Model::recalculate_account_balances | ( | ) |
Recalculates all account balances.
Account_Model::select_list_without_types | ( | $account_attribute_id | ) |
Select list of accounts without accounts whose attribute IDs are in passed argument.
int | array | $account_attribute_id |
Account_Model::select_some_list | ( | $origin = NULL , |
|
$account_attribute_id = NULL |
|||
) |
Select some double entry accounts for select.
If origin is supplied than account with origin ID is not in list. If account attribute ID is supplied than only account with given attribute ID are listed.
integer | $origin | optional origin account ID to be ignored |
type | $account_attribute_id | optional account attribute ID for filter |