Updated Email Features, and stuff

Emailing when there is quotation or reservation happening. Refactored
quote count function. Add error handling for stock report template.