Sahih al-Bukhari, Volume 3, Book 35, Hadith 443 (USC-MSA) ⓘ
Narrated Ibn `Abbas: The Prophet came to Medina and the people used to pay in advance the price of dates to be delivered within two or three years. He said (to them), "Whoever pays in advance the price of a thing to be delivered later should pay it for a specified measure at specified weight for a specified period."
حَدَّثَنَا صَدَقَةُ، أَخْبَرَنَا ابْنُ عُيَيْنَةَ، أَخْبَرَنَا ابْنُ أَبِي نَجِيحٍ، عَنْ عَبْدِ اللَّهِ بْنِ كَثِيرٍ، عَنْ أَبِي الْمِنْهَالِ، عَنِ ابْنِ عَبَّاسٍ ـ رضى الله عنهما ـ قَالَ قَدِمَ النَّبِيُّ صلى الله عليه وسلم الْمَدِينَةَ، وَهُمْ يُسْلِفُونَ بِالتَّمْرِ السَّنَتَيْنِ وَالثَّلاَثَ، فَقَالَ " مَنْ أَسْلَفَ فِي شَىْءٍ فَفِي كَيْلٍ مَعْلُومٍ وَوَزْنٍ مَعْلُومٍ، إِلَى أَجَلٍ مَعْلُومٍ " .
also referenced under: Book 35, Hadith 3 (In-Book) & Hadith 2240 (DarusSalam)