fix: KSA VAT QR Code arabic conversion
This commit is contained in:
parent
de784d8bfe
commit
31b9b84fdf
@ -41,18 +41,16 @@ def create_qr_code(doc, method):
|
|||||||
tlv_array = []
|
tlv_array = []
|
||||||
# Sellers Name
|
# Sellers Name
|
||||||
|
|
||||||
'''TODO: Fix arabic conversion'''
|
seller_name = frappe.db.get_value(
|
||||||
# seller_name = frappe.db.get_value(
|
'Company',
|
||||||
# 'Company',
|
doc.company,
|
||||||
# doc.company,
|
'company_name_in_arabic')
|
||||||
# 'company_name_in_arabic')
|
|
||||||
|
|
||||||
# if not seller_name:
|
if not seller_name:
|
||||||
# frappe.throw(_('Arabic name missing for {} in the company document'.format(doc.company)))
|
frappe.throw(_('Arabic name missing for {} in the company document'.format(doc.company)))
|
||||||
|
|
||||||
seller_name = doc.company
|
|
||||||
tag = bytes([1]).hex()
|
tag = bytes([1]).hex()
|
||||||
length = bytes([len(seller_name)]).hex()
|
length = bytes([len(seller_name.encode('utf-8'))]).hex()
|
||||||
value = seller_name.encode('utf-8').hex()
|
value = seller_name.encode('utf-8').hex()
|
||||||
tlv_array.append(''.join([tag, length, value]))
|
tlv_array.append(''.join([tag, length, value]))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user