Sunan an-Nasa'i, Volume 5, Book 42, Hadith 4294 (DarusSalam) ⓘ
It was narrated from Abu Hurairah that the Messenger of Allah said: "Whoever keep s dog except a dog for hunting, farming or herding livestock, on e Qurat will be deducted from his good deeds each day."
أَخْبَرَنَا إِسْحَاقُ بْنُ إِبْرَاهِيمَ، قَالَ أَنْبَأَنَا عَبْدُ الرَّزَّاقِ، قَالَ حَدَّثَنَا مَعْمَرٌ، عَنِ الزُّهْرِيِّ، عَنْ أَبِي سَلَمَةَ، عَنْ أَبِي هُرَيْرَةَ، عَنْ رَسُولِ اللَّهِ صلى الله عليه وسلم قَالَ " مَنِ اتَّخَذَ كَلْبًا إِلاَّ كَلْبَ صَيْدٍ أَوْ زَرْعٍ أَوْ مَاشِيَةٍ نَقَصَ مِنْ عَمَلِهِ كُلَّ يَوْمٍ قِيرَاطٌ " .
also referenced under: Hadith 4289 (Reference) & Book 42, Hadith 27 (In-Book)