POS Commands Home

The saleline command has a very large collection of functions to affect individual salelines. It works on existing salelines on a sale, the sale(add,...) command is used to add new items to a sale.

While this is documented as a seperate command it is always reached through the sale(line,....) command

Selected Item Concept

The items on a sale are an array of lines. This PosCommand operates on a single saleline, so you need to select which item the command applies too. Every sale has a "current saleline" which is the most recent item an operator is working with. When new items are added to the sale they automatically become the selected item.

Salelines are numbered in two ways, the relative position number, and a sequence number. The relative position number is simply the Nth line on the sale (starting at zero). The sequence number for a saleline is an unique number assigned to a saleline. It will not be reused within a sale. Sequence numbers allow you to specify the exact item, without worrying about relative order.

Consider the flow "Sell Item A", "Sell Item B", "Delete Item A", "Sell Item C".

  1. "Sell Item A". This is the first item, and will be assigend Seq=1, Relative=0
  2. "Sell Item B". This is the second item, and will be assigend Seq=2, Relative=1
  3. "Delete Item A". This removes item A from the sale. Item B retains Seq=2, but now becomes Relative=0 as it is the only item on the sale.
  4. "Sell Item C". This is the third item, it will be assigned Seq=3, Relative=1

If your PosCommand should apply to the current selected item, you can skip supplying the selection information and just issue the command.

Command FormatEffect
sale(line,command)Selects the current selected saleline and processes the command against it
sale(line,-1,command)Selects the current selected saleline and processes the command against it
sale(line,0,command)Selects the first relative saleline and processes the command against it
sale(line,3,command)Selects the third relative saleline and processes the command against it
sale(line,s1,command)Selects the saleline with the sequence number 1, and processes the command against it
sale(line,s3,command)Selects the saleline with the sequence number 3, and processes the command against it

Commnd Overview

sale(line,NNN,delivery))

(July 2014. P1808) Display a captive web page to capture delivery/shipping information for this individual item. This command requires additional files to be present that may not be in every configuration.
NNN defines the saleline to edit. -1 means the current selected saleline.
If you are placing this command on a UI button, the command typically used would be sale(line,-1,delivery)

sale(line,NNN,edit))

(August 2014. P1820) Display a captive web page to display many attributes about the current saleline and allow staff to edit aspects of it. This command requires additional files to be present that may not be in every configuration.
NNN defines the saleline to edit. -1 means the current selected saleline.
If you are placing this command on a UI button, the command typically used would be sale(line,-1,edit)

sale(line, [NNN,] alterline

sale(line, [NNN,] return

sale(line, [NNN,] set, price,

sale(line, [NNN,] set, totalprice,

sale(line, [NNN,] set, allpricezero

Sets the price on the line to zero. This includes finding all attached salelines (modifiers) and zeroing their price also. For example when selling a coffee, the POS will have a primary saleline being the main coffee product and a number of additional modifier salelines.

ItemDescriptionPrice
LBLong Black Coffee3.00
(modifer)1 Sugar 
(modifer)2 Shots0.50

If the command sale(line,set,totalprice,0) is applied to the above sale, the price of the long black will change from $3.00 to $0.00, but the 2 shots price will remain at $0.50. This is by design and allows you to selectively set any individual price.

If however, the command sale(line,set,allpricezero) is applied to the above sale, the price of the long black will will change from $3.00 to $0.00, and the price of the 2 shots will change from $0.50 to $0.00 also.

sale(line, [NNN,] set, returnreason,

sale(line, [NNN,] set, field,

sale(line, [NNN,] set, flag,

sale(line, [NNN,] set, noqtychange

Mark this product as unable to have the quantity changed. Typical POS operation has each time a product is scanned or sold, the quantity simply increases for that item. If there is significant additional processing with an item sale, such as capturing a vehicle registration number, product serial number or even delivery details, then each new item should be sold as a new saleline.

sale(line, [NNN,] set, quantity

sale(line, [NNN,] up,

sale(line, [NNN,] down,

sale(line, [NNN,] cleardiscount

Removes any discount currently applied to the saleline. Each saleline can only hold one discount, and once a discount is applied no further discounts can be applied to the saleline.

sale(line, [NNN,] discount

sale(line, [NNN,] library

sale(line, [NNN,] split

sale(line, [NNN,] txn,

sale(line, [NNN,] aborttxn

sale(line, [NNN,] hirereturn

sale(line, [NNN,] hireunreturn

sale(line, [NNN,] tax

sale(line, [NNN,] servercommand

sale(line, [NNN,] autodelete

Used only by event handlers adding a new item to a sale in order to delete it from the sale. While an item is being added to a sale, it cannot be deleted via the normal method as it does not yet exist on the sale. For early stage event handlers that are rejecting items from being added to the sale, they can issue this command to have the item deleted and not added to the sale. Most event handlers called before the sale is added are also able to return values to decline adding an item to a sale. This command is needed for very specific cases only.

sale(line, [NNN,] comments