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

Static Public Member Functions

static addItem ($strupc, $strdescription, $strtransType, $strtranssubType, $strtransstatus, $intdepartment, $dblquantity, $dblunitPrice, $dbltotal, $dblregPrice, $intscale, $inttax, $intfoodstamp, $dbldiscount, $dblmemDiscount, $intdiscountable, $intdiscounttype, $dblItemQtty, $intvolDiscType, $intvolume, $dblVolSpecial, $intmixMatch, $intmatched, $intvoided, $cost=0, $numflag=0, $charflag='')
 
static addRecord ($named_params)
 
static addQueued ($upc, $description, $numflag=0, $charflag='', $regPrice=0)
 
static emptyQueue ()
 
static addtax ()
 
static addtender ($strtenderdesc, $strtendercode, $dbltendered)
 
static addFlaggedTender ($strtenderdesc, $strtendercode, $dbltendered, $numflag, $charflag)
 
static addcomment ($comment)
 
static addchange ($dblcashreturn, $strtendercode='CA', $strchangemsg='Change')
 
static addfsones ($intfsones)
 
static adddiscount ($dbldiscount, $department)
 
static addfsTaxExempt ()
 
static discountnotify ($strl)
 
static addTaxExempt ()
 
static reverseTaxExempt ()
 
static addcdnotify ()
 
static addCoupon ($strupc, $intdepartment, $dbltotal, $foodstamp=0, $tax=0)
 
static addhousecoupon ($strupc, $intdepartment, $dbltotal, $description='')
 
static additemdiscount ($intdepartment, $dbltotal)
 
static addTare ($dbltare)
 
static addVirtualCoupon ($id)
 
static addTransDiscount ()
 
static addCashDrop ($amt)
 
static addLogRecord ($opts)
 
static add_log_record ($opts)
 
static finalizeTransaction ($incomplete=false)
 
static debugLog ($val)
 

Detailed Description

Defines functions for adding records to the transaction

Member Function Documentation

static TransRecord::addCashDrop (   $amt)
static

Add cash drop record

static TransRecord::addcdnotify ( )
static

Add an informational record noting case discount session setting "casediscount" controls the percentage shown

static TransRecord::addchange (   $dblcashreturn,
  $strtendercode = 'CA',
  $strchangemsg = 'Change' 
)
static

Add a change record (a special type of tender record)

Parameters
$dblcashreturnthe change amount
$strtendercode[default 'CA']
$strchangemsg[default 'Change']

Avoiding writing blank records if opdata.tenders.ChangeMsg happens to be blank or null

static TransRecord::addcomment (   $comment)
static

Add a comment to the transaction

Parameters
$commentis the comment text. Max length allowed is 30 characters.
static TransRecord::addCoupon (   $strupc,
  $intdepartment,
  $dbltotal,
  $foodstamp = 0,
  $tax = 0 
)
static

Add a manufacturer coupon record

Parameters
$strupccoupon UPC
$intdepartmentassociated POS department
$dbltotalcoupon amount (should be negative)
$foodstampmark coupon foodstamp-able
$taxmark coupon as taxable

Marking a coupon as taxable will reduce the taxable total by the coupon amount. This is not desirable in all tax jurisdictions. The ini setting 'CouponsAreTaxable' controls whether the tax parameter is used.

static TransRecord::adddiscount (   $dbldiscount,
  $department 
)
static

Add a "YOU SAVED" record to the transaction. This is just informational and will not alter totals.

Parameters
$dbldiscountdiscount amount
$departmentassociated department
static TransRecord::addFlaggedTender (   $strtenderdesc,
  $strtendercode,
  $dbltendered,
  $numflag,
  $charflag 
)
static

Add a tender record to the transaction with numflag & charflag values

Parameters
$strtenderdescis a description, such as "Credit Card"
$strtendercodeis a 1-2 character code, such as "CC"
$dbltenderedis the amount. Remember that payments are negative amounts.
$numflag[int]
$charflag[1-2 character string]

Flags are meant to store generic additional data as needed. For example, numflag might contain a record ID corresponding to table(s) of additional processor data on an integrated transaction.

static TransRecord::addfsones (   $intfsones)
static

Add a foodstamp change record

Parameters
$intfsonesthe change amount

Please do verify cashback is permitted with EBT transactions in your area before using this.

static TransRecord::addfsTaxExempt ( )
static

Add tax exemption for foodstamps

static TransRecord::addhousecoupon (   $strupc,
  $intdepartment,
  $dbltotal,
  $description = '' 
)
static

Add an in-store coupon

Parameters
$strupccoupon UPC
$intdepartmentassociated POS department
$dbltotalcoupon amount (should be negative)
static TransRecord::addItem (   $strupc,
  $strdescription,
  $strtransType,
  $strtranssubType,
  $strtransstatus,
  $intdepartment,
  $dblquantity,
  $dblunitPrice,
  $dbltotal,
  $dblregPrice,
  $intscale,
  $inttax,
  $intfoodstamp,
  $dbldiscount,
  $dblmemDiscount,
  $intdiscountable,
  $intdiscounttype,
  $dblItemQtty,
  $intvolDiscType,
  $intvolume,
  $dblVolSpecial,
  $intmixMatch,
  $intmatched,
  $intvoided,
  $cost = 0,
  $numflag = 0,
  $charflag = '' 
)
static

