fix: Update transaction currency to company currency to show correct currency symbol
This commit is contained in:
@@ -158,7 +158,7 @@ def get_data(filters, conditions):
|
|||||||
|
|
||||||
# get data for group_by filter
|
# get data for group_by filter
|
||||||
row1 = frappe.db.sql(
|
row1 = frappe.db.sql(
|
||||||
""" select t1.currency , {} , {} from `tab{}` t1, `tab{} Item` t2 {}
|
""" select t4.default_currency AS currency , {} , {} from `tab{}` t1, `tab{} Item` t2 {}
|
||||||
where t2.parent = t1.name and t1.company = {} and {} between {} and {}
|
where t2.parent = t1.name and t1.company = {} and {} between {} and {}
|
||||||
and t1.docstatus = 1 and {} = {} and {} = {} {} {}
|
and t1.docstatus = 1 and {} = {} and {} = {} {} {}
|
||||||
""".format(
|
""".format(
|
||||||
@@ -392,8 +392,12 @@ def based_wise_columns_query(based_on, trans):
|
|||||||
else:
|
else:
|
||||||
frappe.throw(_("Project-wise data is not available for Quotation"))
|
frappe.throw(_("Project-wise data is not available for Quotation"))
|
||||||
|
|
||||||
based_on_details["based_on_select"] += "t1.currency,"
|
based_on_details["based_on_select"] += "t4.default_currency as currency,"
|
||||||
based_on_details["based_on_cols"].append("Currency:Link/Currency:120")
|
based_on_details["based_on_cols"].append("Currency:Link/Currency:120")
|
||||||
|
based_on_details["addl_tables"] += ", `tabCompany` t4"
|
||||||
|
based_on_details["addl_tables_relational_cond"] = (
|
||||||
|
based_on_details.get("addl_tables_relational_cond", "") + " and t1.company = t4.name"
|
||||||
|
)
|
||||||
|
|
||||||
return based_on_details
|
return based_on_details
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user