"When the Prophet ﷺ arrived in Al-Madinah, they were paying in advance for fruits. So he said: 'Whoever pays in advance, then let him pay in advance for known measurements (of dates), and known weights for a specified period of time.'" He said: There are narrations on this topic from Ibn Abi Awfa and 'Abdur-Rahman bin Abza.
قَدِمَ رَسُولُ اللَّهِ ﷺ الْمَدِينَةَ وَهُمْ يُسْلِفُونَ فِي الثَّمَرِ فَقَالَ مَنْ أَسْلَفَ فَلْيُسْلِفْ فِي كَيْلٍ مَعْلُومٍ وَوَزْنٍ مَعْلُومٍ إِلَى أَجَلٍ مَعْلُومٍ قَالَ وَفِي الْبَابِ عَنِ ابْنِ أَبِي أَوْفَى وَعَبْدِ الرَّحْمَنِ بْنِ أَبْزَى