CORE POS - IS4C
The CORE POS front end
Static Public Member Functions | List of all members
ReceiptLib Class Reference
Inheritance diagram for ReceiptLib:
LibraryClass

Static Public Member Functions

static build_time ($timestamp)
 
static centerString ($text)
 
static writeLine ($text)
 
static printToServer ($printer_server, $text)
 
static center_check ($text)
 
static endorse ($text)
 
static center ($text, $linewidth)
 
static drawerKick ()
 
static currentDrawer ()
 
static assignDrawer ($emp, $num)
 
static freeDrawer ($num)
 
static availableDrawers ()
 
static printReceiptHeader ($dateTimeStamp, $ref)
 
static promoMsg ()
 
static printChargeFooterCust ($dateTimeStamp, $ref, $program="charge")
 
static printChargeFooterStore ($dateTimeStamp, $ref, $program="charge")
 
static printCabCoupon ($dateTimeStamp, $ref)
 
static frank ($amount)
 
static frankgiftcert ($amount)
 
static frankstock ($amount)
 
static frankclassreg ()
 
static biggerFont ($str)
 
static centerBig ($text)
 
static chargeBalance ($receipt, $program="charge", $trans_num='')
 
static getChgName ()
 
static normalFont ()
 
static boldFont ()
 
static bold ()
 
static unbold ()
 
static localTTL ()
 
static graphedLocalTTL ()
 
static receiptFromBuilders ($reprint=False, $trans_num='')
 
static receiptDetail ($reprint=false, $trans_num='')
 
static twoColumns ($col1, $col2)
 
static printReceipt ($arg1, $ref, $second=False, $email=False)
 
static memReceiptMessages ($card_no)
 
static shutdownFunction ()
 
static receiptNumber ()
 
static mostRecentReceipt ()
 
static code39 ($barcode)
 

Detailed Description

Receipt functions

Member Function Documentation

static ReceiptLib::assignDrawer (   $emp,
  $num 
)
static

Assign drawer to cashier

Parameters
$empthe employee number
$numthe drawer number
Returns
success True/False
static ReceiptLib::availableDrawers ( )
static

Get list of available drawers

Returns
array of drawer numbers
static ReceiptLib::currentDrawer ( )
static

Which drawer is currently in use

Returns
1 - Use the first drawer 2 - Use the second drawer 0 - Current cashier has no drawer

This always returns 1 when dual drawer mode is enabled. Assignments in the table aren't relevant.

static ReceiptLib::drawerKick ( )
static

30Apr14 - Does not work correctly Needs more investigation. IPv6 maybe? if (isset($_SERVER) && isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] != '127.0.0.1') { return; }

static ReceiptLib::freeDrawer (   $num)
static

Unassign drawer

Parameters
$numthe drawer number
Returns
success True/False
static ReceiptLib::memReceiptMessages (   $card_no)
static

Get per-member receipt messages

Parameters
$card_no[int] member number
Returns
[string] receipt text
static ReceiptLib::mostRecentReceipt ( )
static

Get most recent receipt number

static ReceiptLib::printChargeFooterStore (   $dateTimeStamp,
  $ref,
  $program = "charge" 
)
static

Get a signature slip for use with a charge account

Parameters
$dateTimeStamp[string] representing date and time
$ref[string] transaction identifer
$program[string, optional] identifier for different types of charge accounts that require different text
Returns
[string] receipt text
static ReceiptLib::printReceipt (   $arg1,
  $ref,
  $second = False,
  $email = False 
)
static

generates a receipt string

Parameters
$arg1string receipt type
$refstring transaction identifier
$secondboolean indicating it's a second receipt
$emailgenerate email-style receipt
Returns
string receipt content

This block deprecates ReceiptLib::reprintReceipt()

List local total as defined by settings Default to $ total if no setting exists

static ReceiptLib::printReceiptHeader (   $dateTimeStamp,
  $ref 
)
static

If the receipt header line includes non-printable characters, send it to the receipt printer exactly as-is. If the receipt header line is "nv" and a number, print the corresponding image # from the printer's nonvolatile RAM. If the receipt header line is a .bmp file (and it exists), print it on the receipt. Otherwise just print the line of text centered.

put first header line in larger font

static ReceiptLib::printToServer (   $printer_server,
  $text 
)
static

Write text to server via TCP socket

Parameters
$print_server[string] host or host:port
$text[string] text to print
Returns
  • [int] 1 => success
  • [int] 0 => problem sending text
  • [int] -1 => sent but no response. printer might be stuck/blocked
static ReceiptLib::receiptNumber ( )
static

get current receipt number


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