Blesta
  • Package
  • Class
  • Tree
  • Deprecated

Packages

  • blesta
    • app
      • components
        • events
          • default
      • controllers
      • models
    • components
      • auth
      • delivery
        • interfax
        • postal
          • methods
      • download
      • email
      • exchange
        • rates
          • foxrate
          • google
            • finance
          • yahoo
            • finance
      • gateway
        • payments
      • gateways
      • invoice
        • delivery
        • templates
      • json
      • modules
      • net
        • http
        • net
          • amazon
            • s3
          • geo
            • ip
      • plugins
      • recaptcha
      • security
      • session
        • cart
      • settingscollection
      • upgrades
      • upload
      • vcard
    • helpers
      • currency
        • format
      • data
        • structure
          • array
          • string
      • text
        • parser
  • com
    • tecnick
      • tcpdf
        • blesta
          • components
            • invoice
              • templates
                • quickbooks
                  • invoice
                • templates
                  • default
  • Crypt
    • AES
    • DES
    • Hash
    • Random
    • RC4
    • Rijndael
    • RSA
    • TerraDES
  • File
    • ANSI
    • ASN1
    • X509
  • Math
    • BigInteger
  • minPHP
    • components
      • input
      • record
    • helpers
      • color
      • data
        • structure
      • date
      • html
      • xml
    • lib
  • Net
    • SFTP
    • SSH1
    • SSH2
  • None
  • PHP
  • PHPMailer
  • Services
    • JSON
  • Swift
    • ByteStream
    • CharacterStream
    • Encoder
    • Events
    • KeyCache
    • Mailer
    • Mime
    • Plugins
    • Transport

Classes

  • _404
  • AdminBilling
  • AdminClient
  • AdminClients
  • AdminCompanyAutomation
  • AdminCompanyBilling
  • AdminCompanyCurrencies
  • AdminCompanyCustomfields
  • AdminCompanyEmails
  • AdminCompanyGateways
  • AdminCompanyGeneral
  • AdminCompanyGroups
  • AdminCompanyModules
  • AdminCompanyPlugins
  • AdminCompanyTaxes
  • AdminDialog
  • AdminLicense
  • AdminLogin
  • AdminLogout
  • AdminMain
  • AdminMyinfo
  • AdminPackages
  • AdminSearch
  • AdminSettings
  • AdminSystemApi
  • AdminSystemAutomation
  • AdminSystemBackup
  • AdminSystemCompanies
  • AdminSystemGeneral
  • AdminSystemHelp
  • AdminSystemMarketplace
  • AdminSystemStaff
  • AdminSystemThemes
  • AdminSystemUpgrade
  • AdminTests
  • AdminTheme
  • AdminTools
  • Api
  • Callback
  • ClientAccounts
  • ClientContacts
  • ClientDialog
  • ClientInvoices
  • ClientLogin
  • ClientLogout
  • ClientMain
  • ClientPay
  • ClientServices
  • ClientTheme
  • ClientTransactions
  • Cron
  • Install
  • Main
  • Upgrade
  • Uploads

Class AdminClients

Admin Clients Management

Controller
Extended by AppController
Extended by AdminClients
Package: blesta\app\controllers
Copyright: Copyright (c) 2010, Phillips Data, Inc.
License: The Blesta License Agreement
Link: Blesta
Located at app/controllers/admin_clients.php

Methods summary

public
# preAction( )

Overwritable method called before the index method, or controller specified action. This method is public to make compatible with PHP 5.1 (due to a bug not fixed until 5.2). It is, however, not a callable action.

Overwritable method called before the index method, or controller specified action. This method is public to make compatible with PHP 5.1 (due to a bug not fixed until 5.2). It is, however, not a callable action.

Overrides

AppController::preAction
public
# index( )

Browse Clients

Browse Clients

Overrides

Controller::index
public
# view( string $content = null )

View a specific client profile, may optionally set what content to view within the content view.

View a specific client profile, may optionally set what content to view within the content view.

Parameters

$content
string
$content The content to set in the content view of the client profile page
public
# services( )

List services

List services

public
# serviceCount( )

Service count

Service count

public
# invoices( )

List invoices

List invoices

public
# invoiceCount( )

Invoice count

Invoice count

public
# invoiceApplied( )

AJAX request for all transactions an invoice has applied

AJAX request for all transactions an invoice has applied

public
# transactions( )

List transactions

List transactions

public
# transactionCount( )

Transaction count

Transaction count

public
# transactionApplied( )

AJAX request for all invoices a transaction has been applied to

AJAX request for all invoices a transaction has been applied to

public
# emails( )

View mail log

View mail log

