Abu Hurairah (may Allah be pleased with him) narrates that the Messenger of Allah (peace and blessings of Allah be upon him) said: "When you see a person buying or selling in the mosque, say: May Allah not grant profit in your trade. And when you see a person searching for a lost item in the mosque (announcing it), say: May Allah not return your item to you." __REF_N__ Imam Tirmidhi says: 1- The hadith of Abu Hurairah (may Allah be pleased with him) is Hasan Gharib, 2- Some people of knowledge act upon this, they consider buying and selling in the mosque to be impermissible. This is also the opinion of Ahmad and Ishaq bin Rahwayh, 3- Some people of knowledge have permitted buying and selling in this matter. __XREF_N__
Hadith Referenceسنن ترمذي / كتاب البيوع عن رسول الله صلى الله عليه وسلم / 1321