From b96526eefdd3f16fb4e980ee02c39e866ddb6044 Mon Sep 17 00:00:00 2001 From: hamzaali15 Date: Thu, 1 Sep 2022 15:02:21 +0500 Subject: [PATCH] fix: KSA VAT report multi currency amount issue In KSA VAT report amount is not showing correctly for multi currencies because net_amount field is fetched instead of base_net_amount (cherry picked from commit 56d8962e406a192839a8bf6962d745a9c2f1ea1d) --- erpnext/regional/report/ksa_vat/ksa_vat.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/regional/report/ksa_vat/ksa_vat.py b/erpnext/regional/report/ksa_vat/ksa_vat.py index 15996d2d1f8c..3571f962667c 100644 --- a/erpnext/regional/report/ksa_vat/ksa_vat.py +++ b/erpnext/regional/report/ksa_vat/ksa_vat.py @@ -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)