public
# notes( )

List notes

List notes

public
# addNote( )

Add note

Add note

public
# editNote( )

Edit note

Edit note

public
# deleteNote( )

Delete Note

Delete Note

public
# stickyNotes( )

Displays/removes sticky notes

Displays/removes sticky notes

public
# vCard( )

Prompts to download a vCard of the client's address information

Prompts to download a vCard of the client's address information

public
# add( )

Add New Client

Add New Client

public
# edit( )

Edit Client

Edit Client

public
# delete( )

Delete Client

Delete Client

public
# getCustomFields( )

AJAX request for retrieving all custom fields for a client group

AJAX request for retrieving all custom fields for a client group

private mixed
# addCustomFields( integer $client_id, array $vars = array() )

Attempts to add custom fields to a client

Attempts to add custom fields to a client

Parameters

$client_id
integer
$client_id The client ID to add custom fields for
$vars
array
$vars The post data, containing custom fields

Returns

mixed
An array of errors, or false if none exist

See

Clients::add(), Clients::edit()
public
# quickUpdate( )

AJAX quick update client to set status, invoice method, auto debit status, or auto suspension status

AJAX quick update client to set status, invoice method, auto debit status, or auto suspension status

public
# email( )

Email Client

Email Client

public
# loginAsClient( )

Login as the client

Login as the client

public
# logoutAsClient( )

Logout as the client

Logout as the client

public
# merge( )

Merge clients together

Merge clients together

public
# addContact( )

Add Contact

Add Contact

public
# editContact( )

Edit Contact

Edit Contact

public
# deleteContact( )

Delete Contact

Delete Contact

public
# accounts( )

Manage Payment Accounts

Manage Payment Accounts

public
# addCcAccount( )

Add Credit Card account

Add Credit Card account

public
# addAchAccount( )

Add ACH account

Add ACH account

public
# editCcAccount( )

Edit a CC account

Edit a CC account

public
# editAchAccount( )

Edit an ACH account

Edit an ACH account

public
# deleteCcAccount( )

Delete a CC account

Delete a CC account

public
# deleteAchAccount( )

Delete an ACH account

Delete an ACH account

public
# showcard( )

Renders a form to enter a passphrase for decrypting a card and returns the card on success

Renders a form to enter a passphrase for decrypting a card and returns the card on success

public
# showaccount( )

Renders a form to enter a passphrase for decrypting a bank account and routing number and returns the values on success

Renders a form to enter a passphrase for decrypting a bank account and routing number and returns the values on success

public
# makePayment( )

Processes a payment for this client

Processes a payment for this client

public
# makePaymentInvoices( )

Fetches a table of invoices for the given currency

Fetches a table of invoices for the given currency

public
# recordPayment( )

Manually record a payment for this client (i.e. record payment by check)

Manually record a payment for this client (i.e. record payment by check)

private
# setContactView( stdClass $vars, stdClass $client, boolean $edit = false )

Sets the contact partial view

Sets the contact partial view

Parameters

$vars
stdClass
$vars The input vars object for use in the view
$client
stdClass
$client The client object whose contacts to use
$edit
boolean
$edit True if this is an edit, false otherwise

See

AdminClients::makePayment(), AdminClients::addAchAccount(), AdminClients::addCcAccount(), AdminClients::editAchAccount(), AdminClients::editCcAccount()
private
# setAchView( stdClass $vars, stdClass $client, boolean $edit = false, boolean $save_account = false )

Sets the ACH partial view

Sets the ACH partial view

Parameters

$vars
stdClass
$vars The input vars object for use in the view
$client
stdClass
$client The client object whose contacts to use
$edit
boolean
$edit True if this is an edit, false otherwise
$save_account
boolean
$save_account True to offer an option to save these payment details, false otherwise

See

AdminClients::makePayment(), AdminClients::addAchAccount(), AdminClients::editAchAccount()
private
# setCcView( stdClass $vars, stdClass $client, boolean $edit = false, boolean $save_account = false )

Sets the CC partial view

Sets the CC partial view

Parameters

$vars
stdClass
$vars The input vars object for use in the view
$client
stdClass
$client The client object whose contacts to use
$edit
boolean
$edit True if this is an edit, false otherwise
$save_account
boolean
$save_account True to offer an option to save these payment details, false otherwise

See

AdminClients::makePayment(), AdminClients::addCcAccount(), AdminClients::editCcAccount()
public
# createInvoice( )

Create invoice

Create invoice

public
# editInvoice( )

Edit invoice

Edit invoice

public
# editRecurInvoice( )

Edit a recurring invoice

Edit a recurring invoice

