SlideShare una empresa de Scribd logo
1 de 42
VIVIPOS


Database Schema for Orders


       Release 1.2.x




           Page 1 of 42
Rev 1.2.1
October 21, 2009




   Page 2 of 42
Table of Content
VIVIPOS                                           1


DATABASE SCHEMA FOR ORDERS                        1


RELEASE 1.2.X                                     1


1.CASHDRAWER_RECORDS                              6


2.CLOCK_STAMPS                                    8


3.LEDGER_RECEIPTS                                 9


4.LEDGER_RECORDS                                  10


5.ORDER_ADDITIONS                                 11


6.ORDER_ANNOTATIONS                               13


7.ORDER_ITEM_CONDIMENTS                           14


                                   Page 3 of 42
8.ORDER_ITEM_TAXES                       15


9.ORDER_ITEMS                            17


10.ORDER_OBJECTS                         19


11.ORDER_PAYMENTS                        21


12.ORDER_PROMOTIONS                      24


13.ORDER_QUEUES                          26


14.ORDER_RECEIPTS                        28


15.ORDERS                                29


16.SHIFT_CHANGE_DETAILS                  33


17.SHIFT_CHANGES                         35


18.SHIFT_MARKERS                         37


19.SYNC_REMOTE_MACHINES                  38


                          Page 4 of 42
20.SYNCS                                                   39


21.UNIFORM_INVOICE_MARKERS (FOR TAIWAN MARKET)             40


22.UNIFORM_INVOICES (FOR TAIWAN MARKET)                    41




                                            Page 5 of 42
1.cashdrawer_records

Stores cash drawer activities

   #                NAME          TYPE    DEFAULT                                   DESCRIPTION
   1       id                   VARCHAR   NOT NULL       globally unique record id
   2       terminal_no          VARCHAR     NULL         terminal number where the cash drawer operation took place
   3       drawer_no            INTEGER     NULL         drawer ID (currently 1 or 2)
   4       clerk                VARCHAR     NULL         username of the operator who initiated the cash drawer operation
                                                         (value from vivipos.users.username)
   5       clerk_displayname    VARCHAR    NULL          display name of the operator who initiated the cash drawer operation
                                                         (value from vivipos.users.displayname)
   6       event_type           VARCHAR    NULL          reason for cashdrawer action:

                                                         - payment
                                                         - finalization
                                                         - nosale
                                                         - shift change
   7       status               INTEGER    NULL          result of the cashdrawer operation:
                                                         -   0: failed



                                                  Page 6 of 42
- 1: successful
8    payment_type   VARCHAR   NULL          type of payment (present only for event types of payment and
                                            finalization):

                                            - cash
                                            - creditcard
                                            - giftcard
                                            - coupon
                                            - check
