fix: pre-commit hooks
This commit is contained in:
parent
f1e5a64c61
commit
4ec733fcc0
@ -1,11 +1,13 @@
|
||||
import frappe
|
||||
import os
|
||||
import json
|
||||
import os
|
||||
|
||||
import frappe
|
||||
|
||||
from erpnext.setup.setup_wizard.operations.taxes_setup import setup_taxes_and_charges
|
||||
|
||||
|
||||
def create_ksa_vat_setting(company):
|
||||
"""
|
||||
On creation of first company. Creates KSA VAT Setting"""
|
||||
"""On creation of first company. Creates KSA VAT Setting"""
|
||||
|
||||
company = frappe.get_doc('Company', company)
|
||||
setup_taxes_and_charges(company.name, company.country)
|
||||
@ -13,14 +15,14 @@ def create_ksa_vat_setting(company):
|
||||
file_path = os.path.join(os.path.dirname(__file__), '..', 'data', 'ksa_vat_settings.json')
|
||||
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',
|
||||
'company': company.name
|
||||
})
|
||||
|
||||
|
||||
for data in account_data:
|
||||
if data['type'] == 'Sales Account':
|
||||
for row in data['accounts']:
|
||||
@ -31,7 +33,7 @@ def create_ksa_vat_setting(company):
|
||||
'item_tax_template': f'{item_tax_template} - {company.abbr}',
|
||||
'account': f'{account} - {company.abbr}'
|
||||
})
|
||||
|
||||
|
||||
elif data['type'] == 'Purchase Account':
|
||||
for row in data['accounts']:
|
||||
item_tax_template = row['item_tax_template']
|
||||
|
Loading…
x
Reference in New Issue
Block a user