Those people who used to buy foodstuff at random (without weighing or measuring it) were beaten in the lifetime of Messenger of Allah ﷺ if they sold it at the very place where they had bought it, till they carried it to their dwelling places.
عَنْ عَبْدِ اللَّهِ بْنِ عُمَرَ أَنَّهُمْ كَانُوا يُضْرَبُونَ عَلَى عَهْدِ رَسُولِ اللَّهِ ﷺ إِذَا اشْتَرَوْا طَعَامًا جِزَافًا أَنْ يَبِيعُوهُ فِي مَكَانِهِمْ حَتَّى يُئْوُوهُ إِلَى رِحَالِهِمْ