A dead person prays in a place other than his prayer

If he sees a dead person as if he was praying in a place other than the place of his prayer in which he used to pray during the days of his life, then its interpretation is that he reached to him the reward of a work that he used to do during his life, or the reward of an endowment that he stopped and gave in charity.