Sale_model

OpensourcePOS · pos, sale-management, order-states

Manages sale records with completed and suspended states in CodeIgniter application.

// Source: https://github.com/smills323/OpensourcePOS | 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');

define('COMPLETED', 0);
define('SUSPENDED', 1);
define('CANCELED', 2);

define('SALE_TYPE_POS', 0);
define('SALE_TYPE_INVOICE', 1);
define('SALE_TYPE_WORK_ORDER', 2);
define('SALE_TYPE_QUOTE', 3);
define('SALE_TYPE_RETURN', 4);

/**
 * Sale class
 */

class Sale extends CI_Model
{
	/**
	 * Get sale info
	 */
	public function get_info($sale_id)
	{
		// NOTE: temporary tables are created to speed up searches due to the fact that they are ortogonal to the main query
		// create a temporary table to contain all the payments per sale
		$this->db->query('CREA

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key