I have worked in a grocery store that sells halal and haram items like pork. I worked there as a cashier for 2 months. After leaving my job, I used almost 70% of my earnings to buy a laptop to help me in my schoolwork. The remaining income is now mixed with my other work, which is halal. I want to know that if my income was haram? Because I have heard that it was haram, and some said part of it was haram. Is it permissible for me to use my laptop? I cannot return my laptop now and I want to sincerely repent. Should I give away the rest of my money?
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, sallallaahu 'alayhi wa sallam, is His slave and Messenger.
In general, there is nothing wrong with your previous work in the grocery store because it is a permissible work and you were not specifically hired to sell pork; rather that was part of the store’s inventory and merchandise.
It was necessary for you to avoid selling pork or any forbidden items. However, this doesn't make your salary from that lawful (halaal) job a forbidden income; rather it contains a percentage of unlawful (haram) according to your work in selling what is forbidden.
In any case, there is no harm in benefiting from the device you purchased with the earnings from your previous job.
If you were ignorant of the prohibition of such a sale and repented to Allah the Almighty, then you are not obliged to get rid of any portion of your salary and we ask Allah to forgive you. If you wish to be on the safe side, consider the percentage of your salary that you think most likely corresponds to the unlawful earnings from selling pork or other forbidden items and give away that percentage to the poor and the needy. The Jurisprudential Encyclopedia reads: ‘If a Muslim's money is mixed, consisting of both lawful (halal) and unlawful (haram) earnings, and it cannot be distinguished, the majority of jurists agree that the person holding such money must give away the amount equivalent to the unlawful (haram) portion and give it to its rightful recipient and the remaining portion in his possession is lawful (halal).’
Allah knows best.
You can search for fatwa through many choices