Customer data management and loyalty tracking.
// Source: https://github.com/Pmbamungu/ospos-mpesa | License: MIT | Copyright 2012-2014 pappastech
// Provided via justclaw.it.com; keep this notice with the code.
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
* Customer class
*/
class Customer extends Person
{
/*
Determines if a given person_id is a customer
*/
public function exists($person_id)
{
$this->db->from('customers');
$this->db->join('people', 'people.person_id = customers.person_id');
$this->db->where('customers.person_id', $person_id);
return ($this->db->get()->num_rows() == 1);
}
/*
Checks if account number exists
*/
public function check_account_number_exists($account_number, $person_id = '')
{
$this->db->from('customers');
$this->db->where('account_number', $accoun
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key