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

Add display shipment total before tax #4423

Merged

Conversation

mamhoff
Copy link
Contributor

@mamhoff mamhoff commented Jun 14, 2022

Description

This adds a few money_methods to the Spree::Order model. I expected these to be there, and they weren't, so I guess it's in everyone's best interest to add them.

Checklist:

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have updated Guides and README accordingly to this change (if needed)
  • I have added tests to cover this change (if needed)
  • I have attached screenshots to this PR for visual changes (if needed)

mamhoff added 4 commits June 14, 2022 15:29
This way it's easier to follow any changes.
There was no spec for this method.
This method is akin to Spree::Order#item_total_before_tax. If we have
that method, we should have this one, too.
`item_total_before_tax`, `shipment_total_before_tax`, and
`item_total_excluding_vat` are obviously methods that return a financial
amount, so they should also be formattable money methods.
Copy link
Member

@kennyadsl kennyadsl left a comment

Choose a reason for hiding this comment

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

Assuming specs will pass, 👍 . Thanks Martin!

money_methods :outstanding_balance, :item_total, :adjustment_total,
:included_tax_total, :additional_tax_total, :tax_total,
:shipment_total, :total, :order_total_after_store_credit, :total_available_store_credit
money_methods(
Copy link
Member

Choose a reason for hiding this comment

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

❤️

@waiting-for-dev waiting-for-dev merged commit 64b9e15 into solidusio:master Jun 22, 2022
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.

5 participants