Fix portofolio bugs
1. when changing portfolio setting from manual to automatic a long error message is received that an SQL command was missing.
2. If you try to purchase a security in a portifolio that is set to automatic you get a selection screen. If you select post the transaction and stay in automatic mode you get an error message.