Skip to content

Commit

Permalink
fix: set currency from company
Browse files Browse the repository at this point in the history
(cherry picked from commit 85f0595)
  • Loading branch information
Sanket322 authored and mergify[bot] committed Jul 24, 2024
1 parent 63d1ea3 commit 11b4c96
Showing 1 changed file with 16 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ def get_data(filters):

def get_columns(filters):
columns = []
company_currency = frappe.get_cached_value(
"Company", filters.get("company"), "default_currency"
)

if filters.summary_by == "Overview":
columns.extend(
Expand All @@ -71,35 +74,35 @@ def get_columns(filters):
"fieldname": "taxable_value",
"width": "120",
"fieldtype": "Currency",
"options": "Company:company:default_currency",
"options": company_currency,
},
{
"label": _("IGST Amount"),
"fieldname": "igst_amount",
"width": "120",
"fieldtype": "Currency",
"options": "Company:company:default_currency",
"options": company_currency,
},
{
"label": _("CGST Amount"),
"fieldname": "cgst_amount",
"width": "120",
"fieldtype": "Currency",
"options": "Company:company:default_currency",
"options": company_currency,
},
{
"label": _("SGST Amount"),
"fieldname": "sgst_amount",
"width": "120",
"fieldtype": "Currency",
"options": "Company:company:default_currency",
"options": company_currency,
},
{
"label": _("Total Cess Amount"),
"fieldname": "total_cess_amount",
"width": "120",
"fieldtype": "Currency",
"options": "Company:company:default_currency",
"options": company_currency,
},
]
)
Expand Down Expand Up @@ -232,7 +235,7 @@ def get_columns(filters):
"fieldname": "taxable_value",
"width": 120,
"fieldtype": "Currency",
"options": "Company:company:default_currency",
"options": company_currency,
},
{
"label": _("GST Rate"),
Expand All @@ -245,49 +248,49 @@ def get_columns(filters):
"fieldname": "cgst_amount",
"width": 120,
"fieldtype": "Currency",
"options": "Company:company:default_currency",
"options": company_currency,
},
{
"label": _("SGST Amount"),
"fieldname": "sgst_amount",
"width": 120,
"fieldtype": "Currency",
"options": "Company:company:default_currency",
"options": company_currency,
},
{
"label": _("IGST Amount"),
"fieldname": "igst_amount",
"width": 120,
"fieldtype": "Currency",
"options": "Company:company:default_currency",
"options": company_currency,
},
{
"label": _("Total Cess Amount"),
"fieldname": "total_cess_amount",
"width": 120,
"fieldtype": "Currency",
"options": "Company:company:default_currency",
"options": company_currency,
},
{
"label": _("Total Tax"),
"fieldname": "total_tax",
"width": 120,
"fieldtype": "Currency",
"options": "Company:company:default_currency",
"options": company_currency,
},
{
"label": _("Total Amount"),
"fieldname": "total_amount",
"width": 120,
"fieldtype": "Currency",
"options": "Company:company:default_currency",
"options": company_currency,
},
{
"label": _("Retured Invoice Total"),
"fieldname": "returned_invoice_total",
"width": 120,
"fieldtype": "Currency",
"options": "Company:company:default_currency",
"options": company_currency,
},
{
"label": _("Invoice Type"),
Expand Down

0 comments on commit 11b4c96

Please sign in to comment.