Some Muslims here in Britain accumulate their wealth from both halaal and haraam sources, because they are businessmen and some of the things they sell are alcohol and pork. They vary in the extent to which they do that. In some cases most of the person’s wealth comes from haraam sources and in some cases only a little of his earning is haraam. Is it permissible for us Muslims to mix with them and eat their food if they invite us? Is it permissible for us to accept their donations from this wealth for the mosque?.
You have to advise them and warn them of the evil consequences of dealing in haraam things and earning money from haraam sources. You should cooperate with your brothers in reminding them and warning them of the punishment of Allaah and how severely He deals with those who disobey Him. You should tell them that the pleasures of this world are insignificant, and that the Hereafter is better and more lasting. If they respond, then praise be to Allaah, and they will become thereby your brothers in Islam. Then you should advise them to restore the rights of those whom they have wronged, if they know who they are, and to follow up bad deeds with good, so that Allaah may accept their repentance and turn their bad deeds into good. In that case it will be permissible for you to mix with them as brothers and to eat their food, and to accept their donations for building and furnishing the mosque, etc, because by repenting and restoring people’s rights it is possible that they may be forgiven for what they did in the past, because Allaah says concerning those who deal in riba [usury] (interpretation of the meaning):
“So whosoever receives an admonition from his Lord and stops consuming Ribaa, shall not be punished for the past”
If they refuse to heed the advice and reminders, and they persist in their haraam actions, then you have to forsake them for the sake of Allaah, and not accept their invitations or accept their donations, as a rebuke to them, and in the hope that they will give up their evil ways.
And Allaah is the Source of strength.