Skip to content

fix: update validation logic for non-GST items#4278

Open
ljain112 wants to merge 3 commits intoresilient-tech:version-15-hotfixfrom
ljain112:fix-non-gst-validations
Open

fix: update validation logic for non-GST items#4278
ljain112 wants to merge 3 commits intoresilient-tech:version-15-hotfixfrom
ljain112:fix-non-gst-validations

Conversation

@ljain112
Copy link
Copy Markdown
Member

@ljain112 ljain112 commented May 1, 2026

Issue: Validation for non-GST items was skipped due to which mandatory fields and status were not set.
Now all the validations are run for non gst items also.

  • Now, the HSN Code will also be validated as per the GST Settings.

@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented May 1, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity

Metric Results
Complexity 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 1, 2026

Confidence Score: 5/5

Safe to merge — the fix is narrowly scoped, all edge cases are handled by existing guards in GSTAccounts.validate, and new tests cover both the happy path and the error path.

No P0 or P1 issues found. The refactor correctly delegates to existing class guards (has_gst_tax_rows, setup_defaults) and update_taxable_values is still reached via validate_transaction. Tests are well-targeted.

No files require special attention.

Important Files Changed

Filename Overview
india_compliance/gst_india/overrides/transaction.py Removes early-return-False for pure non-GST invoices in validate_items and moves tax-account-for-non-GST validation into the GSTAccounts class; logic is correct and well-placed.
india_compliance/gst_india/overrides/test_transaction.py Adds test_non_gst_transaction_with_gst_accounts to verify the new validation path; regex and assertion are correct.
india_compliance/gst_india/overrides/test_purchase_invoice.py Adds test_itc_claim_period_is_set_for_non_gst_invoice to verify non-GST invoices now get itc_claim_period populated correctly.
india_compliance/gst_india/doctype/gstr_3b_report/test_gstr_3b_report.py Removes the filter_by key from the GSTR-3B report test fixture; straightforward cleanup.

Reviews (2): Last reviewed commit: "fix: handle empty items list in non-GST ..." | Re-trigger Greptile

Comment thread india_compliance/gst_india/overrides/transaction.py
Comment thread india_compliance/gst_india/overrides/transaction.py
@ljain112
Copy link
Copy Markdown
Member Author

ljain112 commented May 1, 2026

@greptileai

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