SambaPOS

Documentation Website

User Tools

Site Tools


Sidebar

Installation

User interface

Basic concepts

  • Departments
  • Terminals
  • Users & user roles
  • Work periods
  • Tickets & orders
  • The POS menu
    • Products & product categories
    • Menus
    • Recipes
    • Product modifiers

Quick-start: setting up a (very basic) POS configuration

Advanced concepts

Customizing your POS system

Extra

Mobile Client

SambaPOS License

dbtables:orders_table

Table of Contents

Orders table

Info

This table contains all info related to individual orders (order lines, lines added to a ticket). 'Orders' records are created after creation of a ticket (table Tickets), so after the ticket is closed or settled in the POS.

Fields

Field NameMeaningDataTypeDescription
IdThe order’s unique identifierint
TicketIdThe Id of the ticket that this order belongs tointLinks to Table: Tickets
WarehouseIdThe warehouse linked to the current department when the order was added.intLinks to Table: Warehouses
DepartmentIdThe current department when the order was added.intLinks to Table: Departments
MenuItemIdThe Id of the product in the order.intLinks to Table: MenuItems
MenuItemNameThe name of the product in the order.nvarchar(max)Data duplicated from table: MenuItems
PortionNameThe name of the portion of the product that was ordered.nvarchar(max)Data duplicated from table: MenuItemPortions
PriceThe price of the product ordered. This is not (necessarily) the price of the order, it does not include the price of order tags.decimal(16,2)Data duplicated from table: MenuItems
QuantityThe quantity of the order.decimal(16,3)
PortionCount???int
LockedWhether the order is locked or not.bitValues: This will be 0 when the ticket is reopened. It becomes 1 when the corresponding ticket is closed/settled.
CalculatePrice (Boolean)Whether this order’s price needs to be calculated (when, for what??).bitValues: This is normally 1, but is 0 when the order is gifted or voided.
DecreaseInventoryWhether this order causes the inventory in the recipe linked to it to decrease. When a work period is ended, SambaPOS will use this to decide whether or not to create a [PeriodicConsumptionItems][1] record in order to decrease the inventory.bitValues:This is normally 1, but is 0 when the order is voided.
IncreaseInventory????bit
OrderNumberThe official number of the order which is printed on the ticket (????).int
CreatingUserNameThe name of the user who added the order to the ticket.nvarchar(max)
CreatedDateTimeThe date/time when the ticket was created.datetime
AccountTransactionTypeId????int
ProductTimerValueId????int
PriceTag????nvarchar(max)
TagThe tag linked to the product ordered.nvarchar(max)
Taxes????nvarchar(max)
OrderTagsAny tags linked to this order.nvarchar(max)This field is in JSON notation.
OrderStatesThe states attributed to the order.nvarchar(max)This field is in JSON notation

Possible values for the OrderTags field attributes are:

  • TN: Tag name (order tag group name)
  • TV: Tag value (order tag name)
  • TO: Tag note
  • UI: User ID (the user who added the order)
  • PR: Price (the price of the order tag)
  • Q: Quantity (how many of the order tag were selected)
  • OI: Order Tag group ID (Id number of the order tag group)
  • MI: Menu item ID (Product ID)
  • AP: Add price (same as CalculatePrice for the order itself?)
  • PN: Portion name (the portion name of the product linked to the order tag)
  • OK: Order key (number used for ordering the order tag on the ticket?)
  • FT: Free tag (whether this is a Free tag or not)
  • TF: Tax free (whether the order tag is Tax free or not)
dbtables/orders_table.txt · Last modified: 2016/11/17 14:58 (external edit)