CORE POS - IS4C
The CORE POS front end
Static Public Member Functions | List of all members
COREPOS\pos\lib\PrehLib Class Reference

Static Public Member Functions

static tender ($right, $strl)
 
static ttl ()
 
static omtr_ttl ()
 
static peekItem ($full_record=false, $transID=false)
 
static fsEligible ()
 
static percentDiscount ($strl, $json=array())
 
static ageCheck ($required_age, $ret)
 
static applyToggles ($tax, $foodstamp, $discount)
 

Detailed Description

A horrible, horrible catch-all clutter of functions

Member Function Documentation

static COREPOS\pos\lib\PrehLib::ageCheck (   $required_age,
  $ret 
)
static

Enforce age-based restrictions

Parameters
$required_age[int] age in years
$ret[array] Parser-formatted return value
Returns
[array] 0 - boolean age-related approval required 1 - array Parser-formatted return value
static COREPOS\pos\lib\PrehLib::fsEligible ( )
static

Add foodstamp elgibile total record

static COREPOS\pos\lib\PrehLib::omtr_ttl ( )
static

Total the transaction, which the cashier thinks may be eligible for the Ontario Meal Tax Rebate.

Returns
True - total successfully String - URL

If ttl() returns a string, go to that URL for more information on the error or to resolve the problem.

The most common error, by far, is no member number in which case the return value is the member-entry page.

The Ontario Meal Tax Rebate refunds the provincial part of the Harmonized Sales Tax if the total of the transaction is not more than a certain amount.

If the transaction qualifies, change the tax status for each item at the higher rate to the lower rate. Display a message that a change was made. Otherwise display a message about that. Total the transaction as usual.

static COREPOS\pos\lib\PrehLib::peekItem (   $full_record = false,
  $transID = false 
)
static

See what the last item in the transaction is currently

Parameters
$full_record[boolean] return full database record. Default is false. Just returns description.
Returns
localtemptrans.description for the last item or localtemptrans record for the last item

If no record exists, returns false

static COREPOS\pos\lib\PrehLib::percentDiscount (   $strl,
  $json = array() 
)
static

Add a percent discount notification

Parameters
$strldiscount percentage
$jsonkeyed array
Returns
An array see Parser::default_json()
Deprecated:
Use discountnotify() instead. This just adds hard-coded percentages and PLUs that likely aren't applicable anywhere but the Wedge.
static COREPOS\pos\lib\PrehLib::tender (   $right,
  $strl 
)
static

Add a tender to the transaction

tender amount in cents (100 = $1) tender code from tenders table

Returns
An array see Parser::default_json() for format explanation.

This function will automatically end a transaction if the amount due becomes <= zero.

Do tender-specific error checking and prereqs

static COREPOS\pos\lib\PrehLib::ttl ( )
static

Total the transaction

Returns
True - total successfully String - URL

If ttl() returns a string, go to that URL for more information on the error or to resolve the problem.

The most common error, by far, is no member number in which case the return value is the member-entry page.


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