This table is audited, see order_audit for details.
This table contains all orders and sales.
| Column Name | Type | Properties | Docu | 
| orderid | seq32 | Primary-Key | |
| customerid | int32 | NULL-able Foreign-Key=customer(customerid) | ID of the customer connected to this order. | 
| soldby | string:64 | NULL-able Foreign-Key=user(uname) | User name of the user who entered it into the system. "_web" for the online system. | 
| invoiceaddress | int64 | NULL-able Foreign-Key=address(addressid) | If not null: the address the invoice goes to. | 
| deliveryaddress | int64 | NULL-able Foreign-Key=address(addressid) | If not null: the address the delivery goes to. If null: assumed to be identical to invoiceaddress. | 
| status | enum32 | Status the order is in right now. | |
| ordertime | int64 | When the order was created | |
| senttime | int64 | NULL-able | When the order was sent to the customer | 
| comments | text | NULL-able | comments made on web form (eg. "urgently needed for dads birthday") | 
| amountpaid | int32 | NULL-able | how much has been paid already (including used vouchers); this is for comparison with the price fields in ticket and voucher tables | 
| shippingcosts | int32 | NULL-able default="0" | shipping price; this is not re-imbursed for orders that have been sent and then cancelled | 
| shippingtype | int32 | NULL-able Foreign-Key=shipping(shipid) | pointer to shipping type (none per default, programmatic default is in config) | 
| tags | string | NULL-able | additional tags for this order, can be used by scripts | 
| couponid | string:32 | NULL-able Foreign-Key=coupon(couponid) | Optional coupon code used on this order. |