mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-29 18:04:46 +00:00
feat: account name and number columns on trial balance report on export
This commit is contained in:
@@ -122,6 +122,7 @@ frappe.query_reports["Trial Balance"] = {
|
|||||||
tree: true,
|
tree: true,
|
||||||
name_field: "account",
|
name_field: "account",
|
||||||
parent_field: "parent_account",
|
parent_field: "parent_account",
|
||||||
|
export_hidden_cols: true,
|
||||||
initial_depth: 3,
|
initial_depth: 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -402,6 +402,8 @@ def prepare_data(accounts, filters, parent_children_map, company_currency):
|
|||||||
"to_date": filters.to_date,
|
"to_date": filters.to_date,
|
||||||
"currency": company_currency,
|
"currency": company_currency,
|
||||||
"is_group_account": d.is_group,
|
"is_group_account": d.is_group,
|
||||||
|
"acc_name": d.account_name,
|
||||||
|
"acc_number": d.account_number,
|
||||||
"account_name": (
|
"account_name": (
|
||||||
f"{d.account_number} - {d.account_name}" if d.account_number else d.account_name
|
f"{d.account_number} - {d.account_name}" if d.account_number else d.account_name
|
||||||
),
|
),
|
||||||
@@ -436,6 +438,20 @@ def get_columns():
|
|||||||
"options": "Account",
|
"options": "Account",
|
||||||
"width": 300,
|
"width": 300,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "acc_name",
|
||||||
|
"label": _("Account Name"),
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 1,
|
||||||
|
"width": 250,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "acc_number",
|
||||||
|
"label": _("Account Number"),
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 1,
|
||||||
|
"width": 120,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "currency",
|
"fieldname": "currency",
|
||||||
"label": _("Currency"),
|
"label": _("Currency"),
|
||||||
|
|||||||
Reference in New Issue
Block a user