That was credited to him for tzadaqah (righteousness), for all dawar (generation / age / period) to come.