Skip to content

feat(bpe): update schemas to PL_BPe_100b_NT2026.004 RTC_1.00 - #177

Merged
rvalyi merged 2 commits into
masterfrom
bpe-pl_bpe_100b_nt2026.004
Dec 5, 2026
Merged

rvalyi merged 2 commits into
masterfrom
bpe-pl_bpe_100b_nt2026.004

Conversation

@rvalyi

@rvalyi rvalyi commented Nov 4, 2026

Copy link
Copy Markdown
Member

Update the BP-e schemas from the Fazenda package NT 2026.004 v.1.00 (zip contents PL_BPe_100b_NT2026.004 RTC_1.00), published 05/10/2026. This package appears on the CT-e portal listing page, i.e. the page the fingerprint test watches for the cte modality — it is what moved that hash besides the page text.

Source: https://www.cte.fazenda.gov.br/portal/exibirArquivo.aspx?conteudo=Sg8mFlS0NF4=

Changed XSDs: bpeTiposBasico_v1.00.xsd (the other 26 files of the package are byte-identical to the committed ones).

Schema changes:

  • enderComp becomes optional (minOccurs=0);
  • new optional vBPLiq (total value net of taxes) in the bilhete values, on the road, metropolitan and regular layouts;
  • the vBP/vBPTur documentation now states that from 2027 the IBS/CBS values are part of the bilhete total instead of being added to it;
  • the trip identifier restrictions get the [!-ÿ]{8}|[!-ÿ]{10} pattern.

Bindings regenerated with xsdata 25.7, CHANGELOG_SCHEMAS.md records the new package, and the bpe/bindings/v1_0/__init__.py metadata is refreshed.

Local: pytest tests → 89 passed, 3 skipped; pre-commit hooks pass.

Note: the CT-e schemas themselves need no change — all 47 XSDs of PL_CTe_400_NT2026.004 RTC_1.00 (republicado 16/10/2026) are byte-identical to the committed ones, so the rest of the cte fingerprint delta is page text only.

Update the BP-e schemas from the Fazenda package NT 2026.004 v.1.00 (zip
contents PL_BPe_100b_NT2026.004 RTC_1.00), published 05/10/2026. The package
is listed on the CT-e portal listing page (the one the fingerprint test
watches for the cte modality).

Source: https://www.cte.fazenda.gov.br/portal/exibirArquivo.aspx?conteudo=Sg8mFlS0NF4=

Changed schemas: bpeTiposBasico_v1.00.xsd (the other 26 files of the package
are byte-identical to the committed ones).

Notable schema changes:
- enderComp becomes optional (minOccurs=0) in the emitting/recipient groups;
- the new optional vBPLiq field is added to the bilhete values (total value
  net of taxes), on the road, metropolitan and regular layouts;
- the vBP/vBPTur documentation now states that from 2027 the IBS/CBS values
  are part of the bilhete total instead of being added to it;
- the trip identifier restrictions get the [!-ÿ]{8}|[!-ÿ]{10} pattern.

Regenerate the bindings with xsdata 25.7 and refresh the fingerprint
baseline.
… package

CHANGELOG_SCHEMAS.md now carries, for the PL_BPe_100b_NT2026.004 RTC 1.00
package, the date from which production validates it (production_live_from
2026-12-14, moved from 16/11/2026 by the SVRS notice of 12/11/2026) and
whether XML valid under NT 2026.002 RTC 1.01 stays valid (additive: false).

Not additive for one reason: the package adds the [!-ÿ]{8}|[!-ÿ]{10}
pattern on cBenef, so a benefit code of another length that the previous
package accepted is now rejected. The rest is additive (optional vBPLiq in
every modal, enderComp becomes minOccurs=0, documentation only).

generate_bindings.py parses the two new fields and injects
PRODUCTION_LIVE_FROM, ADDITIVE and NOTES in the binding __init__.py
header, refreshed here with --metadata-only (no binding code changed).
@rvalyi
rvalyi force-pushed the bpe-pl_bpe_100b_nt2026.004 branch from 766beb5 to 2d6d38f Compare December 5, 2026 16:08
@rvalyi
rvalyi merged commit 7ba4986 into master Dec 5, 2026
7 checks passed
@ak-git-bot
ak-git-bot deleted the bpe-pl_bpe_100b_nt2026.004 branch December 5, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants