
Sales Database Table
Distrbuted Access: Application controlled
Fields
- sid
- #100, Datatype: Integer
- completeddt
- #101, Datatype: DateTime
Date the sale is completed and will not undergo any futher change. This value is in the local time of the store. See also Completeddtutc - saletotal
- #102, Datatype: Money/Currency
- tax_totinc
- #103, Datatype: Money/Currency
- tax_totex
- #104, Datatype: Money/Currency
- tax_tr1
- #105, Datatype: Money/Currency
- tax_tr2
- #106, Datatype: Money/Currency
- tax_tr3
- #107, Datatype: Money/Currency
- phase
- #108, Datatype: Integer
State of the sale, as in is it complete, parked, void etc. When selecting sales for reports you will typically only want to select those where phase=1Possible Values
Value Description 0 Active on POS 1 Normal completed sale 2 Manual completion override 3 Suspend for later, requires customer 4 Reserved for payment handling substates 5 Temporary sale park 6 Transfer to another lane for completion 7 Copy of sale which cannot be altered. Used internally 8 Stock write-off 9 Manufactured 10 Appro 11 Pickup 200 Sale awaiting stock picking. Typically an eCommerce sale 201 Online sale transmitted directly to counter Pos 202 Sale awaiting verification 203 300 Active customer shopping cart 10000 Trash. Place in holding for audit purposes, but ignore. All stock has been returned. 10001 Quote. As trash, but sale was used to produce a quote 10002 Trash via delete attempt. 10005 Receiving 10006 Reserved SaleId. Used to reserve an id for a lane to use in the future 10007 Invisible. Known sale id but unable to read detail for some business rule reason - startdt
- #109, Datatype: DateTime
- restartflags
- #110, Datatype: Integer
Bitmask containing internal processing flags.Possible Values
Bitmask Description 1 Eftpos transaction in progress 8 Stocktake mode 16 Layby mode 32 Locked 64 Transit mode 128 Autocomplete sale 0x01000000 Sale number was locally allocated as network offline - rid
- #114, Datatype: Integer
- Teller
- #115, Datatype: Integer
- cid
- #117, Datatype: Integer
- PrintCount
- #118, Datatype: Integer
Status of receipt printing and sending. Technically a bitmask, however the lower 8 bits are a count of prints - originalsid
- #121, Datatype: Integer
- srcuid
- #122, Datatype: Integer
- srcuidkey
- #123, Datatype: Integer
- location
- #125, Datatype: Integer
- billingrun
- #128, Datatype: Integer
- externalid
- #130, Datatype: String 32 bytes
- salestype
- #131, Datatype: Integer
Number indicating the type of sale, such as where or how the sale was initiatedPossible Values
Value Description 0 Counter sale 2 eCommerce/web sale 4 A reduced price sale, often used for trade sales. This value is not used for a normal retail sales with discounts, they remain normal sales 8 This sale was created as part of editting another completed sale. It holds the financial changes applied to the original sale(s) 16 Telephone sale 17 Email sale 18 WebChat sale 19 Voice Assistant sale 20 Txt message sale 21 Standing Order 258 Sale created from an online web presence that is managed for a franchise group - Comments
- #133, Datatype: String 250 bytes
- posversion
- #142, Datatype: String 24 bytes
- physkey
- #145, Datatype: String 54 bytes
- physkeyc
- #146, Datatype: String 44 bytes
Physkey of the customer record - stocklocation
- #149, Datatype: Integer
- phys_location
- #161, Datatype: Integer
- Parent
- #162, Datatype: Integer
- rm0
- #164
- rm1
- #165
- rm2
- #166
- rm3
- #167
- createapp
- #170, Datatype: Integer
Coded number indicating the program, app or web page that created this sale - createip
- #171, Datatype: String 90 bytes
The source IP address of the machine or browser client that created this sale. - quoteexpiry
- #174, Datatype: DateTime
Date/time this quotation expires and will no longer be valid - GeoLatitude
- #175, Datatype: Double
Latitude of user or Pos capture program when sale recorded - GeoLongitude
- #176, Datatype: Double
Longitude of user or Pos capture program when sale recorded - GeoAltitude
- #177, Datatype: Double
Altitude of user or Pos capture program when sale recorded - completeddtutc
- #180, Datatype: DateTime
Date the sale is completed and will not undergo any futher change. This value is a UTC date. See also Completeddt - relatedphyskey
- #181, Datatype: String 44 bytes
- relatedcause
- #182, Datatype: Integer
Coded number indicating what or why the field relatedphyskey has a key valuePossible Values
Value Description 1 This is a return sale. relatedphyskey is the original sale - locationstart
- #183, Datatype: Integer
Location where this sale first started - locationend
- #184, Datatype: Integer
Location where this sale finally completed - orderno
- #185, Datatype: String 50 bytes
Customers order number - rvv
- #186, Datatype: String 129 bytes
Internal replication information. Do not edit - custsource
- #187, Datatype: Integer
How the customer was identified and selected to this salePossible Values
Value Description 0 Unknown or invalid 1 PosCommand 2 Customer Barcode 3 Lookup screen 4 SVC Detected 5 Return 6 Lookup, old screen 7 SFF 8 Typed 9 Another database table 22 Default setting - rve
- #188, Datatype: Double
- rvel
- #189, Datatype: Double
- srcuidchild
- #190, Datatype: String 96 bytes
Internal column used to manage active sales. This value is no longer required when a sale is completed or void and may be reset to NULL to save space if desired - randomphyskey
- #191, Datatype: String 90 bytes
A random string identifying this sale. Typically used on public facing applications - randompassword
- #192, Datatype: String 24 bytes
A random password associated with this sale - deliveryphyskey
- #300, Datatype: String 44 bytes
Reference to sale_delivery - CommentsInternal
- #301 Comments for this sale that are internal use only
- myob_extractdate
- #302, Datatype: DateTime
date this sale was sent to MYOB - rmsystem
- #6002, Datatype: String 44 bytes
- x_ms_workflow_run_id
- #6003, Datatype: String 250 bytes
- serverprocessingstate
- #6004, Datatype: Integer
Used on Head Office databases to track status of post sale processing. See ServerProcessing table for more information.Possible Values
Value Description 0/null All processing has completed, or not using ServerProcessing -1 New sale, or processing in progress. See ServerProcessing table for exact status -2 Internal error code, not stored in database - rloaderplevel
- #6005, Datatype: Integer
Version of application that loaded this sale into a multichain retail database