Asampadāna Jātaka (No.131)
The Bodhisatta was born in Rājagaha and became known as Saṅkhaseṭṭhi, worth eight hundred million. He had a friend, Pīḷiyaseṭṭhi, in Bārāṇasī, who was equally wealthy. Pīḷiya having lost all his wealth, sought the assistance of Saṅkha, who gave him one-half of all his possessions. Later, Saṅkha, himself becoming bankrupt, went with his wife to Bārāṇasī to seek help from Pīḷiya; the latter, however, dismissed him with half a quarter of pollard. On the way back Saṅkha was recognised by an erstwhile servant of his whom he had given to Pīḷiya. This servant befriended Saṅkha and his wife, and with the help of his companions, brought to the king’s notice Pīḷiya’s ingratitude. The king, having tried the case, wished to give all Pīḷiya’s wealth to Saṅkha, but at the latter’s request restored to him only what he had, in days of prosperity, given to Pīḷiya.
The story is related in reference to Devadatta’s ingratitude. J.i.465‑9.