Is it permissible for one to masturbate in order not to commit fornication?
This is called committing the milder of the two evils such as eating a carcass in fear of death, and this happens when committing fornication is very likely to occur.
Is it permissible to fast on behalf of the dead who died owing missed fast to make up?
His relative should fast on his behalf, and it is permissible for the guardians to give permission to non-relatives of the dead to fast on his behalf as well. And Allah Knows Best.
I prayed all the obligatory prayers in congregation, but after finishing the `Isha prayer, I remembered that I had forgotten to pray Dhuhr. What should I do, and is my prayer invalid?
Your prayers are valid, but you must make up the Dhuhr prayer as soon as you remember it, based on the saying of the Prophet (peace be upon him): "Whoever forgets a prayer must pray it as soon as they remember it; there is no expiation for it except this." [Muslim]. And Allah knows best
I work in an accounting and auditing office, and among the clients of the office are restaurants, hotels, and supermarkets that sell alcohol. Our work is limited to collecting invoices, whether purchases, sales, or expenses, and recording them in daily books. We also review income and sales taxes on behalf of these clients.
You are more knowledgeable about the nature of your work. If you see it as assisting in wrongdoing, then it is forbidden, as Allah The Exalted Says (What means): "And cooperate in righteousness and piety, but do not cooperate in sin and aggression" [Al-Ma’idah/2]. However, if your work is merely documenting the reality, then I hope there is no sin upon you. The the pious predecessors (Salaf) used to take the tithe from the traders of the People of the Book, even if it included alcohol, after knowing the value of their goods. And Allah The Almighty Knows Best.