Skip to content

Commit

Permalink
fix: QR Code multi currency issue
Browse files Browse the repository at this point in the history
When try to scan qr code on app it is showing correct values for multi currencies because it is not getting base amount

(cherry picked from commit b10a2b8)
  • Loading branch information
hamzaali15 authored and mergify[bot] committed Sep 5, 2022
1 parent edb1002 commit d14a9a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions erpnext/regional/saudi_arabia/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,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()
Expand Down Expand Up @@ -144,7 +144,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

Expand Down

0 comments on commit d14a9a1

Please sign in to comment.