Sunan Ibn Majah, Book 6, Hadith 1584 (In-Book) ⓘ
It was narrated that Abu Hurairah said: “The Messenger of Allah said: ‘Whoever offers the funeral prayer in the mosque will have nothing (i.e., no reward).’”
حَدَّثَنَا عَلِيُّ بْنُ مُحَمَّدٍ، حَدَّثَنَا وَكِيعٌ، عَنِ ابْنِ أَبِي ذِئْبٍ، عَنْ صَالِحٍ، مَوْلَى التَّوْأَمَةِ عَنْ أَبِي هُرَيْرَةَ، قَالَ قَالَ رَسُولُ اللَّهِ ـ صلى الله عليه وسلم ـ " مَنْ صَلَّى عَلَى جِنَازَةٍ فِي الْمَسْجِدِ فَلَيْسَ لَهُ شَىْءٌ " .
also referenced under: Hadith 1517 (Reference) & Volume 2, Book 6, Hadith 1517 (DarusSalam)