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-2655: Allow editing pending purchase orders based SM #1518

Merged
merged 6 commits into from
Mar 31, 2020

Conversation

awalkowiak
Copy link
Collaborator

No description provided.

grails-app/domain/org/pih/warehouse/order/Order.groovy Outdated Show resolved Hide resolved
if (!shipmentItem) {
shipmentItem = new ShipmentItem(
product: orderItem.product,
inventoryItem: orderItem.inventoryItem,
Copy link
Member

Choose a reason for hiding this comment

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

@awalkowiak orderItem.inventoryItem will probably be null 99% of the time, if not 100%. If there's a product and lot number specified then we need to do a look up of the InventoryItem by product and lot number. But I can't tell from the code what's going on here and whether we need to use InventoryService.findOrCreateInventoryItem() or InventoryService.findInventoryItemByProductAndLotNumber() or something else.

But all this logic looks complicated so let's have a discuss before we move this one forward. Can you enumerate the different use cases that are represented here:

  • User goes back to edit order item quantity
  • User goes back to edit order item product (?)
  • ...

Copy link
Collaborator Author

@awalkowiak awalkowiak Mar 31, 2020

Choose a reason for hiding this comment

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

@jmiranda you're right inventory item is not required here. I removed it. Use cases:

  • edit line item (only qty)
  • add new line item
  • delete line item

Copy link
Member

Choose a reason for hiding this comment

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

@awalkowiak But if there's a lot number and expiration date, it is required. Let's discuss on Slack.

@jmiranda jmiranda merged commit 3cb37aa into OBPIH-803-purchase-order-improvements Mar 31, 2020
@jmiranda jmiranda deleted the OBPIH-2655 branch March 31, 2020 15: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.

None yet

2 participants