[ux] re-arranged columns in bank reconciliation, fixes #3114

This commit is contained in:
Rushabh Mehta 2015-04-21 11:08:53 +05:30
parent dfa93305ab
commit 80381475c4
2 changed files with 75 additions and 70 deletions

View File

@ -1,10 +1,25 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
cur_frm.cscript.onload = function(doc, cdt, cdn){
cur_frm.set_intro('<i class="icon-question" /> ' +
__("Update clearance date of Journal Entries marked as 'Bank Entry'"));
frappe.ui.form.on("Bank Reconciliation", {
update_clearance_date: function(frm) {
return frappe.call({
method: "update_details",
doc: frm.doc
});
},
get_relevant_entries: function(frm) {
return frappe.call({
method: "get_details",
doc: frm.doc,
callback: function(r, rt) {
frm.refresh()
}
});
}
});
cur_frm.cscript.onload = function(doc, cdt, cdn) {
cur_frm.add_fetch("bank_account", "company", "company");
cur_frm.set_query("bank_account", function() {
@ -15,21 +30,8 @@ cur_frm.cscript.onload = function(doc, cdt, cdn){
}
};
});
cur_frm.set_value("from_date", frappe.datetime.month_start());
cur_frm.set_value("to_date", frappe.datetime.month_end());
}
frappe.ui.form.on("Bank Reconciliation", "update_clearance_date", function(frm) {
return frappe.call({
method: "update_details",
doc: frm.doc
})
})
frappe.ui.form.on("Bank Reconciliation", "get_relevant_entries", function(frm) {
return frappe.call({
method: "get_details",
doc: frm.doc,
callback: function(r, rt) {
frm.refresh()
}
})
})

View File

@ -1,12 +1,12 @@
{
"creation": "2013-02-22 01:27:37.000000",
"creation": "2013-02-22 01:27:37",
"docstatus": 0,
"doctype": "DocType",
"fields": [
{
"fieldname": "voucher_id",
"fieldtype": "Link",
"in_list_view": 1,
"in_list_view": 0,
"label": "Voucher ID",
"no_copy": 0,
"oldfieldname": "voucher_id",
@ -15,6 +15,17 @@
"permlevel": 0,
"search_index": 0
},
{
"fieldname": "clearance_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "Clearance Date",
"no_copy": 0,
"oldfieldname": "clearance_date",
"oldfieldtype": "Date",
"permlevel": 0,
"search_index": 0
},
{
"fieldname": "against_account",
"fieldtype": "Data",
@ -27,29 +38,6 @@
"read_only": 1,
"search_index": 0
},
{
"fieldname": "posting_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "Posting Date",
"no_copy": 0,
"oldfieldname": "posting_date",
"oldfieldtype": "Date",
"permlevel": 0,
"read_only": 1,
"search_index": 0
},
{
"fieldname": "clearance_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "Clearance Date",
"no_copy": 0,
"oldfieldname": "clearance_date",
"oldfieldtype": "Date",
"permlevel": 0,
"search_index": 0
},
{
"fieldname": "cheque_number",
"fieldtype": "Data",
@ -62,6 +50,44 @@
"read_only": 1,
"search_index": 0
},
{
"fieldname": "debit",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Debit",
"no_copy": 0,
"oldfieldname": "debit",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"read_only": 1,
"search_index": 0
},
{
"fieldname": "credit",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Credit",
"no_copy": 0,
"oldfieldname": "credit",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"read_only": 1,
"search_index": 0
},
{
"fieldname": "posting_date",
"fieldtype": "Date",
"in_list_view": 0,
"label": "Posting Date",
"no_copy": 0,
"oldfieldname": "posting_date",
"oldfieldtype": "Date",
"permlevel": 0,
"read_only": 1,
"search_index": 0
},
{
"fieldname": "cheque_date",
"fieldtype": "Date",
@ -73,37 +99,14 @@
"permlevel": 0,
"read_only": 1,
"search_index": 0
},
{
"fieldname": "debit",
"fieldtype": "Currency",
"label": "Debit",
"no_copy": 0,
"oldfieldname": "debit",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"read_only": 1,
"search_index": 0
},
{
"fieldname": "credit",
"fieldtype": "Currency",
"label": "Credit",
"no_copy": 0,
"oldfieldname": "credit",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"read_only": 1,
"search_index": 0
}
],
"idx": 1,
"istable": 1,
"modified": "2013-12-20 19:22:55.000000",
"modified": "2015-04-21 01:29:29.570890",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Reconciliation Detail",
"owner": "Administrator"
"owner": "Administrator",
"permissions": []
}