Table order

This table is audited, see order_audit for details.

This table contains all orders and sales.

Column NameTypePropertiesDocu
orderidseq32Primary-Key
customeridint32NULL-able Foreign-Key=customer(customerid) ID of the customer connected to this order.
soldbystring:64NULL-able Foreign-Key=user(uname) User name of the user who entered it into the system. "_web" for the online system.
invoiceaddressint64NULL-able Foreign-Key=address(addressid) If not null: the address the invoice goes to.
deliveryaddressint64NULL-able Foreign-Key=address(addressid) If not null: the address the delivery goes to. If null: assumed to be identical to invoiceaddress.
statusenum32Status the order is in right now.
ordertimeint64When the order was created
senttimeint64NULL-able When the order was sent to the customer
commentstextNULL-able comments made on web form (eg. "urgently needed for dads birthday")
amountpaidint32NULL-able how much has been paid already (including used vouchers); this is for comparison with the price fields in ticket and voucher tables
shippingcostsint32NULL-able default="0" shipping price; this is not re-imbursed for orders that have been sent and then cancelled
shippingtypeint32NULL-able Foreign-Key=shipping(shipid) pointer to shipping type (none per default, programmatic default is in config)
tagsstringNULL-able additional tags for this order, can be used by scripts
couponidstring:32NULL-able Foreign-Key=coupon(couponid) Optional coupon code used on this order.

Enum for column status

Foreign Getters