Skip to content

Commit

Permalink
fix: refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
ljain112 committed Nov 15, 2024
1 parent c5b083c commit 0843f65
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions india_compliance/gst_india/utils/ve_sales_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,8 @@ def import_invoices():

try:
if frappe.db.exists("Sales Invoice", data.name):
doc = frappe.get_doc("Sales Invoice", data.name)
if doc.docstatus == 0:
doc.submit()

continue

doc = frappe.new_doc("Sales Invoice")
doc.name = data.name
doc.update(
Expand Down Expand Up @@ -94,8 +91,8 @@ def import_invoices():
doc.save()

update_round_off(doc, data)
frappe.db.commit()
doc.submit()
frappe.db.commit()
except Exception as e:
print(e)

Expand Down

0 comments on commit 0843f65

Please sign in to comment.