Click on Won/Lost from the 3-dot icon in the pipeline view or from the won/lost stars on top of the deal in the right side panel to close the qualified deal. 

Once the deal is closed it gets moved to the order section, where you also can change between won/lost if necessary.

This is done regardless of what stage the deal is in or what activities that have been marked as done before setting the deal as won/lost.