9    amount          FLOAT    NULL          amount of payment (present only for event types of payment and
                                            finalization
10   sequence       VARCHAR   NULL          order sequence number (present only for event types of payment and
                                            finalization)
11   order_id       VARCHAR   NULL          foreign key into the master order record in table ‘orders’ column ‘id’
                                            (present only for event types of payment and finalization)
12   created        INTEGER   NULL          record creation timestamp (unix time)
13   modified       INTEGER   NULL          record last modified timestamp (unix time)




                                     Page 7 of 42
2.clock_stamps

Stores employee clockin/out logs

  #             NAME                 TYPE    DEFAULT                                     DESCRIPTION
  1    id                          VARCHAR   NOT NULL          globally unique record id
  2    username                    VARCHAR     NULL            employee’s username
  3    displayname                 VARCHAR     NULL            employee’s display name
  4    job                         VARCHAR     NULL            job name
  5    clockin                       BOOL      NULL            1 if user has clocked in the current job; 0 otherwise
  6    clockout                      BOOL      NULL            1 if user has clocked out of the current job; 0 otherwise
  7    clockin_time                VARCHAR     NULL            string representation (‘yyyy-MM-dd HH:mm:ss’) of clock-in
                                                               time
  8    clockout_time               VARCHAR    NULL             string representation (‘yyyy-MM-dd HH:mm:ss’) of clock-out
                                                               time
  9    branch_id                   VARCHAR    NULL             branch ID of the store
 10    created                     INTEGER    NULL             record creation timestamp (unix time)
 11    modified                    INTEGER    NULL             record last modified timestamp (unix time)




                                                Page 8 of 42
3.ledger_receipts

Stores ledger receipts (non-sale cash in/out)

  #                  NAME                         TYPE       DEFAULT                          DESCRIPTION
  1     id                                      VARCHAR      NOT NULL    globally unique record id
  2     ledger_id                               VARCHAR      NOT NULL    foreign key into the corresponding ledger record on
                                                                         table ‘ledger_records’ column ‘id’
  3     printer                                 VARCHAR         NULL     the receipt device number where the receipt is printed
  4     created                                 INTEGER         NULL     record creation timestamp (unix time)
  5     modified                                INTEGER         NULL     record last modified timestamp (unix time)




                                                          Page 9 of 42
4.ledger_records

Stores ledger entries (non-sale cash in/out)

  #                   NAME                       TYPE        DEFAULT                          DESCRIPTION
  1     id                                     VARCHAR        NULL       globally unique record id
  2     type                                   VARCHAR        NULL       type of ledger entry
  3     description                            VARCHAR        NULL       user-provided description for this ledger entry
  4     mode                                   VARCHAR        NULL       whether this ledger entry is for money in or out of cash
                                                                         drawer; allowed values are ‘IN’ (into cashdrawer) and
                                                                         ‘OUT’ (out of cashdrawer)
  5     amount                                  FLOAT          NULL      amount of the ledger entry
  6     terminal_no                            VARCHAR         NULL      terminal number where the ledger entry was registered
  7     sale_period                            INTEGER         NULL      sale period during which the ledger entry was registered
  8     shift_number                           INTEGER         NULL      shift number during which the ledger entry was
                                                                         registered
  9     service_clerk                          VARCHAR         NULL      username of the clerk that registered the ledger entry
 10     service_clerk_displayname               VACHAR         NULL      display name of the clerk that registered the ledger entry
 11     created                                INTEGER         NULL      record creation timestamp (unix time)
 12     modified                               INTEGER         NULL      record last modified timestamp (unix time)




                                                         Page 10 of 42
5.order_additions

Stores transaction discounts and surcharges registered against an order; discounts and surcharges applied against items are not stored here

  #                  NAME                         TYPE                DEFAULT                                  DESCRIPTION
  1    id                                       VARCHAR               NOT NULL           globally unique record id
  2    order_id                                 VARCHAR                 NULL             foreign key into the master order record on table ‘orders’
                                                                                         column ‘id’
  3    tax_name                                 VARCHAR                  NULL            name of the tax to apply for this discount/surcharge
                                                                                         (currently not implemented)
  4    tax_rate                                   FLOAT                  NULL            tax rate to apply for this discount/surcharge (currently
                                                                                         not implemented)
  5    tax_type                                 VARCHAR                  NULL            type of tax to apply for this discount/surcharge
                                                                                         (currently not implemented)
  6    current_tax                                FLOAT                  NULL            applicable add-on tax amount (currently not
                                                                                         implemented)
  7    discount_name                            VARCHAR                  NULL            user-defined name assigned to the discount
  8    discount_rate                             FLOAT                   NULL            discount rate (percentage for discounts of type %,
                                                                                         absolute amount for discounts of type $)




                                                                   Page 11 of 42
9    discount_type       VARCHAR         NULL      type of discount:
                                                   - %: percentage discount
                                                   - $: absolute amount
10   current_discount     FLOAT          NULL      discount amount
11   surcharge_name      VARCHAR         NULL      user-defined name assigned to the surcharge
12   surcharge_rate       FLOAT          NULL      surcharge rate (percentage for surcharge of type %,
                                                   absolute amount for surcharge of type $)
13   surcharge_type      VARCHAR         NULL      type of discount:
                                                   - %: percentage surcharge
                                                   - $: absolute amount
14   current_surcharge    FLOAT          NULL      surcharge amount
15   has_discount          BOOL          NULL      (not used)
16   has_surcharge         BOOL          NULL      (not used)
17   created             INTEGER         NULL      record creation timestamp (unix time)
18   modified            INTEGER         NULL      record last modified timestamp (unix time)




                                   Page 12 of 42
6.order_annotations

Stores annotations registered against an order

  #                 NAME                           TYPE       DEFAULT                           DESCRIPTION
  1     id                                       VARCHAR      NOT NULL     globally unique record id
  2     type                                     VARCHAR      NOT NULL     type of annotations (types are stored in preferences and
                                                                           not in database)
  3     text                                     VARCHAR      NOT NULL     annotation text
  4     order_id                                 VARCHAR        NULL       foreign key into the master order record in table ‘orders’
                                                                           column ‘id’
  5     created                                  INTEGER         NULL      record creation timestamp (unix time)
  6     modified                                 INTEGER         NULL      record last modified timestamp (unix time)




                                                           Page 13 of 42
7.order_item_condiments

Stores condiments registered against items in an order

  #                 NAME                         TYPE       DEFAULT                           DESCRIPTION
  1    id                                      VARCHAR      NOT NULL     globally unique record id
  2    order_id                                VARCHAR      NOT NULL     foreign key into the master order record in table ‘orders’
                                                                         column ‘id’
  3    item_id                                 VARCHAR      NOT NULL     foreign key into the order item record in table
                                                                         ‘order_items’ column ‘id’
  4    name                                    VARCHAR         NULL      condiment name
  5    price                                    FLOAT          NULL      condiment price
  6    created                                 INTEGER         NULL      record creation timestamp (unix time)
  7    modified                                INTEGER         NULL      record last modified timestamp (unix time)




                                                         Page 14 of 42
8.order_item_taxes

Stores detailed taxes for items, promotions, and orders

  #                 NAME                          TYPE       DEFAULT                           DESCRIPTION
  1    id                                       VARCHAR      NOT NULL     globally unique record id
  2    order_id                                 VARCHAR      NOT NULL     foreign key into the master order record that this tax
                                                                          entry applies to on table ‘orders’ column ‘id’
  3    order_item_id                            VARCHAR         NULL      foreign key into the order item record that this tax entry
                                                                          applies to on table ‘order_items’ column ‘id’

                                                                          (this field will be blank for order and promotion tax
                                                                          details)
  4    promotion_id                             VARCHAR         NULL      foreign key into the order promotion record that this tax
                                                                          entry applies to in table ‘order_promotions’ column ‘id’

                                                                          (this field will be blank for order and item tax details)
  5    tax_no                                   VARCHAR      NOT NULL     tax number
  6    tax_name                                 VARCHAR      NOT NULL     tax name
  7    tax_type                                 VARCHAR      NOT NULL     tax type (ADDON or INCLUDED)
  8    tax_rate                                  FLOAT       NOT NULL     tax rate (percentage for tax rate type %, absolute amount
                                                                          for tax rate type $)
  9    tax_rate_type                            VARCHAR      NOT NULL     type of discount:


                                                          Page 15 of 42
- %: percentage surcharge
                                                       $: absolute amount
10   tax_threshold            FLOAT       NOT NULL     tax threshold
11   tax_subtotal             FLOAT         NULL       add-on tax amount
12   included_tax_subtotal    FLOAT         NULL       included tax amount
13   item_count              INTEGER          0        number of items subject to this tax (present only for
                                                       order tax details)
14   taxable_amount          FLOAT              0      sales amount subject to this tax




                                       Page 16 of 42
9.order_items

Stores individual sale items

  #                 NAME         TYPE       DEFAULT                            DESCRIPTION
  1     id                     VARCHAR      NOT NULL     globally unique record id
  2     order_id               VARCHAR        NULL       foreign key into the master order record in table ‘orders’
                                                         column ‘id’
  3     cate_no                VARCHAR         NULL      department number
  4     included_tax            FLOAT          NULL      total included tax amount due on item
  5     cate_name              VARCHAR         NULL      department name
  6     product_no             VARCHAR         NULL      product number (department number for sale-able
                                                         departments)
  7     product_barcode        VARCHAR         NULL      product barcode
  8     product_name           VARCHAR         NULL      product name (department name for sale-able
                                                         departments)
  9     current_qty             FLOAT          NULL      quantity
 10     current_price           FLOAT          NULL      unit price
 11     current_subtotal        FLOAT          NULL      subtotal (including condiment subtotal) before item
                                                         discount/surcharge
 12     tax_name               VARCHAR         NULL      name of the tax to apply for this discount/surcharge
 13     tax_rate                FLOAT          NULL      tax rate to apply for this discount/surcharge



                                         Page 17 of 42
14   tax_type            VARCHAR         NULL      type of tax to apply for this discount/surcharge
15   current_tax          FLOAT          NULL      applicable add-on tax amount
16   discount_name       VARCHAR         NULL      user-defined name assigned to the discount
17   discount_rate        FLOAT          NULL      discount rate (percentage for discounts of type %,
                                                   absolute amount for discounts of type $)
18   discount_type       VARCHAR         NULL      type of discount:
                                                   - %: percentage discount
                                                   - $: absolute amount
19   current_discount     FLOAT          NULL      discount amount
20   surcharge_name      VARCHAR         NULL      user-defined name assigned to the surcharge
21   surcharge_rate       FLOAT          NULL      surcharge rate (percentage for surcharge of type %,
                                                   absolute amount for surcharge of type $)
22   surcharge_type      VARCHAR         NULL      type of discount:
                                                   - %: percentage surcharge
                                                   - $: absolute amount
23   current_surcharge    FLOAT          NULL      surcharge amount
24   condiments          VARCHAR         NULL      string containing comma-separated list of condiments
25   current_condiment    FLOAT          NULL      subtotal from condiments
26   memo                  TEXT          NULL      memo registered against the item
27   has_discount          BOOL          NULL      1 if discount has been registered against the item; 0
                                                   otherwise
28   has_surcharge        BOOL           NULL      1 if surcharge has been registered against the item; 0
                                                   otherwise
29   has_marker           BOOL           NULL      1 if a marker (subtotal, total, or tray marker) has been
                                                   registered against the item; 0 otherwise
30   destination         VARCHAR         NULL      item destination
31   parent_no           VARCHAR         NULL      product number of the set menu (present only if this



                                   Page 18 of 42
item is ordered as part of a set menu)
 32     weight                                     FLOAT                    0      for scale items, the weight of the item sold, in item’s
                                                                                   sale unit
 33     sale_unit                                VARCHAR                 ‘unit’    the unit the product is sold under
 34     seat_no                                  VARCHAR                 NULL      the seat number the item is registered against (currently
                                                                                   unused)
 35     parent_index                             VARCHAR                 NULL      foreign key into the order item record that this item is a
                                                                                   set menu component of in table ‘order_items’ column
                                                                                   ‘id’ (present only if this item is ordered as part of a set
                                                                                   menu)
 36     has_setitems                            BOOLEAN                    0       1 if this item is a set menu; 0 otherwise
 37     stock_maintained                        BOOLEAN                  NULL      1 if stock level has been adjusted for this item; 0
                                                                                   otherwise
 38     created                                  INTEGER                 NULL      record creation timestamp (unix time)
 39     modified                                 INTEGER                 NULL      record last modified timestamp (unix time)




10.order_objects

Stores serialized transaction objects representing stored orders

  #                  NAME                          TYPE               DEFAULT                          DESCRIPTION
  1     id                                       VARCHAR              NOT NULL     globally unique record id



                                                                   Page 19 of 42
2   order_id   VARCHAR         NULL      foreign key into the master order record in table ‘orders’
                                         column ‘id’
3   object       TEXT          NULL      serialized transaction object
4   created    INTEGER         NULL      record creation timestamp (unix time)
5   modified   INTEGER         NULL      record last modified timestamp (unix time)




                         Page 20 of 42
11.order_payments

Stores payments registered against an order

  #                         NAME                TYPE           DEFAULT                DESCRIPTION
  1    id                                     VARCHAR           NULL     globally unique record id
  2    order_id                               VARCHAR           NULL     foreign key into the master order record
                                                                         in table ‘orders’ column ‘id’
  3    order_items_count                      INTEGER           NULL     number of items in the order at the time
                                                                         when the payment is made
  4    order_total                             FLOAT            NULL     total amount of the order at the time
                                                                         when the payment is made
  5    name                                   VARCHAR           NULL     payment type:

                                                                         - cash
                                                                         - check
                                                                         - coupon
                                                                         - creditcard
                                                                         - giftcard
  6    amount                                  FLOAT            NULL     payment amount, in local currency.
                                                                         When paying with giftcard, if the



                                               Page 21 of 42
giftcard face value is larger than
                                                          amount due, only the amount due is
                                                          recorded here (because no change will
                                                          be given for giftcard payments)
7    memo1                         TEXT            NULL   payment subtype; this is taken from the
                                                          parameter assigned to the payment
                                                          function key and is used to further
                                                          define payment type; for cash payment
                                                          in local currency, this field is NULL.
8    memo2                         TEXT            NULL   operator remarks registered against the
                                                          payment
9    origin_amount                 FLOAT           NULL   original payment amount, in actual
                                                          tendered currency. If the payment type
                                                          is giftcard, this will be the actual face
                                                          value of the giftcard
10   service_clerk                VARCHAR          NULL   username of the clerk who registered
                                                          the payment
11   service_clerk_displayname    VARCHAR          NULL   display name of the clerk who
                                                          registered the payment
12   proceeds_clerk               VARCHAR          NULL   username of the clerk who registered
                                                          the payment (recorded only if the
                                                          payment finalizes the order)
13   proceeds_clerk_displayname   VARCHAR          NULL   display name of the clerk who
                                                          registered the payment (recorded only
                                                          if the payment finalizes the order)
14   change                        FLOAT           NULL   amount of change given
15   sale_period                  INTEGER          NULL   the sale period in which the payment
                                                          was registered
16   shift_number                 INTEGER          NULL   the shift number in which the payment



                                   Page 22 of 42
was registered
17   terminal_no    VARCHAR          NULL   terminal number where the payment
                                            was registered
18   is_groupable    BOOL             0     1 if this payment should be grouped
                                            with other groupable payments of the
                                            same name and amount from the same
                                            shift for shift change reporting
                                            purposes; 0 otherwise
19   created        INTEGER          NULL   record creation timestamp (unix time)
20   modified       INTEGER          NULL   record last modified timestamp (unix
                                            time)




                     Page 23 of 42
12.order_promotions

Stores detailed information on promotion rules that were triggered on an order

  #                NAME                         TYPE                 DEFAULT                            DESCRIPTION
  1    id                                     VARCHAR                NOT NULL     globally unique record id
  2    order_id                               VARCHAR                  NULL       foreign key into the master order record in table ‘orders’
                                                                                  column ‘id’
  3    promotion_id                             TEXT                    NULL      foreign key into the master promotions record in table
                                                                                  ‘promotions’ column ‘id’
  4    name                                   VARCHAR                   NULL      the name of the triggered promotions rule (taken from
                                                                                  vivipos.promotions)
  5    code                                   VARCHAR                   NULL      the code of the triggered promotions rule (taken from
                                                                                  vivipos.promotions)
  6    alt_name1                              VARCHAR                   NULL      alternate name of the triggered promotions rule (taken
                                                                                  from vivipos.promotions)
  7    alt_name2                              VARCHAR                   NULL      second alternate name of the triggered promotions rule
                                                                                  (taken from vivipos.promotions)
  8    trigger                                VARCHAR                   NULL      id of the trigger
  9    trigger_name                           VARCHAR                   NULL      internal name of the trigger
 10    trigger_label                          VARCHAR                   NULL      display name of the trigger
 11    type                                   VARCHAR                   NULL      id of the promotion type
 12    type_name                              VARCHAR                   NULL      internal name of the promotion type


                                                                  Page 24 of 42
13   type_label               VARCHAR         NULL      display name of the promotion type
14   matched_amount           INTEGER         NULL      number of times the rule was triggered
15   matched_items_qty        INTEGER         NULL      quantity of items consumed by the trigger
16   matched_items_subtotal    FLOAT          NULL      total price of consumed items (before any
                                                        discount/surcharge)
17   discount_subtotal         FLOAT          NULL      amount of promotion
18   tax_name                 VARCHAR         NULL      name of applicable tax on this promotion
19   current_tax               FLOAT          NULL      amount of add-on tax applicable on this promotion
20   included_tax              FLOAT          NULL      amount of included tax applicable on this promotion
21   created                  INTEGER         NULL      record creation timestamp (unix time)
22   modified                 INTEGER         NULL      record last modified timestamp (unix time)




                                        Page 25 of 42
13.order_queues

Stores queued orders

  #                NAME     TYPE       DEFAULT                          DESCRIPTION
  1    id                 VARCHAR      NOT NULL     globally unique record id


                                                    if a queued order is later stored into the orders table
                                                    (when it’s recalled and finalized, stored, or cancelled),
                                                    that order record will have the same id as this queued
                                                    order record
  2    user               VARCHAR         NULL      foreign key into the master user record in table ‘users’
                                                    column ‘username’
  3    seq                VARCHAR         NULL      sequence number of the queued order
  4    status             INTEGER         NULL      1 if order is active; -1 if order has been recalled into the
                                                    shopping cart
  5    mode               INTEGER         NULL      1 if order is queued in normal mode, 0 if queued in
                                                    training mode
  6    summary             TEXT           NULL      a short textual summary (sequence number, list of items
                                                    and quantities, and total)
  7    object              TEXT           NULL      serialized transaction object


                                    Page 26 of 42
8   created    INTEGER         NULL      record creation timestamp (unix time)
9   modified   INTEGER         NULL      record last modified timestamp (unix time)




                         Page 27 of 42
14.order_receipts

Stores records of printed receipts

  #                  NAME              TYPE       DEFAULT                           DESCRIPTION
  1     id                           VARCHAR      NOT NULL     globally unique record id
  2     order_id                     VARCHAR        NULL       foreign key into the master order record in table ‘orders’
                                                               column ‘id’
  3     sequence                     VARCHAR         NULL      sequence number of the order associated with the receipt
  4     device                       INTEGER         NULL      the receipt device number where the receipt was printed
  5     batch                        INTEGER         NULL      the order batch number for which the printed was
                                                               printed
  6     created                      INTEGER         NULL      record creation timestamp (unix time)
  7     modified                     INTEGER         NULL      record last modified timestamp (unix time)




                                               Page 28 of 42
15.orders

Stores master records of individual orders
  #                          NAME              TYPE           DEFAULT                 DESCRIPTION
  1     id                                   VARCHAR          NOT NULL   globally unique record id
  2     sequence                             VARCHAR            NULL     order sequence number
  3     items_count                          INTEGER            NULL     number of item entries in order
  4     total                                 FLOAT             NULL     total amount due (after discounts,
                                                                         surcharges, and taxes)
  5    change                                 FLOAT            NULL      amount of change due
  6    tax_subtotal                           FLOAT            NULL      amount of add-on tax due
  7    surcharge_subtotal                     FLOAT            NULL      total amount of surcharges (item +
                                                                         transaction)
  8    discount_subtotal                      FLOAT            NULL      total amount of discounts (item +
                                                                         transaction)
  9    payment_subtotal                       FLOAT            NULL      actual payment amount received
 10    rounding_prices                       VARCHAR           NULL      algorithm used for rounding prices
 11    precision_prices                      VARCHAR           NULL      precision used for rounding prices
 12    rounding_taxes                        VARCHAR           NULL      algorithm used for rounding taxes
 13    precision_taxes                       VARCHAR           NULL      precision used for rounding taxes
 14    status                                INTEGER           NULL      order status:




                                              Page 29 of 42
- -2: voided
                                                          - -1; cancelled
                                                          - 1: completed
                                                          - 2: stored
15   service_clerk                VARCHAR          NULL   username of the clerk that opened the
                                                          order
16   service_clerk_displayname    VARCHAR          NULL   display name of the clerk that opened
                                                          the order
17   proceeds_clerk               VARCHAR          NULL   username of the clerk that finalized the
                                                          order
18   proceeds_clerk_displayname   VARCHAR          NULL   display name of the clerk that finalized
                                                          the order
19   member                       VARCHAR          NULL   member ID
20   member_displayname           VARCHAR          NULL   member’s display name
21   member_email                 VARCHAR          NULL   member’s email
22   member_cellphone             VARCHAR          NULL   member’s contact number
23   invoice_type                 VARCHAR          NULL   invoice type
24   invoice_title                VARCHAR          NULL   invoice title
25   invoice_no                   VARCHAR          NULL   invoice number
26   invoice_count                INTEGER          NULL   number of pages in invoice
27   destination                  VARCHAR          NULL   order destination
28   table_no                     INTEGER          NULL   table number
29   check_no                     INTEGER          NULL   check number
30   no_of_customers              INTEGER          NULL   number of customers
31   terminal_no                  VARCHAR          NULL   terminal number where the order was
                                                          last modified



                                   Page 30 of 42
32   transaction_created      INTEGER          NULL   order created timestamp (unix time)
33   transaction_submitted    INTEGER          NULL   order store/finalization timestamp (unix
                                                      time)
34   included_tax_subtotal     FLOAT           NULL   total amount of applicable included
                                                      tax(es)
35   item_subtotal             FLOAT           NULL   total due before discounts, surcharges,
                                                      and taxes
36   sale_period              INTEGER          NULL   sale period in which the order was
                                                      stored or finalized
37   shift_number             INTEGER          NULL   shift number in which the order was
                                                      stored or finalized
38   branch_id                VARCHAR          NULL   store branch id
39   branch                   VARCHAR          NULL   store branch name
41   transaction_voided       INTEGER          NULL   order voided timestamp (unix time)
40   promotion_subtotal        FLOAT           NULL   total amount of applicable promotions
42   void_clerk               VARCHAR          NULL   username of the clerk that voided this
                                                      order
43   void_clerk_displayname   VARCHAR          NULL   display name of the clerk that voided
                                                      this order
44   void_sale_period         INTEGER          NULL   sale period in which this order was
                                                      voided
45   void_shift_number        INTEGER          NULL   shift number in which this order was
                                                      voided
46   revalue_subtotal          FLOAT           NULL   amount of adjustments made to order
                                                      total due to revalue
47   qty_subtotal             INTEGER          NULL   total quantity of items registered in the
                                                      order
48   inherited_order_id       VARCHAR          NULL
49   inherited_desc           VARCHAR          NULL


                               Page 31 of 42
50   item_surcharge_subtotal    FLOAT            NULL   total amount of surcharges applied on
                                                        items
51   trans_surcharge_subtotal   FLOAT            NULL   total amount of surcharges applied on
                                                        the entire order (item surcharges
                                                        excluded)
52   item_discount_subtotal     FLOAT            NULL   total amount of discounts applied on
                                                        items
53   trans_discount_subtotal    FLOAT            NULL   total amount of discounts applied on
                                                        the entire order (item discounts
                                                        excluded)
54   created                    INTEGER          NULL   record creation timestamp (unix time)
55   modified                   INTEGER          NULL   record last modified timestamp (unix
                                                        time)




                                 Page 32 of 42
16.shift_change_details

Stores summaries of payments registered during a shift; also used to store sales amount grouped by destinations.

  #                 NAME                         TYPE                 DEFAULT                                DESCRIPTION
  1    id                                      VARCHAR                 NULL             globally unique record id
  2    shift_change_id                         VARCHAR                 NULL             foreign key into the master shift change record in table
                                                                                        ‘shift_changes’ column ‘id’
  3    type                                    VARCHAR                  NULL            payment type; in addition to standard payment types of
                                                                                        cash, check, coupon, creditcard, giftcard, this field may
                                                                                        also contain type of ‘destination’
  4    amount                                    FLOAT                  NULL            total amount of payments registered for the given (type,
                                                                                        name) combination
  5    name                                    VARCHAR                  NULL            user-defined payment sub-type
  6    change                                   FLOAT                   NULL            amount of cash change given for non-cash types of
                                                                                        payments
  7    excess_amount                             FLOAT                  NULL            amount of excess giftcard payment (since no change is
                                                                                        given for giftcard payments)
  8    count                                    INTEGER                 NULL            number of payments of the given (type, name)
                                                                                        combination
  9    created                                  INTEGER                 NULL            record creation timestamp (unix time)
 10    modified                                 INTEGER                 NULL            record last modified timestamp (unix time)



                                                                  Page 33 of 42
Page 34 of 42
17.shift_changes

Stores various financial summaries for a shift

  #                 NAME                           TYPE        DEFAULT                           DESCRIPTION
  1     id                                       VARCHAR        NULL       globally unique record id
  2     starttime                                INTEGER        NULL       actual start time of the shift (unix time)
  3     endtime                                  INTEGER        NULL       actual end time of the shift
  4     balance                                   FLOAT         NULL       total amount of money (including all forms of payment)
                                                                           in the cashdrawer
  5     note                                     VARCHAR         NULL      clerk’s shift change remarks
  6     terminal_no                              VARCHAR         NULL      terminal number where the shift change took place
  7     sale_period                              INTEGER         NULL      the sale period
  8     shift_number                             INTEGER         NULL      the shift number
  9     cash                                      FLOAT          NULL      total amount of cash in the cashdrawer
 10     sales                                     FLOAT          NULL      total amount of sales
 11     excess                                    FLOAT          NULL      total amount of excess giftcard payments
 12     ledger_in                                 FLOAT          NULL      amount of non-sale cash received
 13     ledger_out                                FLOAT          NULL      amount of non-sale cash paid out
 14     deposit                                   FLOAT          NULL      amount of payments received on stored orders
 15     refund                                    FLOAT          NULL      amount of money paid out as refund for orders voided in
                                                                           this shift



                                                           Page 35 of 42
16   credit          FLOAT           NULL      difference between sales total and payments received
                                               from sales
17   reported_cash    FLOAT          NULL      cash declared by clerk upon shift change/sale period end
18   created         INTEGER         NULL      record creation timestamp (unix time)
19   modified        INTEGER         NULL      record last modified timestamp (unix time)




                               Page 36 of 42
18.shift_markers

Stores current shift information for each terminal

  #                   NAME                        TYPE       DEFAULT                             DESCRIPTION
  1     id                                      VARCHAR      NOT NULL     globally unique record id
  2     sale_period                             VARCHAR        NULL       sale period
  3     shift_number                            VARCHAR        NULL       shift number
  4     end_of_period                             BOOL         NULL       1 if the current sale period has ended; 0 otherwise
  5     end_of_shift                              BOOL         NULL       1 if the current shift has ended; 0 otherwise
  6     end_of_shift_cash                       VARCHAR        NULL       serialized payment object representing change left in
                                                                          cash drawer from previous shift
  7     terminal_no                             VARCHAR         NULL      indicates which terminal this shift marker is for
  8     created                                 INTEGER         NULL      record creation timestamp (unix time)
  9     modified                                INTEGER         NULL      record last modified timestamp (unix time)




                                                          Page 37 of 42
19.sync_remote_machines

This table maintains synchronization status and is for internal use only

  #                   NAME                        TYPE                     DEFAULT   DESCRIPTION
  1     id                                      INTEGER                     NULL
  2     machine_id                              varchar(36)                 NULL
  3     last_synced                                 int                     NULL




                                                                    Page 38 of 42
20.syncs

This table maintains change logs for synchronization purposes and is for internal use only

  #               NAME                            TYPE                 DEFAULT               DESCRIPTION
  1    id                                       INTEGER                 NULL
  2    crud                                    varchar(255)             NULL
  3    machine_id                               varchar(36)             NULL
  4    from_machine_id                          varchar(36)             NULL
  5    method_id                                varchar(36)             NULL
  6    method_type                              varchar(45)             NULL
  7    method_table                             varchar(45)             NULL
  8    created                                      int                 NULL
  9    modified                                     int                 NULL




                                                                   Page 39 of 42
21.uniform_invoice_markers (for Taiwan market)


(統一發票)


Stores current uniform invoice sequence for individal terminals

  #                  NAME                        TYPE                 DEFAULT                            DESCRIPTION
  1    id                                      VARCHAR                 NULL       globally unique record id
  2    code                                    VARCHAR                 NULL       uniform invoice code
  3    seq                                     VARCHAR                 NULL       uniform invoice sequence number
  4    terminal_no                             VARCHAR                 NULL       terminal number where the uniform invoices are issued
  5    reset_time                              INTEGER                 NULL       time when the sequence was last reset (unix time); this
                                                                                  field is cleared if the last operation was not a sequence
                                                                                  reset
  6    created                                  INTEGER                 NULL      record creation timestamp (unix time)
  7    modified                                 INTEGER                 NULL      record last modified timestamp (unix time)




                                                                  Page 40 of 42
22.uniform_invoices (for Taiwan market)


(統一發票)


Stores information about uniform invoices that have been issued

  #                       NAME                               TYPE                 DEFAULT                 DESCRIPTION
  1    id                                                  VARCHAR                 NULL     globally unique record id
  2    order_id                                            VARCHAR                 NULL     foreign key into the master order record in
                                                                                            ‘orders’ column ‘id’
  3    code                                                VARCHAR                 NULL     uniform invoice code
  4    start_seq                                           VARCHAR                 NULL     starting sequence number
  5    end_seq                                             VARCHAR                 NULL     ending sequence number
  6    terminal_no                                         VARCHAR                 NULL     terminal number where the uniform invoice
                                                                                            was issued
  7    uniform_business_number                             VARCHAR                 NULL     uniform business number
  8    status                                              INTEGER                 NULL     status code:

                                                                                            -   1: successfully issued
                                                                                            -   -1: voided without sale



                                                                  Page 41 of 42
- -2: voided with sale
9    sale_period    INTEGER            NULL   the sale period in which the uniform
                                              invoice was issued
10   shift_number   INTEGER            NULL   the shift number in which the uniform
                                              invoice was issued
11   memo           VARCHAR            NULL   operator-filled memo field when issuing
                                              paper receipts
12   reset_time     INTEGER            NULL   the first receipt issued after a reset
                                              operation will have this field populated
                                              with the reset timestamp
13   manual          BOOL               0     1 if this invoice is issued manually, 0
                                              otherwise
14   created        INTEGER            NULL   record creation timestamp (unix time)
15   modified       INTEGER            NULL   record last modified timestamp (unix time)




                       Page 42 of 42

Más contenido relacionado

Destacado

Interior And Exterior
Interior And ExteriorInterior And Exterior
Interior And Exteriorguest8de4bc2
 
Aligning Vision With Action
Aligning Vision With ActionAligning Vision With Action
Aligning Vision With Actionarmandojusto
 
Expo Zaragoza2008
Expo Zaragoza2008Expo Zaragoza2008
Expo Zaragoza2008yolkas
 
Derivatives Trading
Derivatives TradingDerivatives Trading
Derivatives Tradingvidhu_mishra
 
Consulting Presentation to Sony for PS3
Consulting Presentation to Sony for PS3Consulting Presentation to Sony for PS3
Consulting Presentation to Sony for PS3curtishowell
 
Ben 10 presentation
Ben 10 presentationBen 10 presentation
Ben 10 presentationShakeel Fuad
 
Kanban in Oracle Applications
Kanban in Oracle ApplicationsKanban in Oracle Applications
Kanban in Oracle Applicationsmgarg82
 
NOVA SHRM SIG "Aligning Competencies To Your Organizations Mission"
NOVA SHRM SIG "Aligning Competencies To Your Organizations Mission"NOVA SHRM SIG "Aligning Competencies To Your Organizations Mission"
NOVA SHRM SIG "Aligning Competencies To Your Organizations Mission"armandojusto
 
Oracle min-max-planning
Oracle min-max-planningOracle min-max-planning
Oracle min-max-planningmgarg82
 
Complete Oracle Procure to Pay Cycle
Complete Oracle Procure to Pay Cycle Complete Oracle Procure to Pay Cycle
Complete Oracle Procure to Pay Cycle mgarg82
 
Dietoterapia
DietoterapiaDietoterapia
Dietoterapiaritaberna
 
Alimentazione Equilibrata
Alimentazione EquilibrataAlimentazione Equilibrata
Alimentazione Equilibrataritaberna
 
Expo Zaragoza2008
Expo Zaragoza2008Expo Zaragoza2008
Expo Zaragoza2008yolkas
 

Destacado (16)

Interior And Exterior
Interior And ExteriorInterior And Exterior
Interior And Exterior
 
Cptp Nv.1
Cptp Nv.1Cptp Nv.1
Cptp Nv.1
 
Aligning Vision With Action
Aligning Vision With ActionAligning Vision With Action
Aligning Vision With Action
 
Ocean
OceanOcean
Ocean
 
Expo Zaragoza2008
Expo Zaragoza2008Expo Zaragoza2008
Expo Zaragoza2008
 
Derivatives Trading
Derivatives TradingDerivatives Trading
Derivatives Trading
 
Consulting Presentation to Sony for PS3
Consulting Presentation to Sony for PS3Consulting Presentation to Sony for PS3
Consulting Presentation to Sony for PS3
 
Ben 10 presentation
Ben 10 presentationBen 10 presentation
Ben 10 presentation
 
Kanban in Oracle Applications
Kanban in Oracle ApplicationsKanban in Oracle Applications
Kanban in Oracle Applications
 
NOVA SHRM SIG "Aligning Competencies To Your Organizations Mission"
NOVA SHRM SIG "Aligning Competencies To Your Organizations Mission"NOVA SHRM SIG "Aligning Competencies To Your Organizations Mission"
NOVA SHRM SIG "Aligning Competencies To Your Organizations Mission"
 
Oracle min-max-planning
Oracle min-max-planningOracle min-max-planning
Oracle min-max-planning
 
Secondary Market
Secondary MarketSecondary Market
Secondary Market
 
Complete Oracle Procure to Pay Cycle
Complete Oracle Procure to Pay Cycle Complete Oracle Procure to Pay Cycle
Complete Oracle Procure to Pay Cycle
 
Dietoterapia
DietoterapiaDietoterapia
Dietoterapia
 
Alimentazione Equilibrata
Alimentazione EquilibrataAlimentazione Equilibrata
Alimentazione Equilibrata
 
Expo Zaragoza2008
Expo Zaragoza2008Expo Zaragoza2008
Expo Zaragoza2008
 

Último

Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 

Último (20)

Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 

Vivipos Order Schema Release 1 2 X Rev 1 2 1

  • 1. VIVIPOS Database Schema for Orders Release 1.2.x Page 1 of 42
  • 2. Rev 1.2.1 October 21, 2009 Page 2 of 42
  • 3. Table of Content VIVIPOS 1 DATABASE SCHEMA FOR ORDERS 1 RELEASE 1.2.X 1 1.CASHDRAWER_RECORDS 6 2.CLOCK_STAMPS 8 3.LEDGER_RECEIPTS 9 4.LEDGER_RECORDS 10 5.ORDER_ADDITIONS 11 6.ORDER_ANNOTATIONS 13 7.ORDER_ITEM_CONDIMENTS 14 Page 3 of 42
  • 4. 8.ORDER_ITEM_TAXES 15 9.ORDER_ITEMS 17 10.ORDER_OBJECTS 19 11.ORDER_PAYMENTS 21 12.ORDER_PROMOTIONS 24 13.ORDER_QUEUES 26 14.ORDER_RECEIPTS 28 15.ORDERS 29 16.SHIFT_CHANGE_DETAILS 33 17.SHIFT_CHANGES 35 18.SHIFT_MARKERS 37 19.SYNC_REMOTE_MACHINES 38 Page 4 of 42
  • 5. 20.SYNCS 39 21.UNIFORM_INVOICE_MARKERS (FOR TAIWAN MARKET) 40 22.UNIFORM_INVOICES (FOR TAIWAN MARKET) 41 Page 5 of 42
  • 6. 1.cashdrawer_records Stores cash drawer activities # NAME TYPE DEFAULT DESCRIPTION 1 id VARCHAR NOT NULL globally unique record id 2 terminal_no VARCHAR NULL terminal number where the cash drawer operation took place 3 drawer_no INTEGER NULL drawer ID (currently 1 or 2) 4 clerk VARCHAR NULL username of the operator who initiated the cash drawer operation (value from vivipos.users.username) 5 clerk_displayname VARCHAR NULL display name of the operator who initiated the cash drawer operation (value from vivipos.users.displayname) 6 event_type VARCHAR NULL reason for cashdrawer action: - payment - finalization - nosale - shift change 7 status INTEGER NULL result of the cashdrawer operation: - 0: failed Page 6 of 42
  • 7. - 1: successful 8 payment_type VARCHAR NULL type of payment (present only for event types of payment and finalization): - cash - creditcard - giftcard - coupon - check 9 amount FLOAT NULL amount of payment (present only for event types of payment and finalization 10 sequence VARCHAR NULL order sequence number (present only for event types of payment and finalization) 11 order_id VARCHAR NULL foreign key into the master order record in table ‘orders’ column ‘id’ (present only for event types of payment and finalization) 12 created INTEGER NULL record creation timestamp (unix time) 13 modified INTEGER NULL record last modified timestamp (unix time) Page 7 of 42
  • 8. 2.clock_stamps Stores employee clockin/out logs # NAME TYPE DEFAULT DESCRIPTION 1 id VARCHAR NOT NULL globally unique record id 2 username VARCHAR NULL employee’s username 3 displayname VARCHAR NULL employee’s display name 4 job VARCHAR NULL job name 5 clockin BOOL NULL 1 if user has clocked in the current job; 0 otherwise 6 clockout BOOL NULL 1 if user has clocked out of the current job; 0 otherwise 7 clockin_time VARCHAR NULL string representation (‘yyyy-MM-dd HH:mm:ss’) of clock-in time 8 clockout_time VARCHAR NULL string representation (‘yyyy-MM-dd HH:mm:ss’) of clock-out time 9 branch_id VARCHAR NULL branch ID of the store 10 created INTEGER NULL record creation timestamp (unix time) 11 modified INTEGER NULL record last modified timestamp (unix time) Page 8 of 42
  • 9. 3.ledger_receipts Stores ledger receipts (non-sale cash in/out) # NAME TYPE DEFAULT DESCRIPTION 1 id VARCHAR NOT NULL globally unique record id 2 ledger_id VARCHAR NOT NULL foreign key into the corresponding ledger record on table ‘ledger_records’ column ‘id’ 3 printer VARCHAR NULL the receipt device number where the receipt is printed 4 created INTEGER NULL record creation timestamp (unix time) 5 modified INTEGER NULL record last modified timestamp (unix time) Page 9 of 42
  • 10. 4.ledger_records Stores ledger entries (non-sale cash in/out) # NAME TYPE DEFAULT DESCRIPTION 1 id VARCHAR NULL globally unique record id 2 type VARCHAR NULL type of ledger entry 3 description VARCHAR NULL user-provided description for this ledger entry 4 mode VARCHAR NULL whether this ledger entry is for money in or out of cash drawer; allowed values are ‘IN’ (into cashdrawer) and ‘OUT’ (out of cashdrawer) 5 amount FLOAT NULL amount of the ledger entry 6 terminal_no VARCHAR NULL terminal number where the ledger entry was registered 7 sale_period INTEGER NULL sale period during which the ledger entry was registered 8 shift_number INTEGER NULL shift number during which the ledger entry was registered 9 service_clerk VARCHAR NULL username of the clerk that registered the ledger entry 10 service_clerk_displayname VACHAR NULL display name of the clerk that registered the ledger entry 11 created INTEGER NULL record creation timestamp (unix time) 12 modified INTEGER NULL record last modified timestamp (unix time) Page 10 of 42
  • 11. 5.order_additions Stores transaction discounts and surcharges registered against an order; discounts and surcharges applied against items are not stored here # NAME TYPE DEFAULT DESCRIPTION 1 id VARCHAR NOT NULL globally unique record id 2 order_id VARCHAR NULL foreign key into the master order record on table ‘orders’ column ‘id’ 3 tax_name VARCHAR NULL name of the tax to apply for this discount/surcharge (currently not implemented) 4 tax_rate FLOAT NULL tax rate to apply for this discount/surcharge (currently not implemented) 5 tax_type VARCHAR NULL type of tax to apply for this discount/surcharge (currently not implemented) 6 current_tax FLOAT NULL applicable add-on tax amount (currently not implemented) 7 discount_name VARCHAR NULL user-defined name assigned to the discount 8 discount_rate FLOAT NULL discount rate (percentage for discounts of type %, absolute amount for discounts of type $) Page 11 of 42
  • 12. 9 discount_type VARCHAR NULL type of discount: - %: percentage discount - $: absolute amount 10 current_discount FLOAT NULL discount amount 11 surcharge_name VARCHAR NULL user-defined name assigned to the surcharge 12 surcharge_rate FLOAT NULL surcharge rate (percentage for surcharge of type %, absolute amount for surcharge of type $) 13 surcharge_type VARCHAR NULL type of discount: - %: percentage surcharge - $: absolute amount 14 current_surcharge FLOAT NULL surcharge amount 15 has_discount BOOL NULL (not used) 16 has_surcharge BOOL NULL (not used) 17 created INTEGER NULL record creation timestamp (unix time) 18 modified INTEGER NULL record last modified timestamp (unix time) Page 12 of 42
  • 13. 6.order_annotations Stores annotations registered against an order # NAME TYPE DEFAULT DESCRIPTION 1 id VARCHAR NOT NULL globally unique record id 2 type VARCHAR NOT NULL type of annotations (types are stored in preferences and not in database) 3 text VARCHAR NOT NULL annotation text 4 order_id VARCHAR NULL foreign key into the master order record in table ‘orders’ column ‘id’ 5 created INTEGER NULL record creation timestamp (unix time) 6 modified INTEGER NULL record last modified timestamp (unix time) Page 13 of 42
  • 14. 7.order_item_condiments Stores condiments registered against items in an order # NAME TYPE DEFAULT DESCRIPTION 1 id VARCHAR NOT NULL globally unique record id 2 order_id VARCHAR NOT NULL foreign key into the master order record in table ‘orders’ column ‘id’ 3 item_id VARCHAR NOT NULL foreign key into the order item record in table ‘order_items’ column ‘id’ 4 name VARCHAR NULL condiment name 5 price FLOAT NULL condiment price 6 created INTEGER NULL record creation timestamp (unix time) 7 modified INTEGER NULL record last modified timestamp (unix time) Page 14 of 42
  • 15. 8.order_item_taxes Stores detailed taxes for items, promotions, and orders # NAME TYPE DEFAULT DESCRIPTION 1 id VARCHAR NOT NULL globally unique record id 2 order_id VARCHAR NOT NULL foreign key into the master order record that this tax entry applies to on table ‘orders’ column ‘id’ 3 order_item_id VARCHAR NULL foreign key into the order item record that this tax entry applies to on table ‘order_items’ column ‘id’ (this field will be blank for order and promotion tax details) 4 promotion_id VARCHAR NULL foreign key into the order promotion record that this tax entry applies to in table ‘order_promotions’ column ‘id’ (this field will be blank for order and item tax details) 5 tax_no VARCHAR NOT NULL tax number 6 tax_name VARCHAR NOT NULL tax name 7 tax_type VARCHAR NOT NULL tax type (ADDON or INCLUDED) 8 tax_rate FLOAT NOT NULL tax rate (percentage for tax rate type %, absolute amount for tax rate type $) 9 tax_rate_type VARCHAR NOT NULL type of discount: Page 15 of 42
  • 16. - %: percentage surcharge $: absolute amount 10 tax_threshold FLOAT NOT NULL tax threshold 11 tax_subtotal FLOAT NULL add-on tax amount 12 included_tax_subtotal FLOAT NULL included tax amount 13 item_count INTEGER 0 number of items subject to this tax (present only for order tax details) 14 taxable_amount FLOAT 0 sales amount subject to this tax Page 16 of 42
  • 17. 9.order_items Stores individual sale items # NAME TYPE DEFAULT DESCRIPTION 1 id VARCHAR NOT NULL globally unique record id 2 order_id VARCHAR NULL foreign key into the master order record in table ‘orders’ column ‘id’ 3 cate_no VARCHAR NULL department number 4 included_tax FLOAT NULL total included tax amount due on item 5 cate_name VARCHAR NULL department name 6 product_no VARCHAR NULL product number (department number for sale-able departments) 7 product_barcode VARCHAR NULL product barcode 8 product_name VARCHAR NULL product name (department name for sale-able departments) 9 current_qty FLOAT NULL quantity 10 current_price FLOAT NULL unit price 11 current_subtotal FLOAT NULL subtotal (including condiment subtotal) before item discount/surcharge 12 tax_name VARCHAR NULL name of the tax to apply for this discount/surcharge 13 tax_rate FLOAT NULL tax rate to apply for this discount/surcharge Page 17 of 42
  • 18. 14 tax_type VARCHAR NULL type of tax to apply for this discount/surcharge 15 current_tax FLOAT NULL applicable add-on tax amount 16 discount_name VARCHAR NULL user-defined name assigned to the discount 17 discount_rate FLOAT NULL discount rate (percentage for discounts of type %, absolute amount for discounts of type $) 18 discount_type VARCHAR NULL type of discount: - %: percentage discount - $: absolute amount 19 current_discount FLOAT NULL discount amount 20 surcharge_name VARCHAR NULL user-defined name assigned to the surcharge 21 surcharge_rate FLOAT NULL surcharge rate (percentage for surcharge of type %, absolute amount for surcharge of type $) 22 surcharge_type VARCHAR NULL type of discount: - %: percentage surcharge - $: absolute amount 23 current_surcharge FLOAT NULL surcharge amount 24 condiments VARCHAR NULL string containing comma-separated list of condiments 25 current_condiment FLOAT NULL subtotal from condiments 26 memo TEXT NULL memo registered against the item 27 has_discount BOOL NULL 1 if discount has been registered against the item; 0 otherwise 28 has_surcharge BOOL NULL 1 if surcharge has been registered against the item; 0 otherwise 29 has_marker BOOL NULL 1 if a marker (subtotal, total, or tray marker) has been registered against the item; 0 otherwise 30 destination VARCHAR NULL item destination 31 parent_no VARCHAR NULL product number of the set menu (present only if this Page 18 of 42
  • 19. item is ordered as part of a set menu) 32 weight FLOAT 0 for scale items, the weight of the item sold, in item’s sale unit 33 sale_unit VARCHAR ‘unit’ the unit the product is sold under 34 seat_no VARCHAR NULL the seat number the item is registered against (currently unused) 35 parent_index VARCHAR NULL foreign key into the order item record that this item is a set menu component of in table ‘order_items’ column ‘id’ (present only if this item is ordered as part of a set menu) 36 has_setitems BOOLEAN 0 1 if this item is a set menu; 0 otherwise 37 stock_maintained BOOLEAN NULL 1 if stock level has been adjusted for this item; 0 otherwise 38 created INTEGER NULL record creation timestamp (unix time) 39 modified INTEGER NULL record last modified timestamp (unix time) 10.order_objects Stores serialized transaction objects representing stored orders # NAME TYPE DEFAULT DESCRIPTION 1 id VARCHAR NOT NULL globally unique record id Page 19 of 42
  • 20. 2 order_id VARCHAR NULL foreign key into the master order record in table ‘orders’ column ‘id’ 3 object TEXT NULL serialized transaction object 4 created INTEGER NULL record creation timestamp (unix time) 5 modified INTEGER NULL record last modified timestamp (unix time) Page 20 of 42
  • 21. 11.order_payments Stores payments registered against an order # NAME TYPE DEFAULT DESCRIPTION 1 id VARCHAR NULL globally unique record id 2 order_id VARCHAR NULL foreign key into the master order record in table ‘orders’ column ‘id’ 3 order_items_count INTEGER NULL number of items in the order at the time when the payment is made 4 order_total FLOAT NULL total amount of the order at the time when the payment is made 5 name VARCHAR NULL payment type: - cash - check - coupon - creditcard - giftcard 6 amount FLOAT NULL payment amount, in local currency. When paying with giftcard, if the Page 21 of 42
  • 22. giftcard face value is larger than amount due, only the amount due is recorded here (because no change will be given for giftcard payments) 7 memo1 TEXT NULL payment subtype; this is taken from the parameter assigned to the payment function key and is used to further define payment type; for cash payment in local currency, this field is NULL. 8 memo2 TEXT NULL operator remarks registered against the payment 9 origin_amount FLOAT NULL original payment amount, in actual tendered currency. If the payment type is giftcard, this will be the actual face value of the giftcard 10 service_clerk VARCHAR NULL username of the clerk who registered the payment 11 service_clerk_displayname VARCHAR NULL display name of the clerk who registered the payment 12 proceeds_clerk VARCHAR NULL username of the clerk who registered the payment (recorded only if the payment finalizes the order) 13 proceeds_clerk_displayname VARCHAR NULL display name of the clerk who registered the payment (recorded only if the payment finalizes the order) 14 change FLOAT NULL amount of change given 15 sale_period INTEGER NULL the sale period in which the payment was registered 16 shift_number INTEGER NULL the shift number in which the payment Page 22 of 42
  • 23. was registered 17 terminal_no VARCHAR NULL terminal number where the payment was registered 18 is_groupable BOOL 0 1 if this payment should be grouped with other groupable payments of the same name and amount from the same shift for shift change reporting purposes; 0 otherwise 19 created INTEGER NULL record creation timestamp (unix time) 20 modified INTEGER NULL record last modified timestamp (unix time) Page 23 of 42
  • 24. 12.order_promotions Stores detailed information on promotion rules that were triggered on an order # NAME TYPE DEFAULT DESCRIPTION 1 id VARCHAR NOT NULL globally unique record id 2 order_id VARCHAR NULL foreign key into the master order record in table ‘orders’ column ‘id’ 3 promotion_id TEXT NULL foreign key into the master promotions record in table ‘promotions’ column ‘id’ 4 name VARCHAR NULL the name of the triggered promotions rule (taken from vivipos.promotions) 5 code VARCHAR NULL the code of the triggered promotions rule (taken from vivipos.promotions) 6 alt_name1 VARCHAR NULL alternate name of the triggered promotions rule (taken from vivipos.promotions) 7 alt_name2 VARCHAR NULL second alternate name of the triggered promotions rule (taken from vivipos.promotions) 8 trigger VARCHAR NULL id of the trigger 9 trigger_name VARCHAR NULL internal name of the trigger 10 trigger_label VARCHAR NULL display name of the trigger 11 type VARCHAR NULL id of the promotion type 12 type_name VARCHAR NULL internal name of the promotion type Page 24 of 42
  • 25. 13 type_label VARCHAR NULL display name of the promotion type 14 matched_amount INTEGER NULL number of times the rule was triggered 15 matched_items_qty INTEGER NULL quantity of items consumed by the trigger 16 matched_items_subtotal FLOAT NULL total price of consumed items (before any discount/surcharge) 17 discount_subtotal FLOAT NULL amount of promotion 18 tax_name VARCHAR NULL name of applicable tax on this promotion 19 current_tax FLOAT NULL amount of add-on tax applicable on this promotion 20 included_tax FLOAT NULL amount of included tax applicable on this promotion 21 created INTEGER NULL record creation timestamp (unix time) 22 modified INTEGER NULL record last modified timestamp (unix time) Page 25 of 42
  • 26. 13.order_queues Stores queued orders # NAME TYPE DEFAULT DESCRIPTION 1 id VARCHAR NOT NULL globally unique record id if a queued order is later stored into the orders table (when it’s recalled and finalized, stored, or cancelled), that order record will have the same id as this queued order record 2 user VARCHAR NULL foreign key into the master user record in table ‘users’ column ‘username’ 3 seq VARCHAR NULL sequence number of the queued order 4 status INTEGER NULL 1 if order is active; -1 if order has been recalled into the shopping cart 5 mode INTEGER NULL 1 if order is queued in normal mode, 0 if queued in training mode 6 summary TEXT NULL a short textual summary (sequence number, list of items and quantities, and total) 7 object TEXT NULL serialized transaction object Page 26 of 42
  • 27. 8 created INTEGER NULL record creation timestamp (unix time) 9 modified INTEGER NULL record last modified timestamp (unix time) Page 27 of 42
  • 28. 14.order_receipts Stores records of printed receipts # NAME TYPE DEFAULT DESCRIPTION 1 id VARCHAR NOT NULL globally unique record id 2 order_id VARCHAR NULL foreign key into the master order record in table ‘orders’ column ‘id’ 3 sequence VARCHAR NULL sequence number of the order associated with the receipt 4 device INTEGER NULL the receipt device number where the receipt was printed 5 batch INTEGER NULL the order batch number for which the printed was printed 6 created INTEGER NULL record creation timestamp (unix time) 7 modified INTEGER NULL record last modified timestamp (unix time) Page 28 of 42
  • 29. 15.orders Stores master records of individual orders # NAME TYPE DEFAULT DESCRIPTION 1 id VARCHAR NOT NULL globally unique record id 2 sequence VARCHAR NULL order sequence number 3 items_count INTEGER NULL number of item entries in order 4 total FLOAT NULL total amount due (after discounts, surcharges, and taxes) 5 change FLOAT NULL amount of change due 6 tax_subtotal FLOAT NULL amount of add-on tax due 7 surcharge_subtotal FLOAT NULL total amount of surcharges (item + transaction) 8 discount_subtotal FLOAT NULL total amount of discounts (item + transaction) 9 payment_subtotal FLOAT NULL actual payment amount received 10 rounding_prices VARCHAR NULL algorithm used for rounding prices 11 precision_prices VARCHAR NULL precision used for rounding prices 12 rounding_taxes VARCHAR NULL algorithm used for rounding taxes 13 precision_taxes VARCHAR NULL precision used for rounding taxes 14 status INTEGER NULL order status: Page 29 of 42
  • 30. - -2: voided - -1; cancelled - 1: completed - 2: stored 15 service_clerk VARCHAR NULL username of the clerk that opened the order 16 service_clerk_displayname VARCHAR NULL display name of the clerk that opened the order 17 proceeds_clerk VARCHAR NULL username of the clerk that finalized the order 18 proceeds_clerk_displayname VARCHAR NULL display name of the clerk that finalized the order 19 member VARCHAR NULL member ID 20 member_displayname VARCHAR NULL member’s display name 21 member_email VARCHAR NULL member’s email 22 member_cellphone VARCHAR NULL member’s contact number 23 invoice_type VARCHAR NULL invoice type 24 invoice_title VARCHAR NULL invoice title 25 invoice_no VARCHAR NULL invoice number 26 invoice_count INTEGER NULL number of pages in invoice 27 destination VARCHAR NULL order destination 28 table_no INTEGER NULL table number 29 check_no INTEGER NULL check number 30 no_of_customers INTEGER NULL number of customers 31 terminal_no VARCHAR NULL terminal number where the order was last modified Page 30 of 42
  • 31. 32 transaction_created INTEGER NULL order created timestamp (unix time) 33 transaction_submitted INTEGER NULL order store/finalization timestamp (unix time) 34 included_tax_subtotal FLOAT NULL total amount of applicable included tax(es) 35 item_subtotal FLOAT NULL total due before discounts, surcharges, and taxes 36 sale_period INTEGER NULL sale period in which the order was stored or finalized 37 shift_number INTEGER NULL shift number in which the order was stored or finalized 38 branch_id VARCHAR NULL store branch id 39 branch VARCHAR NULL store branch name 41 transaction_voided INTEGER NULL order voided timestamp (unix time) 40 promotion_subtotal FLOAT NULL total amount of applicable promotions 42 void_clerk VARCHAR NULL username of the clerk that voided this order 43 void_clerk_displayname VARCHAR NULL display name of the clerk that voided this order 44 void_sale_period INTEGER NULL sale period in which this order was voided 45 void_shift_number INTEGER NULL shift number in which this order was voided 46 revalue_subtotal FLOAT NULL amount of adjustments made to order total due to revalue 47 qty_subtotal INTEGER NULL total quantity of items registered in the order 48 inherited_order_id VARCHAR NULL 49 inherited_desc VARCHAR NULL Page 31 of 42
  • 32. 50 item_surcharge_subtotal FLOAT NULL total amount of surcharges applied on items 51 trans_surcharge_subtotal FLOAT NULL total amount of surcharges applied on the entire order (item surcharges excluded) 52 item_discount_subtotal FLOAT NULL total amount of discounts applied on items 53 trans_discount_subtotal FLOAT NULL total amount of discounts applied on the entire order (item discounts excluded) 54 created INTEGER NULL record creation timestamp (unix time) 55 modified INTEGER NULL record last modified timestamp (unix time) Page 32 of 42
  • 33. 16.shift_change_details Stores summaries of payments registered during a shift; also used to store sales amount grouped by destinations. # NAME TYPE DEFAULT DESCRIPTION 1 id VARCHAR NULL globally unique record id 2 shift_change_id VARCHAR NULL foreign key into the master shift change record in table ‘shift_changes’ column ‘id’ 3 type VARCHAR NULL payment type; in addition to standard payment types of cash, check, coupon, creditcard, giftcard, this field may also contain type of ‘destination’ 4 amount FLOAT NULL total amount of payments registered for the given (type, name) combination 5 name VARCHAR NULL user-defined payment sub-type 6 change FLOAT NULL amount of cash change given for non-cash types of payments 7 excess_amount FLOAT NULL amount of excess giftcard payment (since no change is given for giftcard payments) 8 count INTEGER NULL number of payments of the given (type, name) combination 9 created INTEGER NULL record creation timestamp (unix time) 10 modified INTEGER NULL record last modified timestamp (unix time) Page 33 of 42
  • 35. 17.shift_changes Stores various financial summaries for a shift # NAME TYPE DEFAULT DESCRIPTION 1 id VARCHAR NULL globally unique record id 2 starttime INTEGER NULL actual start time of the shift (unix time) 3 endtime INTEGER NULL actual end time of the shift 4 balance FLOAT NULL total amount of money (including all forms of payment) in the cashdrawer 5 note VARCHAR NULL clerk’s shift change remarks 6 terminal_no VARCHAR NULL terminal number where the shift change took place 7 sale_period INTEGER NULL the sale period 8 shift_number INTEGER NULL the shift number 9 cash FLOAT NULL total amount of cash in the cashdrawer 10 sales FLOAT NULL total amount of sales 11 excess FLOAT NULL total amount of excess giftcard payments 12 ledger_in FLOAT NULL amount of non-sale cash received 13 ledger_out FLOAT NULL amount of non-sale cash paid out 14 deposit FLOAT NULL amount of payments received on stored orders 15 refund FLOAT NULL amount of money paid out as refund for orders voided in this shift Page 35 of 42
  • 36. 16 credit FLOAT NULL difference between sales total and payments received from sales 17 reported_cash FLOAT NULL cash declared by clerk upon shift change/sale period end 18 created INTEGER NULL record creation timestamp (unix time) 19 modified INTEGER NULL record last modified timestamp (unix time) Page 36 of 42
  • 37. 18.shift_markers Stores current shift information for each terminal # NAME TYPE DEFAULT DESCRIPTION 1 id VARCHAR NOT NULL globally unique record id 2 sale_period VARCHAR NULL sale period 3 shift_number VARCHAR NULL shift number 4 end_of_period BOOL NULL 1 if the current sale period has ended; 0 otherwise 5 end_of_shift BOOL NULL 1 if the current shift has ended; 0 otherwise 6 end_of_shift_cash VARCHAR NULL serialized payment object representing change left in cash drawer from previous shift 7 terminal_no VARCHAR NULL indicates which terminal this shift marker is for 8 created INTEGER NULL record creation timestamp (unix time) 9 modified INTEGER NULL record last modified timestamp (unix time) Page 37 of 42
  • 38. 19.sync_remote_machines This table maintains synchronization status and is for internal use only # NAME TYPE DEFAULT DESCRIPTION 1 id INTEGER NULL 2 machine_id varchar(36) NULL 3 last_synced int NULL Page 38 of 42
  • 39. 20.syncs This table maintains change logs for synchronization purposes and is for internal use only # NAME TYPE DEFAULT DESCRIPTION 1 id INTEGER NULL 2 crud varchar(255) NULL 3 machine_id varchar(36) NULL 4 from_machine_id varchar(36) NULL 5 method_id varchar(36) NULL 6 method_type varchar(45) NULL 7 method_table varchar(45) NULL 8 created int NULL 9 modified int NULL Page 39 of 42
  • 40. 21.uniform_invoice_markers (for Taiwan market) (統一發票) Stores current uniform invoice sequence for individal terminals # NAME TYPE DEFAULT DESCRIPTION 1 id VARCHAR NULL globally unique record id 2 code VARCHAR NULL uniform invoice code 3 seq VARCHAR NULL uniform invoice sequence number 4 terminal_no VARCHAR NULL terminal number where the uniform invoices are issued 5 reset_time INTEGER NULL time when the sequence was last reset (unix time); this field is cleared if the last operation was not a sequence reset 6 created INTEGER NULL record creation timestamp (unix time) 7 modified INTEGER NULL record last modified timestamp (unix time) Page 40 of 42
  • 41. 22.uniform_invoices (for Taiwan market) (統一發票) Stores information about uniform invoices that have been issued # NAME TYPE DEFAULT DESCRIPTION 1 id VARCHAR NULL globally unique record id 2 order_id VARCHAR NULL foreign key into the master order record in ‘orders’ column ‘id’ 3 code VARCHAR NULL uniform invoice code 4 start_seq VARCHAR NULL starting sequence number 5 end_seq VARCHAR NULL ending sequence number 6 terminal_no VARCHAR NULL terminal number where the uniform invoice was issued 7 uniform_business_number VARCHAR NULL uniform business number 8 status INTEGER NULL status code: - 1: successfully issued - -1: voided without sale Page 41 of 42
  • 42. - -2: voided with sale 9 sale_period INTEGER NULL the sale period in which the uniform invoice was issued 10 shift_number INTEGER NULL the shift number in which the uniform invoice was issued 11 memo VARCHAR NULL operator-filled memo field when issuing paper receipts 12 reset_time INTEGER NULL the first receipt issued after a reset operation will have this field populated with the reset timestamp 13 manual BOOL 0 1 if this invoice is issued manually, 0 otherwise 14 created INTEGER NULL record creation timestamp (unix time) 15 modified INTEGER NULL record last modified timestamp (unix time) Page 42 of 42