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
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".
If your PosCommand should apply to the current selected item, you can skip supplying the selection information and just issue the command.
Command Format | Effect |
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 |
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
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
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.
Item | Description | Price |
LB | Long Black Coffee | 3.00 |
(modifer) | 1 Sugar | |
(modifer) | 2 Shots | 0.50 |
If the command
If however, the command
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.
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.
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.