{"action":"created","issue":{"url":"https://api.github.com/repos/uzerpllp/migration-testing/issues/83","labels_url":"https://api.github.com/repos/uzerpllp/migration-testing/issues/83/labels{/name}","comments_url":"https://api.github.com/repos/uzerpllp/migration-testing/issues/83/comments","events_url":"https://api.github.com/repos/uzerpllp/migration-testing/issues/83/events","html_url":"https://github.com/uzerpllp/migration-testing/issues/83","id":119181147,"number":83,"title":"Sales Invoice created for customer on stop","user":{"login":"steveblamey","id":297376,"avatar_url":"https://avatars.githubusercontent.com/u/297376?v=3","gravatar_id":"","url":"https://api.github.com/users/steveblamey","html_url":"https://github.com/steveblamey","followers_url":"https://api.github.com/users/steveblamey/followers","following_url":"https://api.github.com/users/steveblamey/following{/other_user}","gists_url":"https://api.github.com/users/steveblamey/gists{/gist_id}","starred_url":"https://api.github.com/users/steveblamey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steveblamey/subscriptions","organizations_url":"https://api.github.com/users/steveblamey/orgs","repos_url":"https://api.github.com/users/steveblamey/repos","events_url":"https://api.github.com/users/steveblamey/events{/privacy}","received_events_url":"https://api.github.com/users/steveblamey/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/uzerpllp/migration-testing/labels/Sales","name":"Sales","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"steveblamey","id":297376,"avatar_url":"https://avatars.githubusercontent.com/u/297376?v=3","gravatar_id":"","url":"https://api.github.com/users/steveblamey","html_url":"https://github.com/steveblamey","followers_url":"https://api.github.com/users/steveblamey/followers","following_url":"https://api.github.com/users/steveblamey/following{/other_user}","gists_url":"https://api.github.com/users/steveblamey/gists{/gist_id}","starred_url":"https://api.github.com/users/steveblamey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steveblamey/subscriptions","organizations_url":"https://api.github.com/users/steveblamey/orgs","repos_url":"https://api.github.com/users/steveblamey/repos","events_url":"https://api.github.com/users/steveblamey/events{/privacy}","received_events_url":"https://api.github.com/users/steveblamey/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-11-27T11:30:48Z","updated_at":"2015-11-27T11:47:31Z","closed_at":null,"body":"With a customer on stop, uzERP allows a sales invoice to be created from a sales order that contains only non stock controlled items."},"comment":{"url":"https://api.github.com/repos/uzerpllp/migration-testing/issues/comments/160122201","html_url":"https://github.com/uzerpllp/migration-testing/issues/83#issuecomment-160122201","issue_url":"https://api.github.com/repos/uzerpllp/migration-testing/issues/83","id":160122201,"user":{"login":"steveblamey","id":297376,"avatar_url":"https://avatars.githubusercontent.com/u/297376?v=3","gravatar_id":"","url":"https://api.github.com/users/steveblamey","html_url":"https://github.com/steveblamey","followers_url":"https://api.github.com/users/steveblamey/followers","following_url":"https://api.github.com/users/steveblamey/following{/other_user}","gists_url":"https://api.github.com/users/steveblamey/gists{/gist_id}","starred_url":"https://api.github.com/users/steveblamey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steveblamey/subscriptions","organizations_url":"https://api.github.com/users/steveblamey/orgs","repos_url":"https://api.github.com/users/steveblamey/repos","events_url":"https://api.github.com/users/steveblamey/events{/privacy}","received_events_url":"https://api.github.com/users/steveblamey/received_events","type":"User","site_admin":false},"created_at":"2015-11-27T11:47:31Z","updated_at":"2015-11-27T11:47:31Z","body":"Creating an invoice from a sales order uses the createPostInvoice method in the SordersController, which calls SODespatchLine::makeline if the sales order line is a stock item. SODespatchLine::makeline generates and error if the customer is on stop. Since SODespatchLine::makeline is not called for non-stock items an error is never generated.\n\nWe should check the customer account status in createPostInvoice, before any processing is attempted and generate an error there.\n\nTo assist users, we should also show a warning if the customer account is stopped when a sales order is viewed. At the moment, the warning is only displayed when a sales order is saved (generated by Factory in the SOrder model)."}}