Reward for
    planting: who gets it and when does it end?
Question

                What is the ruling on one who plants
      something, then he dies and the plants go to his heir? Who gets the reward? If some of the
      fruits of these plants are taken wrongfully during the lifetime of the one who planted
      them, is it better for him to forgive the person who took it, or to leave it as a debt
      owed by that person? If his heir does not forgive that person or accept any compensation,
      and the debt remains until the Day of Resurrection, who will be able to demand it from him
      on that Day – the original planter or the heir?
Praise be to Allah.The one who planted it will have an ongoing reward from
    the time he planted it until the plants die. The heir will have the reward for whatever of
    its fruit is eaten during the time when the plants are under his care, so long as it is
    taken without his objection.
Whatever fruits are taken, it is better to forgive than to leave it as
    a debt. But if he does not forgive, then both the deceased and his heir will be rewarded
    for whatever is eaten, from the time the payment is due until it is finally paid. As for
    demanding restitution on the Day of Resurrection, priority will be given to the rights of
    the one from whom it was taken by force. It was said that it will be given to the final
    heir in the direct line of descent. This does not apply only the case of plants, but also
    in the case of everything that was owed and was not paid off. This ruling applies in all
    such cases. And Allaah knows best.