Sylius/Sylius — pull request #904 by umpirsky (2014-01-24 13:09:12+00:00)
Title: Fixed unique order number error

Order with latest `completedAt` value, is not always order with greatest order number. That is why you can get:

```
An exception occurred while executing 'UPDATE sylius_order SET number = ?, completed_at = ?, updated_at = ? WHERE id = ?' with params ["000000048", "2014-01-24 13:06:05", "2014-01-24 13:06:05", 52]:

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '000000048' for key 'UNIQ_6196A1F996901F54'
```

This should be fixed now.