Public Member Functions | |
__construct () | |
Constructor, only test if finance is enabled. | |
index () | |
By default, it redirects user to day book - list of all double-entry transfers. | |
show_all ($limit_results=50, $order_by= 'datetime', $order_by_direction= 'desc', $page_word=null, $page=1) | |
It shows all double-entry transfers. | |
show_by_account ($account_id=NULL, $limit_results=500, $order_by= 'datetime', $order_by_direction= 'desc', $page_word=null, $page=1) | |
It shows transfers of credit account. | |
show ($transfer_id=null) | |
Function shows information of transfer including previous transfer if exists. | |
add_from_account ($origin_account_id=null) | |
Adds transfers from single origin account. | |
add () | |
Function adds transfers from one arbitrary account to another arbitrary account. | |
add_voip ($origin_account=NULL) | |
Function adds VoIP transfers. | |
edit ($transfer_id=NULL) | |
Function edits double-entry transfers. | |
deduct_member_fees () | |
Deducts fees of all members in one month. | |
deduct_entrance_fees () | |
Function deducts entrance fees. | |
deduct_device_fees () | |
Deducts repayments of devices. | |
add_member_fee_payment_by_cash ($member_id=NULL, $amount=NULL) | |
Function adds member fee payment by cash. | |
payment_calculator ($account_id=NULL, $text=FALSE) | |
Perform payment calculator. | |
valid_calculator_item ($input=NULL) | |
Callback function to validate form inputs from payment calulator. | |
valid_amount_to_send ($input=NULL) | |
Function validates amount of money to send from double-entry account. | |
valid_amount ($input=NULL) | |
Function validates amount of money in editing. | |
valid_fee ($input=NULL) | |
Function validates amount of money in editing. | |
valid_months ($input=NULL) | |
Function validates number of months in function deduct_fees. | |
valid_default_fee ($input=NULL) | |
Callback function to validate default fee. | |
Public Member Functions inherited from Controller | |
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 | worker_deduct_members_fees ($month, $year, $user_id) |
Deduct member fees in given year and month if not deducted already. | |
static | worker_deduct_entrance_fees ($month, $year, $user_id) |
Deduct entrance fees. | |
static | worker_deduct_devices_fees ($month, $year, $user_id) |
Deduct device fees. | |
Static Public Member Functions inherited from Controller | |
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. |
Additional Inherited Members | |
Public Attributes inherited from Controller | |
const | ICON_ERROR = 1 |
const | ICON_GOOD = 2 |
const | ICON_HELP = 3 |
const | ICON_INFO = 4 |
const | ICON_WARNING = 5 |
$arr | |
$settings = NULL | |
$popup = 0 | |
$dialog = 0 | |
$noredirect = FALSE | |
$user_has_voip = 0 | |
$ip_address_span = '' | |
$unread_user_mails = 0 | |
$count_of_unclosed_logged_errors = 0 | |
$devices_down_count = 0 | |
$user_favourites_pages = NULL | |
$axo_doc_access = FALSE | |
Protected Member Functions inherited from Controller | |
is_preprocesor_enabled () | |
This methods defines whether the preprocessor of MY_Controller is loaded or not. | |
Protected Attributes inherited from Controller | |
$member_id | |
$user_id | |
$member_account_id = 1 | |
$session |
Transfers_Controller::add | ( | ) |
Function adds transfers from one arbitrary account to another arbitrary account.
integer | $origin_account |
Transfers_Controller::add_from_account | ( | $origin_account_id = null | ) |
Adds transfers from single origin account.
integer | $origin_account_id |
Transfers_Controller::add_member_fee_payment_by_cash | ( | $member_id = NULL , |
|
$amount = NULL |
|||
) |
Function adds member fee payment by cash.
integer | $member_id |
Transfers_Controller::add_voip | ( | $origin_account = NULL | ) |
Function adds VoIP transfers.
integer | $origin_account |
Transfers_Controller::deduct_device_fees | ( | ) |
Deducts repayments of devices.
Special devices, like wifi clients can be sold by association. This mechanism enables repayments of these devices in case that member has not enough money to buy it immediately.
Transfers_Controller::deduct_entrance_fees | ( | ) |
Function deducts entrance fees.
This fee is deducted only one once to each member. It checks each member if his fee was deducted, and if it is not, then the fee is deducted.
Transfers_Controller::deduct_member_fees | ( | ) |
Deducts fees of all members in one month.
If deduct transfer for one month and account is found, then it is ignored and skipped.
Transfers_Controller::edit | ( | $transfer_id = NULL | ) |
Function edits double-entry transfers.
They should not be edited. Wrong transfer should be solved by new transfer.
integer | $transfer_id |
Transfers_Controller::index | ( | ) |
By default, it redirects user to day book - list of all double-entry transfers.
Transfers_Controller::payment_calculator | ( | $account_id = NULL , |
|
$text = FALSE |
|||
) |
Perform payment calculator.
type | $account_id | |
type | $text |
Transfers_Controller::show | ( | $transfer_id = null | ) |
Function shows information of transfer including previous transfer if exists.
integer | $transfer_id |
Transfers_Controller::show_all | ( | $limit_results = 50 , |
|
$order_by = 'datetime' , |
|||
$order_by_direction = 'desc' , |
|||
$page_word = null , |
|||
$page = 1 |
|||
) |
It shows all double-entry transfers.
They are shown in day book.
integer | $limit_results | |
string | $order_by | |
string | $order_by_direction |
Transfers_Controller::show_by_account | ( | $account_id = NULL , |
|
$limit_results = 500 , |
|||
$order_by = 'datetime' , |
|||
$order_by_direction = 'desc' , |
|||
$page_word = null , |
|||
$page = 1 |
|||
) |
It shows transfers of credit account.
integer | $account_id |
integer | $limit_results | |
string | $order_by | |
string | $order_by_direction |
Transfers_Controller::valid_amount | ( | $input = NULL | ) |
Function validates amount of money in editing.
object | $input |
Transfers_Controller::valid_amount_to_send | ( | $input = NULL | ) |
Function validates amount of money to send from double-entry account.
object | $input |
Transfers_Controller::valid_calculator_item | ( | $input = NULL | ) |
Callback function to validate form inputs from payment calulator.
type | $input |
Transfers_Controller::valid_default_fee | ( | $input = NULL | ) |
Callback function to validate default fee.
object | $input |
Transfers_Controller::valid_fee | ( | $input = NULL | ) |
Function validates amount of money in editing.
object | $input |
Transfers_Controller::valid_months | ( | $input = NULL | ) |
Function validates number of months in function deduct_fees.
object | $input |
|
static |
Deduct device fees.
integer | $user_id | Who is deducting |
Exception | On any error |
|
static |
Deduct entrance fees.
integer | $user_id | Who is deducting |
integer | $date | Date of deduction [optional - default NOW] |
Exception | On any error |
|
static |
Deduct member fees in given year and month if not deducted already.
integer | $month | Month of deduction |
integer | $year | Year of deduction |
integer | $user_id | Who is deducting |
Exception | On any error |