CORE POS - Fannie
The CORE POS back end
|
Static Public Member Functions | |
static | parameterize ($arr, $datecol='', $datefunc='') |
static | isTesting ($prefix='') |
static | isNotTesting ($prefix='') |
static | isCanceled ($prefix='') |
static | isValid ($prefix='') |
static | isStoreID ($store_id, $prefix='') |
static | sumQuantity ($prefix='') |
static | joinProducts ($dlog_alias='t', $product_alias='p', $join_type='left') |
static | joinDepartments ($dlog_alias='t', $dept_alias='d') |
static | joinCustdata ($dlog_alias='t', $cust_alias='c') |
static | joinTenders ($dlog_alias='t', $tender_alias='n') |
static | getTransNo (SQLManager $connection, $emp_no=false, $register_no=false) |
static | addItem (SQLManager $connection, $trans_no, $params) |
static | addOpenRing (SQLManager $connection, $department, $amount, $trans_no, $params=array()) |
Static Public Attributes | |
static | $DEFAULTS |
Helper class for generating useful bits of transaction SQL
|
static |
Add a transaction record directly to dtransactions on the backend
$connection | [SQLManager] database connection |
$trans_no | [integer] transaction number (dtransactions.trans_no) |
$params | [array] of column_name => value |
If emp_no and register_no values are not specified, the defaults are the configuration settings FANNIE_EMP_NO and FANNIE_REGISTER_NO.
The following columns are always calculated by addItem() and values set in $params will be ignored:
|
static |
Add an open ring record to dtransactions on the backend
$connection | [SQLManager] database connection |
$department | [integer] department number $param $amount [number] ring amount |
$trans_no | [integer] transaction number (dtransactions.trans_no) |
$params | [array] of column_name => value |
If emp_no and register_no values are not specified, the defaults are the configuration settings FANNIE_EMP_NO and FANNIE_REGISTER_NO.
The following columns are automatically calculated based on department number and amount:
This method calls DTrans::addItem() so columns datetime and trans_id are also automatically assigned.
|
static |
Get an available dtransactions.trans_no value
$connection | [SQLManager] database connection |
$emp_no | [int] employee number |
$register_no | [int] register number |
|
static |
Get SQL condition to select canceled transactions
$prefix | [optional] table alias |
|
static |
Get SQL condition to select non-testing transactions
$prefix | [optional] table alias |
|
static |
Get SQL condition to select transactions with the given store ID. Store ID must be passed to the resulting prepared statement as an argument
|
static |
Get SQL condition to select testing transactions
$prefix | [optional] table alias |
|
static |
Get SQL condition to select valid transactions This is essentially the opposite of "isCanceled" but excludes some additional informational rows that provide commentary but do not impact numeric totals
$prefix | [optional] table alias |
|
static |
Get join statement for custdata table
$dlog_alias | [optional] alias for the transaction table (default 't') |
$cust_alias | [optional] alias for the custdata table (default 'c') |
|
static |
Get join statement for departments table
$dlog_alias | [optional] alias for the transaction table (default 't') |
$dept_alias | [optional] alias for the departments table (default 'd') |
|
static |
Get join statement for products table
$dlog_alias | [optional] alias for the transaction table (default 't') |
$product_alias | [optional] alias for the products table (default 'p') |
|
static |
Get join statement for tenders table
$dlog_alias | [optional] alias for the transaction table (default 't') |
$tender_alias | [optional] alias for the tenders table (default 'n') |
|
static |
Turn an key=>value array into useful SQL bits
$arr | array of column_name => column_value |
$datecol | [optional] name of datetime column |
$datefunc | [optional] string database function for current datetime |
|
static |
Get standard quantity sum. Member-discount line items are excluded and quasi-scalabe items with a unitPrice of a penny are counted as one instead of whatever value is in the quantity field.
$prefix | [optional] table alias |
|
static |
Array of default values for dtransaction-style tables The column 'datetime' is ommitted. Normally an SQL function like NOW() is used there and cannot be a parameter