Any runs scored off leg byes/bye will go in the appropriate extras column.
Have a look at the attached example score card. It shows leg byes and byes with a triangle, the dots within the triangle denote how many runs were scored. If you add up the score of each batter, you'll notice that even though the byes/leg byes are noted next to their name, they're not added to their score.
I've attached the bowling analysis, so you can see how it's recorded in the bowler's section.