While generating e-invoice it is showing such error:
This error is raised by the GST Authority.Can you share Integration request because as per GST Portal it is valid.
{
“exception”: “frappe.exceptions.ValidationError: 2176 : HSN code(s)-550810 is invalid”,
“exc_type”: “ValidationError”,
“_exc_source”: “india_compliance (app)”,
“exc”: “["Traceback (most recent call last):\n File \"apps/frappe/frappe/app.py\", line 114, in application\n response = frappe.api.handle(request)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"apps/frappe/frappe/api/init.py\", line 49, in handle\n data = endpoint(**arguments)\n ^^^^^^^^^^^^^^^^^^^^^\n File \"apps/frappe/frappe/api/v1.py\", line 36, in handle_rpc_call\n return frappe.handler.handle()\n ^^^^^^^^^^^^^^^^^^^^^^^\n File \"apps/frappe/frappe/handler.py\", line 49, in handle\n data = execute_cmd(cmd)\n ^^^^^^^^^^^^^^^^\n File \"apps/frappe/frappe/handler.py\", line 85, in execute_cmd\n return frappe.call(method, **frappe.form_dict)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"apps/frappe/frappe/init.py\", line 1768, in call\n return fn(*args, **newargs)\n ^^^^^^^^^^^^^^^^^^^^\n File \"apps/frappe/frappe/utils/typing_validations.py\", line 31, in wrapper\n return func(*args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^\n File \"apps/india_compliance/india_compliance/gst_india/utils/e_invoice.py\", line 178, in generate_e_invoice\n raise e\n File \"apps/india_compliance/india_compliance/gst_india/utils/e_invoice.py\", line 131, in generate_e_invoice\n result = api.generate_irn(data)\n ^^^^^^^^^^^^^^^^^^^^^^\n File \"apps/india_compliance/india_compliance/gst_india/api_classes/e_invoice.py\", line 77, in generate_irn\n result = self.post(endpoint=\"invoice\", json=data)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"apps/india_compliance/india_compliance/gst_india/api_classes/base.py\", line 81, in post\n return self._make_request(\"POST\", *args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"apps/india_compliance/india_compliance/gst_india/api_classes/base.py\", line 165, in _make_request\n raise e\n File \"apps/india_compliance/india_compliance/gst_india/api_classes/base.py\", line 156, in _make_request\n response_json = self.process_response(response_json)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"apps/india_compliance/india_compliance/gst_india/api_classes/base.py\", line 186, in process_response\n self.handle_error_response(response)\n File \"apps/india_compliance/india_compliance/gst_india/api_classes/base.py\", line 200, in handle_error_response\n frappe.throw(\n File \"apps/frappe/frappe/init.py\", line 645, in throw\n msgprint(\n File \"apps/frappe/frappe/init.py\", line 610, in msgprint\n _raise_exception()\n File \"apps/frappe/frappe/init.py\", line 561, in _raise_exception\n raise exc\nfrappe.exceptions.ValidationError: 2176 : HSN code(s)-550810 is invalid\n"]”,
“_server_messages”: “["{\"message\": \"2176 : HSN code(s)-550810 is invalid\", \"title\": \"API Request Failed\", \"indicator\": \"red\", \"raise_exception\": 1, \"__frappe_exc_id\": \"33f84a86d7cd77224349ad3c3429a04313788bc6cbdff82c3675ecc3\"}"]”
}
i tried with 8 digit code
55082000
and it created e invoice
so i think when i disabled the 6 digits… it still expects 8 digits…
As per GST Portal, 550810
is valid. However, as per e-Invoice portal, it’s invalid.
We have created HSN codes as per GST Portal, and hence you see 550810.
We will refine HSN codes to only exclude such codes with inconsistency.
For your current use case, you can delete them manually to avoid it’s usage.
For more verification:
e-Invoice Portal Masters: MasterCodes - nic.einvoice.web
GST Portal HSN code search: Goods & Services Tax (GST) | Services