mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-13 11:55:11 +00:00
feat: add asset name to Asset Depreciations and Balances report
(cherry picked from commit b4cf6a1fb9)
This commit is contained in:
@@ -354,7 +354,7 @@ def get_asset_details_for_grouped_by_category(filters):
|
|||||||
# nosemgrep
|
# nosemgrep
|
||||||
return frappe.db.sql(
|
return frappe.db.sql(
|
||||||
f"""
|
f"""
|
||||||
SELECT a.name,
|
SELECT a.name, a.asset_name,
|
||||||
ifnull(sum(case when a.purchase_date < %(from_date)s then
|
ifnull(sum(case when a.purchase_date < %(from_date)s then
|
||||||
case when ifnull(a.disposal_date, 0) = 0 or a.disposal_date >= %(from_date)s then
|
case when ifnull(a.disposal_date, 0) = 0 or a.disposal_date >= %(from_date)s then
|
||||||
a.gross_purchase_amount
|
a.gross_purchase_amount
|
||||||
@@ -583,6 +583,14 @@ def get_columns(filters):
|
|||||||
"width": 120,
|
"width": 120,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
columns.append(
|
||||||
|
{
|
||||||
|
"label": _("Asset Name"),
|
||||||
|
"fieldname": "asset_name",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"width": 140,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
columns += [
|
columns += [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user