finished fixing relationship issues and corrected how items were looked ...

...up via invoice item. Also added integration test.