Skip to content

fix: always emit tribFed and totTrib blocks#21

Merged
vitormattos merged 1 commit into
mainfrom
fix/always-emit-trib-blocks
Jul 2, 2026
Merged

fix: always emit tribFed and totTrib blocks#21
vitormattos merged 1 commit into
mainfrom
fix/always-emit-trib-blocks

Conversation

@vitormattos

Copy link
Copy Markdown
Member

📝 Summary

Ensure the DPS XML always includes the tribFed and totTrib blocks under trib.

This fixes SEFIN schema rejections where the gateway requires the full trib -> tribMun, tribFed, totTrib sequence even when no federal values were configured.

🧪 How to test

  1. Run vendor/bin/phpunit tests/Unit/Xml/XmlBuilderTest.php.
  2. Confirm the generated DPS XML always includes <tribFed/> and <totTrib>.
  3. Confirm empty tax totals default to 0.00 for federal, state, and municipal percentages.

⚙️ API / Back-end changes

  • Always render tribFed in DPS XML output.
  • Always render totTrib with 0.00 defaults when values are absent.
  • Unit and/or integration tests added – required for backend changes
  • Documentation updated (if applicable)

✅ Checklist

  • I have read and followed the contribution guide.
  • All existing tests pass.
  • New tests cover the changed behaviour.
  • Commit messages follow Conventional Commits.
  • Commits are signed off (git commit -s).

🤖 AI (if applicable)

  • The content of this PR was partially or fully generated using AI.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@vitormattos vitormattos merged commit 8e2ee3e into main Jul 2, 2026
10 checks passed
@vitormattos vitormattos deleted the fix/always-emit-trib-blocks branch July 2, 2026 02:54
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