FreenetIS
 All Classes Namespaces Functions Variables Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Phone_invoices_Controller Class Reference
Inheritance diagram for Phone_invoices_Controller:
Controller

Public Member Functions

 __construct ()
 Only check whether are phone invoices enabled.
 index ()
 Index of controller Redirects to show_all.
 import ()
 Imports invoice and save it to the database.
 show_all ($limit_results=20, $order_by= 'billing_period_from', $order_by_direction= 'DESC', $page_word=null, $page=1)
 Shows all invoices.
 show ($phone_invoice_id=NULL, $phone_invoice_user_id=NULL)
 Displays detail of invoice and list of phone numbers on invoice Enable assign user to each detail.
 delete ($phone_invoice_id=0)
 Deletes invoice.
 delete_user_invoice ($phone_user_invoice_id=0)
 Deletes user phone invoice.
 lock_set ($phone_invoice_id=0)
 (Un)Lock invoice for editing
 post_mail_warning ($phone_invoice_id=0)
 Sends warning to users which numbers are on invoice.
 pay ($phone_invoice_id=0)
 Disccount private services price from users credit.
 show_by_user ($user_id=0)
 Displays users phone invoices.
 show_details ($phone_invoice_user_id=0, $detail_of= 'calls')
 Show details of phone number on invoice.
 show_history ($user_id=NULL, $number=NULL, $phone_invoice_user_id=NULL)
 Show history between user and number.
 intelligent_select_ajax ($phone_invoice_user_id=NULL, $detail_of=NULL)
 Ajax intelligent handler.
 user_details_set_private_ajax ($phone_invoice_user_id=0, $detail_of= 'calls')
 Ajax set handler Output: - 0 on any error.
- 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 user_number_cache ($number)
 Cache for connection between user and number.
- 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.

Protected Member Functions

 user_field ($item, $name)
 Callback for user fields in phone invoices.
- Protected Member Functions inherited from Controller
 is_preprocesor_enabled ()
 This methods defines whether the preprocessor of MY_Controller is loaded or not.

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 Attributes inherited from Controller
 $member_id
 $user_id
 $member_account_id = 1
 $session

Constructor & Destructor Documentation

Phone_invoices_Controller::__construct ( )

Only check whether are phone invoices enabled.

Author
Ondrej Fibich

Reimplemented from Controller.

Member Function Documentation

Phone_invoices_Controller::delete (   $phone_invoice_id = 0)

Deletes invoice.

Parameters
integer$phone_invoice_id
Phone_invoices_Controller::delete_user_invoice (   $phone_user_invoice_id = 0)

Deletes user phone invoice.

Parameters
integer$phone_user_invoice_id
Phone_invoices_Controller::import ( )

Imports invoice and save it to the database.

Tries to figured out which services was private and which was not.

Phone_invoices_Controller::intelligent_select_ajax (   $phone_invoice_user_id = NULL,
  $detail_of = NULL 
)

Ajax intelligent handler.

Output: - 0 if there is any error

  • list of ids on success (id,id,id,)
    Parameters
    integer$phone_invoice_user_id
    string$detail_of
Phone_invoices_Controller::lock_set (   $phone_invoice_id = 0)

(Un)Lock invoice for editing

Parameters
integer$phone_invoice_id
Phone_invoices_Controller::pay (   $phone_invoice_id = 0)

Disccount private services price from users credit.

Parameters
integer$phone_invoice_id
Phone_invoices_Controller::post_mail_warning (   $phone_invoice_id = 0)

Sends warning to users which numbers are on invoice.

See Also
Mail_messages_Model
Parameters
integer$phone_invoice_id
Phone_invoices_Controller::show (   $phone_invoice_id = NULL,
  $phone_invoice_user_id = NULL 
)

Displays detail of invoice and list of phone numbers on invoice Enable assign user to each detail.

Parameters
integer$phone_invoice_id
integer$phone_invoice_user_id
Phone_invoices_Controller::show_all (   $limit_results = 20,
  $order_by = 'billing_period_from',
  $order_by_direction = 'DESC',
  $page_word = null,
  $page = 1 
)

Shows all invoices.

Enable delete invoice.

Parameters
integer$limit_results
string$order_by
string$order_by_direction
integer$page_word
integer$page
Phone_invoices_Controller::show_by_user (   $user_id = 0)

Displays users phone invoices.

Parameters
integer$user_id
Phone_invoices_Controller::show_details (   $phone_invoice_user_id = 0,
  $detail_of = 'calls' 
)

Show details of phone number on invoice.

Show sum of price of each service. Show payment which has to be done by user. Show detail extract of services, enable to set or unset private services

Parameters
integer$phone_invoice_user_id
string$detail_of
Phone_invoices_Controller::show_history (   $user_id = NULL,
  $number = NULL,
  $phone_invoice_user_id = NULL 
)

Show history between user and number.

Shows SMS, Calls, Fixed calls

Parameters
integer$user_id
string$number
integer$phone_invoice_user_id
Phone_invoices_Controller::user_details_set_private_ajax (   $phone_invoice_user_id = 0,
  $detail_of = 'calls' 
)

Ajax set handler Output: - 0 on any error.

           - 1 on success
Parameters
integer$phone_invoice_user_id
string$detail_of
Phone_invoices_Controller::user_field (   $item,
  $name 
)
protected

Callback for user fields in phone invoices.

Parameters
unknown_type$item
unknown_type$name
static Phone_invoices_Controller::user_number_cache (   $number)
static

Cache for connection between user and number.

Parameters
string$numberPhone number to find
Returns
integer User ID or zero

The documentation for this class was generated from the following file: