Merge pull request #4386 from rmehta/bank-reco-bulk-edit

[enhancement] bulk edit in bank reconciliation, #4356
diff --git a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js
index cd9d9d0..9ffed71 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 @@
 		});
 	}
 });
-
-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 2f0c0e5..d1e2cdc 100644
--- a/erpnext/accounts/party.py
+++ b/erpnext/accounts/party.py
@@ -35,7 +35,7 @@
 	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 0000000..7b10dcf
--- /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 bfa9e51..125b358 100644
--- a/sponsors.md
+++ b/sponsors.md
@@ -53,5 +53,13 @@
 				Leave Allocation based on Arbitrary Dates <a href="https://github.com/frappe/erpnext/issues/1938">#1938</a>
 			</td>
 		</tr>
+		<tr>
+			<td style="width: 30%">
+				<a href="http://agtech.com.sq">AG Technologies, Singapore</a>
+			</td>
+			<td>
+				Bulk edit via export-import in Bank Reconciliation <a href="https://github.com/frappe/erpnext/issues/1938">#4356</a>
+			</td>
+		</tr>
 	</tbody>
 </table>