{"action":"created","comment":{"url":"https://api.github.com/repos/IMA-WorldHealth/bhima/pulls/comments/39668604","id":39668604,"diff_hunk":"@@ -1,24 +1,21 @@\n-angular.module('bhima.controllers')\n-.controller('purchaseRecords', [\n-  '$scope',\n-  '$q',\n-  'connect',\n-  function ($scope, $q, connect) {\n-    var session = $scope.session = { purchase_type: 'indirect'};\n-    $scope.purchase_filter = {};\n+\n+var purchaseRecords = function ($q, connect) {","path":"client/src/partials/purchase/view/purchase_records.js","position":10,"original_position":10,"commit_id":"a1e2839b340113afd4ee494213fd4de83f2d6663","original_commit_id":"a1e2839b340113afd4ee494213fd4de83f2d6663","user":{"login":"jniles","id":896472,"avatar_url":"https://avatars.githubusercontent.com/u/896472?v=3","gravatar_id":"","url":"https://api.github.com/users/jniles","html_url":"https://github.com/jniles","followers_url":"https://api.github.com/users/jniles/followers","following_url":"https://api.github.com/users/jniles/following{/other_user}","gists_url":"https://api.github.com/users/jniles/gists{/gist_id}","starred_url":"https://api.github.com/users/jniles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jniles/subscriptions","organizations_url":"https://api.github.com/users/jniles/orgs","repos_url":"https://api.github.com/users/jniles/repos","events_url":"https://api.github.com/users/jniles/events{/privacy}","received_events_url":"https://api.github.com/users/jniles/received_events","type":"User","site_admin":false},"body":"It is better to always have `angular.module()` as the first line in the controller.  [You can see an example here](https://github.com/johnpapa/angular-styleguide#separate-data-calls).  That way, you can easily find where Angular binds the controller and see what its name is.   Like this:\r\n```js\r\nangular.module('bhima.controllers')\r\n.controller('PurchaseRecordsController', purchaseRecords);\r\n\r\npurchaseRecords.$inject = [/* some injects */];\r\n\r\n// this will be hoisted to the top of the controller by javascript!\r\nfunction purchaseRecords(/* some names for the injects */) {\r\n  // code ...\r\n}\r\n```","created_at":"2015-09-16T18:40:01Z","updated_at":"2015-09-16T18:40:01Z","html_url":"https://github.com/IMA-WorldHealth/bhima/pull/745#discussion_r39668604","pull_request_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/pulls/745","_links":{"self":{"href":"https://api.github.com/repos/IMA-WorldHealth/bhima/pulls/comments/39668604"},"html":{"href":"https://github.com/IMA-WorldHealth/bhima/pull/745#discussion_r39668604"},"pull_request":{"href":"https://api.github.com/repos/IMA-WorldHealth/bhima/pulls/745"}}},"pull_request":{"url":"https://api.github.com/repos/IMA-WorldHealth/bhima/pulls/745","id":45186747,"html_url":"https://github.com/IMA-WorldHealth/bhima/pull/745","diff_url":"https://github.com/IMA-WorldHealth/bhima/pull/745.diff","patch_url":"https://github.com/IMA-WorldHealth/bhima/pull/745.patch","issue_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/issues/745","number":745,"state":"open","locked":false,"title":"Fixing erros, Aliasing, new service injector Syntax","user":{"login":"DedrickEnc","id":5418919,"avatar_url":"https://avatars.githubusercontent.com/u/5418919?v=3","gravatar_id":"","url":"https://api.github.com/users/DedrickEnc","html_url":"https://github.com/DedrickEnc","followers_url":"https://api.github.com/users/DedrickEnc/followers","following_url":"https://api.github.com/users/DedrickEnc/following{/other_user}","gists_url":"https://api.github.com/users/DedrickEnc/gists{/gist_id}","starred_url":"https://api.github.com/users/DedrickEnc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DedrickEnc/subscriptions","organizations_url":"https://api.github.com/users/DedrickEnc/orgs","repos_url":"https://api.github.com/users/DedrickEnc/repos","events_url":"https://api.github.com/users/DedrickEnc/events{/privacy}","received_events_url":"https://api.github.com/users/DedrickEnc/received_events","type":"User","site_admin":false},"body":"For more clarty I introduced the new syntax for service injector as discussed,\r\nIn this PR, I corrected the error in purchase order page also","created_at":"2015-09-16T15:31:08Z","updated_at":"2015-09-16T18:40:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fbc1f3d6b188ba3165e266bdf45119e397237471","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/pulls/745/commits","review_comments_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/pulls/745/comments","review_comment_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/pulls/comments{/number}","comments_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/issues/745/comments","statuses_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/statuses/a1e2839b340113afd4ee494213fd4de83f2d6663","head":{"label":"DedrickEnc:purchaseFix","ref":"purchaseFix","sha":"a1e2839b340113afd4ee494213fd4de83f2d6663","user":{"login":"DedrickEnc","id":5418919,"avatar_url":"https://avatars.githubusercontent.com/u/5418919?v=3","gravatar_id":"","url":"https://api.github.com/users/DedrickEnc","html_url":"https://github.com/DedrickEnc","followers_url":"https://api.github.com/users/DedrickEnc/followers","following_url":"https://api.github.com/users/DedrickEnc/following{/other_user}","gists_url":"https://api.github.com/users/DedrickEnc/gists{/gist_id}","starred_url":"https://api.github.com/users/DedrickEnc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DedrickEnc/subscriptions","organizations_url":"https://api.github.com/users/DedrickEnc/orgs","repos_url":"https://api.github.com/users/DedrickEnc/repos","events_url":"https://api.github.com/users/DedrickEnc/events{/privacy}","received_events_url":"https://api.github.com/users/DedrickEnc/received_events","type":"User","site_admin":false},"repo":{"id":26802027,"name":"bhima","full_name":"DedrickEnc/bhima","owner":{"login":"DedrickEnc","id":5418919,"avatar_url":"https://avatars.githubusercontent.com/u/5418919?v=3","gravatar_id":"","url":"https://api.github.com/users/DedrickEnc","html_url":"https://github.com/DedrickEnc","followers_url":"https://api.github.com/users/DedrickEnc/followers","following_url":"https://api.github.com/users/DedrickEnc/following{/other_user}","gists_url":"https://api.github.com/users/DedrickEnc/gists{/gist_id}","starred_url":"https://api.github.com/users/DedrickEnc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DedrickEnc/subscriptions","organizations_url":"https://api.github.com/users/DedrickEnc/orgs","repos_url":"https://api.github.com/users/DedrickEnc/repos","events_url":"https://api.github.com/users/DedrickEnc/events{/privacy}","received_events_url":"https://api.github.com/users/DedrickEnc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DedrickEnc/bhima","description":"A full-featured hospital information system for developing countries.","fork":true,"url":"https://api.github.com/repos/DedrickEnc/bhima","forks_url":"https://api.github.com/repos/DedrickEnc/bhima/forks","keys_url":"https://api.github.com/repos/DedrickEnc/bhima/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DedrickEnc/bhima/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DedrickEnc/bhima/teams","hooks_url":"https://api.github.com/repos/DedrickEnc/bhima/hooks","issue_events_url":"https://api.github.com/repos/DedrickEnc/bhima/issues/events{/number}","events_url":"https://api.github.com/repos/DedrickEnc/bhima/events","assignees_url":"https://api.github.com/repos/DedrickEnc/bhima/assignees{/user}","branches_url":"https://api.github.com/repos/DedrickEnc/bhima/branches{/branch}","tags_url":"https://api.github.com/repos/DedrickEnc/bhima/tags","blobs_url":"https://api.github.com/repos/DedrickEnc/bhima/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DedrickEnc/bhima/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DedrickEnc/bhima/git/refs{/sha}","trees_url":"https://api.github.com/repos/DedrickEnc/bhima/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DedrickEnc/bhima/statuses/{sha}","languages_url":"https://api.github.com/repos/DedrickEnc/bhima/languages","stargazers_url":"https://api.github.com/repos/DedrickEnc/bhima/stargazers","contributors_url":"https://api.github.com/repos/DedrickEnc/bhima/contributors","subscribers_url":"https://api.github.com/repos/DedrickEnc/bhima/subscribers","subscription_url":"https://api.github.com/repos/DedrickEnc/bhima/subscription","commits_url":"https://api.github.com/repos/DedrickEnc/bhima/commits{/sha}","git_commits_url":"https://api.github.com/repos/DedrickEnc/bhima/git/commits{/sha}","comments_url":"https://api.github.com/repos/DedrickEnc/bhima/comments{/number}","issue_comment_url":"https://api.github.com/repos/DedrickEnc/bhima/issues/comments{/number}","contents_url":"https://api.github.com/repos/DedrickEnc/bhima/contents/{+path}","compare_url":"https://api.github.com/repos/DedrickEnc/bhima/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DedrickEnc/bhima/merges","archive_url":"https://api.github.com/repos/DedrickEnc/bhima/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DedrickEnc/bhima/downloads","issues_url":"https://api.github.com/repos/DedrickEnc/bhima/issues{/number}","pulls_url":"https://api.github.com/repos/DedrickEnc/bhima/pulls{/number}","milestones_url":"https://api.github.com/repos/DedrickEnc/bhima/milestones{/number}","notifications_url":"https://api.github.com/repos/DedrickEnc/bhima/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DedrickEnc/bhima/labels{/name}","releases_url":"https://api.github.com/repos/DedrickEnc/bhima/releases{/id}","created_at":"2014-11-18T09:37:59Z","updated_at":"2015-03-24T13:13:08Z","pushed_at":"2015-09-16T15:26:41Z","git_url":"git://github.com/DedrickEnc/bhima.git","ssh_url":"git@github.com:DedrickEnc/bhima.git","clone_url":"https://github.com/DedrickEnc/bhima.git","svn_url":"https://github.com/DedrickEnc/bhima","homepage":"","size":101177,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"development"}},"base":{"label":"IMA-WorldHealth:development","ref":"development","sha":"9aa56e44e4f26bc27fb03ba8181a0d75657e6271","user":{"login":"IMA-WorldHealth","id":5330583,"avatar_url":"https://avatars.githubusercontent.com/u/5330583?v=3","gravatar_id":"","url":"https://api.github.com/users/IMA-WorldHealth","html_url":"https://github.com/IMA-WorldHealth","followers_url":"https://api.github.com/users/IMA-WorldHealth/followers","following_url":"https://api.github.com/users/IMA-WorldHealth/following{/other_user}","gists_url":"https://api.github.com/users/IMA-WorldHealth/gists{/gist_id}","starred_url":"https://api.github.com/users/IMA-WorldHealth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IMA-WorldHealth/subscriptions","organizations_url":"https://api.github.com/users/IMA-WorldHealth/orgs","repos_url":"https://api.github.com/users/IMA-WorldHealth/repos","events_url":"https://api.github.com/users/IMA-WorldHealth/events{/privacy}","received_events_url":"https://api.github.com/users/IMA-WorldHealth/received_events","type":"Organization","site_admin":false},"repo":{"id":15043926,"name":"bhima","full_name":"IMA-WorldHealth/bhima","owner":{"login":"IMA-WorldHealth","id":5330583,"avatar_url":"https://avatars.githubusercontent.com/u/5330583?v=3","gravatar_id":"","url":"https://api.github.com/users/IMA-WorldHealth","html_url":"https://github.com/IMA-WorldHealth","followers_url":"https://api.github.com/users/IMA-WorldHealth/followers","following_url":"https://api.github.com/users/IMA-WorldHealth/following{/other_user}","gists_url":"https://api.github.com/users/IMA-WorldHealth/gists{/gist_id}","starred_url":"https://api.github.com/users/IMA-WorldHealth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IMA-WorldHealth/subscriptions","organizations_url":"https://api.github.com/users/IMA-WorldHealth/orgs","repos_url":"https://api.github.com/users/IMA-WorldHealth/repos","events_url":"https://api.github.com/users/IMA-WorldHealth/events{/privacy}","received_events_url":"https://api.github.com/users/IMA-WorldHealth/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/IMA-WorldHealth/bhima","description":"A hospital information system for developing countries.","fork":false,"url":"https://api.github.com/repos/IMA-WorldHealth/bhima","forks_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/forks","keys_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/keys{/key_id}","collaborators_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/teams","hooks_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/hooks","issue_events_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/issues/events{/number}","events_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/events","assignees_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/assignees{/user}","branches_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/branches{/branch}","tags_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/tags","blobs_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/git/refs{/sha}","trees_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/git/trees{/sha}","statuses_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/statuses/{sha}","languages_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/languages","stargazers_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/stargazers","contributors_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/contributors","subscribers_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/subscribers","subscription_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/subscription","commits_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/commits{/sha}","git_commits_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/git/commits{/sha}","comments_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/comments{/number}","issue_comment_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/issues/comments{/number}","contents_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/contents/{+path}","compare_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/compare/{base}...{head}","merges_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/merges","archive_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/downloads","issues_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/issues{/number}","pulls_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/pulls{/number}","milestones_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/milestones{/number}","notifications_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/labels{/name}","releases_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/releases{/id}","created_at":"2013-12-09T10:07:16Z","updated_at":"2015-08-26T12:16:26Z","pushed_at":"2015-09-16T15:31:08Z","git_url":"git://github.com/IMA-WorldHealth/bhima.git","ssh_url":"git@github.com:IMA-WorldHealth/bhima.git","clone_url":"https://github.com/IMA-WorldHealth/bhima.git","svn_url":"https://github.com/IMA-WorldHealth/bhima","homepage":"","size":102614,"stargazers_count":6,"watchers_count":6,"language":"Groff","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":78,"forks":9,"open_issues":78,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/IMA-WorldHealth/bhima/pulls/745"},"html":{"href":"https://github.com/IMA-WorldHealth/bhima/pull/745"},"issue":{"href":"https://api.github.com/repos/IMA-WorldHealth/bhima/issues/745"},"comments":{"href":"https://api.github.com/repos/IMA-WorldHealth/bhima/issues/745/comments"},"review_comments":{"href":"https://api.github.com/repos/IMA-WorldHealth/bhima/pulls/745/comments"},"review_comment":{"href":"https://api.github.com/repos/IMA-WorldHealth/bhima/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/IMA-WorldHealth/bhima/pulls/745/commits"},"statuses":{"href":"https://api.github.com/repos/IMA-WorldHealth/bhima/statuses/a1e2839b340113afd4ee494213fd4de83f2d6663"}}}}