public
# calcLineTotals( )

Sums line items and returns the sub total, total, and tax amount based on currency and company settings for the given set of data and tax rules that apply to each. Outputs a JSON encoded array including:
-subtotal The decimal format for the subtotal
-subtotal_formatted The currency format for the subtotal
-tax The decimal format for the tax
-tax_formatted The currency format for the tax
-total The decimal format for the tax
-total_formatted The currency format for the total

Sums line items and returns the sub total, total, and tax amount based on currency and company settings for the given set of data and tax rules that apply to each. Outputs a JSON encoded array including: -subtotal The decimal format for the subtotal -subtotal_formatted The currency format for the subtotal -tax The decimal format for the tax -tax_formatted The currency format for the tax -total The decimal format for the tax -total_formatted The currency format for the total

public
# deleteDraftInvoice( )

Deletes a draft invoice

Deletes a draft invoice

public
# deleteRecurInvoice( )

Delete recurring invoice

Delete recurring invoice

public
# viewInvoice( )

Streams the given invoice to the browser

Streams the given invoice to the browser

public
# editTransaction( )

Edit a Transaction

Edit a Transaction

public
# unapplyTransaction( )

Unapplies a transaction from the given invoice

Unapplies a transaction from the given invoice

public
# packages( )

Sets Restricted Packages

Sets Restricted Packages

public
# addService( )

Add a service

Add a service

public
# editService( )

Edit service

Edit service

public
# serviceTab( )

Service tab request

Service tab request

public
# serviceInfo( )

Service Info

Service Info

private string
# processServiceStep( string $step, stdClass $package, stdClass $package_group, stdClass $client )

Process the requested step

Process the requested step

Parameters

$step
string
$step The add services step to process
$package
stdClass
$package A stdClass object representing the primary package being ordered
$package_group
stdClass
$package_group A stdClass object representing the package group of the primary package being ordered
$client
stdClass
$client A stdClass object representing the client for which the service is being added

Returns

string
The step to render
private
# renderServiceStep( string $step, stdClass $package, stdClass $package_group, stdClass $client )

Render each add service step

Render each add service step

Parameters

$step
string
$step The add services step to render
$package
stdClass
$package A stdClass object representing the primary package being ordered
$package_group
stdClass
$package_group A stdClass object representing the package group of the primary package being ordered
$client
stdClass
$client A stdClass object representing the client for which the service is being added
private array
# getPackageTerms( stdClass $package )

Returns an array of all pricing terms for the given package

Returns an array of all pricing terms for the given package

Parameters

$package
stdClass
$package A stdClass object representing the package to fetch the terms for

Returns

array
An array of key/value pairs where the key is the package pricing ID and the value is a string representing the price, term, and period.
private
# listPackages( )

List all packages available to the client

List all packages available to the client

public
# getStates( )

AJAX Fetch all states belonging to a given country (json encoded ajax request)

AJAX Fetch all states belonging to a given country (json encoded ajax request)

private mixed
# renderClientView( string $view, boolean $content_only = false )

Render the given Client view element

Render the given Client view element

Parameters

$view
string
$view The view to render
$content_only
boolean
$content_only True to only return the content, false to render it

Returns

mixed
boolean false if this is an ajax request that can not be rendered within a structure, string containing the content to be rendered, or void if the content is rendered automatically

Methods inherited from AppController

__construct(), authorized(), flashMessage(), getCompany(), getDaysOfWeek(), getMonths(), getTimes(), getWidgets(), isAjax(), isLoggedIn(), isStaffAsClient(), licenseCheck(), outputAsJson(), postAction(), primeCompany(), renderAjaxWidget(), renderAjaxWidgetIfAsync(), reorderWidgets(), requireLogin(), setMessage(), setWidgetState(), toggleWidget()

Methods inherited from Controller

clearCache(), components(), draw(), emptyCache(), helpers(), partial(), redirect(), render(), set(), setDefaultViewPath(), startCaching(), stopCaching(), uses()

Magic methods summary

Properties summary

private array $widgets_state
#

Param

array
$widgets_state The current state of widgets to be displayed in the given view
private string $custom_field_prefix
#

The custom field prefix used in form names to keep them unique and easily referenced

The custom field prefix used in form names to keep them unique and easily referenced

Properties inherited from AppController

$admin_uri, $base_uri, $base_url, $client_uri, $company_id, $components, $helpers, $layout, $request_uri, $server_protocol

Properties inherited from Controller

$action, $controller, $files, $get, $is_cli, $plugin, $post, $structure, $structure_view, $uri, $uri_str, $uses, $view

Blesta API documentation generated by ApiGen 2.8.0