OBPIH-6037 Get only available quantity bin location in expiration report exports#4501
Merged
kchelstowski merged 1 commit intofeature/upgrade-to-grails-3.3.10from Feb 12, 2024
Conversation
kchelstowski
reviewed
Feb 9, 2024
| """, [location: location]) | ||
| where pa.location = :location and pa.quantityOnHand > 0""" + | ||
| "${inventoryItems ? " and pa.inventoryItem.id in (:inventoryItems) " : " "}" + | ||
| """group by pa.product, pa.inventoryItem, pa.binLocation""", arguments) |
Collaborator
There was a problem hiding this comment.
Have you checked if it works fine with/without inventoryItems?
The indents here look weird, and the """ at the beginning of the line, could you maybe paste a screenshot how it really looks in the IDE?
Collaborator
Author
There was a problem hiding this comment.
Yes, I have tested without inventoryItems, this method is also currently used in returning putaway candidate items and works fine after the change.
the inventoryItems parameter has a default value of an empty list and that's the reason for the conditionals in the SQL query and the arguments.
If we are not using passed arguments in the query, we get an exception that's why I needed to condition it.
Collaborator
There was a problem hiding this comment.
this looks good now, thanks
kchelstowski
approved these changes
Feb 9, 2024
alannadolny
approved these changes
Feb 12, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This is a requested change after the reopen, Kelsey has pointed out that we want available bin locations, that is bin locations that have quantity > 0