Add Bizkaia activity extension to TicketBAI add-on#829
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #829 +/- ##
=======================================
Coverage 93.39% 93.39%
=======================================
Files 369 369
Lines 20115 20121 +6
=======================================
+ Hits 18786 18792 +6
Misses 888 888
Partials 441 441 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR adds support for a Bizkaia-specific TicketBAI supplier extension (es-tbai-bi-activity) and enforces it via invoice validation rules for Bizkaia individual suppliers, with accompanying tests and documentation/data updates.
Changes:
- Added new TicketBAI extension definition for Bizkaia individual activity code (epígrafe), including sources and a
^\d{1,7}$pattern. - Added invoice validation rules: require the extension for Bizkaia individuals and validate the code format when present.
- Refactored TicketBAI region codes to exported constants and updated normalization/tests accordingly.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| data/rules/es-tbai.json | Adds rule definitions for requiring/validating the Bizkaia activity extension. |
| data/addons/es-tbai-v1.json | Documents the new es-tbai-bi-activity extension (name/desc/sources/pattern). |
| CHANGELOG.md | Adds an Unreleased changelog entry for the new extension. |
| addons/es/tbai/extensions.go | Defines the new extension key + adds the extension definition; factors region codes into constants. |
| addons/es/tbai/bill.go | Implements validation rules and guard logic for Bizkaia individual suppliers; uses region constants in normalization. |
| addons/es/tbai/bill_test.go | Updates region normalization assertions and adds validation test coverage for the new rules. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
Docs PR opened: invopop/gobl.docs#46 Documented the new es-tbai-bi-activity extension and its two validation rules in the TicketBAI add-on page. |
|
Docs PR opened: invopop/docs.invopop.com#364 Documented the new es-tbai-bi-activity extension in the TicketBAI invoicing guide and added a changelog entry. |
Pre-Review Checklist
go generate .to ensure that the Schemas and Regime data are up to date.And if you are part of the org: