Fieldpine Logo Documentation Home  
User Interface Home

The salelist directive places a list on the screen that displays the customers current purchases.

Command Options

at(x1,y1,x2,y2)

Defines the bounding box position the salelist is drawn on the window.

font(string)

Sets the font characteristics to use in the salelist

salelist()

Required placeholder parameter. Must be first option in the list. See examples below where this option is always first.

reg(N)

Not documented for use

list(N)

tabs

Sets "tabs" mode, which means each sale is given its own tab on the control. This is the usually always enabled.

lines(field)

reverse

Indicates that this salelist should draw most recent items at the top. The default is to draw items at the bottom and continue scrolling as more items are added.

name(Z)

Sets the format of the heading in the Tab for this sale. If this option is not supplied, the value of Pos Message 401,1 is used, which will draw "Sale 1234" style of message. The name() option only applies to retail sales, the headings for psuedo sales (transit, stocktake etc) are described in the internal operation section below. Using name() automatically enables the tabs option.

Some examples of use

name(Sale %TIME%) - Draws the time for the sale

tabfont(string)

Sets the font characteristics to use in the salelist tabs headings

tip(Z)

if(Z)

position(Z)

salename(Z)

bandbrgb(Z)

bandrgb(Z)

payments(Z)

colum(A,B)

modifierfont(Z)

popup(AnchorField,Type)

Enables the display of an additional bubble of information for the selected saleline. This is typically used to provide much more contextual detail than can be provided using rows and columns.

The Anchor field is the name of a column in the salelist that this popup bubble is to appear to come out from. If the anchor field is not present or invalid, the popup will not display.

The following types of popups can be displayed. Not all types are available on all configurations and additional setup may be required to make a popup functional.


Internal Operation

The Salelist control is quite complex as it caters for various different retail options.

Drawing a Sale

  1. The count of lines on the sale is fetched.
  2. If the sale has a display condition, this conditional rule is fetched. This is set with the sale(condition(display(...))) command
    (Tip, Using display conditions can be confusing to users as totals might not equal what is shown on screen)
  3. For each line in turn, from first to last (or last to first if reverse mode is selected)
    1. If a display condition is present, this is evaluated to see if the line should be drawn.
    2. If there are internal reasons why this line should not be drawn, it is skipped. Typically this might be modifier items that have been rolled up and do not need individual display.
    3. The data for the first defined column is fetched and stored into the control
    4. If the saleline is a modifier, this value is prefixed with the value of the setting SalelistModifierAdjust. This is designed to allow indenting for modifiers.
    5. All data for reminaing columns are fetched and stored into the control
    6. If the column being display is "totalprice" then
      1. If the setting SalelistTaxColor is not explicity set to 0 (ie, it is on by default), then
      2. If the tax amount for this item is $0, then the total is highlighted red.
      3. Otherwise the tax amount is highlighted green

      This highlighting is to show items that are tax free vs taxable, which is important in some environments

      1. If the setting SalelistTaxColor is explicity set to 0 then
      2. If the setting SalelistHighlightZero is explicity set to 1 then
      3. If the total price for this item is $0, then the total is highlighted red (or the value of setting SalelistHighlightRGB if you wish to change the color)

      This highlighting is alert the operator that something is zero priced, which may indicate problems elsewhere

    7. If the column being displayed has a Popup defined and this is the active saleline, the Popup is drawn now.

Drawing a Tab

Each sale is drawn in a different tab, and the user can click on the tabs to change the sale they are working on

  1. A a sale title is decoded from the name() option or Pos Message 401,1
  2. If the sale is a stocktake, then the title is taken from Pos Message 314,5
  3. If the sale is a transit, then the title is taken from Pos Message 314,7
  4. If the sale is an exception sale, then the title is taken from Pos Message 314,8

Examples of Use

5025|main|||control|salelist() tabs at(222,75,715,385) font(Arial,16) lines list(C[Product,250,L,shortdescription] C[Qty,47,R,quantityunit] C[Each,90,R,unitprice] C[Total,100,R,totalprice])||1001