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

[9.0] Fix invoicing subscriptions and extend one off charges #598

Merged
merged 4 commits into from Dec 17, 2018

Conversation

@driesvints
Copy link
Member

commented Dec 14, 2018

I sent this PR with 2 changes because the 2nd one depends on the first one. Here's the commit summary for both:

When invoicing the customer while swapping plans, Cashier would invoice the customer for all its pending items instead of just the ones for the subscription. This PR fixes this by using the subscription field when creating an invoice to allow swapping a plan and the incrementAndInvoice method so the invoice at hand only invoices for the subscription and also uses the proper tax which is applied to the subscription.

When doing one off charges and immediately invoicing them you currently can't add extra options like a tax_percent to it which kind of limits you. By adding this extra option we can pass it to the invoice method with the parameter from the previous commit.

Fixes #384

driesvints added some commits Dec 14, 2018

Fix invoicing subscriptions
When invoicing the customer while swapping plans, Cashier would invoice the customer for all its pending items instead of just the ones for the subscription. This PR fixes this by using the subscription field when creating an invoice to allow swapping a plan and the `incrementAndInvoice` method so the invoice at hand only invoices for the subscription and also uses the proper tax which is applied to the subscription.
Allow one off invoices to specify extra options
When doing one off charges and immediately invoicing them you currently can't add extra options like a tax_percent to it which kind of limits you. By adding this extra option we can pass it to the invoice method with the parameter from the previous commit.

@taylorotwell taylorotwell merged commit dcc884a into master Dec 17, 2018

3 checks passed

continuous-integration/styleci/pr The analysis has passed
Details
continuous-integration/styleci/push The analysis has passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@driesvints driesvints deleted the fix-invoice-taxes branch Dec 17, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.