Transaction CreateOrder
Authentication mode: Checked (known user, must have the privilege)
Database access mode: updating
CreateOrder creates orders that are queued to be executed immediately or sales that are marked executed and paid for immediately; they may contain tickets, vouchers, or shopping items
Inputs:
- cart: CartOrder
The cart contents
- issale: bool
true if this is a sale, false if this is an order
- vouchers: List:string
an optional list of vouchers to be used in this order for payment (coupon is in the cart instead)
Outputs:
- order: Order
If successful: the created order
- vouchers: List:Voucher
If vouchers were used: the current state of the vouchers after creating (and paying) the order
- paidcash: int
If this is a sale: the amount paid in cash (in cents)
- cart: CartOrder
If unsuccessful: the cart with annotations
Privileges
- AnyVoucherValue
users with this privilege can create vouchers with arbitrary value
- DiffVoucherValuePrice
users with this privilege can create vouchers with a price (what the customer pays) different from its value (what the customer can buy with it)
- LateSale
users with this privilege can sell/order tickets until the event is over, otherwise a configurable limit applies
- AfterTheFactSale
users with this privilege can sell tickets for past events - be careful to give this privilege only to very few special users, it is an invitation to mistakes!
- CanOrder
users with this privilege may use this transaction to create orders
- CanSell
users with this privilege may use this transaction to create sales
- CanOrderTicket
users with this privilege may put tickets into orders
- CanOrderVoucher
users with this privilege may put vouchers into orders
- CanOrderItem
users with this privilege may put shop items (merchandise) into orders
- CanPayVoucherWithVoucher
users with this privilege may pay for vouchers with other vouchers