Skip to content

Add Bizkaia activity extension to TicketBAI add-on#829

Merged
cavalle merged 4 commits into
mainfrom
batuz-model-140
May 8, 2026
Merged

Add Bizkaia activity extension to TicketBAI add-on#829
cavalle merged 4 commits into
mainfrom
batuz-model-140

Conversation

@cavalle
Copy link
Copy Markdown
Contributor

@cavalle cavalle commented May 6, 2026

  • Adds extension for the Bizcaia's activity code required to individual (not business) suppliers.

Pre-Review Checklist

  • Opened this PR as a draft
  • Read the CONTRIBUTING.md guide.
  • Performed a self-review of my code.
  • Added thorough tests with at least 90% code coverage.
  • Modified or created example GOBL documents to show my changes in use, if appropriate.
  • Added links to the source of the changes in tax regimes or addons, either structured or in the comments.
  • Run go generate . to ensure that the Schemas and Regime data are up to date.
  • Reviewed and fixed all linter warnings.
  • Been obsessive with pointer nil checks to avoid panics.
  • Updated the CHANGELOG.md with an overview of my changes.
  • Marked this PR as ready for review.

And if you are part of the org:

  • Requested a review from Copilot and fixed or dismissed (with a reason) all the feedback raised.
  • Requested a review from @samlown.

@cavalle cavalle requested a review from Copilot May 6, 2026 10:46
@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.39%. Comparing base (4a0a25f) to head (ba5f50c).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread addons/es/tbai/bill.go Outdated
Comment thread CHANGELOG.md Outdated
cavalle and others added 2 commits May 6, 2026 14:16
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@cavalle cavalle force-pushed the batuz-model-140 branch from 2f4775a to 1158dde Compare May 8, 2026 12:12
@cavalle cavalle marked this pull request as ready for review May 8, 2026 12:17
@cavalle cavalle requested a review from samlown May 8, 2026 12:17
@mintlify
Copy link
Copy Markdown

mintlify Bot commented May 8, 2026

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.

@mintlify
Copy link
Copy Markdown

mintlify Bot commented May 8, 2026

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.

Copy link
Copy Markdown
Collaborator

@samlown samlown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@cavalle cavalle merged commit 4cdd472 into main May 8, 2026
8 checks passed
@cavalle cavalle deleted the batuz-model-140 branch May 8, 2026 16:13
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.

3 participants