Skip to content

fix: validate structured NFS-e cancellation data - #346

Merged
vitormattos merged 3 commits into
mainfrom
fix/342-cancellation-validation
Oct 8, 2026
Merged

vitormattos merged 3 commits into
mainfrom
fix/342-cancellation-validation

Conversation

@vitormattos

Copy link
Copy Markdown
Member

Summary

Starts #342 on the Akaunting module side.

  • maps cancellation choices to the official e101101 reason codes 1, 2 and 9;
  • validates the justification locally at 15–255 characters;
  • stops concatenating the localized reason label into xMotivo;
  • adds HTML min/max constraints to both cancellation surfaces;
  • keeps a transitional fallback to the legacy library method until fix: model official NFS-e cancellation reasons nfse-php#92 is merged.

Dependency

Depends on LibreCodeCoop/nfse-php#92 for the structured cancelWithReason() transport contract. After that PR lands, this branch should pin/rebuild the scoped runtime and remove the compatibility fallback.

Remaining work before merge

Fixes #342.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@vitormattos
vitormattos marked this pull request as ready for review October 8, 2026 02:02
@vitormattos
vitormattos merged commit 6463995 into main Oct 8, 2026
13 checks passed
@vitormattos
vitormattos deleted the fix/342-cancellation-validation branch October 8, 2026 02:02
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.

Validar motivo de cancelamento NFS-e antes do envio à SEFIN

1 participant