Skip to content

Commit

Permalink
fix: set gst breakup only for valid docs
Browse files Browse the repository at this point in the history
(cherry picked from commit e4a58ea)
  • Loading branch information
vorasmit authored and mergify[bot] committed Feb 23, 2024
1 parent 6201457 commit e88ef22
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions india_compliance/gst_india/overrides/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,7 @@


def set_gst_breakup(doc, method=None):
if doc.doctype not in DOCTYPES_WITH_GST_DETAIL:
return

doc_meta = frappe.get_meta(doc.doctype)
if not (doc_meta and doc_meta.get_field("custom_gst_breakup_table")):
if ignore_gst_validations(doc) or not doc.place_of_supply or not doc.company_gstin:
return

doc.custom_gst_breakup_table = frappe.render_template(
Expand Down

0 comments on commit e88ef22

Please sign in to comment.