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

Exclude line item additional taxes from unit cancel adjustment amount #3072

Conversation

mdesantis
Copy link
Contributor

Description

Fixes #3068. It takes into account the line item taxes amount during calculation of line item amount on line item cancellation.

In order to keep code consistency, I made a refactoring along the same lines of core/app/models/spree/calculator/returns/default_refund_amount.rb, which performs a similar calculation.

Ref #3068

Checklist:

  • Pull Request guidelines are respected
  • Documentation/Readme have been updated accordingly
  • Changes are covered by tests (if possible)
  • Each commit has a meaningful message attached that described WHAT changed, and WHY

@mdesantis mdesantis force-pushed the exclude-line-item-additional-taxes-from-unit-cancel-adjustment-amount branch from e7ed796 to df9a7f3 Compare February 4, 2019 09:02
Copy link
Member

@spaghetticode spaghetticode left a comment

Choose a reason for hiding this comment

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

@mdesantis 👍nice fix, thank you! 👏

Copy link
Contributor

@jacobherrington jacobherrington left a comment

Choose a reason for hiding this comment

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

Thanks @mdesantis!

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.

@mdesantis thanks for the fix. I think it could be useful to split this change into two different commits, one that refactors only and the other that makes the change so it will be easier to understand what/how changed. WDYT?

@mdesantis
Copy link
Contributor Author

@kennyadsl good suggestion! I agree

jtapia
jtapia approved these changes Feb 6, 2019
Fixes solidusio#3068. It takes into account the line item taxes amount during
calculation of line item amount on line item cancellation.
Related to solidusio#3068. In order to keep code consistency, I made a
refactoring along the same lines of
`core/app/models/spree/calculator/returns/default_refund_amount.rb`,
which performs a similar calculation.
@mdesantis mdesantis force-pushed the exclude-line-item-additional-taxes-from-unit-cancel-adjustment-amount branch from df9a7f3 to d822a08 Compare February 7, 2019 08:58
@mdesantis
Copy link
Contributor Author

@kennyadsl commit splitting 👍

@kennyadsl kennyadsl merged commit c8e4891 into solidusio:master Feb 11, 2019
@mdesantis mdesantis deleted the exclude-line-item-additional-taxes-from-unit-cancel-adjustment-amount branch February 11, 2019 17:15
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.

6 participants