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

Static Public Member Functions

static build_time ($timestamp)
 
static centerString ($text)
 
static writeLine ($text)
 
static printToServer ($printer_server, $text)
 
static center ($text, $linewidth)
 
static printReceiptHeader ($dateTimeStamp, $ref)
 
static printChargeFooterCust ($dateTimeStamp, $ref, $program="charge")
 
static printChargeFooterStore ($dateTimeStamp, $ref, $program="charge")
 
static printCabCoupon ($dateTimeStamp, $ref)
 
static biggerFont ($str)
 
static centerBig ($text)
 
static chargeBalance ($receipt, $program="charge", $trans_num='')
 
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 parseRef ($ref)
 
static printReceipt ($arg1, $ref, $second=False, $email=False)
 
static memReceiptMessages ($card_no)
 
static receiptNumber ()
 
static mostRecentReceipt ()
 
static code39 ($barcode)
 
static emailReceiptMod ()
 

Detailed Description

Receipt functions

Member Function Documentation

static COREPOS\pos\lib\ReceiptLib::memReceiptMessages (   $card_no)
static

Get per-member receipt messages

Parameters
$card_no[int] member number
Returns
[array] receipt text Array keys are "any" and "print".
static COREPOS\pos\lib\ReceiptLib::mostRecentReceipt ( )
static

Get most recent receipt number

static COREPOS\pos\lib\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 COREPOS\pos\lib\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

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

static COREPOS\pos\lib\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 COREPOS\pos\lib\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 COREPOS\pos\lib\ReceiptLib::receiptDetail (   $reprint = false,
  $trans_num = '' 
)
static

The newReceipt=1 option should not be shown in the configuration UI if the view doesn't exist, but if the configuration gets messed up try to do something useful rather than printing nothing.

static COREPOS\pos\lib\ReceiptLib::receiptNumber ( )
static

get current receipt number


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