Update order state chart

This commit is contained in:
Raphael Michel
2021-02-15 09:38:13 +01:00
parent c65b2aa4f8
commit 938d84b251
3 changed files with 40 additions and 16 deletions

View File

@@ -82,11 +82,15 @@ Orders
^^^^^^ ^^^^^^
If a customer completes the checkout process, an **Order** will be created containing all the entered information. 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 .. 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. * An order is considered **canceled (with paid fee)** if it is in **paid** status but does not include any non-cancelled positions.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 93 KiB

View File

@@ -1,19 +1,39 @@
@startuml @startuml
Pending: Order is expecting payment\nOrder reduces quotas state "Approval Pending" as AP
Expired: Payment period is over\nOrder does not affect quotas state "Canceled (with paid fee)" as CP
Paid: Order was successful\nOrder reduces quotas AP: status = "n"
Canceled: Order has been canceled\nOrder does not affect quotas 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: order placed\ntotal > 0
Pending --> Expired: automatically\nor manually\non admin action [*] -> Paid: order placed\ntotal = 0
Expired --> Paid: if payment is received\nonly if quota left [*] -> AP: order placed\napproval required
Expired --> Canceled Pending --> Paid: order paid
Expired --> Pending: manually\non admin action Pending --> Expired: after payment\ndeadline
Paid --> Canceled: manually on\nadmin action\nor if an external\npayment provider\nnotifies about a\npayment refund Expired --> Paid: order paid\n(only if quota left)
Pending --> Canceled: on admin or\ncustomer action Expired -[dashed]-> Canceled
Paid -> Pending: manually on admin action Expired -[dashed]-> Pending: order extended
[*] --> Paid: customer\nplaces free order 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 @enduml