From b10a2b87b65f3c29ed0aae7f30099e9c8ad75377 Mon Sep 17 00:00:00 2001 From: hamzaali15 Date: Mon, 5 Sep 2022 11:15:43 +0500 Subject: [PATCH] fix: QR Code multi currency issue When try to scan qr code on app it is showing correct values for multi currencies because it is not getting base amount --- erpnext/regional/saudi_arabia/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/regional/saudi_arabia/utils.py b/erpnext/regional/saudi_arabia/utils.py index 4557730e4da5..df9ada44761b 100644 --- a/erpnext/regional/saudi_arabia/utils.py +++ b/erpnext/regional/saudi_arabia/utils.py @@ -87,7 +87,7 @@ def create_qr_code(doc, method=None): tlv_array.append("".join([tag, length, value])) # Invoice Amount - invoice_amount = str(doc.grand_total) + invoice_amount = str(doc.base_grand_total) tag = bytes([4]).hex() length = bytes([len(invoice_amount)]).hex() value = invoice_amount.encode("utf-8").hex() @@ -147,7 +147,7 @@ def get_vat_amount(doc): for tax in doc.get("taxes"): if tax.account_head in vat_accounts: - vat_amount += tax.tax_amount + vat_amount += tax.base_tax_amount return vat_amount