All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
Whoever is in charge of running the inheritance has the right to deduct what he had spent on it provided he proves that with legal evidence.
In principle, he should deduct what was spent on the inheritance and consumed for its benefit before the division of inheritance, because it is like a debt; he should start with it first and then the remainder of the inheritance should be divided among the inheritors.
Nonetheless, it is also permissible for him to divide the inheritance among the inheritors first and then he should divide whatever he spent on it on the heirs according to the share of each person in it [inheritance]; in which case, a person who has two shares in the inheritance, should bear two shares of the expenses, and so forth.
Allah Knows best.