Browse Source

[enhancement] bulk edit in bank reconciliation, #4356

develop
Rushabh Mehta 9 years ago
parent
commit
2d70887aaf
  1. 35
      erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js
  2. 2
      erpnext/accounts/party.py
  3. 1
      erpnext/change_log/current/bulk-edit-bank-reco.md
  4. 8
      sponsors.md

35
erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js

@ -2,6 +2,25 @@
// License: GNU General Public License v3. See license.txt // License: GNU General Public License v3. See license.txt
frappe.ui.form.on("Bank Reconciliation", { 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) { refresh: function(frm) {
frm.disable_save(); frm.disable_save();
}, },
@ -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());
}

2
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()] party = out[party_type.lower()]
if not ignore_permissions and not frappe.has_permission(party_type, "read", party): 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) party = frappe.get_doc(party_type, party)

1
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)

8
sponsors.md

@ -53,5 +53,13 @@
Leave Allocation based on Arbitrary Dates <a href="https://github.com/frappe/erpnext/issues/1938">#1938</a> Leave Allocation based on Arbitrary Dates <a href="https://github.com/frappe/erpnext/issues/1938">#1938</a>
</td> </td>
</tr> </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> </tbody>
</table> </table>

Loading…
Cancel
Save