Exchanging Goods: The Golden Rule (Hadith No. 1789)

Bismillah.
Volume 3, Book 34, Number 294:
Narrated Abu Said (radiallaahu `anhu):
We used to be given mixed dates (from the booty) and used to sell (barter) two Sas of those dates) for one Sa (of good dates). The Prophet (sallallaahu `alayhi wasallam) said (to us), "No (bartering of) two Sas for one Sa nor two Dirhams for one Dirham is permissible", (as that is a kind of usury).
Bilaal (may Allaah be pleased with him) brought some good dates to the Prophet (peace and blessings of Allaah be upon him) and he said to him: “Where did these come from?” Bilaal said: “We had some bad dates and I paid two saa’s of them for a saa’ so that the Prophet (peace and blessings of Allaah be upon him) might have some of it.” The Messenger of Allaah (peace and blessings of Allaah be upon him) said: “Oh! Do not do that, (it is) the essence of riba, the essence of riba.” Narrated by al-Bukhaari, 3212. 
The Messenger (peace and blessings of Allaah be upon him) stated that giving more when equal amounts should be exchanged because of the difference in quality is the essence of riba, and it is not permissible to do that. But the Messenger of Allaah (peace and blessings of Allaah be upon him), as was his wont, pointed out the permissible way. The Prophet (peace and blessings of Allaah be upon him) told him to sell the bad dates for money (dirhams) and then buy the good dates with the money.