fix: get default company currency

(cherry picked from commit 984947f333)
This commit is contained in:
mithili
2025-07-08 19:22:23 +05:30
committed by Mergify
parent 49befc1dfd
commit 622052b950

View File

@@ -35,6 +35,12 @@ def get_columns(filters):
"fieldtype": "Link",
"width": 140,
},
{
"label": _("Currency"),
"fieldname": "currency",
"fieldtype": "Data",
"width": 80,
},
{
"label": _("Territory"),
"options": "Territory",
@@ -43,7 +49,7 @@ def get_columns(filters):
"width": 100,
},
{"label": _("Posting Date"), "fieldname": "posting_date", "fieldtype": "Date", "width": 100},
{"label": _("Amount"), "fieldname": "amount", "fieldtype": "Currency", "width": 120},
{"label": _("Amount"), "fieldname": "amount", "fieldtype": "Currency", "options": "currency", "width": 120},
{
"label": _("Sales Partner"),
"options": "Sales Partner",
@@ -61,6 +67,7 @@ def get_columns(filters):
"label": _("Total Commission"),
"fieldname": "total_commission",
"fieldtype": "Currency",
"options": "currency",
"width": 120,
},
]
@@ -86,6 +93,9 @@ def get_entries(filters):
filters,
as_dict=1,
)
currency_company = frappe.get_cached_value("Company", filters.get("company"), "default_currency")
for row in entries:
row["currency"] = currency_company
return entries