diff --git a/erpnext/regional/report/uae_vat_201/uae_vat_201.py b/erpnext/regional/report/uae_vat_201/uae_vat_201.py index 78dcb367a4..c151c622a6 100644 --- a/erpnext/regional/report/uae_vat_201/uae_vat_201.py +++ b/erpnext/regional/report/uae_vat_201/uae_vat_201.py @@ -8,8 +8,7 @@ from frappe import _ def execute(filters=None): columns = get_columns() data, emirates, amounts_by_emirate = get_data(filters) - chart = get_chart(emirates, amounts_by_emirate) - return columns, data, None, chart + return columns, data def get_columns(): """Creates a list of dictionaries that are used to generate column headers of the data table.""" @@ -49,32 +48,6 @@ def get_data(filters = None): append_vat_on_expenses(data, filters) return data, emirates, amounts_by_emirate -def get_chart(emirates, amounts_by_emirate): - """Returns chart data.""" - labels = [] - amount = [] - vat_amount = [] - for emirate in emirates: - if emirate in amounts_by_emirate: - amount.append(amounts_by_emirate[emirate]["raw_amount"]) - vat_amount.append(amounts_by_emirate[emirate]["raw_vat_amount"]) - labels.append(emirate) - - datasets = [] - datasets.append({'name': _('Amount (AED)'), 'values': amount}) - datasets.append({'name': _('Vat Amount (AED)'), 'values': vat_amount}) - - chart = { - "type": "bar", - "fieldtype": "Currency", - "data": { - 'labels': labels, - 'datasets': datasets - } - } - - return chart - def append_vat_on_sales(data, filters): """Appends Sales and All Other Outputs.""" append_data(data, '', _('VAT on Sales and All Other Outputs'), '', '') diff --git a/erpnext/regional/united_arab_emirates/utils.py b/erpnext/regional/united_arab_emirates/utils.py index 872839495a..7d5fd6ecf8 100644 --- a/erpnext/regional/united_arab_emirates/utils.py +++ b/erpnext/regional/united_arab_emirates/utils.py @@ -59,7 +59,7 @@ def get_tax_accounts(company): if not tax_accounts_list and not frappe.flags.in_test: frappe.throw(_('Please set Vat Accounts for Company: "{0}" in UAE VAT Settings').format(company)) for tax_account in tax_accounts_list: - for _, name in tax_account.items(): + for account, name in tax_account.items(): tax_accounts_dict[name] = name return tax_accounts_dict