CORE POS - Fannie
The CORE POS back end
|
Public Member Functions | |
normalize ($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK, $doCreate=false) | |
dlogMode ($switch) | |
normalizeLog ($view_name, $table_name, $mode=BasicModel::NORMALIZE_MODE_CHECK) | |
doc () | |
datetime () | |
store_id () | |
register_no () | |
emp_no () | |
trans_no () | |
upc () | |
description () | |
trans_type () | |
trans_subtype () | |
trans_status () | |
department () | |
quantity () | |
scale () | |
cost () | |
unitPrice () | |
total () | |
regPrice () | |
tax () | |
foodstamp () | |
discount () | |
memDiscount () | |
discountable () | |
discounttype () | |
voided () | |
percentDiscount () | |
ItemQtty () | |
volDiscType () | |
volume () | |
VolSpecial () | |
mixMatch () | |
matched () | |
memType () | |
staff () | |
numflag () | |
charflag () | |
card_no () | |
trans_id () | |
pos_row_id () | |
store_row_id () | |
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 () | |
Static Public Member Functions | |
static | selectDlog ($start, $end=false, $where=false) |
static | select_dlog ($start, $end=false, $where=false) |
static | selectDtrans ($start, $end=false, $where=false) |
static | select_dtrans ($start, $end=false, $where=false) |
static | aggregateDlog (SQLManager $connection, $start_date, $end_date, stdclass $where, $groupby=array()) |
static | aggregateDtrans (SQLManager $connection, $start_date, $end_date, stdclass $where, $groupby=array()) |
static | aggregateStruct (SQLManager $connection, $dlog, $start_date, $end_date, stdclass $where, $groupby=array()) |
Protected Attributes | |
$name = 'dtransactions' | |
$preferred_db = 'trans' | |
$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 |
Protected Member Functions inherited from BasicModel | |
getMeta ($type, $dbms) | |
validateOp ($operator) | |
insertRecord () | |
updateRecord () | |
normalizeLanes ($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK, $doCreate=False) | |
loadHooks () | |
|
static |
Grouping is required
Validate group by columns
Always include a datetime column
Create randomly named temporary table based on the structure of dlog_15 or transachive
Build a query to insert aggregated rows into the temporary table
Always aggregate by total & quantity
Add a where clause if one has been specified
Add the group by clause
Split monthly archive union if needed
Load data into temporary table from source table(s) using built query
DTransactionsModel::normalize | ( | $db_name, | |
$mode = BasicModel::NORMALIZE_MODE_CHECK , |
|||
$doCreate = false |
|||
) |
Overrides (extends) the base function to check multiple tables that should all have identical or similar structure after doing a normal run of the base.
DTransactionsModel::normalizeLog | ( | $view_name, | |
$table_name, | |||
$mode = BasicModel::NORMALIZE_MODE_CHECK |
|||
) |
Rebuild dlog style views
$view_name | name of the view |
$table_name | underlying table |
$mode | the normalization mode. See BasicModel. |
The view changes the column "datetime" to "tdate" and adds a "trans_num" column. Otherwise it includes all the columns from dtransactions. Columns "trans_type" and "trans_subtype" still have translations to fix older records but everyting else passes through as-is.