diff --git a/doc/development/concepts.rst b/doc/development/concepts.rst index 3018addb4d..0632743760 100644 --- a/doc/development/concepts.rst +++ b/doc/development/concepts.rst @@ -82,11 +82,15 @@ Orders ^^^^^^ If a customer completes the checkout process, an **Order** will be created containing all the entered information. -An order can be in one of currently four states that are listed in the diagram below: +An order can be in one of currently six states that are listed in the diagram below: .. image:: /images/order_states.png -There are additional "fake" states that are displayed like states but not represented as states in the system: +The dotted lines represent status changes that usually do not happen as part of the regular process, but can be +performed manually in the admin backend. + +For historical reasons, there are only four valid values of the ``status`` field, and the two additional states are +represented differently: * An order is considered **canceled (with paid fee)** if it is in **paid** status but does not include any non-cancelled positions. diff --git a/doc/images/order_states.png b/doc/images/order_states.png index 84e9b0eb1d..4c5cc4a3c8 100644 Binary files a/doc/images/order_states.png and b/doc/images/order_states.png differ diff --git a/doc/images/order_states.puml b/doc/images/order_states.puml index 5465725af9..a1ef55fac3 100644 --- a/doc/images/order_states.puml +++ b/doc/images/order_states.puml @@ -1,19 +1,39 @@ @startuml -Pending: Order is expecting payment\nOrder reduces quotas -Expired: Payment period is over\nOrder does not affect quotas -Paid: Order was successful\nOrder reduces quotas -Canceled: Order has been canceled\nOrder does not affect quotas +state "Approval Pending" as AP +state "Canceled (with paid fee)" as CP +AP: status = "n" +AP: require_approval = true +Pending: status = "n" +Pending: require_approval = false +Pending: Tickets reserved: yes +Expired: status = "e" +Expired: Tickets reserved: no +Paid: status = "p" +Paid: count(positions | !canceled) > 0 +Paid: Tickets reserved: yes +CP: status = "p" +CP: count(positions | !canceled) = 0 +Canceled: status = "c" +Canceled: Tickets reserved: no -[*] --> Pending: customer\nplaces order -Pending --> Paid: successful payment -Pending --> Expired: automatically\nor manually\non admin action -Expired --> Paid: if payment is received\nonly if quota left -Expired --> Canceled -Expired --> Pending: manually\non admin action -Paid --> Canceled: manually on\nadmin action\nor if an external\npayment provider\nnotifies about a\npayment refund -Pending --> Canceled: on admin or\ncustomer action -Paid -> Pending: manually on admin action -[*] --> Paid: customer\nplaces free order + +[*] -> Pending: order placed\ntotal > 0 +[*] -> Paid: order placed\ntotal = 0 +[*] -> AP: order placed\napproval required +Pending --> Paid: order paid +Pending --> Expired: after payment\ndeadline +Expired --> Paid: order paid\n(only if quota left) +Expired -[dashed]-> Canceled +Expired -[dashed]-> Pending: order extended +Paid --> Canceled: order canceled +Pending --> Canceled: order canceled +Paid -[dashed]-> Pending: refund +AP --> Pending: order approved +AP --> Canceled: order denied +Paid --> CP: order canceled\n(with cancellation fee) +Canceled -[dashed]-> Pending: order reactivated +Canceled -[dashed]-> Paid: order reactivated +CP -[dashed]-> Canceled: fee canceled @enduml