Why not make use the of the move transactions function to keep the batches in the required order as new invoices are added?