وَدَاوُودَ وَسُلَيْمَانَ إِذْ يَحْكُمَانِ فِي الْحَرْثِ إِذْ نَفَشَتْ فِيهِ غَنَمُ الْقَوْمِ وَكُنَّا لِحُكْمِهِمْ شَاهِدِينَ{78} فَفَهَّمْنَاهَا سُلَيْمَانَ وَكُلّاً آتَيْنَا حُكْماً وَعِلْماً وَسَخَّرْنَا مَعَ دَاوُودَ الْجِبَالَ يُسَبِّحْنَ وَالطَّيْرَ وَكُنَّا فَاعِلِينَ{79}الأنبياء.اذكر حكم كل من داوود وسليمان عليهما السلام في قضية الغنم .
واذكر - أيها الرسول - نبي الله داود وابنه سليمان, إذ يحكمان في قضية عرَضَها خصمان, عَدَت غنم أحدهما على زرع الآخر, وانتشرت فيه ليلا فأتلفت الزرع, فحكم داود بأن تكون الغنم لصاحب الزرع ملْكًا بما أتلفته, فقيمتهما سواء, وكنَّا لحكمهم شاهدين لم يَغِبْ عنا. فَفَهَّمنا سليمان مراعاة مصلحة الطرفين مع العدل, فحكم على صاحب الغنم بإصلاح الزرع التالف في فترة يستفيد فيها صاحب الزرع بمنافع الغنم من لبن وصوف ونحوهما, ثم تعود الغنم إلى صاحبها والزرع إلى صاحبه; لمساواة قيمة ما تلف من الزرع لمنفعة الغنم.
حكم داوود وسليمان في الغنم
Remember, O Messenger, the prophet David and his son Solomon, who judged a case between two disputants. One's sheep had trampled the other's crop at night, destroying it. David ruled that the sheep should belong to the owner of the crop as compensation for the damage, with both sides being equal in value. We were witnesses to their judgment, which was not hidden from us. Solomon understood the need to consider the benefit of both parties while maintaining justice. He ruled that the owner of the sheep should repair the damaged crop within a period that would allow the owner of the crop to benefit from the sheep's milk, wool, and other such benefits. Then, the sheep would return to its owner, and the crop to its owner, with the value of the damaged crop being equal to the benefit derived from the sheep.
David and Solomon's ruling on the sheep
Recall the judgment of both David and Solomon (peace be upon them) in the case of the lost livestock. (An-Naml 27:16-17)
Quran Surah 21 Ayah 78:
And (Also Call To Mind The Account Of) Dawud (David) And Sulayman (Solomon) When Both Of Them Were To Decide (The Dispute) Of A Crop When The Goats Of A Tribe, Unattended By The Shepherd, Entered The Field At Night (And Destroyed It). And We Were Witnessing Their Judgment.

Quran Surah 21 Ayah 79:
So We Alone Taught Sulayman ([Solomon] The Way To Make That Judgment) And Blessed Them All With Reason And Knowledge. And We Made (Even) The Mountains And The Birds Subservient To (The Command Of) Dawud (David). They All Celebrated (Our) Praise (With Him Jointly). And It Was We Who Were Doing (All This).
[{"index": 593, "q_src_id": 567, "surah": 21, "ayah": 78, "ayah_en": "And (Also Call To Mind The Account Of) Dawud (David) And Sulayman (Solomon) When Both Of Them Were To Decide (The Dispute) Of A Crop When The Goats Of A Tribe, Unattended By The Shepherd, Entered The Field At Night (And Destroyed It). And We Were Witnessing Their Judgment."}, {"index": 593, "q_src_id": 567, "surah": 21, "ayah": 79, "ayah_en": "So We Alone Taught Sulayman ([Solomon] The Way To Make That Judgment) And Blessed Them All With Reason And Knowledge. And We Made (Even) The Mountains And The Birds Subservient To (The Command Of) Dawud (David). They All Celebrated (Our) Praise (With Him Jointly). And It Was We Who Were Doing (All This)."}]