Sales/Purchases Transactions

Added pages to create new Sales and Purchases to add to the database.
Some other code fixes and cleanup.