كتاب الصيام
13  
The Book of Fasting
(16)
Chapter: The reward of the one who does not fast when travelling if he does any tasks that are required
(16)
باب أَجْرِ الْمُفْطِرِ فِي السَّفَرِ إِذَا تَوَلَّى الْعَمَلَ ‏‏
Sahih Muslim 1119 a

Anas (Allah be pleased with him) reported:

We were with the Messenger of Allah (ﷺ) on a journey. Some of us had been observing the fast and some of us had not been fasting. We got down at a place on a hot day. Most of us had the cloth for shelter. There were also those amongst us who sheltered (themselves against the rays of the) sun with the help of their hands. The observers of the fast fell down (on account of weakness). Those who had not observed it got up and pitched tents and watered the mounts. Thereupon the Messenger of Allah (ﷺ) said: The breakers of the fast have taken away the reward today.
حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، أَخْبَرَنَا أَبُو مُعَاوِيَةَ، عَنْ عَاصِمٍ، عَنْ مُوَرِّقٍ، عَنْ أَنَسٍ، - رضى الله عنه - قَالَ كُنَّا مَعَ النَّبِيِّ صلى الله عليه وسلم فِي السَّفَرِ فَمِنَّا الصَّائِمُ وَمِنَّا الْمُفْطِرُ - قَالَ - فَنَزَلْنَا مَنْزِلاً فِي يَوْمٍ حَارٍّ أَكْثَرُنَا ظِلاًّ صَاحِبُ الْكِسَاءِ وَمِنَّا مَنْ يَتَّقِي الشَّمْسَ بِيَدِهِ - قَالَ - فَسَقَطَ الصُّوَّامُ وَقَامَ الْمُفْطِرُونَ فَضَرَبُوا الأَبْنِيَةَ وَسَقَوُا الرِّكَابَ فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ ذَهَبَ الْمُفْطِرُونَ الْيَوْمَ بِالأَجْرِ ‏"‏ ‏.‏
Reference : Sahih Muslim 1119a
In-book reference : Book 13, Hadith 128
USC-MSA web (English) reference : Book 6, Hadith 2484
  (deprecated numbering scheme)