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

Static Public Member Functions

static printfooter ($readOnly=False)
 
static plainmsg ($strmsg)
 
static msgbox ($strmsg, $icon, $noBeep=false, $buttons=array())
 
static xboxMsg ($strmsg, $buttons=array())
 
static boxMsg ($strmsg, $header="", $noBeep=false, $buttons=array())
 
static inputUnknown ()
 
static standardClearButton ()
 
static printheaderb ()
 
static printItem ($fields, $trans_id=-1)
 
static printItemColor ($color, $fields, $trans_id=-1)
 
static printItemColorHilite ($color, $fields)
 
static scaledisplaymsg ($input="")
 
static drawNotifications ()
 
static listItems ($top_item, $highlight)
 
static printReceiptfooter ($readOnly=False)
 
static drawItems ($top_item, $rows, $highlight)
 
static lastpage ($readOnly=False)
 
static screenDisplay ($min, $max)
 
static touchScreenScrollButtons ($selector='#search')
 
static screenLines ()
 

Detailed Description

Functions for drawing display elements

Member Function Documentation

static COREPOS\pos\lib\DisplayLib::boxMsg (   $strmsg,
  $header = "",
  $noBeep = false,
  $buttons = array() 
)
static

Get a centered message box with "exclaimC" graphic

Parameters
$strmsgthe message
$headertitle for the box
$noBeepdon't beep scale
$buttonssee msgbox()
Returns
An HTML string

An alias for msgbox().

static COREPOS\pos\lib\DisplayLib::drawItems (   $top_item,
  $rows,
  $highlight 
)
static

Get the currently displayed items

Parameters
$top_itemis the trans_id of the first item to display
$rowsis the number of items to display
$highlightis the trans_id of the selected item
Returns
An HTML string

This function probably shouldn't be used directly. Call listitems() or lastpage() instead.

30Oct2014 Andy Idea here is to look up the currently displayed items and perform any necessary transformations of the text in PHP instead of tucking that logic inside the screendisplay view. I'm leaving the query above for reference in case I screwed something up and the old method of drawing the screen needs to be quickly re-enabled.

14Nov2014 Andy Disabled for the sake of putting together a release. Will go into testing following the release and be included in the next one

03Dec2014 Andy Axing screen display isn't a super high priority right now With better unit testing in place, I want to write more tests to verify this method behaves the same as the screendisplay via. No ETA at this point.

static COREPOS\pos\lib\DisplayLib::drawNotifications ( )
static

Use the right side of the screen to show various notifications

static COREPOS\pos\lib\DisplayLib::inputUnknown ( )
static

Get a centered message box with input unknown message.

Returns
An HTML string

An alias for msgbox().

static COREPOS\pos\lib\DisplayLib::lastpage (   $readOnly = False)
static

Get the currently displayed items

Parameters
$readOnlydon't update session
Returns
An HTML string

This will always display the most recently scanned items. If you want a specific subset, use listitems().

static COREPOS\pos\lib\DisplayLib::listItems (   $top_item,
  $highlight 
)
static

Get the items currently on screen

Parameters
$top_itemis trans_id (localtemptrans) of the first item to display
$highlightis the trans_id (localtemptrans) of the currently selected item
Returns
An HTML string

If you just want to show the most recently scanned items, use lastpage().

static COREPOS\pos\lib\DisplayLib::msgbox (   $strmsg,
  $icon,
  $noBeep = false,
  $buttons = array() 
)
static

Get a centered message box

Parameters
$strmsgthe message
$icongraphic icon file
$noBeepdon't send a scale beep
$buttonskeyed array of touchable/clickable buttons
  • key is the text shown on the button
  • value is javascript executed onclick
Returns
An HTML string

This function will include the header printheaderb().

static COREPOS\pos\lib\DisplayLib::plainmsg (   $strmsg)
static

Wrap a message in a id="plainmsg" div

Parameters
$strmsgthe message
Returns
An HTML string
static COREPOS\pos\lib\DisplayLib::printfooter (   $readOnly = False)
static

Get the standard footer with total and amount(s) saved

Parameters
$readOnlydon't update any session info This would be set when rendering a separate, different customer display
Returns
A string of HTML
static COREPOS\pos\lib\DisplayLib::printheaderb ( )
static

Get the standard header row with CASHIER and MEMBER info

Returns
An HTML string
static COREPOS\pos\lib\DisplayLib::printItem (   $fields,
  $trans_id = -1 
)
static

Get a transaction line item

Parameters
$fields[array] of entries (left-to-right)
$trans_idvalue from localtemptrans. Including the trans_id makes the lines selectable via mouseclick (or touchscreen).
Returns
An HTML string
static COREPOS\pos\lib\DisplayLib::printItemColor (   $color,
  $fields,
  $trans_id = -1 
)
static

Get a transaction line item in a specific color

Parameters
$coloris a hex color code (do not include a '#') (see CSS notes)
$fields[array] of entries (left-to-right)
$trans_idvalue from localtemptrans. Including the trans_id makes the lines selectable via mouseclick (or touchscreen).
Returns
An HTML string

CSS Notes: In an effort to replace hard-coded colors, some values are re-written as CSS classes rather than inline styles. Current mapping:

  • 004080 => coloredText
  • 408080 => lightColorText
  • 000000 => totalLine
  • 800080 => fsLine
static COREPOS\pos\lib\DisplayLib::printItemColorHilite (   $color,
  $fields 
)
static

Get a transaction line item in a specific color

Parameters
$coloris a hex color code (do not include a '#') (see CSS notes)
$fields[array] of entries (left-to-right)
Returns
An HTML string

CSS Notes: In an effort to replace hard-coded colors, some values are re-written as CSS classes rather than inline styles. Current mapping:

  • 004080 => coloredArea
  • 408080 => lightColorArea
  • 000000 => totalArea
  • 800080 => fsArea
static COREPOS\pos\lib\DisplayLib::printReceiptfooter (   $readOnly = False)
static

Show some items and farewell message

Parameters
$readOnlydon't update totals
Returns
An HTML string

Show a few recent items and the "Thank you for shopping" messaging.

Yes, this function should be renamed. It has nothing to do with receipts.

static COREPOS\pos\lib\DisplayLib::scaledisplaymsg (   $input = "")
static

Get the scale display box

Parameters
$inputmessage from scale
Returns
An HTML string

If $input is specified, weight information in the session gets updated before returning the current value.

Known input values are:

  • S11WWWW where WWWW is weight in hundreths (i.e., 1lb = 0100)
  • S141 not settled on a weight yet
  • S143 zero weight
  • S145 an error condition
  • S142 an error condition
static COREPOS\pos\lib\DisplayLib::screenDisplay (   $min,
  $max 
)
static

Select items from the transaction with formatting for on screen display

Parameters
$min[int] minimum localtemptrans.trans_id
$max[int] maximum localtemtprans.trans_id
Returns
array of records

Each record contains the following keys:

  • description
  • comment
  • total
  • status
  • discounttype
  • trans_status
  • trans_type
  • voided
  • trans_id

Note: the outer array is indexed by localtemptrans.trans_id instead of zero through array.length.

static COREPOS\pos\lib\DisplayLib::xboxMsg (   $strmsg,
  $buttons = array() 
)
static

Get a centered message box with "crossD" graphic

Parameters
$strmsgthe message
$buttonssee msgbox()
Returns
An HTML string

An alias for msgbox().


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