Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Veri*Factu Addon #410

Merged
merged 32 commits into from
Dec 5, 2024
Merged

Veri*Factu Addon #410

merged 32 commits into from
Dec 5, 2024

Conversation

apardods
Copy link
Contributor

@apardods apardods commented Nov 4, 2024

Describe your changes

Add-on for the Ver*Factu Regulation. Includes:

  • Extensions: es-verifactu-doc-type for document type and es-verifactu-tax-classification to cover tax exemptions and overall classification. They correspond to L2 and L9/10 from the BOE order, at the very bottom.
  • Invoice Validation:
    • Correction invoices must include Preceding, which must include the issue date.
    • Invoice Tax field must include the es-verifactu-doc-type extension.
    • Line taxes must include the es-verifactu-tax-classification extension.
    • There must be a note with key general that, like with TicketBAI, acts as the invoice description.
    • If there is a customer with a Spanish taxID, require its code
  • Scenarios: automatically apply the es-verifactu-doc-type extension based on invoice information.
  • Tags: added a Substitution tag for Factura emitida en sustitución de facturas simplificadas facturadas y declaradas., to cover the case when a client that has received a simplified invoice then asks for a full one.

Checklist before requesting a review

  • I have performed a self-review of my code.
  • I have added thorough tests with at least 90% code coverage. Coverage tops out at 87% because of invoice nil checks. Could add tests although they would be somewhat redundant.
  • I've modified or created example GOBL documents the show my changes in use, if appropriate.
  • When adding or modifying a tax regime or addon, I've added links to the source of the changes either structured or in the comments.
  • I've run go generate . to ensure that Schemas and Regime data are up to date.
  • All linter warnings have been reviewed and fixed.
  • I've been obsessive with pointer nil checks to avoid panics.
  • The CHANGELOG.md has been updated with an overview of my changes.
  • Requested a review from @samlown.

Copy link

codecov bot commented Nov 4, 2024

Codecov Report

Attention: Patch coverage is 98.65471% with 3 lines in your changes missing coverage. Please review.

Project coverage is 82.21%. Comparing base (6d09561) to head (633fce7).
Report is 33 commits behind head on main.

Files with missing lines Patch % Lines
addons/es/verifactu/bill.go 97.36% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #410      +/-   ##
==========================================
+ Coverage   81.64%   82.21%   +0.56%     
==========================================
  Files         235      238       +3     
  Lines       11546    11751     +205     
==========================================
+ Hits         9427     9661     +234     
+ Misses       1756     1727      -29     
  Partials      363      363              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@apardods apardods changed the title WIP: Veri*Factu Addon Veri*Factu Addon Nov 26, 2024
@apardods apardods marked this pull request as ready for review November 26, 2024 10:32
@apardods apardods requested a review from samlown November 27, 2024 17:03
Copy link
Contributor Author

@apardods apardods left a comment

Choose a reason for hiding this comment

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

Looks great! I think it makes sense to only cover the most basic cases, and to leave things like reverse charges to the user, as using scenarios was risky.

Copy link
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.

🔝 🎩

@samlown samlown merged commit 04ddb4c into main Dec 5, 2024
7 checks passed
@samlown samlown deleted the addon-verifactu branch December 5, 2024 11:00
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.

2 participants