Merge pull request #34501 from ruthra-kumar/incorrect_currency_symbol_for_bank_accounts_in_reconciliation_tool
refactor(bank reconciliation tool): currency symbol fix and concurrent usage
This commit is contained in:
commit
2d19cee713
@ -18,6 +18,10 @@ frappe.ui.form.on("Bank Reconciliation Tool", {
|
|||||||
},
|
},
|
||||||
|
|
||||||
onload: function (frm) {
|
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');
|
frm.trigger('bank_account');
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -32,6 +36,7 @@ frappe.ui.form.on("Bank Reconciliation Tool", {
|
|||||||
},
|
},
|
||||||
|
|
||||||
refresh: function (frm) {
|
refresh: function (frm) {
|
||||||
|
frm.disable_save();
|
||||||
frappe.require("bank-reconciliation-tool.bundle.js", () =>
|
frappe.require("bank-reconciliation-tool.bundle.js", () =>
|
||||||
frm.trigger("make_reconciliation_tool")
|
frm.trigger("make_reconciliation_tool")
|
||||||
);
|
);
|
||||||
@ -72,10 +77,12 @@ frappe.ui.form.on("Bank Reconciliation Tool", {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
},
|
|
||||||
|
|
||||||
after_save: function (frm) {
|
frm.add_custom_button(__('Get Unreconciled Entries'), function() {
|
||||||
frm.trigger("make_reconciliation_tool");
|
frm.trigger("make_reconciliation_tool");
|
||||||
|
});
|
||||||
|
frm.change_custom_button_type('Get Unreconciled Entries', null, 'primary');
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
bank_account: function (frm) {
|
bank_account: function (frm) {
|
||||||
@ -89,7 +96,7 @@ frappe.ui.form.on("Bank Reconciliation Tool", {
|
|||||||
r.account,
|
r.account,
|
||||||
"account_currency",
|
"account_currency",
|
||||||
(r) => {
|
(r) => {
|
||||||
frm.currency = r.account_currency;
|
frm.doc.account_currency = r.account_currency;
|
||||||
frm.trigger("render_chart");
|
frm.trigger("render_chart");
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -162,9 +169,9 @@ frappe.ui.form.on("Bank Reconciliation Tool", {
|
|||||||
"reconciliation_tool_cards"
|
"reconciliation_tool_cards"
|
||||||
).$wrapper,
|
).$wrapper,
|
||||||
bank_statement_closing_balance:
|
bank_statement_closing_balance:
|
||||||
frm.doc.bank_statement_closing_balance,
|
frm.doc.bank_statement_closing_balance,
|
||||||
cleared_balance: frm.cleared_balance,
|
cleared_balance: frm.cleared_balance,
|
||||||
currency: frm.currency,
|
currency: frm.doc.account_currency,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
"to_reference_date",
|
"to_reference_date",
|
||||||
"filter_by_reference_date",
|
"filter_by_reference_date",
|
||||||
"column_break_2",
|
"column_break_2",
|
||||||
|
"account_currency",
|
||||||
"account_opening_balance",
|
"account_opening_balance",
|
||||||
"bank_statement_closing_balance",
|
"bank_statement_closing_balance",
|
||||||
"section_break_1",
|
"section_break_1",
|
||||||
@ -59,7 +60,7 @@
|
|||||||
"fieldname": "account_opening_balance",
|
"fieldname": "account_opening_balance",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"label": "Account Opening Balance",
|
"label": "Account Opening Balance",
|
||||||
"options": "Currency",
|
"options": "account_currency",
|
||||||
"read_only": 1
|
"read_only": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -67,7 +68,7 @@
|
|||||||
"fieldname": "bank_statement_closing_balance",
|
"fieldname": "bank_statement_closing_balance",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"label": "Closing Balance",
|
"label": "Closing Balance",
|
||||||
"options": "Currency"
|
"options": "account_currency"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "section_break_1",
|
"fieldname": "section_break_1",
|
||||||
@ -104,13 +105,20 @@
|
|||||||
"fieldname": "filter_by_reference_date",
|
"fieldname": "filter_by_reference_date",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"label": "Filter by Reference Date"
|
"label": "Filter by Reference Date"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "account_currency",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"hidden": 1,
|
||||||
|
"label": "Account Currency",
|
||||||
|
"options": "Currency"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"hide_toolbar": 1,
|
"hide_toolbar": 1,
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"issingle": 1,
|
"issingle": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2023-01-13 13:00:02.022919",
|
"modified": "2023-03-07 11:02:24.535714",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Bank Reconciliation Tool",
|
"name": "Bank Reconciliation Tool",
|
||||||
|
@ -391,14 +391,14 @@ erpnext.accounts.bank_reconciliation.DialogManager = class DialogManager {
|
|||||||
fieldname: "deposit",
|
fieldname: "deposit",
|
||||||
fieldtype: "Currency",
|
fieldtype: "Currency",
|
||||||
label: "Deposit",
|
label: "Deposit",
|
||||||
options: "currency",
|
options: "account_currency",
|
||||||
read_only: 1,
|
read_only: 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldname: "withdrawal",
|
fieldname: "withdrawal",
|
||||||
fieldtype: "Currency",
|
fieldtype: "Currency",
|
||||||
label: "Withdrawal",
|
label: "Withdrawal",
|
||||||
options: "currency",
|
options: "account_currency",
|
||||||
read_only: 1,
|
read_only: 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -416,18 +416,18 @@ erpnext.accounts.bank_reconciliation.DialogManager = class DialogManager {
|
|||||||
fieldname: "allocated_amount",
|
fieldname: "allocated_amount",
|
||||||
fieldtype: "Currency",
|
fieldtype: "Currency",
|
||||||
label: "Allocated Amount",
|
label: "Allocated Amount",
|
||||||
options: "Currency",
|
options: "account_currency",
|
||||||
read_only: 1,
|
read_only: 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldname: "unallocated_amount",
|
fieldname: "unallocated_amount",
|
||||||
fieldtype: "Currency",
|
fieldtype: "Currency",
|
||||||
label: "Unallocated Amount",
|
label: "Unallocated Amount",
|
||||||
options: "Currency",
|
options: "account_currency",
|
||||||
read_only: 1,
|
read_only: 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldname: "currency",
|
fieldname: "account_currency",
|
||||||
fieldtype: "Link",
|
fieldtype: "Link",
|
||||||
label: "Currency",
|
label: "Currency",
|
||||||
options: "Currency",
|
options: "Currency",
|
||||||
|
Loading…
Reference in New Issue
Block a user