Are you saying that customer has ordered ItemX 5 Nos and due to manufacturing variabilities you could end up anywhere from 3 Nos to 7 Nos that are produced. Now you have a contract that you can bill the customer for 7 Nos even though the optimum order quantity (from the client’s perspective) is 5 Nos? If this is the scenario, @olamide_shodunke’s solution would work fine if and only if the client allows you to bill for the additional quantities that are produced.
If you can’t bill the additional quantities. You can simply do a Stock Entry purpose: Material Issue and flush out the quantities from your warehouse. If you need to load up the valuation of these items to the quantity that got invoiced, that’s slightly more complicated. Let us know if this is the case before we give you complicated answers down this path!
If you are saying that there are some off shoot items that get produced while manufacturing what the Client has ordered (Like let’s say the client has ordered a Table but with the left over wood/iron you can also make a pen stand) and that your contract with the Client let’s you bill those items to the client (or your contract says that you need to give such items anyways because the client has paid for the material), then the answer is slightly more complicated.
I’m guessing that it’s not a simple answer considering who’s asking the question.