Skip to content

Payment receipts and advances in Portugal #457

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

Merged
merged 11 commits into from
Feb 19, 2025
Merged

Payment receipts and advances in Portugal #457

merged 11 commits into from
Feb 19, 2025

Conversation

cavalle
Copy link
Contributor

@cavalle cavalle commented Feb 11, 2025

  • Adds support for payment advances and receipts in PT
  • Changes the default unit to one in PT
  • Fixes a panic when calculating a bill.Receipt without lines
  • Changes bill.Receipt to allow empty codes while the invoice isn't signed (like in bill.Invoice)
  • Calculates line indexes automatically in bill.Receipt

Pre-Review Checklist

  • I have performed a self-review of my code.
  • I have added thorough tests with at least 90% code coverage.
  • I've modified or created example GOBL documents to 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 the 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 Feb 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.92%. Comparing base (b86e5d8) to head (d32c8bb).
Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #457      +/-   ##
==========================================
+ Coverage   85.67%   85.92%   +0.24%     
==========================================
  Files         255      257       +2     
  Lines       12582    12803     +221     
==========================================
+ Hits        10780    11001     +221     
  Misses       1454     1454              
  Partials      348      348              

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

@cavalle cavalle marked this pull request as ready for review February 11, 2025 13:25
@cavalle cavalle requested a review from samlown February 11, 2025 13:25
@cavalle cavalle changed the title Payment advances and receipts in Portugal Payment receipts and advances in Portugal Feb 11, 2025
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.

Code looks great! I do think we should start moving all the documentation to the structure approach though. My objective is to remove README.md files completely, as everything should be defined inside the Go structures.

@cavalle cavalle requested a review from samlown February 13, 2025 12:59
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.

I think we can be a bit more efficient perhaps with the tables, but otherwise, this looks great! Juan will be happy too :-)

@samlown samlown merged commit 07f1ebe into main Feb 19, 2025
7 checks passed
@samlown samlown deleted the pt-receipts branch February 19, 2025 08:28
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