refactor: make strings translate

This commit is contained in:
Ahmad 2021-10-10 21:17:59 +02:00
parent 0ab57d49c1
commit cb2213ef0c
2 changed files with 3 additions and 4 deletions

View File

@ -150,7 +150,7 @@ def get_tax_data_for_each_vat_setting(vat_setting, filters, doctype):
def append_data(data, title, amount, adjustment_amount, vat_amount):
"""Returns data with appended value."""
data.append({"title":title, "amount": amount, "adjustment_amount": adjustment_amount, "vat_amount": vat_amount})
data.append({"title": _(title), "amount": amount, "adjustment_amount": adjustment_amount, "vat_amount": vat_amount})
def get_tax_amount(item_code, account_head, doctype, parent):
if doctype == 'Sales Invoice':
@ -173,4 +173,4 @@ def get_tax_amount(item_code, account_head, doctype, parent):
tax_amount = value[1]
break
return tax_amount
return tax_amount

View File

@ -16,7 +16,6 @@ def create_ksa_vat_setting(company):
with open(file_path, 'r') as json_file:
account_data = json.load(json_file)
# Creating KSA VAT Setting
ksa_vat_setting = frappe.get_doc({
'doctype': 'KSA VAT Setting',
@ -44,4 +43,4 @@ def create_ksa_vat_setting(company):
'account': f'{account} - {company.abbr}'
})
ksa_vat_setting.save()
ksa_vat_setting.save()