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

Fixing inventory unit finalizer #3094

Merged
merged 1 commit into from
Feb 13, 2019

Conversation

seand7565
Copy link
Contributor

Description
In an order with more than one inventory_unit, the total of inventory_units in the shipment would be subtracted from the stock of each item. For example, if a customer ordered 5 of "Product A" and 3 of "Product B", both products would have their stock decreased by 8, because the code is summing the inventory_units in general, not the units specific to the line_item.

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.

Thanks @seand7565 ! I'd love to see a regression test for this, this way we can be sure this does not happen again in the future.

@seand7565
Copy link
Contributor Author

Test added, all passing!

@kennyadsl kennyadsl added the type:bug Error, flaw or fault label Feb 12, 2019
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.

Thanks @seand7565, I think this bugfix is very important, so I think it's a good idea to release 2.8.1 with this PR's code.

@DanielePalombo
Copy link
Contributor

Thank @seand7565 to have fixed this bug. LGTM !

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.

👍 great catch @seand7565

@kennyadsl kennyadsl merged commit 54eb04f into solidusio:master Feb 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Error, flaw or fault
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants