{"action":"created","comment":{"url":"https://api.github.com/repos/frappe/erpnext/pulls/comments/42361157","id":42361157,"diff_hunk":"@@ -15,21 +15,34 @@ def reorder_item():\n \n def _reorder_item():\n \tmaterial_requests = {\"Purchase\": {}, \"Transfer\": {}}\n-\n-\titem_warehouse_projected_qty = get_item_warehouse_projected_qty()\n-\n-\twarehouse_company = frappe._dict(frappe.db.sql(\"\"\"select name, company from `tabWarehouse`\"\"\"))\n+\twarehouse_company = frappe._dict(frappe.db.sql(\"\"\"select name, company from `tabWarehouse`\n+\t\twhere disabled=0\"\"\"))\n \tdefault_company = (frappe.defaults.get_defaults().get(\"company\") or\n \t\tfrappe.db.sql(\"\"\"select name from tabCompany limit 1\"\"\")[0][0])\n \n+\titems_to_consider = frappe.db.sql_list(\"\"\"select name from `tabItem` item\n+\t\twhere is_stock_item=1\n+\t\t\tand (is_purchase_item=1 or is_sub_contracted_item=1)\n+\t\t\tand (end_of_life is null or end_of_life='0000-00-00' or end_of_life > %(today)s)\n+\t\t\tand ((re_order_level and re_order_qty) or exists (","path":"erpnext/stock/reorder_item.py","position":17,"original_position":17,"commit_id":"e6f198934662372db6fc773c8b8ad9aae24f067c","original_commit_id":"e6f198934662372db6fc773c8b8ad9aae24f067c","user":{"login":"nabinhait","id":836784,"avatar_url":"https://avatars.githubusercontent.com/u/836784?v=3","gravatar_id":"","url":"https://api.github.com/users/nabinhait","html_url":"https://github.com/nabinhait","followers_url":"https://api.github.com/users/nabinhait/followers","following_url":"https://api.github.com/users/nabinhait/following{/other_user}","gists_url":"https://api.github.com/users/nabinhait/gists{/gist_id}","starred_url":"https://api.github.com/users/nabinhait/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nabinhait/subscriptions","organizations_url":"https://api.github.com/users/nabinhait/orgs","repos_url":"https://api.github.com/users/nabinhait/repos","events_url":"https://api.github.com/users/nabinhait/events{/privacy}","received_events_url":"https://api.github.com/users/nabinhait/received_events","type":"User","site_admin":false},"body":"re_order_qty is not mandatory","created_at":"2015-10-19T11:39:49Z","updated_at":"2015-10-19T11:39:49Z","html_url":"https://github.com/frappe/erpnext/pull/4178#discussion_r42361157","pull_request_url":"https://api.github.com/repos/frappe/erpnext/pulls/4178","_links":{"self":{"href":"https://api.github.com/repos/frappe/erpnext/pulls/comments/42361157"},"html":{"href":"https://github.com/frappe/erpnext/pull/4178#discussion_r42361157"},"pull_request":{"href":"https://api.github.com/repos/frappe/erpnext/pulls/4178"}}},"pull_request":{"url":"https://api.github.com/repos/frappe/erpnext/pulls/4178","id":47780343,"html_url":"https://github.com/frappe/erpnext/pull/4178","diff_url":"https://github.com/frappe/erpnext/pull/4178.diff","patch_url":"https://github.com/frappe/erpnext/pull/4178.patch","issue_url":"https://api.github.com/repos/frappe/erpnext/issues/4178","number":4178,"state":"open","locked":false,"title":"[fix] Item Re-order if Bin does not exists and fixed Stock Projected Qty report to show per Warehouse Re-order level","user":{"login":"anandpdoshi","id":836785,"avatar_url":"https://avatars.githubusercontent.com/u/836785?v=3","gravatar_id":"","url":"https://api.github.com/users/anandpdoshi","html_url":"https://github.com/anandpdoshi","followers_url":"https://api.github.com/users/anandpdoshi/followers","following_url":"https://api.github.com/users/anandpdoshi/following{/other_user}","gists_url":"https://api.github.com/users/anandpdoshi/gists{/gist_id}","starred_url":"https://api.github.com/users/anandpdoshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anandpdoshi/subscriptions","organizations_url":"https://api.github.com/users/anandpdoshi/orgs","repos_url":"https://api.github.com/users/anandpdoshi/repos","events_url":"https://api.github.com/users/anandpdoshi/events{/privacy}","received_events_url":"https://api.github.com/users/anandpdoshi/received_events","type":"User","site_admin":false},"body":null,"created_at":"2015-10-15T12:38:02Z","updated_at":"2015-10-19T11:39:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1d4d4253bc2e7733c5c4897aedabe403ebb23ec7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/frappe/erpnext/pulls/4178/commits","review_comments_url":"https://api.github.com/repos/frappe/erpnext/pulls/4178/comments","review_comment_url":"https://api.github.com/repos/frappe/erpnext/pulls/comments{/number}","comments_url":"https://api.github.com/repos/frappe/erpnext/issues/4178/comments","statuses_url":"https://api.github.com/repos/frappe/erpnext/statuses/e6f198934662372db6fc773c8b8ad9aae24f067c","head":{"label":"anandpdoshi:item-reorder-if-no-bin","ref":"item-reorder-if-no-bin","sha":"e6f198934662372db6fc773c8b8ad9aae24f067c","user":{"login":"anandpdoshi","id":836785,"avatar_url":"https://avatars.githubusercontent.com/u/836785?v=3","gravatar_id":"","url":"https://api.github.com/users/anandpdoshi","html_url":"https://github.com/anandpdoshi","followers_url":"https://api.github.com/users/anandpdoshi/followers","following_url":"https://api.github.com/users/anandpdoshi/following{/other_user}","gists_url":"https://api.github.com/users/anandpdoshi/gists{/gist_id}","starred_url":"https://api.github.com/users/anandpdoshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anandpdoshi/subscriptions","organizations_url":"https://api.github.com/users/anandpdoshi/orgs","repos_url":"https://api.github.com/users/anandpdoshi/repos","events_url":"https://api.github.com/users/anandpdoshi/events{/privacy}","received_events_url":"https://api.github.com/users/anandpdoshi/received_events","type":"User","site_admin":false},"repo":{"id":14708949,"name":"erpnext","full_name":"anandpdoshi/erpnext","owner":{"login":"anandpdoshi","id":836785,"avatar_url":"https://avatars.githubusercontent.com/u/836785?v=3","gravatar_id":"","url":"https://api.github.com/users/anandpdoshi","html_url":"https://github.com/anandpdoshi","followers_url":"https://api.github.com/users/anandpdoshi/followers","following_url":"https://api.github.com/users/anandpdoshi/following{/other_user}","gists_url":"https://api.github.com/users/anandpdoshi/gists{/gist_id}","starred_url":"https://api.github.com/users/anandpdoshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anandpdoshi/subscriptions","organizations_url":"https://api.github.com/users/anandpdoshi/orgs","repos_url":"https://api.github.com/users/anandpdoshi/repos","events_url":"https://api.github.com/users/anandpdoshi/events{/privacy}","received_events_url":"https://api.github.com/users/anandpdoshi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/anandpdoshi/erpnext","description":"Open Source, web-based ERP based on Python, Javascript and MySQL. ","fork":true,"url":"https://api.github.com/repos/anandpdoshi/erpnext","forks_url":"https://api.github.com/repos/anandpdoshi/erpnext/forks","keys_url":"https://api.github.com/repos/anandpdoshi/erpnext/keys{/key_id}","collaborators_url":"https://api.github.com/repos/anandpdoshi/erpnext/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/anandpdoshi/erpnext/teams","hooks_url":"https://api.github.com/repos/anandpdoshi/erpnext/hooks","issue_events_url":"https://api.github.com/repos/anandpdoshi/erpnext/issues/events{/number}","events_url":"https://api.github.com/repos/anandpdoshi/erpnext/events","assignees_url":"https://api.github.com/repos/anandpdoshi/erpnext/assignees{/user}","branches_url":"https://api.github.com/repos/anandpdoshi/erpnext/branches{/branch}","tags_url":"https://api.github.com/repos/anandpdoshi/erpnext/tags","blobs_url":"https://api.github.com/repos/anandpdoshi/erpnext/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/anandpdoshi/erpnext/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/anandpdoshi/erpnext/git/refs{/sha}","trees_url":"https://api.github.com/repos/anandpdoshi/erpnext/git/trees{/sha}","statuses_url":"https://api.github.com/repos/anandpdoshi/erpnext/statuses/{sha}","languages_url":"https://api.github.com/repos/anandpdoshi/erpnext/languages","stargazers_url":"https://api.github.com/repos/anandpdoshi/erpnext/stargazers","contributors_url":"https://api.github.com/repos/anandpdoshi/erpnext/contributors","subscribers_url":"https://api.github.com/repos/anandpdoshi/erpnext/subscribers","subscription_url":"https://api.github.com/repos/anandpdoshi/erpnext/subscription","commits_url":"https://api.github.com/repos/anandpdoshi/erpnext/commits{/sha}","git_commits_url":"https://api.github.com/repos/anandpdoshi/erpnext/git/commits{/sha}","comments_url":"https://api.github.com/repos/anandpdoshi/erpnext/comments{/number}","issue_comment_url":"https://api.github.com/repos/anandpdoshi/erpnext/issues/comments{/number}","contents_url":"https://api.github.com/repos/anandpdoshi/erpnext/contents/{+path}","compare_url":"https://api.github.com/repos/anandpdoshi/erpnext/compare/{base}...{head}","merges_url":"https://api.github.com/repos/anandpdoshi/erpnext/merges","archive_url":"https://api.github.com/repos/anandpdoshi/erpnext/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/anandpdoshi/erpnext/downloads","issues_url":"https://api.github.com/repos/anandpdoshi/erpnext/issues{/number}","pulls_url":"https://api.github.com/repos/anandpdoshi/erpnext/pulls{/number}","milestones_url":"https://api.github.com/repos/anandpdoshi/erpnext/milestones{/number}","notifications_url":"https://api.github.com/repos/anandpdoshi/erpnext/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/anandpdoshi/erpnext/labels{/name}","releases_url":"https://api.github.com/repos/anandpdoshi/erpnext/releases{/id}","created_at":"2013-11-26T06:33:36Z","updated_at":"2015-09-19T17:13:20Z","pushed_at":"2015-10-19T09:30:02Z","git_url":"git://github.com/anandpdoshi/erpnext.git","ssh_url":"git@github.com:anandpdoshi/erpnext.git","clone_url":"https://github.com/anandpdoshi/erpnext.git","svn_url":"https://github.com/anandpdoshi/erpnext","homepage":"https://erpnext.com/open-source","size":65178,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"develop"}},"base":{"label":"frappe:develop","ref":"develop","sha":"2a1ba886f10c8ccf967dfde20a512d456563a470","user":{"login":"frappe","id":836974,"avatar_url":"https://avatars.githubusercontent.com/u/836974?v=3","gravatar_id":"","url":"https://api.github.com/users/frappe","html_url":"https://github.com/frappe","followers_url":"https://api.github.com/users/frappe/followers","following_url":"https://api.github.com/users/frappe/following{/other_user}","gists_url":"https://api.github.com/users/frappe/gists{/gist_id}","starred_url":"https://api.github.com/users/frappe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frappe/subscriptions","organizations_url":"https://api.github.com/users/frappe/orgs","repos_url":"https://api.github.com/users/frappe/repos","events_url":"https://api.github.com/users/frappe/events{/privacy}","received_events_url":"https://api.github.com/users/frappe/received_events","type":"Organization","site_admin":false},"repo":{"id":1864233,"name":"erpnext","full_name":"frappe/erpnext","owner":{"login":"frappe","id":836974,"avatar_url":"https://avatars.githubusercontent.com/u/836974?v=3","gravatar_id":"","url":"https://api.github.com/users/frappe","html_url":"https://github.com/frappe","followers_url":"https://api.github.com/users/frappe/followers","following_url":"https://api.github.com/users/frappe/following{/other_user}","gists_url":"https://api.github.com/users/frappe/gists{/gist_id}","starred_url":"https://api.github.com/users/frappe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frappe/subscriptions","organizations_url":"https://api.github.com/users/frappe/orgs","repos_url":"https://api.github.com/users/frappe/repos","events_url":"https://api.github.com/users/frappe/events{/privacy}","received_events_url":"https://api.github.com/users/frappe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/frappe/erpnext","description":"Open Source ERP built for the Web. Uses Python, MariaDB.","fork":false,"url":"https://api.github.com/repos/frappe/erpnext","forks_url":"https://api.github.com/repos/frappe/erpnext/forks","keys_url":"https://api.github.com/repos/frappe/erpnext/keys{/key_id}","collaborators_url":"https://api.github.com/repos/frappe/erpnext/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/frappe/erpnext/teams","hooks_url":"https://api.github.com/repos/frappe/erpnext/hooks","issue_events_url":"https://api.github.com/repos/frappe/erpnext/issues/events{/number}","events_url":"https://api.github.com/repos/frappe/erpnext/events","assignees_url":"https://api.github.com/repos/frappe/erpnext/assignees{/user}","branches_url":"https://api.github.com/repos/frappe/erpnext/branches{/branch}","tags_url":"https://api.github.com/repos/frappe/erpnext/tags","blobs_url":"https://api.github.com/repos/frappe/erpnext/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/frappe/erpnext/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/frappe/erpnext/git/refs{/sha}","trees_url":"https://api.github.com/repos/frappe/erpnext/git/trees{/sha}","statuses_url":"https://api.github.com/repos/frappe/erpnext/statuses/{sha}","languages_url":"https://api.github.com/repos/frappe/erpnext/languages","stargazers_url":"https://api.github.com/repos/frappe/erpnext/stargazers","contributors_url":"https://api.github.com/repos/frappe/erpnext/contributors","subscribers_url":"https://api.github.com/repos/frappe/erpnext/subscribers","subscription_url":"https://api.github.com/repos/frappe/erpnext/subscription","commits_url":"https://api.github.com/repos/frappe/erpnext/commits{/sha}","git_commits_url":"https://api.github.com/repos/frappe/erpnext/git/commits{/sha}","comments_url":"https://api.github.com/repos/frappe/erpnext/comments{/number}","issue_comment_url":"https://api.github.com/repos/frappe/erpnext/issues/comments{/number}","contents_url":"https://api.github.com/repos/frappe/erpnext/contents/{+path}","compare_url":"https://api.github.com/repos/frappe/erpnext/compare/{base}...{head}","merges_url":"https://api.github.com/repos/frappe/erpnext/merges","archive_url":"https://api.github.com/repos/frappe/erpnext/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/frappe/erpnext/downloads","issues_url":"https://api.github.com/repos/frappe/erpnext/issues{/number}","pulls_url":"https://api.github.com/repos/frappe/erpnext/pulls{/number}","milestones_url":"https://api.github.com/repos/frappe/erpnext/milestones{/number}","notifications_url":"https://api.github.com/repos/frappe/erpnext/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/frappe/erpnext/labels{/name}","releases_url":"https://api.github.com/repos/frappe/erpnext/releases{/id}","created_at":"2011-06-08T08:20:56Z","updated_at":"2015-10-18T04:29:40Z","pushed_at":"2015-10-19T11:24:21Z","git_url":"git://github.com/frappe/erpnext.git","ssh_url":"git@github.com:frappe/erpnext.git","clone_url":"https://github.com/frappe/erpnext.git","svn_url":"https://github.com/frappe/erpnext","homepage":"http://erpnext.com","size":100254,"stargazers_count":892,"watchers_count":892,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":537,"mirror_url":null,"open_issues_count":744,"forks":537,"open_issues":744,"watchers":892,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/frappe/erpnext/pulls/4178"},"html":{"href":"https://github.com/frappe/erpnext/pull/4178"},"issue":{"href":"https://api.github.com/repos/frappe/erpnext/issues/4178"},"comments":{"href":"https://api.github.com/repos/frappe/erpnext/issues/4178/comments"},"review_comments":{"href":"https://api.github.com/repos/frappe/erpnext/pulls/4178/comments"},"review_comment":{"href":"https://api.github.com/repos/frappe/erpnext/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/frappe/erpnext/pulls/4178/commits"},"statuses":{"href":"https://api.github.com/repos/frappe/erpnext/statuses/e6f198934662372db6fc773c8b8ad9aae24f067c"}}}}