FIFO need be the main rule must of the time. If I sort by quantity eventually I will have the same problem. Old batches with small quantities. Since new batches are always bigger than old batches.
I think, I will have to change the process. Trigger analysis when the delivery qty is not the same as the confirmed qty in batches.