Sunan Abi Dawud, Book 24, Hadith 48 (Abu Dawud 3464)

Narrated Ibn 'Abbas:

When the Messenger of Allah (ﷺ) came to Medina, they were paying one, two and three years in advance for fruits, so he said: Those who pay in advance for anything, must do for a specified measure and weight with a specified time fixed.