Repository navigation
Document India GST e-invoicing: research, readiness and feature design - #456
Merged
Merged
Conversation
Three documents under docs/ for the optional India e-invoicing feature asked for in #29, answering #42 and naming the fixtures for #43 and #44: - INDIA_EINVOICING_RESEARCH.md: what the regime and the IRPs require, with a source for every rule - thresholds, the six IRPs and access models, the INV-01 v1.1 schema, NIC validations and tolerances, IRN, signed QR, cancellation, the offline bulk tool, sandbox endpoints and error codes, open-source references, indicative pricing, 2025-2026 changes. Secondary and unconfirmed points are marked. - INDIA_EINVOICING_READINESS.md: what the code on develop already holds, file by file, and a field-by-field contract marking each schema attribute existing, derivable, unclear, missing or not supported. - INDIA_EINVOICING_DESIGN.md: the proposal - an offline layer (validate, export, record IRN, print QR) behind module_einvoice_enable, shipped first; live submission as a separately accepted connector design with three options compared. Includes the feature-switch registration checklist, additive model fields, finding codes, synthetic fixtures with checksum-valid placeholder GSTINs, a PR plan and open questions. The README documentation table and the contributor quickstart point at them. Documentation only; no behaviour changes. Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: Sridhar Bala <[email protected]>
Contributor
|
Merged to Try it at https://develop.posnic.io, or run it yourself: git fetch origin develop && git checkout develop
npm install && npm --prefix api install
npm run dev # then http://localhost:3000When you have tested it, say what you did and what happened, and set Reporting that something is broken is as useful as fixing it. It is |
sridharkalaibala
added a commit
that referenced
this pull request
Sep 4, 2026
Three pieces of the India GST work opened by #456. CODE (PR 2 of the design's delivery plan, issue #43) api/src/services/einvoice/ - pure functions, no database, no network, not yet wired to a route: - gstin.js: the mod-36 check digit, so a transposed character is caught at the till instead of by the portal after the customer has left. The existing regex accepts 33AAAAA0000A1Z0 as readily as ...1Z9. - uqc.js + uqc_codes.json: GST unit codes, and the mapping from the free text Posnic stores. A unit nobody can map produces NOTHING rather than OTH - choosing OTHERS is a decision about what a shop declares, and it is the shop's to make. - applicability.js: the India-only gate, in one place. Availability is checked before the feature switch, so module_einvoice_enable left on by a shop that changed country cannot revive an Indian-only feature. - findings.js: the EI-xxx catalogue, with the screen that fixes each. - validate.js: the checks. A walk-in sale is not_applicable, not an error; a customer MARKED registered with no GSTIN still is one. 121 tests over four suites. The robustness test found a real crash: a null entry in items threw, which would have taken the readiness page down for any shop with one damaged row. It is now reported (EI-113) rather than skipped, because exporting an invoice with a line quietly missing would file a total that does not match the printed bill. EI-012 is a warning, not the block the design proposed. The export takes the state code from the GSTIN, so it is consistent either way, and EI-108 blocks the case that matters. DOCS docs/INDIA_GST_RETURNS_GAPS.md (issue #45): what the GST reports compute today, verified by hand against the code. One filing-capable artefact and one correct tax position; around them a GSTR-1 aggregation that groups without accumulators and loses duplicate lines, credit notes filed in the invoice's month rather than the return's, unregistered credit notes dropped by an inherited filter, four DOM-scraping exports no filing tool can read, and no exemption, reverse-charge or cess field anywhere. Twelve items in dependency order. docs/INDIA_GOVERNMENT_INTEGRATION.md: how software is actually registered with the GST system. The e-invoice sandbox is free and self-service today; production credentials need ~390 logged operations run through our own application; return-filing APIs are GSP-only and that window is closed. Records, with the source, that no government list of recommended billing software exists. Corrects a claim that HSN is never persisted on a sale line: the model does not declare it, but the line schema is strict:false and sale.service.js does write it. Co-Authored-By: Claude Opus 5 <[email protected]> Signed-off-by: Sridhar Bala <[email protected]>
Merged
20 of 21 tasks
sridharkalaibala
added a commit
that referenced
this pull request
Sep 4, 2026
Three pieces of the India GST work opened by #456. CODE (PR 2 of the design's delivery plan, issue #43) api/src/services/einvoice/ - pure functions, no database, no network, not yet wired to a route: - gstin.js: the mod-36 check digit, so a transposed character is caught at the till instead of by the portal after the customer has left. The existing regex accepts 33AAAAA0000A1Z0 as readily as ...1Z9. - uqc.js + uqc_codes.json: GST unit codes, and the mapping from the free text Posnic stores. A unit nobody can map produces NOTHING rather than OTH - choosing OTHERS is a decision about what a shop declares, and it is the shop's to make. - applicability.js: the India-only gate, in one place. Availability is checked before the feature switch, so module_einvoice_enable left on by a shop that changed country cannot revive an Indian-only feature. - findings.js: the EI-xxx catalogue, with the screen that fixes each. - validate.js: the checks. A walk-in sale is not_applicable, not an error; a customer MARKED registered with no GSTIN still is one. 121 tests over four suites. The robustness test found a real crash: a null entry in items threw, which would have taken the readiness page down for any shop with one damaged row. It is now reported (EI-113) rather than skipped, because exporting an invoice with a line quietly missing would file a total that does not match the printed bill. EI-012 is a warning, not the block the design proposed. The export takes the state code from the GSTIN, so it is consistent either way, and EI-108 blocks the case that matters. DOCS docs/INDIA_GST_RETURNS_GAPS.md (issue #45): what the GST reports compute today, verified by hand against the code. One filing-capable artefact and one correct tax position; around them a GSTR-1 aggregation that groups without accumulators and loses duplicate lines, credit notes filed in the invoice's month rather than the return's, unregistered credit notes dropped by an inherited filter, four DOM-scraping exports no filing tool can read, and no exemption, reverse-charge or cess field anywhere. Twelve items in dependency order. docs/INDIA_GOVERNMENT_INTEGRATION.md: how software is actually registered with the GST system. The e-invoice sandbox is free and self-service today; production credentials need ~390 logged operations run through our own application; return-filing APIs are GSP-only and that window is closed. Records, with the source, that no government list of recommended billing software exists. Corrects a claim that HSN is never persisted on a sale line: the model does not declare it, but the line schema is strict:false and sale.service.js does write it. Signed-off-by: Sridhar Bala <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Documentation only. It adds the research, readiness evaluation and feature design for India GST e-invoicing as an optional, off-by-default feature under Manage > Features, and decides nothing about live IRP submission beyond laying out the options.
Addresses #42 (the offline field contract) and PR slices 1 and 7 of #29 (design, and connector boundary). Names the fixtures for #43 and #44 and gives #100 something true to describe. No code, schema, report or receipt changes.
Three new documents under
docs/:INDIA_EINVOICING_RESEARCH.mdINDIA_EINVOICING_READINESS.mddevelopalready holds, file by file, and a field-by-field contract table marking each schema attribute Existing / Derivable / Unclear / Missing / Not supported. Lists the cases the code cannot express today and the data-quality problems in shipped JSON (state names used for place of supply, stalehsn.json,hsncode: '0'seeds).INDIA_EINVOICING_DESIGN.mdmodule_einvoice_enableswitch and every registration point it needs, settings, additive model fields, the pure contract module and its finding codes, the deterministic export, result import, printing, sync, ACL, synthetic fixtures (checksum-valid placeholder GSTINs), a ten-row PR plan mapped to issues, and open questions for maintainers.Two small edits link them: a row in the README documentation table and a pointer in the contributor quickstart's "Tax, GST, or e-invoice PR" section.
Acceptance criteria covered
From #42:
From #29, slices 1 and 7: the design PR and the connector design PR are both in
INDIA_EINVOICING_DESIGN.md. The remaining #29 slices are mapped to PRs in its "Delivery plan" and are not part of this change.How was it tested?
git diff --checkcleanChecklist
git commit -s, DCO)docs/Notes for reviewers