The Prophet ﷺ used to send Abdullah bin Rawaha to estimate the yield of the date palms when the fruit had ripened, before any of it was eaten. He would then give the Jews the choice either to take the harvest at that estimated value or to hand it over to the Muslims at that estimated value, so that the zakat could be calculated before the fruits were consumed and dispersed.
حدثنا يحيى بن معين حدثنا حجاج عن ابن جريج قال أخبرت عن ابن شهاب عن عروة
كان النبي ﷺ يبعث عبد الله بن رواحة فيخرص النخل حين يطيب قبل أن يؤكل منه ثم يخير يهود يأخذونه بذلك الخرص أو يدفعونه إليهم بذلك الخرص لكي تحصى الزكاة قبل أن تؤكل الثمار وتفرق