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-5672 Add new custom document - Requisition template #4067

Merged
merged 1 commit into from
May 29, 2023

Conversation

awalkowiak
Copy link
Collaborator

No description provided.

@awalkowiak awalkowiak requested a review from jmiranda May 26, 2023 13:08
}

private createRequisitionContext(IXDocReport report, Requisition requisitionInstance) {
def requisitionItems = requisitionInstance?.requisitionItems?.collect { RequisitionItem requisitionItem ->
Copy link
Collaborator Author

@awalkowiak awalkowiak May 26, 2023

Choose a reason for hiding this comment

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

@jmiranda I had to go with this version either way, because couple of properties used are transients, and this was easier. I tested it on 150-200 items, and the performance was (imho) very good.

Copy link
Member

@jmiranda jmiranda left a comment

Choose a reason for hiding this comment

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

LGTM other than the issue around demand.

def requisitionItems = requisitionInstance?.requisitionItems?.collect { RequisitionItem requisitionItem ->
def demand
def quantityOnHand
if (requisitionInstance?.destination?.isWard()) {
Copy link
Member

Choose a reason for hiding this comment

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

This logic makes me uneasy since there's no way to tell if demand is for a single location or it's aggregated. I think if there's we should only care about demand for the origin/destination pair and demand should be 0 if a demand record does not exist for that pair.

Can you ask Kelsey about this?

Copy link
Collaborator

Choose a reason for hiding this comment

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

One thing worth mentioning - if it was meant to be working for locations without MANAGE_INVENTORY and with SUBMIT_REQUEST, it won't, because isWard() checks only if locationTypeCode == LocationTypeCode.WARD

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 Kelsey wanted to have it working like on add items page. Where it is working like that - if a request is from "ward" then pull demand from the origin to the requestor, and if a request is not from the "ward", then pull demand outgoing from the requestor to all other locations.

@kchelstowski I specifically asked if this is fine on Friday's standup because we are using exactly this in the stockMovementService.getAddPageItem and it was fine.

@awalkowiak
Copy link
Collaborator Author

I am merging to start testing and I'll confirm the above concerns today and improve if needed.

@awalkowiak awalkowiak merged commit 2a29fc1 into develop May 29, 2023
3 checks passed
@awalkowiak awalkowiak deleted the OBPIH-5672 branch May 29, 2023 08:46
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

3 participants