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

User orders cancel #130

Merged
merged 12 commits into from
May 25, 2019
Merged

User orders cancel #130

merged 12 commits into from
May 25, 2019

Conversation

BrennanAyers
Copy link
Owner

This PR brings in the functionality of a User cancelling one of their Orders, and all the associated actions that happen because of it. An Order can only be cancelled if it is in a Pending state. The User is given a button to click on, but it will be disabled unless the Order is Pending.
When an Order is cancelled, it simultaneously updates the Order status to Cancelled, updates all Order Items to Fulfilled:False, and all Items have their previously spoken for Inventory returned to the Merchants. This requires the OrdersController Destroy method to iterate through Order Items and change their Fulfilled status to False.
Once an Order Item fulfillment status changes (to True or False), the Model will modify the Inventory of the corresponding Item. It will reduce the Inventory by the Order Items quantity if True, and add the quantity if False.

Resolves. #53

Copy link

@WHomer WHomer left a comment

Choose a reason for hiding this comment

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

it is looking nice.

@WHomer WHomer merged commit 20ef9b4 into master May 25, 2019
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.

2 participants