Repository navigation
feat: model NT009 credit reversals and advance-payment references (#95) - #103
Merged
vitormattos merged 1 commit intoOct 9, 2026
Merged
Conversation
…yment references (#95) Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
vitormattos
marked this pull request as ready for review
October 9, 2026 04:59
vitormattos
deleted the
feat/issue-95-nt009-credit-reversal-advance-payments
branch
October 9, 2026 11:35
This was referenced Oct 9, 2026
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.
Issue #95 — source-backed NT009 groups after merged #102
Continues from main at
ff0a325fad59b78dc85c15154381969ab8965577; the earlier PR #102 is merged. Implements two missing Annex VI v1.04.01 groups only for the opt-in non-emitting NT009 preview.Implemented
IBSCBS/valores/trib/gIBSCBS/gEstornoCred(Annex VI rows 438-440): exact two-decimalvIBSEstCred/vCBSEstCred, paired validation, and mandatory caller-verified officialcClassTrib.ind_gEstornoCredfor inclusion. False forbids the group; true requires both values. No tax classification is inferred.IBSCBS/valores/trib/gIBSCBS/gPagAntecipado/refNFSe(rows 441-442): opt-in explicit list of 1-99 existing invoice references, 50 characters each. Empty list omits the group. No assumptions about taxpayer liabilities, no implicit paid invoices and no undocumented deduplication restriction.gIBSCBS, updated DTO constructor with optional trailing parameters, and eleven focused PHPUnit cases for valid paths, ordering, omissions, missing official evidence, malformed amounts, 50-character keys, 99-reference bound and forbidden combinations.docs/NT009-CONTRACT-IMPLEMENTATION.md.Safety and compatibility
DpsData,XmlBuilder::buildDps(),DpsSchemaValidator,NfseClient::emit()and Akaunting's Composer pin unchanged.Verification / review
resources/contracts/nt009-dps-v1.04.01-matrix.tsv.3932a256b9e0ae8641c0b9f6c5394023b27cde87: PHPUnit (PHP 8.2/8.3/8.4), coverage/Coveralls, Psalm, PHP CS Fixer, minimum dependencies, REUSE and commit conventions. No separate local Composer/dependency run was performed.Remaining #95 blockers
The official portal still publishes NT009 Annex VI/VII without a confirmed deployed NT009-effective XSD for production and restricted production, or a verified activation schedule. The NT009 PDF/Annex VI
gIBSCBSAjusteplacement contradiction, full contract modeling, official fiscal classification dependencies and XSD/SEFIN acceptance remain open.Do not close #95, enable issuance, or update downstream dependencies on this PR's basis.