The problem here is not underbidding as much as it is clearly communicating what work is included in that price. It sounds like the customer and yourself were clearly on separate pages. I learned the hard way to make sure things are excruciating clear. Some people are terrible at conveying what they actually want done. They have an idea in their head but never get it out their mouth and when you just say OK here is the price they expect something done that you really have no idea about. Some people are just PITA customers and there will always be those who try and get something for nothing.
We email all estimates, even if we provide an estimate on site we email a hard copy when we get to the office so we have a record of what the scope of work entails. Again you must be specific