Close a table in variant autocomplete

There was no table closing tag in the variants autocomplete.
Fixes #5396
Show line items for orders that have not advanced to delivery state yet.
Merge remote-tracking branch 'upstream/2-2-stable' into 2-2-stable