During the time of the Messenger of Allah ﷺ, people would be punished if they bought food in bulk and then sold it on the spot before transporting it to their own quarters.
حدثنا عبد الأعلى عن معمر
أنهم كانوا يضربون على عهد رسول الله ﷺ إذا اشتروا طعاما جزافا أن يبيعوه في مكانه حتى يؤووه إلى رحالهم
Its chain of transmission is sahih. Abu Dawud narrated it (300) by way of Abdul-Razzaq from Maamar. Munziri said, Bukhari, Muslim, and Nasai also narrated it, see (3496).Al-jizaf, with the jim vowelled either damma or kasra, and al-jizafah, with damma, means selling or buying something without weighing or measuring it, and it relates to leniency in the transaction. So it is stated in Lisan.