Skip to content

Commit

Permalink
fix: handle invalid gstin in einvoice api
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanket322 committed Sep 30, 2024
1 parent 195eedd commit 74fc6ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions india_compliance/gst_india/api_classes/e_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class EInvoiceAPI(BaseAPI):
# Invalid GSTIN error
"3028": "GSTIN is invalid",
"3029": "GSTIN is not active",
"3001": "Requested data is not available",
}

def setup(self, doc=None, *, company_gstin=None):
Expand Down
2 changes: 1 addition & 1 deletion india_compliance/gst_india/utils/e_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def generate_e_invoice(docname, throw=True, force=False):
)

# Handle Invalid GSTIN Error
if result.error_code in ("3028", "3029"):
if result.error_code in ("3028", "3029", "3001"):
gstin = data.get("BuyerDtls").get("Gstin")
response = api.sync_gstin_info(gstin)

Expand Down

0 comments on commit 74fc6ed

Please sign in to comment.