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-5138 HOTFIX: QOH on blur updating quantity requested to 0 over and over again #3640

Merged
merged 3 commits into from
Nov 18, 2022

Conversation

kchelstowski
Copy link
Collaborator

The problem was, that whenever we've gone from QOH, the quantityRequested (Needed Qty) was updated to 0 (if there was not any demand). I think the problem has not been seen before, because whenever we were adding a new line, we were not going from QOH from previous product to QOH of next product and we were always going from left to right.
The problem was happening both for keyboard and mouse, but when switching the cells by mouse, the quantity was not updating in the table until you added a new line (but when console.loging the values, they were 0).

@kchelstowski kchelstowski changed the title OBPIH-5138 HOTFIX: QOH on blur updating quantity requested over and over OBPIH-5138 HOTFIX: QOH on blur updating quantity requested over and over again Nov 18, 2022
@kchelstowski kchelstowski changed the title OBPIH-5138 HOTFIX: QOH on blur updating quantity requested over and over again OBPIH-5138 HOTFIX: QOH on blur updating quantity requested to 0 over and over again Nov 18, 2022
valuesWithUpdatedQtyRequested.lineItems[rowIndex].quantityRequested =
values.lineItems[rowIndex].quantityAllowed - fieldValue >= 0 ?
values.lineItems[rowIndex].quantityAllowed - fieldValue : 0;
const lineItem = valuesWithUpdatedQtyRequested.lineItems[rowIndex];
Copy link
Collaborator

Choose a reason for hiding this comment

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

Actually, these could be moved to a separate method and passed like the updateRow.

@awalkowiak awalkowiak merged commit 32201d3 into release/0.8.19-hotfix2 Nov 18, 2022
@awalkowiak awalkowiak deleted the OBPIH-5138 branch November 18, 2022 22:49
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