Creating an order
Orders are automatically created as a result of the following operations:
Sales order — after ordering a subscription by an account user via the Customer Control Panel or Storefront, or by a manager via the Operator Control Panel (see Ordering subscriptions).
- Change order — after changing the quantity of additional resources of a subscription via the Customer Control Panel or via the Operator Control Panel (see Upgrading or downgrading subscription resources).
- Switch plan order — after switching the plan of a subscription via the Customer Control Panel or via the Operator Control Panel (see Switching a plan).
- Renewal order — after renewing a subscription via the Customer Control Panel, or via the Operator Control Panel, or automatically (if the Auto-renew option is activated for a subscription) (see Renewing a subscription).
- Prolong order — after renewing a subscription via the Customer Control Panel, or via the Operator Control Panel, or automatically (regardless of the Auto-renew option of a subscription) (see Prolonging a subscription).
When the Order created event is triggered (see Creating an event handler), a PDF invoice for the order is attached to an email notification (see Creating a notification template). The PDF file is generated using a template specified in the account type (see Creating an account type) in the default payment method based on the CheckCash plugin. If the default payment method is not specified, the PDF invoice is not attached.
The order amount and charge amounts are rounded to two decimal places. In some cases, when applying a discount, this may lead to a discrepancy between the order amount and the charge amounts for a subscription. To avoid this discrepancy, rounding and applying discounts for the order amount and the charge amounts are performed using a special algorithm (see Specifics of orders and charges amounts calculation and rounding when a discount is applied).
If the system settings are configured to complete all payments automatically (see General system settings), all linked orders are also completed automatically after creating.