It's only a visual bug, but it's really frustrating when you aren't attentive.
Here are the steps to be followed:
1. Be sure you don't have enough money to pay all your mercs in a mission.
2. Go to a dungeon(mercenaries are selected from previous fights).
3. Click to fight the battle.
4. Notice that the hero fights alone, without any merc.
I don't know how this can be changed, it wouldn't be too nice if we have to select the mercs for every battle.
Maybe some message which tells you that you don't have money for the mercs, I don't know.