mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-06 12:04:00 +00:00
fix: get default company currency
(cherry picked from commit 984947f333)
This commit is contained in:
@@ -35,6 +35,12 @@ def get_columns(filters):
|
|||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"width": 140,
|
"width": 140,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": _("Currency"),
|
||||||
|
"fieldname": "currency",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"width": 80,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": _("Territory"),
|
"label": _("Territory"),
|
||||||
"options": "Territory",
|
"options": "Territory",
|
||||||
@@ -43,7 +49,7 @@ def get_columns(filters):
|
|||||||
"width": 100,
|
"width": 100,
|
||||||
},
|
},
|
||||||
{"label": _("Posting Date"), "fieldname": "posting_date", "fieldtype": "Date", "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"),
|
"label": _("Sales Partner"),
|
||||||
"options": "Sales Partner",
|
"options": "Sales Partner",
|
||||||
@@ -61,6 +67,7 @@ def get_columns(filters):
|
|||||||
"label": _("Total Commission"),
|
"label": _("Total Commission"),
|
||||||
"fieldname": "total_commission",
|
"fieldname": "total_commission",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
|
"options": "currency",
|
||||||
"width": 120,
|
"width": 120,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
@@ -86,6 +93,9 @@ def get_entries(filters):
|
|||||||
filters,
|
filters,
|
||||||
as_dict=1,
|
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
|
return entries
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user