Skip to content

Commit

Permalink
fix(india): e-invoice eligibility if company gstin is not configured (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
nextchamp-saqib committed Jun 8, 2022
1 parent f830b57 commit fb4f8d8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions erpnext/regional/india/e_invoice/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ def validate_eligibility(doc):
return False

invalid_company = not frappe.db.get_value("E Invoice User", {"company": doc.get("company")})
invalid_company_gstin = not frappe.db.get_value(
"E Invoice User", {"gstin": doc.get("company_gstin")}
)
invalid_supply_type = doc.get("gst_category") not in [
"Registered Regular",
"Registered Composition",
Expand All @@ -71,6 +74,7 @@ def validate_eligibility(doc):

if (
invalid_company
or invalid_company_gstin
or invalid_supply_type
or company_transaction
or no_taxes_applied
Expand Down

0 comments on commit fb4f8d8

Please sign in to comment.