Overview

Namespaces

  • emberlabs
    • Barcode
  • None

Classes

  • Appconfig
  • Barcode_lib
  • Config
  • Customer
  • Customer_rewards
  • Customers
  • Detailed_receivings
  • Detailed_sales
  • Dinner_table
  • Email_lib
  • Employee
  • Employees
  • Giftcard
  • Giftcards
  • Home
  • Inventory
  • Inventory_low
  • Inventory_summary
  • Item
  • Item_kit
  • Item_kit_items
  • Item_kits
  • Item_lib
  • Item_quantity
  • Item_taxes
  • Items
  • Login
  • Mailchimp_lib
  • MailchimpConnector
  • Messages
  • Module
  • MY_Lang
  • No_Access
  • Person
  • Persons
  • Receiving
  • Receiving_lib
  • Receivings
  • Report
  • Reports
  • Rewards
  • Rounding_code
  • Sale
  • Sale_lib
  • Sale_suspended
  • Sales
  • Secure_Controller
  • Sms_lib
  • Specific_customer
  • Specific_discount
  • Specific_employee
  • Stock_location
  • Summary_categories
  • Summary_customers
  • Summary_discounts
  • Summary_employees
  • Summary_items
  • Summary_payments
  • Summary_report
  • Summary_sales
  • Summary_suppliers
  • Summary_taxes
  • Supplier
  • Suppliers
  • Tax
  • Tax_lib
  • Taxes
  • Token
  • Token_customer
  • Token_invoice_count
  • Token_invoice_sequence
  • Token_lib
  • Token_quote_sequence
  • Token_suspended_invoice_count
  • Token_year_invoice_count
  • Tracking_lib

Functions

  • currency_side
  • current_language
  • current_language_code
  • dateformat_bootstrap
  • dateformat_momentjs
  • db_log_queries
  • get_customer_data_row
  • get_customer_manage_table_headers
  • get_giftcard_data_row
  • get_giftcards_manage_table_headers
  • get_item_data_row
  • get_item_kit_data_row
  • get_item_kits_manage_table_headers
  • get_items_manage_table_headers
  • get_people_manage_table_headers
  • get_person_data_row
  • get_sale_data_last_row
  • get_sale_data_row
  • get_sales_manage_payments_summary
  • get_sales_manage_table_headers
  • get_supplier_data_row
  • get_suppliers_manage_table_headers
  • get_tax_data_row
  • get_taxes_manage_table_headers
  • load_config
  • load_language_files
  • load_stats
  • parse_decimals
  • pdf_create
  • quantity_decimals
  • show_report
  • show_report_if_allowed
  • to_currency
  • to_currency_no_money
  • to_decimals
  • to_quantity_decimals
  • to_tax_decimals
  • totals_decimals
  • transform_headers
  • transform_headers_readonly
  • Overview
  • Namespace
  • Class

Class Customer

Customer class

CI_Model
Extended by Person
Extended by Customer
Author: N/A
Since: 1.0
Link: github.com/jekkos/opensourcepos
Located at models/Customer.php
Methods summary
public boolean
# exists( integer $person_id )

Determines whether the given person exists in the people database table

Determines whether the given person exists in the people database table

Parameters

$person_id
identifier of the person to verify the existence

Returns

boolean
TRUE if the person exists, FALSE if not

Overrides

Person::exists()
public
# check_account_number_exists( $account_number, $person_id = '' )
public integer
# get_total_rows( )

Gets total of rows of people database table

Gets total of rows of people database table

Returns

integer
row counter

Overrides

Person::get_total_rows()
public array
# get_all( integer $rows = 0, integer $limit_from = 0 )

Gets all people from the database table

Gets all people from the database table

Parameters

$rows
$limit limits the query return rows
$limit_from
$offset offset the query

Returns

array
array of people table rows

Overrides

Person::get_all()
public array
# get_info( integer $customer_id )

Gets information about a person as an array

Gets information about a person as an array

Parameters

$customer_id
$person_id identifier of the person

Returns

array
containing all the fields of the table row

Overrides

Person::get_info()
public
# get_stats( $customer_id )
public array
# get_multiple_info( array $customer_ids )

Gets information about people as an array of rows

Gets information about people as an array of rows

Parameters

$customer_ids
$person_ids array of people identifiers

Returns

array
containing all the fields of the table row

Overrides

Person::get_multiple_info()
public
# check_email_exists( $email, $customer_id = '' )
public
# save_customer( & $person_data, & $customer_data, $customer_id = FALSE )
public
# update_reward_points_value( $customer_id, $value )
public boolean
# delete( integer $customer_id )

Deletes one Person (dummy base function)

Deletes one Person (dummy base function)

Parameters

$customer_id
$person_id person identificator

Returns

boolean
always TRUE

Overrides

Person::delete()
public boolean
# delete_list( array $customer_ids )

Deletes a list of people (dummy base function)

Deletes a list of people (dummy base function)

Parameters

$customer_ids
$person_ids list of person identificators

Returns

boolean
always TRUE

Overrides

Person::delete_list()
public array
# get_search_suggestions( string $search, integer $unique = TRUE, $limit = 25 )

Get search suggestions to find person

Get search suggestions to find person

Parameters

$search
string containing the term to search in the people table
$unique
$limit limit the search
$limit

Returns

array
array with the suggestion strings

Overrides

Person::get_search_suggestions()
public
# get_found_rows( $search )
public
# search( $search, $rows = 0, $limit_from = 0, $sort = 'last_name', $order = 'asc' )
Methods inherited from Person
save()
API documentation generated by ApiGen