When modifying an item in an order, the order code was not correctly filled or cleared

When modifying an item in an order, the order code was not correctly filled or cleared.