fix: add currency select to Trial Balance

This commit is contained in:
Abhishek Balam 2020-09-30 01:32:42 +05:30
parent 2aea184f6f
commit 42d8db59f0
2 changed files with 8 additions and 1 deletions

View File

@ -72,6 +72,13 @@ frappe.require("assets/erpnext/js/financial_statements.js", function() {
"fieldtype": "Link", "fieldtype": "Link",
"options": "Finance Book", "options": "Finance Book",
}, },
{
"fieldname": "presentation_currency",
"label": __("Currency"),
"fieldtype": "Select",
"options": erpnext.get_presentation_currency_list(),
"default": frappe.defaults.get_user_default("currency")
},
{ {
"fieldname": "with_period_closing_entry", "fieldname": "with_period_closing_entry",
"label": __("Period Closing Entry"), "label": __("Period Closing Entry"),

View File

@ -56,7 +56,7 @@ def get_data(filters):
accounts = frappe.db.sql("""select name, account_number, parent_account, account_name, root_type, report_type, lft, rgt accounts = frappe.db.sql("""select name, account_number, parent_account, account_name, root_type, report_type, lft, rgt
from `tabAccount` where company=%s order by lft""", filters.company, as_dict=True) from `tabAccount` where company=%s order by lft""", filters.company, as_dict=True)
company_currency = erpnext.get_company_currency(filters.company) company_currency = filters.presentation_currency or erpnext.get_company_currency(filters.company)
if not accounts: if not accounts:
return None return None