{"action":"created","issue":{"url":"https://api.github.com/repos/stevebauman/inventory/issues/16","labels_url":"https://api.github.com/repos/stevebauman/inventory/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/stevebauman/inventory/issues/16/comments","events_url":"https://api.github.com/repos/stevebauman/inventory/issues/16/events","html_url":"https://github.com/stevebauman/inventory/issues/16","id":65773233,"number":16,"title":"Transactions: Sold stock not removed from transaction","user":{"login":"rawcreative","id":1143718,"avatar_url":"https://avatars.githubusercontent.com/u/1143718?v=3","gravatar_id":"","url":"https://api.github.com/users/rawcreative","html_url":"https://github.com/rawcreative","followers_url":"https://api.github.com/users/rawcreative/followers","following_url":"https://api.github.com/users/rawcreative/following{/other_user}","gists_url":"https://api.github.com/users/rawcreative/gists{/gist_id}","starred_url":"https://api.github.com/users/rawcreative/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rawcreative/subscriptions","organizations_url":"https://api.github.com/users/rawcreative/orgs","repos_url":"https://api.github.com/users/rawcreative/repos","events_url":"https://api.github.com/users/rawcreative/events{/privacy}","received_events_url":"https://api.github.com/users/rawcreative/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-04-01T20:32:05Z","updated_at":"2015-04-02T14:10:49Z","closed_at":null,"body":"While going through and checking out v1.5 I noticed that any transaction that is marked as sold is not removed from the transaction. If someone happens to be comparing the quantity_after column on sold transactions to something, all counts will be incorrect. Since the stock is being released, this should be removed from the transaction when it's marked as sold. It technically should create a stock movement but I don't think this is possible since it's already been reduced with the reservation. "},"comment":{"url":"https://api.github.com/repos/stevebauman/inventory/issues/comments/88919991","html_url":"https://github.com/stevebauman/inventory/issues/16#issuecomment-88919991","issue_url":"https://api.github.com/repos/stevebauman/inventory/issues/16","id":88919991,"user":{"login":"rawcreative","id":1143718,"avatar_url":"https://avatars.githubusercontent.com/u/1143718?v=3","gravatar_id":"","url":"https://api.github.com/users/rawcreative","html_url":"https://github.com/rawcreative","followers_url":"https://api.github.com/users/rawcreative/followers","following_url":"https://api.github.com/users/rawcreative/following{/other_user}","gists_url":"https://api.github.com/users/rawcreative/gists{/gist_id}","starred_url":"https://api.github.com/users/rawcreative/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rawcreative/subscriptions","organizations_url":"https://api.github.com/users/rawcreative/orgs","repos_url":"https://api.github.com/users/rawcreative/repos","events_url":"https://api.github.com/users/rawcreative/events{/privacy}","received_events_url":"https://api.github.com/users/rawcreative/received_events","type":"User","site_admin":false},"created_at":"2015-04-02T14:10:49Z","updated_at":"2015-04-02T14:10:49Z","body":"I think that’s perfectly acceptable to have a separate transaction for returns. I would say that in most instances returned stock is treated differently than regular stock anyway since it is not always in a ‘new’ condition, or may be defective, etc. So it could be helpful to separate them for that reason.\n\n\n> On Apr 2, 2015, at 10:06 AM, Steve Bauman <notifications@github.com> wrote:\n> \n> Yea you're right. This needs to be changed to reflect quantity that has actually left the stock, and the sold() method should perform this.\n> \n> I'm not too sure how to go about this though since I'd rather not have to dig into the transaction history to be able to perform a return. However, maybe a returned() transaction can be modified to be a whole new transaction? Thoughts?\n> \n> —\n> Reply to this email directly or view it on GitHub <https://github.com/stevebauman/inventory/issues/16#issuecomment-88918086>.\n> \n\n"}}