Scan Barcode for Multiple Batch dynamically

Suppose I have a 3 batch for my item pen-001. I am generating barcode using serial no. So every item has a barcode.
So now I have a sales order for the item pen-001 with 10qty. When I am creating Delivery Note from that Sales Order I use barcode scanner.
The Problem is user wants to scan barcode from different different Batch data. How to handle this. I dont want to show the pop-up for update item when using barcode.

I have done this from my codebase. As if we insert serial no from different batch using scan barcode it creates a new row. I just have to pass the reference and make some validation.