Skip to content

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
OBPIH-6037-add-bin-location-data-to-expiration-reports
Feb 12, 2024
Merged

OBPIH-6037 Get only available quantity bin location in expiration report exports#4501
kchelstowski merged 1 commit intofeature/upgrade-to-grails-3.3.10from
OBPIH-6037-add-bin-location-data-to-expiration-reports

Conversation

@drodzewicz
Copy link
Collaborator

@drodzewicz drodzewicz commented Feb 9, 2024

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

""", [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)
Copy link
Collaborator

Choose a reason for hiding this comment

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

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

image

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.

Copy link
Collaborator

Choose a reason for hiding this comment

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

this looks good now, thanks

@kchelstowski kchelstowski merged commit 8cb2a53 into feature/upgrade-to-grails-3.3.10 Feb 12, 2024
@kchelstowski kchelstowski deleted the OBPIH-6037-add-bin-location-data-to-expiration-reports branch February 12, 2024 12:12
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.

3 participants