Skip to content

Commit

Permalink
fix: use company name to create address in setup wizard
Browse files Browse the repository at this point in the history
  • Loading branch information
ljain112 committed Nov 2, 2023
1 parent 04f8cf6 commit 2d21a1f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions india_compliance/setup_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def setup_company_gstin_details(params):
gstin_info = get_gstin_info(params.company_gstin, throw_error=False)

update_company_info(params, gstin_info.gst_category)
create_address(gstin_info)
create_address(gstin_info, params)


def update_company_info(params, gst_category=None):
Expand All @@ -74,13 +74,13 @@ def update_company_info(params, gst_category=None):
company_doc.save()


def create_address(gstin_info: dict) -> None:
def create_address(gstin_info: dict, params: dict) -> None:
if not gstin_info.permanent_address:
return

address = frappe.new_doc("Address")
address.append(
"links", {"link_doctype": "Company", "link_name": gstin_info.business_name}
"links", {"link_doctype": "Company", "link_name": params.company_name}
)

for key, value in gstin_info.permanent_address.items():
Expand Down

0 comments on commit 2d21a1f

Please sign in to comment.