Skip to content

[MAIN]- The GST portal has introduced strict HSN reporting rules for GSTR-1, requiring you to separately declare B2B and B2C HSN summaries. And Business Central has provided standard Consolidate Sales HSN Summary in GSTR-1 Report - #9728

Open
Tabrez Ajaz (v-ajaztabrez) wants to merge 1 commit into
mainfrom
bugs/Bug-644091-Main-HSN-B2b-and-B2C-HSN-Summary-in-GSTR-1-Report

Conversation

@v-ajaztabrez

@v-ajaztabrez Tabrez Ajaz (v-ajaztabrez) commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Bug 644091: Incident 51000001110600 : [BC-IN] The GST portal has introduced strict HSN reporting rules for GSTR-1, requiring you to separately declare B2B and B2C HSN summaries. And Business Central has provided standard Consolidate Sales HSN Summary in GSTR-1 Report

AB#644091

Issue:
HSN export in GSTR-1 was not handling Nature of Supply correctly. Blank selection was not giving the old combined output, and explicit B2B/B2C selection needed to work separately.

Cause:
The HSN request/report path was splitting rows by Nature of Supply, and the report logic was depending on a request-page visibility flow that was not reliable. That caused duplicate rows and incorrect totals when both B2B and B2C data existed for the same HSN.

Solution:
Made the HSN report use a conditional filter on Nature of Supply only when B2B or B2C is explicitly selected. For blank selection, it now falls back to the combined HSN output as before, while still supporting separate B2B/B2C output when chosen.

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Stale Status Check Deleted

The Pull Request Build workflow run for this PR was older than 72 hours and has been deleted.

📋 Why was it deleted?

Status checks that are too old may no longer reflect the current state of the target branch. To ensure this PR is validated against the latest code and passes up-to-date checks, a fresh build is required.


🔄 How to trigger a new status check:

  1. 📤 Push a new commit to the PR branch, or
  2. 🔁 Close and reopen the PR

This will automatically trigger a new Pull Request Build workflow run.

Comment thread src/Apps/IN/INReports/app/src/report/GSTR1FileFormat.Report.al
Comment thread src/Apps/IN/INReports/app/src/report/GSTR1FileFormat.Report.al
@alexei-dobriansky

Copy link
Copy Markdown
Contributor

Agentic PR Review - Round 1

Recommendation: Request Changes

What this PR does

This PR adds an HSN request-page choice for B2B or B2C, and it applies a Nature of Supply filter to the GSTR-1 HSN queries only when that choice is explicit. The blank choice still produces the combined HSN output by reading both B2B and B2C grouped rows and adding them together.

The core HSN filter approach looks targeted and matches the stated regulatory need. However, the change touches statutory tax totals and exported Excel content, so it needs regression coverage. The diff also changes an existing report procedure from public to local, which is unrelated to the HSN fix and can break extensions that call it.

Suggestions

S1 - Missing HSN regression tests
Add tests for the three HSN modes: blank, B2B, and B2C. This report changes statutory GSTR-1 totals, and the PR should prove that combined output still combines both supplies while explicit choices split them.

S2 - Public report procedure becomes local
Do not change MakeExcelHeaderB2B from public to local in this PR. That is unrelated to the HSN change and can break extensions that call the report procedure.

Risk assessment and necessity

Risk: This is a high-sensitivity India GST reporting path. A wrong filter or grouping change can export incorrect GSTR-1 HSN taxable values, quantities, or tax amounts for B2B and B2C supplies. No BaseApp event publisher dependency was introduced.

Necessity: The linked Bug 644091 describes a real compliance need: GSTR-1 HSN summaries must support separate B2B and B2C reporting while preserving the old combined output. The scope is appropriate, but the missing tests and unrelated public-procedure visibility change should be fixed before merge.


[AI-PR-REVIEW] version=1 system=github pr=9728 round=1 by=alexei-dobriansky at=2026-08-03T10:19:34Z lastSha=0a56f31d1f04f26665ef3ba7d36b1161c729c36d suggestions=S1,S2

@alexei-dobriansky alexei-dobriansky left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address the suggestions

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

⚠️ Stale Status Check Deleted

The Pull Request Build workflow run for this PR was older than 72 hours and has been deleted.

📋 Why was it deleted?

Status checks that are too old may no longer reflect the current state of the target branch. To ensure this PR is validated against the latest code and passes up-to-date checks, a fresh build is required.


🔄 How to trigger a new status check:

  1. 📤 Push a new commit to the PR branch, or
  2. 🔁 Close and reopen the PR

This will automatically trigger a new Pull Request Build workflow run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Finance GitHub request for Finance area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants