refactor: allow for concurrent use of reconciliation tool
1. set default filter dates a period of one month from current date
This commit is contained in:
parent
2d14d92b32
commit
1eea585d29
@ -18,6 +18,10 @@ frappe.ui.form.on("Bank Reconciliation Tool", {
|
||||
},
|
||||
|
||||
onload: function (frm) {
|
||||
// Set default filter dates
|
||||
today = frappe.datetime.get_today()
|
||||
frm.doc.bank_statement_from_date = frappe.datetime.add_months(today, -1);
|
||||
frm.doc.bank_statement_to_date = today;
|
||||
frm.trigger('bank_account');
|
||||
},
|
||||
|
||||
@ -32,6 +36,7 @@ frappe.ui.form.on("Bank Reconciliation Tool", {
|
||||
},
|
||||
|
||||
refresh: function (frm) {
|
||||
frm.disable_save();
|
||||
frappe.require("bank-reconciliation-tool.bundle.js", () =>
|
||||
frm.trigger("make_reconciliation_tool")
|
||||
);
|
||||
@ -73,10 +78,11 @@ frappe.ui.form.on("Bank Reconciliation Tool", {
|
||||
})
|
||||
});
|
||||
|
||||
},
|
||||
frm.add_custom_button(__('Get Unreconciled Entries'), function() {
|
||||
frm.trigger("make_reconciliation_tool");
|
||||
});
|
||||
frm.change_custom_button_type('Get Unreconciled Entries', null, 'primary');
|
||||
|
||||
after_save: function (frm) {
|
||||
frm.trigger("make_reconciliation_tool");
|
||||
},
|
||||
|
||||
bank_account: function (frm) {
|
||||
|
Loading…
Reference in New Issue
Block a user