Skip to content

Commit

Permalink
fix: KSA VAT report multi currency amount issue
Browse files Browse the repository at this point in the history
In KSA VAT report amount is not showing correctly for multi currencies because net_amount field is fetched instead of base_net_amount
  • Loading branch information
hamzaali15 committed Sep 1, 2022
1 parent 0a3ac82 commit 56d8962
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions erpnext/regional/report/ksa_vat/ksa_vat.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,16 +177,16 @@ def get_tax_data_for_each_vat_setting(vat_setting, filters, doctype):
"parent": invoice.name,
"item_tax_template": vat_setting.item_tax_template,
},
fields=["item_code", "net_amount"],
fields=["item_code", "base_net_amount"],
)

for item in invoice_items:
# Summing up total taxable amount
if invoice.is_return == 0:
total_taxable_amount += item.net_amount
total_taxable_amount += item.base_net_amount

if invoice.is_return == 1:
total_taxable_adjustment_amount += item.net_amount
total_taxable_adjustment_amount += item.base_net_amount

# Summing up total tax
total_tax += get_tax_amount(item.item_code, vat_setting.account, doctype, invoice.name)
Expand Down

0 comments on commit 56d8962

Please sign in to comment.