There was an incident involving King Munbaz (see Bava Batra 11a:3,
Y. Peah I.1.19), who went and gave away all of his treasures [to the poor] in the years of drought, and his brothers said to him, "Your ancestors stored up treasures, and added to those of their fathers, and you went and gave away all your treasures, and those of your fathers." He said to them, "My ancestors stored treasures below, but I stored treasures above, as it is written (Psalms 85:12), 'Truth will spring out of the earth [and righteousness will look down from heaven].' My ancestors stored treasures in a place that a [human] hand can reach, but I stored treasures in a place that no hand can reach, as it says (Psalms 89:15), 'Righteousness and justice are the foundation of Your throne.' My ancestors stored treasures that do not bear fruit (i.e., generate profit), but I stored treasures that do bear fruit, as it says (Isaiah 3:10), 'Say of the righteous, that it shall be well [with them, for they shall eat the fruit of their doings].' My ancestors stored treasures of money, whereas I am storing treasures of souls, as it says (Proverbs 11:30), 'The fruit of the righteous is a tree of life, and he that wins souls is wise.' My ancestors stored treasures for others, whereas I am storing treasures for myself, as it says (Deut. 24:13), 'And it shall be as righteousness to you before Hashem your God.' My ancestors stored treasures for this world, whereas I am storing treasures for the world to come, as it says (Isaiah 58:8), 'And your righteousness shall go before you, [the glory of the Lord shall be your rearguard].'" Charity and kind deeds are as important as all commandments of the Torah. Charity applies to the living, works of lovingkindness apply to the living and the dead. Charity applies to the poor, works of lovingkindness apply to the poor and the rich. Charity is [performed] through a person's money, works of lovingkindness through his money and his person. (
Y. Peah I.1.20, following Guggenheimer tr.).