What
      should be done with samples left over from quality-control testing?
Question

                Various samples of cheeses, juices, nuts, meats, perfumes, dairy products etc. come to our laboratory. In some cases the samples are more than is required for testing. For example, a carton of juice holds 30 boxes, and the tests require only 5 boxes. There are many similar examples. Is it permissible for the lab technicians to take them or give them to some deserving people? Knowing that leaving them until all the lab and customs procedures are completed would mean that they may go off and have to be thrown out, and, moreover, many of the traders never come and ask about the rest of their samples.
Praise be to Allah.Firstly:
      those who are responsible for requesting samples for quality-control
      testing must ask for the amount that is usually sufficient for testing,
      and not ask for or accept more than what is needed.
Secondly:
      in cases where only some of the amount given is sufficient, whatever is
      left over must be handed back to its owner. His address should be written
      down on the sample, and an appointment should be made to give back
      whatever is left over from the tests. A name of a contact person and an
      address should also be obtained, so that the goods may be returned.
Thirdly:
      in the event that the owner of the goods or his representative does not
      keep the appointment, and there is the fear that the samples may go off,
      then they may be sold and the money raised should be given to Bayt
      al-maal al-Muslimeen (the treasury of the Islamic state). If they
      cannot be sold, they should be given away to the people who are usually
      taken care of by the bayt al-maal.