This page contains technical detail about the physical database structure. This documentation is not required for normal day to day operation of the Point Of Sale.
This table holds individual items purchased on a sale. It is a child of the sales table. Salelines may be present for other structures that arent technically sales (such as writeoffs in progress) as it also holds details of any open sale being used at counters
On mesh configured systems, this table is maintained as an output
|sid||long||105/E||Internal sale number allocated to this sale. References Sales.sid|
|pid||long||106/E||The internal product number of the item sold.|
|qty||long||101/E||Quantity of item sold, in measurement units, which is often "units" or "grams"|
|totalprice||money||102/s||Total price charged to customer|
Indicates what type of item is being stored in this row.
|seqnce||long||114/E||An ordinal sequence number for this saleline. Used to place salelines in order they were created|
|fueldispenser||long||117/E||The pump/dispenser this item came from for integrated fuel controllers.|
|linesource||long||120/E||How this item came to be recognised and added to the sale
This field holds a reason for the price being derived. Not all pricing techniques will store a cause reason.
The following codes are defined.
|pricecausedata||long||122/E||Additional key information for the pricecause field.|
|changereason||char(64)||127/s||Descriptive message entered by staff member as to why this saleline was editted. Capturing change reasons needs to be enabled specifically.|
|tax_totinc||money||128/s||Total price charged to customer, including all relevant taxes|
|tax_totex||money||129/s||Total price charged to customer, excluding all relevant taxes|
|tax_tr1||money||130/s||Total amount of Tax #1|
|tax_tr2||money||131/s||Total amount of Tax #2|
|tax_tr3||money||132/s||Total amount of Tax #3|
|physkey||string||Unique Physical key of this saleline|
|trackedid||string||Reference to the exact item if tracked items are being used|
|qtyqoh||number||Internal use only. Used to maintain stock levels where sales are fully distributed and visible at all sites all the time|
|regno||string||Contains a vehicle registration number if this item relates to a vehicle|
|commentscust||string||Line specific comments that are considered safe to show customers and are intended for customers|
|commentsint||string||Line specific customers that are NOT to be shown to customers and are reserved for retailer staff|
|picktid||number||User id who claimed to pick this item for web fulfilment|
|pickqty||number||Amount actually picked, which can differ to customers order quantity|
|picktotalprice||money||Total price to charge after picking.|
The primary key on this table is sid,seqnce. The field physkey is also a unique key, if present, although historic records may not contain values for this field
Reporting servers often add an index on pid to speed reports that select by product