Actually the logic I still not understand I tell you one example
Let say batch no 1 has 100 pieces and batch no 2 has 50. Suppose we made sakes of 150 pieces. I need report which can tell first 100 pieces were of batch no1 and 50 pieces are of batch no2