Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:62:11

But when they saw a transaction or a diversion, ˹O Muhammad˺, they rushed to it and left you standing. Say, "What is with Allah is better than diversion and than a transaction, and Allah is the best of providers."  

On one occasion the Prophet (s) was delivering the Friday sermon when a caravan arrived and so, as was the custom, drums were beaten to announce its arrival, whereat the people began to leave the mosque ˹to go to it˺, all except for twelve men. The following ˹verse˺ was then revealed: But when they sight some ˹opportunity for˺ business or a diversion, they scatter off towards it, that is, towards the business, since it is what they seek more than diversion, and leave you, during the sermon, standing. Say: ‘That which is with God, in the way of reward, is better, for those who believe, than diversion and commerce. And God is the best of providers’. They say that every person ‘provides for’ (yarzuqu) his dependants, ˹by which they mean that such a person does so˺ by means of the provision given by God (min rizqi’Llāhi), exalted be He. Medinese, consisting of 11 verses. (Al-Munâfiqûn)
القرآن:٦٢:١١

وَإِذَا رَأَوْا تِجَارَةً أَوْ لَهْوًا انْفَضُّوا إِلَيْهَا وَتَرَكُوكَ قَائِمًا ۚ قُلْ مَا عِنْدَ اللَّهِ خَيْرٌ مِنَ اللَّهْوِ وَمِنَ التِّجَارَةِ ۚ وَاللَّهُ خَيْرُ الرَّازِقِينَ  

{وإذا رأوا تجارةً أو لهوا انفضوا إليها} أي التجارة لأنها مطلوبهم دون اللهو {وتركوك} في الخطبة {قائما قل ما عند الله} من الثواب {خير} للذين آمنوا {من اللهو ومن التجارة والله خير الرازقين} يقال: كل إنسان يرزق عائلته، أي من رزق الله تعالى.

See similar narrations below:

Collected by Nasāʾī's Kubrá
nasai-kubra:1724Aḥmad b. ʿAbdullāh b. al-Ḥakam > Muḥammad b. Jaʿfar > Shuʿbah > Manṣūr > ʿAmr b. Murrah > Abū ʿUbaydah > Kaʿb b. ʿUjrah

[Machine] And Allah, blessed and exalted, said: "And when they see some merchandise or some amusement, they disperse to it and leave you standing." (Surah Al-Jumu'ah, 11)  

الكبرى للنسائي:١٧٢٤أَخْبَرَنَا أَحْمَدُ بْنُ عَبْدِ اللهِ بْنِ الْحَكَمِ قَالَ حَدَّثَنَا مُحَمَّدُ بْنُ جَعْفَرٍ قَالَ حَدَّثَنَا شُعْبَةُ عَنْ مَنْصُورٍ عَنْ عَمْرِو بْنِ مُرَّةَ عَنْ أَبِي عُبَيْدَةَ عَنْ كَعْبِ بْنِ عُجْرَةَ قَالَ دَخَلَ الْمَسْجِدَ وَعَبْدُ الرَّحْمَنِ بْنُ أُمِّ الْحَكَمِ يَخْطُبُ قَاعِدًا فَقَالَ §انْظُرُوا إِلَى هَذَا يَخْطُبُ قَاعِدًا

وَقَالَ اللهُ تَبَارَكَ وَتَعَالَى {وَإِذَا رَأَوْا تِجَارَةً أَوْ لَهْوًا انْفَضُّوا إِلَيْهَا وَتَرَكُوكَ قَائِمًا} [الجمعة 11]