CORE POS - IS4C
The CORE POS front end
Public Member Functions | Public Attributes | List of all members
ReceiptMessage Class Reference
Inheritance diagram for ReceiptMessage:
AccessProgramReceipt BarcodeTransIdentifierMessage CCReceiptMessage CCredSigSlip CCredUsedBalances EbtReceiptMessage EquitySoldReceiptMessage GCBalanceReceiptMessage GCReceiptMessage GenericSigSlipMessage StoreCreditIssuedReceiptMessage

Public Member Functions

 select_condition ()
 
 message ($val, $ref, $reprint=false)
 
 standalone_receipt ($ref, $reprint=false)
 

Public Attributes

 $paper_only = false
 
 $standalone_receipt_type = ''
 

Member Function Documentation

ReceiptMessage::message (   $val,
  $ref,
  $reprint = false 
)

Generate the message

Parameters
$valthe value returned by the object's select_condition()
$refa transaction reference (emp-lane-trans)
$reprintboolean
Returns
[string] message to print on receipt
ReceiptMessage::select_condition ( )
Returns
[string] SQL select statement

This statement will be slotted into a query like this:

SELECT <ReceiptMessage1->select_condition()> as ReceiptMessage1, <ReceiptMessage2->select_condition()> as ReceiptMessage2, <ReceiptMessage3->select_condition()> as ReceiptMessage3 FROM localtranstoday

This query should return one row, so your select statement should use an aggregate (SUM, MAX, MIN, etc). If the message depends on certain conditions - sales in a specific department, a particular type of tender, etc - this should determine whether the message is needed. Having every message run its own separate queries checking for data can negatively impact performance.

ReceiptMessage::standalone_receipt (   $ref,
  $reprint = false 
)

Print message as its own receipt

Parameters
$refa transaction reference (emp-lane-trans)
$reprintboolean
Returns
[string] message to print

Member Data Documentation

ReceiptMessage::$paper_only = false

This message has to be printed on paper

ReceiptMessage::$standalone_receipt_type = ''

Message can be printed independently from a regular receipt. Pass this string to ajax-end.php as URL parameter receiptType to print the standalone receipt.


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