Skip to content

Add Ladakh (38) to the Indian GSTIN state codes - #526

Open
ShaktiOSindia wants to merge 1 commit into
arthurdejong:masterfrom
ShaktiOSindia:gstin-ladakh
Open

ShaktiOSindia wants to merge 1 commit into
arthurdejong:masterfrom
ShaktiOSindia:gstin-ladakh

Conversation

@ShaktiOSindia

Copy link
Copy Markdown

Ladakh became a union territory separate from Jammu and Kashmir on 31 October 2019, and GSTINs registered there start with state code 38. stdnum.in_.gstin stops at 37, so these numbers are rejected with InvalidComponent even though their check digits are correct.

On python-stdnum 2.2, all four of these real Ladakh registrations (companies, taken from public GSTIN listings) fail only on the state code. Their Luhn mod 36 check digits are valid:

38AAACB2894G1ZK   Bharti Airtel Ltd
38AAHCP1178L1ZX   Ibibo Group Pvt Ltd
38AACCN6194P1ZM   Air India Ltd
38AAACU5552C1ZG

The change adds '38': 'Ladakh' and a doctest for info() using the first number. The full test suite passes locally (413 passed, 100% coverage).

Code 97 ("Other Territory") might also need adding, but I have no real numbers to verify it, so it is not included here.

This change was prepared with Claude Code (Anthropic's AI coding assistant), which found the bug, wrote the patch and ran the tests. I reviewed it before submitting.

Ladakh became a union territory separate from Jammu and Kashmir on
31 October 2019 and GSTINs issued there start with state code 38. These
were rejected with InvalidComponent although their check digits are
correct, for example 38AAACB2894G1ZK (Bharti Airtel Ltd, Ladakh).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant