ReceiptMessage::message |
( |
|
$val, |
|
|
|
$ref, |
|
|
|
$reprint = false |
|
) |
| |
Generate the message
- Parameters
-
$val | the value returned by the object's select_condition() |
$ref | a transaction reference (emp-lane-trans) |
$reprint | boolean |
- 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
-
$ref | a transaction reference (emp-lane-trans) |
$reprint | boolean |
- Returns
- [string] message to print
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:
- pos/is4c-nf/lib/ReceiptBuilding/Messages/ReceiptMessage.php