"He (the Prophet) purchased a calf from a caravan, but he had no money with him. He then sold it with some profit and gave the profit in charity to the poor and widows of Banu 'Abd al-Muttalib. He then said: I shall not buy anything after this but only when I have money with me.
Sunan Abi Dawud Book 23, Hadith 19