# UAE VAT Report Issue - VAT Amount Wrong

There is a issue with the TAX reporting for UAE:

VAT on Sales Calculation has issues based on the number of Items in the sales invoice

Say a sales Invoice has 3 items then the VAT amount reported is 3 times the expected VAT amount.

Will provide supporting images to understand the issue in details

1 Like

There are two sales Invoice Item as per the image above.

In the Sales Invoice VAT is calculated properly as shown below:

The following is the UAE VAT 201 report for this Sales Invoice:

Instead of AED 25 the VAT amount Reported as AED 50

Now the same sales invoice is added with an additional Item:

Calculated VAT in sales Invoice is correct as shown below:

Now generating the UAE VAT report have this following wrong reporting with VAT amount.

Instead of VAT amount of AED 30 the reported value is AED 90.

Also reported the issue in github

erpnext/erpnext/regional/report/uae_vat_201/uae_vat_201.py

def get_total_emiratewise(filters):
βββReturns Emiratewise Amount and Taxes.βββ
conditions = get_conditions(filters)
try:
return frappe.db.sql(ββ"
select
s.vat_emirate as emirate, sum(i.base_amount) as total, sum(s.total_taxes_and_charges)
from
`tabSales Invoice Item` i inner join `tabSales Invoice` s
on
i.parent = s.name
where
s.docstatus = 1 and i.is_exempt != 1 and i.is_zero_rated != 1
{where_conditions}
group by
s.vat_emirate;
ββ".format(where_conditions=conditions), filters)
except (IndexError, TypeError):
return 0

select
s.vat_emirate as emirate, sum(i.base_amount) astotal,sum(s.total_taxes_and_charges)

Trying to understand this select why Total is a sum of Sale Inoice Item and the Tax is picked from Sales Invoice field total_taxes_and_charges (and also the sum here is confusing)

Have sent a pull request.
https://github.com/frappe/erpnext/pull/27994

Thank you for reporting the issue.
Next time, please donβt leave the issue description empty on GitHub.

1 Like