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

Public Member Functions

 doc ()
 
 save ()
 
 mergeDescription ()
 
 normalize ($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK, $doCreate=False)
 
- Public Member Functions inherited from BasicModel
 __construct ($con)
 
 pushToLanes ()
 
 deleteFromLanes ()
 
 getModels ()
 
 setConnectionByName ($db_name)
 

Protected Attributes

 $name = "scaleItems"
 
 $columns
 
 $preferred_db = 'op'
 
- Protected Attributes inherited from BasicModel
 $normalize_lanes = false
 
 $currently_normalizing_lane = false
 

Additional Inherited Members

- Public Attributes inherited from BasicModel
const NORMALIZE_MODE_CHECK = 1
 
const NORMALIZE_MODE_APPLY = 2
 
- Protected Member Functions inherited from BasicModel
 normalizeLanes ($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
 
 loadHooks ()
 
 afterNormalize ($db_name, $mode)
 

Member Function Documentation

ScaleItemsModel::normalize (   $db_name,
  $mode = BasicModel::NORMALIZE_MODE_CHECK,
  $doCreate = False 
)

Custom normalization: The original version of scaleItems contained a column named "class". "class" is not a valid PHP function name, so the model is unable to have a method corresponding to the column.

This will rename the legacy "class" column to "reportingClass" if needed. Otherwise, it just calls BasicModel::normalize().

Member Data Documentation

ScaleItemsModel::$columns
protected
Initial value:
= array(
'plu' => array('type'=>'VARCHAR(13)', 'primary_key'=>true),
'price' => array('type'=>'MONEY'),
'itemdesc' => array('type'=>'VARCHAR(100)'),
'exceptionprice' => array('type'=>'MONEY'),
'weight' => array('type'=>'TINYINT', 'default'=>0),
'bycount' => array('type'=>'TINYINT', 'default'=>0),
'tare' => array('type'=>'FLOAT', 'default'=>0),
'shelflife' => array('type'=>'SMALLINT', 'default'=>0),
'netWeight' => array('type'=>'SMALLINT', 'default'=>0),
'text' => array('type'=>'TEXT'),
'reportingClass' => array('type'=>'VARCHAR(6)'),
'label' => array('type'=>'INT'),
'graphics' => array('type'=>'INT'),
'modified' => array('type'=>'DATETIME', 'ignore_updates'=>true),
)

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