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

OBPIH-2936,2937: Update product packages after uom edits on placed PO #1845

Merged
merged 2 commits into from
Aug 18, 2020

Conversation

awalkowiak
Copy link
Collaborator

No description provided.

@@ -696,6 +696,9 @@ class OrderController {
if (!order.save(flush:true)) {
throw new ValidationException("Order is invalid", order.errors)
}
orderService.updateProductPackage(orderItem)
Copy link
Member

Choose a reason for hiding this comment

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

This is going to update product package and unit price every time an order item is saved, not just when the order has already been placed.

Copy link
Member

Choose a reason for hiding this comment

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

We should probably trigger an event to deal with this or just wrap this with an if statement to check if the order has been placed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@jmiranda Again I had something done in proper way first and then I decide to remove it. You're right this should be done only in the case after the order is placed. I added it as an if statement because I guess in the event it needs to be checked too.

@awalkowiak
Copy link
Collaborator Author

@jmiranda as i did requested change, I am gonna merge it now.

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.

None yet

2 participants