fix: currency in bank reconciliation tool

This commit is contained in:
Saqib Ansari 2022-02-17 14:14:47 +05:30
parent 85adb947bf
commit 60674e52b8

View File

@ -64,6 +64,7 @@ frappe.ui.form.on("Bank Reconciliation Tool", {
"account_currency", "account_currency",
(r) => { (r) => {
frm.currency = r.account_currency; frm.currency = r.account_currency;
frm.trigger("render_chart");
} }
); );
} }
@ -128,7 +129,7 @@ frappe.ui.form.on("Bank Reconciliation Tool", {
} }
}, },
render_chart(frm) { render_chart: frappe.utils.debounce((frm) => {
frm.cards_manager = new erpnext.accounts.bank_reconciliation.NumberCardManager( frm.cards_manager = new erpnext.accounts.bank_reconciliation.NumberCardManager(
{ {
$reconciliation_tool_cards: frm.get_field( $reconciliation_tool_cards: frm.get_field(
@ -140,7 +141,7 @@ frappe.ui.form.on("Bank Reconciliation Tool", {
currency: frm.currency, currency: frm.currency,
} }
); );
}, }, 500),
render(frm) { render(frm) {
if (frm.doc.bank_account) { if (frm.doc.bank_account) {