When you create a transaction, items get entered based on entry date rather than item number. However, there is a way to re-sort the items on a transaction. This wiki will walk you through how to do this. Although this document shows how to do this on an order, it can be applied to any transaction.
Click the edit button to enter edit mode.
In edit mode, double click on the product column.
The products will now be re-sorted.
Assign each product a line number corresponding to the order you want the items to appear by clicking the line column.
When you save the transaction after clicking the save button, the re-assortment will also get saved.