A Question Comparing Sadqa And Salah
The same principle is applied to the second example. The person if he receives money for his charity work, it does not nullify his good deed.
no such mathematics is done by God. A charity is a charity. an unexpected benefit is not haram to take. however, a person may want to attain a higher status of piety, he may not like to accept it. that is better, but it is better, not the only choice.