|
@ -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()); |
|
|
|
|
|
} |
|
|
|