Add Serial No quantity warning!

In Purchase Reciept, for a item with serial number when i try to add serial number for that item a popup is displayed to enter the serial numbers.
For example below I have attached a image for a item in purchsae reciept having quantity of 8.

Then in Add serial popup if I add only 5 serial numbers and create it the quantity in the purchase reciept item table gets changed to 5

After adding serial numbers the quantity automatically gets changed.

To avoid errors happening like this i need to a field in the add serial no popup showing the total serial numbers added and the quantity of the item in the purchase reciept and also a warning message if the serial numbers entered in less than the original quantity.

Is there anyway to do it?