Those people who used to buy foodstuff at random (without weighing or measuring it) were…

Sahih al-Bukhari Book 86 Hadith 75

Sahih al-Bukhari #6852

Limits and Punishments set by Allah (Hudood) 86:75

Narrated `Abdullah bin `Umar:

Those people who used to buy foodstuff at random (without weighing or measuring it) were beaten in the lifetime of Allah's Messenger (ﷺ) if they sold it at the very place where they had bought it, till they carried it to their dwelling places.

Chapter: What punishment may be inflicted on the person so that they may not commit the same sin again, or so that they may learn good manners

Grade: Sahih