During the reign of akbar, birbal's wisdom was known to all. Many ministers in akbar's court were jealous of him and one of them was akbar's brother-in-law. He request akbar to remove birbal from his ministry and appoint him in his place. Birbal got to know about it. Before akbar could decide, birbal resigned from his ministry and left. Akbar decided to test his new minister. So he called him and gave him three hundred coins saying, "Spend these coins in such a way that I get hundred coins in this life, another hundred after life in other world and left hundred coins neither here nor in other world.."New minster was confused. He couldn't think of any solution and spent endless night worrying about it. He felt hopeless, seeing this his wife advised him to go to birbal. So, at last he went to birbal for help. When minister went to birbal for solution he said to him, "Give me coins and I will handle the rest."Next day birbal went out with those coins. On his way he noticed rich merchant celebrating his son's wedding. Birbal went to him. Birbal gave a hundred gold coins to him and bowed courteously saying, "Emperor akbar sends you his good wishes and blessings for the wedding of your son. please accept the gift he has sent."Merchant felt honored to receive gift from emperor, so he honored birbal and gave large number to expensive gift as return gifts for the emperor. Next, birbal went to place where poor lived. He bought cloths and food with hundred coins and distributed them in the name to emperor. With left hundred coins he organized a music and dance concert for everyone. Next day birbal entered akbar's court and announced that the king had asked his brother-in-law to do. Birbal told him about all the events. Akbar asked him to explain. Birbal replied, "The money I gave to the merchant for the wedding of his son - you have got back while on this earth. the money I spent on buying food and clothing for the poor - you will get it in the other world. the money I spent on the musical concert - you will get neither here nor there."Akbar's new minister understood his mistake and resigned to give birbal his place back. 
Money you spend on friends is returned or reciprocated in some form. Money spent on charity gets converted into blessings from god which will be your eternal property. Money spent on pleasures is just frittered away. 