Add an item to localtemptrans. Parameters correspond to columns in localtemptrans. See that table for valid types.

Parameters
$strupclocaltemptrans.upc
$strdescriptionlocaltemptrans.description
$strtransTypelocaltemptrans.trans_type
$strtranssubTypelocaltemptrans.trans_subtype
$strtransstatutslocaltemptrans.trans_status
$dblquantitylocaltemptrans.quantity
$dblunitPricelocaltemptrans.unitPrice
$dbltotallocaltemptrans.total
$dblregPricelocaltemptrans.regPrice
$intscalelocaltemptrans.scale
$inttaxlocaltemptrans.tax
$intfoodstamplocaltemptrans.foodstamp
$dbldiscountlocaltemptrans.discount
$dblmemDiscountlocaltemptrans.memDiscount
$intdiscountablelocaltemptrans.discounttable
$intdiscounttypelocaltemptrans.discounttype
$dblItemQttylocaltemptrans.ItemQtty
$intvolDiscTypelocaltemptrans.volDiscType
$intvolumelocaltemptrans.volume
$dblVolSpeciallocaltemptrans.VolSpecial
$intmixMatchlocaltemptrans.mixMatch
$intmatchedlocaltemptrans.matched
$intvoidedlocaltemptrans.voided
$costlocaltemptrans.cost
$numflaglocaltemptrans.numflag
$charflaglocaltemptrans.charflag

In many cases there is a simpler function that takes far fewer arguments and adds a specific type of record. All such functions should be in this file.

static TransRecord::additemdiscount (   $intdepartment,
  $dbltotal 
)
static

Add a line-item discount

Parameters
$intdepartmentPOS department
$dbltotaldiscount amount (should be positive)
static TransRecord::addLogRecord (   $opts)
static

Add a log entry to the transaction table. Log records do not appear onscreen or on receipts.

Parameters
$optskeyed array. Currently valid keys are:
  • upc
  • description
  • department
  • numflag
  • charflag
  • amount1
  • amount2

All keys are optional and will be left blank or zero if omitted. Log records have trans_status 'X', trans_type 'L', and trans_subtype 'OG'. Amount1 and Amount2 are reflected in total and regPrice (respectively). The other values go in the correspondingly named columns.

static TransRecord::addQueued (   $upc,
  $description,
  $numflag = 0,
  $charflag = '',
  $regPrice = 0 
)
static

Add a item, but not until the end of the transaction Use this for records that shouldn't be displayed

Note: TransRecord::addLogRecord() can be used to add non-display records to the transaction instantly

static TransRecord::addRecord (   $named_params)
static

Wrapper for addItem that accepted a keyed array instead of many, MANY arguments. All keys are optional and will have the default values listed below if ommitted (read the actual method)

Parameters
$named_params[keyed array]
Returns
[none]
static TransRecord::addTare (   $dbltare)
static

Add a tare record

Parameters
$dbltarethe tare weight. The weight gets divided by 100, so an argument of 5 gives tare 0.05
static TransRecord::addtax ( )
static

Add a tax record to the transaction. Amount is pulled from session info automatically.

static TransRecord::addTaxExempt ( )
static

Add tax exemption record to transaction

static TransRecord::addtender (   $strtenderdesc,
  $strtendercode,
  $dbltendered 
)
static

Add a tender record to the transaction

Parameters
$strtenderdescis a description, such as "Credit Card"
$strtendercodeis a 1-2 character code, such as "CC"
$dbltenderedis the amount. Remember that payments are negative amounts.
static TransRecord::addTransDiscount ( )
static

Add transaction discount record

static TransRecord::addVirtualCoupon (   $id)
static

Add a virtual coupon by ID

Parameters
$ididentifier in the VirtualCoupon table
static TransRecord::discountnotify (   $strl)
static

Add a information record showing transaction percent discount

Parameters
$strlthe percentage
static TransRecord::emptyQueue ( )
static

Add records queued by TransRecord::addQueued to the current transaction then clear the queue. Records get trans_type C, trans_status D

static TransRecord::finalizeTransaction (   $incomplete = false)
static

Finish the current transaction

Parameters
$incomplete[boolean] optional, default false

This method: 1) Adds tax and discount lines if transaction is complete (i.e., $incomplete == false) 2) Rotates data out of localtemptrans 3) Advances trans_no variable to next available value

This method replaces older ajax-end.php / end.php operations where the receipt was printed first and then steps 1-3 above happened. This method should be called BEFORE printing a receipt. Receipts are now always printed via localtranstoday.

static TransRecord::reverseTaxExempt ( )
static

Add record to undo tax exemption


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