Skip to content

[29.X]-Inconsistent Validation of Non-Deductible VAT % for Purchase Lines Sharing the Same VAT Identifier - #10880

Open
Fixes4BC (neeleshsinghal) wants to merge 1 commit into
releases/29.xfrom
bugs/Bug-647053-NonDeductible-VAT-Purch-Lines-Same-VAT-Identifier-v6-29
Open

[29.X]-Inconsistent Validation of Non-Deductible VAT % for Purchase Lines Sharing the Same VAT Identifier#10880
Fixes4BC (neeleshsinghal) wants to merge 1 commit into
releases/29.xfrom
bugs/Bug-647053-NonDeductible-VAT-Purch-Lines-Same-VAT-Identifier-v6-29

Conversation

@neeleshsinghal

@neeleshsinghal Fixes4BC (neeleshsinghal) commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Fixes AB#648529

… Lines Sharing the Same VAT Identifier- #10607 (#10609)

[AB#647365](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/647365)

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: neeleshsinghal <241776335+neeleshsinghal@users.noreply.github.com>
(cherry picked from commit 20c3a9a)
@neeleshsinghal
Fixes4BC (neeleshsinghal) requested a review from a team September 1, 2026 08:31
@neeleshsinghal
Fixes4BC (neeleshsinghal) requested a review from a team as a code owner September 1, 2026 08:31
@github-actions github-actions Bot added the Team: Finance GitHub request for Finance area label Sep 1, 2026
@github-actions github-actions Bot added this to the Version 29.1 milestone Sep 1, 2026
@alexei-dobriansky

Copy link
Copy Markdown
Contributor

Good Sense Reviewer - Round 1

Recommendation: Request Changes

What this PR does

This change removes the early exit for zero Non-Deductible VAT % on purchase lines, so the line check compares both entry orders for lines with the same VAT Identifier. That addresses the document-line part of the reported bug, and the added tests cover the line validation path. The fix is still incomplete because the invalid VAT Posting Setup combination can still be created before a document line is entered.

Problem-solution fit

Fit: Partial

The bug asks for consistent validation on purchase lines and prevention of the inconsistent setup. The line validation is covered, but the setup validation path still allows a zero/non-allowed setup to share a VAT Identifier with an allowed non-zero setup.

Suggestions

S1 (🔴 High): Setup validation still allows invalid pairs
The line check fixes one entry order, but the same invalid VAT Posting Setup can still be saved. CheckVATPostingSetupChangeIsAllowed exits when the current setup does not allow Non-Deductible VAT, so a zero-percent setup can share a VAT Identifier with an allowed non-zero setup. Add setup validation for that pair and cover it with a regression test.

Risk assessment and necessity

Risk: This touches VAT validation on purchase documents, so a missed path can leave inconsistent VAT setup and later affect VAT amount grouping. The code change is narrow and has line-level tests, but the setup path is still a real regression surface.

Necessity: The change is needed because the reported scenario can let two purchase lines with the same VAT Identifier use different Non-Deductible VAT percentages. The scope should include both the document-line validation and the VAT Posting Setup validation.


[AI-PR-REVIEW] version=1 promptVersion=4 system=github pr=10880 round=1 by=alexei-dobriansky at=2026-09-01T13:18:44Z lastSha=23035ccafb0c61389f1d02f779fc5f467f5cf5eb reviewKey=affdfe360b104cfa76a4ea73ac547bed59738a736f9c68fd5b866b9805dcaffe suggestions=S1@c7e5e2f6

@github-actions

github-actions Bot commented Sep 5, 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

Team: Finance GitHub request for Finance area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants