Fix #4: 500 error on /modules/api/glaccounttypes
tests: restore test for Fix #4
Merge pull request #5 from cambell-prince/bug/4

Fix #4: 500 error on /modules/api/glaccounttypes
Moved set_global_connection call so that it is always called early on in the session startup.
tests: /modules/api/inventory CRUD tests
Fix #6: Delete /modules/api/inventory/id fails

- Changed the post delete check to use the given $id from the url
  rather than the stock_id from the request body (which is likely
  not present).