Skip to content

Billing: Order, Delivery, and Payment #462

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 5 commits into from
Feb 28, 2025
Merged

Billing: Order, Delivery, and Payment #462

merged 5 commits into from
Feb 28, 2025

Conversation

samlown
Copy link
Collaborator

@samlown samlown commented Feb 19, 2025

  • Renamed old bill.Payment and bill.Delivery types to bill.PaymentDetails and bill.DeliveryDetails, so that the names are available for the new document types.
  • Renamed bill.Receipt to bill.Payment as the new base type for communicating payments.

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.

@samlown samlown marked this pull request as draft February 19, 2025 11:06
@samlown samlown changed the title Renaming bill's Payment and Delivery structs Billing: Order, Delivery, and Payment Feb 19, 2025
Copy link

codecov bot commented Feb 19, 2025

Codecov Report

Attention: Patch coverage is 95.63786% with 53 lines in your changes missing coverage. Please review.

Project coverage is 86.87%. Comparing base (a7b2e43) to head (776e78a).
Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
bill/calculator.go 89.14% 13 Missing and 6 partials ⚠️
bill/order.go 90.36% 12 Missing and 4 partials ⚠️
bill/delivery.go 94.18% 8 Missing and 2 partials ⚠️
bill/exchange.go 94.17% 4 Missing and 2 partials ⚠️
bill/line.go 98.21% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #462      +/-   ##
==========================================
+ Coverage   85.97%   86.87%   +0.89%     
==========================================
  Files         258      263       +5     
  Lines       12847    13430     +583     
==========================================
+ Hits        11045    11667     +622     
+ Misses       1454     1415      -39     
  Partials      348      348              

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

@samlown samlown requested a review from cavalle February 25, 2025 11:39
@samlown samlown marked this pull request as ready for review February 25, 2025 11:39
// Result of quantity multiplied by the item's price (calculated)
Sum num.Amount `json:"sum" jsonschema:"title=Sum" jsonschema_extras:"calculated=true"`
Sum *num.Amount `json:"sum,omitempty" jsonschema:"title=Sum" jsonschema_extras:"calculated=true"`
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Using pointers will require changes to current implementations of convertors, but is backwards compatible.

@samlown samlown merged commit 39774f7 into main Feb 28, 2025
7 checks passed
@samlown samlown deleted the bill-docs branch February 28, 2025 13:46
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.

1 participant