Handles POS checkout, sale completion, and receipt handling.
// 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');
require_once("Secure_Controller.php");
define('PRICE_MODE_STANDARD', 0);
define('PRICE_MODE_KIT', 1);
define('PAYMENT_TYPE_UNASSIGNED', '--');
class Sales extends Secure_Controller
{
public function __construct()
{
parent::__construct('sales');
$this->load->model('mpesa_model');
$this->load->library('sale_lib');
$this->load->library('barcode_lib');
$this->load->library('email_lib');
$this->load->library('token_lib');
}
public function index()
{
$this->session->set_userdata('allow_temp_items', 1);
$this->_reload();
}
public f
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key