{"action":"created","comment":{"url":"https://api.github.com/repos/frappe/erpnext/pulls/comments/169862673","pull_request_review_id":98456547,"id":169862673,"diff_hunk":"@@ -90,10 +90,82 @@ def update_clearance_date(self):\n \t\t\t\t\twhere name=%s\"\"\".format(d.payment_document), \n \t\t\t\t(d.clearance_date, nowdate(), d.payment_entry))\n \t\t\t\t\n+\t\t\t\tcheque_status = \"Done\"\n+\t\t\t\tfrappe.db.sql(\"update `tabPayment Entry` set cheque_status=%s where clearance_date=%s\",\n+\t\t\t\t\t\t\t(cheque_status, d.clearance_date))\n \t\t\t\tclearance_date_updated = True\n \n \t\tif clearance_date_updated:\n \t\t\tself.get_payment_entries()\n \t\t\tmsgprint(_(\"Clearance Date updated\"))\n \t\telse:\n \t\t\tmsgprint(_(\"Clearance Date not mentioned\"))\n+\t\n+\t\n+\tdef update_return_date(self):\n+\t\treturn_date_updated = False\n+\t\tfor d in self.get('payment_entries'):\n+\t\t\tif d.return_date:\n+\t\t\t\tif not d.payment_document:\n+\t\t\t\t\tfrappe.throw(_(\"Row #{0}: Payment document is required to complete the trasaction\"))\n+\t\t\t\t\n+\t\t\t\tif d.cheque_date and getdate(d.return_date) < getdate(d.cheque_date):\n+\t\t\t\t\tfrappe.throw(_(\"Row #{0}: Return date {1} cannot be before Cheque Date {2}\")\n+\t\t\t\t\t\t.format(d.idx, d.return_date, d.cheque_date))\n+\t\t\t\t\n+\t\t\tif d.return_date or self.include_reconciled_entries:\n+\t\t\t\tif not d.return_date:\n+\t\t\t\t\td.return_date = None\n+\t\t\t\t\n+\t\t\t\tfrappe.db.set_value(d.payment_document, d.payment_entry, \"return_date\", d.return_date)\n+\t\t\t\tfrappe.db.sql(\"\"\"update `tab{0}` set return_date = %s, modified = %s \n+\t\t\t\t\twhere name=%s\"\"\".format(d.payment_document), \n+\t\t\t\t(d.return_date, nowdate(), d.payment_entry))\n+\t\t\t\t\n+\t\t\t\treturn_date_updated = True\n+\t\t\t\n+\t\t\tif d.return_date:\n+\t\t\t\tpayment_ref = frappe.get_doc(d.payment_document, d.payment_entry)\n+\t\t\t\t\n+\t\t\t\tcheque_status = \"Return\"","path":"erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py","position":66,"original_position":66,"commit_id":"7bf25ed2b8d96356a20ad0b7a6e50c461e43eba7","original_commit_id":"7bf25ed2b8d96356a20ad0b7a6e50c461e43eba7","user":{"login":"rmehta","id":140076,"avatar_url":"https://avatars1.githubusercontent.com/u/140076?v=4","gravatar_id":"","url":"https://api.github.com/users/rmehta","html_url":"https://github.com/rmehta","followers_url":"https://api.github.com/users/rmehta/followers","following_url":"https://api.github.com/users/rmehta/following{/other_user}","gists_url":"https://api.github.com/users/rmehta/gists{/gist_id}","starred_url":"https://api.github.com/users/rmehta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmehta/subscriptions","organizations_url":"https://api.github.com/users/rmehta/orgs","repos_url":"https://api.github.com/users/rmehta/repos","events_url":"https://api.github.com/users/rmehta/events{/privacy}","received_events_url":"https://api.github.com/users/rmehta/received_events","type":"User","site_admin":false},"body":"`deposit_status`","created_at":"2018-02-22T06:12:47Z","updated_at":"2018-02-22T06:13:32Z","html_url":"https://github.com/frappe/erpnext/pull/12961#discussion_r169862673","pull_request_url":"https://api.github.com/repos/frappe/erpnext/pulls/12961","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/frappe/erpnext/pulls/comments/169862673"},"html":{"href":"https://github.com/frappe/erpnext/pull/12961#discussion_r169862673"},"pull_request":{"href":"https://api.github.com/repos/frappe/erpnext/pulls/12961"}}},"pull_request":{"url":"https://api.github.com/repos/frappe/erpnext/pulls/12961","id":169551833,"html_url":"https://github.com/frappe/erpnext/pull/12961","diff_url":"https://github.com/frappe/erpnext/pull/12961.diff","patch_url":"https://github.com/frappe/erpnext/pull/12961.patch","issue_url":"https://api.github.com/repos/frappe/erpnext/issues/12961","number":12961,"state":"open","locked":false,"title":" New features to added PDC(Post Dated Cheque) Management.","user":{"login":"Solufyin","id":34390782,"avatar_url":"https://avatars1.githubusercontent.com/u/34390782?v=4","gravatar_id":"","url":"https://api.github.com/users/Solufyin","html_url":"https://github.com/Solufyin","followers_url":"https://api.github.com/users/Solufyin/followers","following_url":"https://api.github.com/users/Solufyin/following{/other_user}","gists_url":"https://api.github.com/users/Solufyin/gists{/gist_id}","starred_url":"https://api.github.com/users/Solufyin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Solufyin/subscriptions","organizations_url":"https://api.github.com/users/Solufyin/orgs","repos_url":"https://api.github.com/users/Solufyin/repos","events_url":"https://api.github.com/users/Solufyin/events{/privacy}","received_events_url":"https://api.github.com/users/Solufyin/received_events","type":"User","site_admin":false},"body":"@revant, @manassolanki\r\nWe added a new Feature to PDC(Post Dated Cheque) Management for BANK RECONCILIATION functionality.\r\n\r\n![customer](https://user-images.githubusercontent.com/34390782/36294742-bd1723ee-1308-11e8-9351-4442b25b440e.png)\r\n\r\n![bank recon-statement1](https://user-images.githubusercontent.com/34390782/36294747-cd1bd848-1308-11e8-823e-4634437f1e8d.png)\r\n\r\n![bank recon-statement2](https://user-images.githubusercontent.com/34390782/36294757-d9a03000-1308-11e8-9d4c-1daf4a993340.png)\r\n\r\n**You can refer attached video for the PDC Management:**\r\n\r\n[PDC Workflow for ERPNEXT.mp4.zip](https://github.com/frappe/erpnext/files/1730308/PDC.Workflow.for.ERPNEXT.mp4.zip)\r\n\r\n","created_at":"2018-02-16T05:42:10Z","updated_at":"2018-02-22T06:13:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b5fa209883ef685edadc0bb6f584a2e37e3ab96b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/frappe/erpnext/pulls/12961/commits","review_comments_url":"https://api.github.com/repos/frappe/erpnext/pulls/12961/comments","review_comment_url":"https://api.github.com/repos/frappe/erpnext/pulls/comments{/number}","comments_url":"https://api.github.com/repos/frappe/erpnext/issues/12961/comments","statuses_url":"https://api.github.com/repos/frappe/erpnext/statuses/7bf25ed2b8d96356a20ad0b7a6e50c461e43eba7","head":{"label":"Solufyin:develop_solufy_pdc","ref":"develop_solufy_pdc","sha":"7bf25ed2b8d96356a20ad0b7a6e50c461e43eba7","user":{"login":"Solufyin","id":34390782,"avatar_url":"https://avatars1.githubusercontent.com/u/34390782?v=4","gravatar_id":"","url":"https://api.github.com/users/Solufyin","html_url":"https://github.com/Solufyin","followers_url":"https://api.github.com/users/Solufyin/followers","following_url":"https://api.github.com/users/Solufyin/following{/other_user}","gists_url":"https://api.github.com/users/Solufyin/gists{/gist_id}","starred_url":"https://api.github.com/users/Solufyin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Solufyin/subscriptions","organizations_url":"https://api.github.com/users/Solufyin/orgs","repos_url":"https://api.github.com/users/Solufyin/repos","events_url":"https://api.github.com/users/Solufyin/events{/privacy}","received_events_url":"https://api.github.com/users/Solufyin/received_events","type":"User","site_admin":false},"repo":{"id":113648881,"name":"erpnext","full_name":"Solufyin/erpnext","owner":{"login":"Solufyin","id":34390782,"avatar_url":"https://avatars1.githubusercontent.com/u/34390782?v=4","gravatar_id":"","url":"https://api.github.com/users/Solufyin","html_url":"https://github.com/Solufyin","followers_url":"https://api.github.com/users/Solufyin/followers","following_url":"https://api.github.com/users/Solufyin/following{/other_user}","gists_url":"https://api.github.com/users/Solufyin/gists{/gist_id}","starred_url":"https://api.github.com/users/Solufyin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Solufyin/subscriptions","organizations_url":"https://api.github.com/users/Solufyin/orgs","repos_url":"https://api.github.com/users/Solufyin/repos","events_url":"https://api.github.com/users/Solufyin/events{/privacy}","received_events_url":"https://api.github.com/users/Solufyin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Solufyin/erpnext","description":"Open Source ERP","fork":true,"url":"https://api.github.com/repos/Solufyin/erpnext","forks_url":"https://api.github.com/repos/Solufyin/erpnext/forks","keys_url":"https://api.github.com/repos/Solufyin/erpnext/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Solufyin/erpnext/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Solufyin/erpnext/teams","hooks_url":"https://api.github.com/repos/Solufyin/erpnext/hooks","issue_events_url":"https://api.github.com/repos/Solufyin/erpnext/issues/events{/number}","events_url":"https://api.github.com/repos/Solufyin/erpnext/events","assignees_url":"https://api.github.com/repos/Solufyin/erpnext/assignees{/user}","branches_url":"https://api.github.com/repos/Solufyin/erpnext/branches{/branch}","tags_url":"https://api.github.com/repos/Solufyin/erpnext/tags","blobs_url":"https://api.github.com/repos/Solufyin/erpnext/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Solufyin/erpnext/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Solufyin/erpnext/git/refs{/sha}","trees_url":"https://api.github.com/repos/Solufyin/erpnext/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Solufyin/erpnext/statuses/{sha}","languages_url":"https://api.github.com/repos/Solufyin/erpnext/languages","stargazers_url":"https://api.github.com/repos/Solufyin/erpnext/stargazers","contributors_url":"https://api.github.com/repos/Solufyin/erpnext/contributors","subscribers_url":"https://api.github.com/repos/Solufyin/erpnext/subscribers","subscription_url":"https://api.github.com/repos/Solufyin/erpnext/subscription","commits_url":"https://api.github.com/repos/Solufyin/erpnext/commits{/sha}","git_commits_url":"https://api.github.com/repos/Solufyin/erpnext/git/commits{/sha}","comments_url":"https://api.github.com/repos/Solufyin/erpnext/comments{/number}","issue_comment_url":"https://api.github.com/repos/Solufyin/erpnext/issues/comments{/number}","contents_url":"https://api.github.com/repos/Solufyin/erpnext/contents/{+path}","compare_url":"https://api.github.com/repos/Solufyin/erpnext/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Solufyin/erpnext/merges","archive_url":"https://api.github.com/repos/Solufyin/erpnext/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Solufyin/erpnext/downloads","issues_url":"https://api.github.com/repos/Solufyin/erpnext/issues{/number}","pulls_url":"https://api.github.com/repos/Solufyin/erpnext/pulls{/number}","milestones_url":"https://api.github.com/repos/Solufyin/erpnext/milestones{/number}","notifications_url":"https://api.github.com/repos/Solufyin/erpnext/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Solufyin/erpnext/labels{/name}","releases_url":"https://api.github.com/repos/Solufyin/erpnext/releases{/id}","deployments_url":"https://api.github.com/repos/Solufyin/erpnext/deployments","created_at":"2017-12-09T06:47:14Z","updated_at":"2017-12-09T06:47:27Z","pushed_at":"2018-02-21T09:21:44Z","git_url":"git://github.com/Solufyin/erpnext.git","ssh_url":"git@github.com:Solufyin/erpnext.git","clone_url":"https://github.com/Solufyin/erpnext.git","svn_url":"https://github.com/Solufyin/erpnext","homepage":"http://erpnext.com","size":462025,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"frappe:develop","ref":"develop","sha":"394b7a2fa39827f59fac10d453bb141376aa00a7","user":{"login":"frappe","id":836974,"avatar_url":"https://avatars2.githubusercontent.com/u/836974?v=4","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://avatars2.githubusercontent.com/u/836974?v=4","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","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}","deployments_url":"https://api.github.com/repos/frappe/erpnext/deployments","created_at":"2011-06-08T08:20:56Z","updated_at":"2018-02-21T18:41:09Z","pushed_at":"2018-02-22T06:02:10Z","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":461731,"stargazers_count":2857,"watchers_count":2857,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1478,"mirror_url":null,"archived":false,"open_issues_count":1309,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":1478,"open_issues":1309,"watchers":2857,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/frappe/erpnext/pulls/12961"},"html":{"href":"https://github.com/frappe/erpnext/pull/12961"},"issue":{"href":"https://api.github.com/repos/frappe/erpnext/issues/12961"},"comments":{"href":"https://api.github.com/repos/frappe/erpnext/issues/12961/comments"},"review_comments":{"href":"https://api.github.com/repos/frappe/erpnext/pulls/12961/comments"},"review_comment":{"href":"https://api.github.com/repos/frappe/erpnext/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/frappe/erpnext/pulls/12961/commits"},"statuses":{"href":"https://api.github.com/repos/frappe/erpnext/statuses/7bf25ed2b8d96356a20ad0b7a6e50c461e43eba7"}},"author_association":"NONE"}}
{"actor":{"display_login":"rmehta"}}