CORE POS - Fannie
The CORE POS back end
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
BatchesModel Class Reference
Inheritance diagram for BatchesModel:
BasicModel

Public Member Functions

 doc ()
 
 forceStartBatch ($id)
 
 forceStopBatch ($id)
 
 getUPCs ($batchID=false)
 
 batchID ()
 
 startDate ()
 
 endDate ()
 
 batchName ()
 
 batchType ()
 
 discountType ()
 
 priority ()
 
 owner ()
 
 transLimit ()
 
- Public Member Functions inherited from BasicModel
 db ()
 
 preferredDB ()
 
 setConfig ($c)
 
 __construct ($con)
 
 whichDB ($db_name)
 
 getDefinition ()
 
 create ()
 
 createIfNeeded ($db_name)
 
 load ()
 
 reset ()
 
 getColumns ()
 
 getName ()
 
 getFullQualifiedName ()
 
 find ($sort='', $reverse=false)
 
 delete ()
 
 save ()
 
 pushToLanes ()
 
 deleteFromLanes ()
 
 normalize ($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK, $doCreate=False)
 
 doc ()
 
 generate ($filename)
 
 newModel ($name, $as_view=false)
 
 getModels ()
 
 toJSON ()
 

Protected Member Functions

 hookAddColumnowner ()
 
- Protected Member Functions inherited from BasicModel
 getMeta ($type, $dbms)
 
 validateOp ($operator)
 
 insertRecord ()
 
 updateRecord ()
 
 normalizeLanes ($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK, $doCreate=False)
 
 loadHooks ()
 

Protected Attributes

 $name = "batches"
 
 $preferred_db = 'op'
 
 $columns
 
- Protected Attributes inherited from BasicModel
 $name
 
 $fq_name
 
 $columns = array()
 
 $unique = array()
 
 $meta_types
 
 $connection = false
 
 $record_changed = false
 
 $instance = array()
 
 $filters = array()
 
 $normalize_lanes = false
 
 $currently_normalizing_lane = false
 
 $cached_definition = false
 
 $config
 
 $preferred_db = ''
 
 $hooks = array()
 

Additional Inherited Members

- Public Attributes inherited from BasicModel
const NORMALIZE_MODE_CHECK = 1
 
const NORMALIZE_MODE_APPLY = 2
 

Member Function Documentation

BatchesModel::forceStartBatch (   $id)

Start batch immediately

Parameters
$id[int] batchID

This helper method masks some ugly queries that cope with UPC vs Likecode values plus differences in multi-table UPDATE syntax for different SQL flavors. Also provides some de-duplication.

BatchesModel::forceStopBatch (   $id)

Stop batch immediately

Parameters
$id[int] batchID
BatchesModel::getUPCs (   $batchID = false)

Fetch all UPCs associated with a batch

Parameters
$batchID[optional]
Returns
[array] of [string] UPC values If $batchID is omitted, the model's own batchID is used.

Member Data Documentation

BatchesModel::$columns
protected
Initial value:
= array(
'batchID' => array('type'=>'INT', 'primary_key'=>True, 'increment'=>True),
'startDate' => array('type'=>'DATETIME'),
'endDate' => array('type'=>'DATETIME'),
'batchName' => array('type'=>'VARCHAR(80)'),
'batchType' => array('type'=>'SMALLINT'),
'discountType' => array('type'=>'SMALLINT'),
'priority' => array('type'=>'INT'),
'owner' => array('type'=>'VARCHAR(50)'),
'transLimit' => array('type'=>'TINYINT', 'default'=>0),
)

The documentation for this class was generated from the following file: