From 2d70887aaf62932726f31bddd18799662e2642d7 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 27 Nov 2015 11:35:35 +0530 Subject: [PATCH] [enhancement] bulk edit in bank reconciliation, #4356 --- .../bank_reconciliation.js | 37 ++++++++++--------- erpnext/accounts/party.py | 2 +- .../change_log/current/bulk-edit-bank-reco.md | 1 + sponsors.md | 8 ++++ 4 files changed, 30 insertions(+), 18 deletions(-) create mode 100644 erpnext/change_log/current/bulk-edit-bank-reco.md diff --git a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js index cd9d9d0f7e..9ffed717ae 100644 --- a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js +++ b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js @@ -2,10 +2,29 @@ // License: GNU General Public License v3. See license.txt frappe.ui.form.on("Bank Reconciliation", { + setup: function(frm) { + frm.get_docfield("journal_entries").allow_bulk_edit = 1; + frm.add_fetch("bank_account", "company", "company"); + }, + + onload: function(frm) { + frm.set_query("bank_account", function() { + return { + "filters": { + "account_type": "Bank", + "is_group": 0 + } + }; + }); + + frm.set_value("from_date", frappe.datetime.month_start()); + frm.set_value("to_date", frappe.datetime.month_end()); + }, + refresh: function(frm) { frm.disable_save(); }, - + update_clearance_date: function(frm) { return frappe.call({ method: "update_details", @@ -22,19 +41,3 @@ frappe.ui.form.on("Bank Reconciliation", { }); } }); - -cur_frm.cscript.onload = function(doc, cdt, cdn) { - cur_frm.add_fetch("bank_account", "company", "company"); - - cur_frm.set_query("bank_account", function() { - return { - "filters": { - "account_type": "Bank", - "is_group": 0 - } - }; - }); - - cur_frm.set_value("from_date", frappe.datetime.month_start()); - cur_frm.set_value("to_date", frappe.datetime.month_end()); -} \ No newline at end of file diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py index 2f0c0e54b5..d1e2cdcd69 100644 --- a/erpnext/accounts/party.py +++ b/erpnext/accounts/party.py @@ -35,7 +35,7 @@ def _get_party_details(party=None, account=None, party_type="Customer", company= party = out[party_type.lower()] if not ignore_permissions and not frappe.has_permission(party_type, "read", party): - frappe.throw(_("Not permitted"), frappe.PermissionError) + frappe.throw(_("Not permitted for {0}").format(party), frappe.PermissionError) party = frappe.get_doc(party_type, party) diff --git a/erpnext/change_log/current/bulk-edit-bank-reco.md b/erpnext/change_log/current/bulk-edit-bank-reco.md new file mode 100644 index 0000000000..7b10dcf8b8 --- /dev/null +++ b/erpnext/change_log/current/bulk-edit-bank-reco.md @@ -0,0 +1 @@ +- Update Clearance date via Upload and Download like Stock Reconciliation. Sponsored by [AG Techologies, Singapore](http://agtech.com.sg) diff --git a/sponsors.md b/sponsors.md index bfa9e51ae6..125b3588e2 100644 --- a/sponsors.md +++ b/sponsors.md @@ -53,5 +53,13 @@ Leave Allocation based on Arbitrary Dates #1938 + + + AG Technologies, Singapore + + + Bulk edit via export-import in Bank Reconciliation #4356 + +