|
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) |
|
Defines functions for adding records to the transaction
static TransRecord::addCashDrop |
( |
|
$amt) | |
|
|
static |
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
-
$dblcashreturn | the 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
-
$comment | is 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
-
$strupc | coupon UPC |
$intdepartment | associated POS department |
$dbltotal | coupon amount (should be negative) |
$foodstamp | mark coupon foodstamp-able |
$tax | mark 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
-
$dbldiscount | discount amount |
$department | associated department |
static TransRecord::addFlaggedTender |
( |
|
$strtenderdesc, |
|
|
|
$strtendercode, |
|
|
|
$dbltendered, |
|
|
|
$numflag, |
|
|
|
$charflag |
|
) |
| |
|
static |
Add a tender record to the transaction with numflag & charflag values
- Parameters
-
$strtenderdesc | is a description, such as "Credit Card" |
$strtendercode | is a 1-2 character code, such as "CC" |
$dbltendered | is 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
-
$intfsones | the 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
-
$strupc | coupon UPC |
$intdepartment | associated POS department |
$dbltotal | coupon 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
-
$strupc | localtemptrans.upc |
$strdescription | localtemptrans.description |
$strtransType | localtemptrans.trans_type |
$strtranssubType | localtemptrans.trans_subtype |
$strtransstatuts | localtemptrans.trans_status |
$dblquantity | localtemptrans.quantity |
$dblunitPrice | localtemptrans.unitPrice |
$dbltotal | localtemptrans.total |
$dblregPrice | localtemptrans.regPrice |
$intscale | localtemptrans.scale |
$inttax | localtemptrans.tax |
$intfoodstamp | localtemptrans.foodstamp |
$dbldiscount | localtemptrans.discount |
$dblmemDiscount | localtemptrans.memDiscount |
$intdiscountable | localtemptrans.discounttable |
$intdiscounttype | localtemptrans.discounttype |
$dblItemQtty | localtemptrans.ItemQtty |
$intvolDiscType | localtemptrans.volDiscType |
$intvolume | localtemptrans.volume |
$dblVolSpecial | localtemptrans.VolSpecial |
$intmixMatch | localtemptrans.mixMatch |
$intmatched | localtemptrans.matched |
$intvoided | localtemptrans.voided |
$cost | localtemptrans.cost |
$numflag | localtemptrans.numflag |
$charflag | localtemptrans.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
-
$intdepartment | POS department |
$dbltotal | discount 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
-
$opts | keyed 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
-
$dbltare | the 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
-
$strtenderdesc | is a description, such as "Credit Card" |
$strtendercode | is a 1-2 character code, such as "CC" |
$dbltendered | is 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
-
static TransRecord::discountnotify |
( |
|
$strl) | |
|
|
static |
Add a information record showing transaction percent discount
- Parameters
-
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:
- pos/is4c-nf/lib/TransRecord.php