problem: we recognise on Sales Orders, users has available always all actions on sales orders for example: user able to Close and Complete Sales Order from status Invalid, but this is not covered in code. Users select Complete but no code behind from Invalid. So call to support.
If user go back to valid-handled status code well - in our case prepare - then able to complete sales order.
solution: Refactor this and all use cases and remove none valid statuses or improve code to handle cases.
Closing as potential idea