Skip to content

OBPIH-6111 Fix substitution and calculation of each price#4529

Merged
awalkowiak merged 1 commit intofeature/product-supplier-list-redesignfrom
OBPIH-6111-fix
Mar 4, 2024
Merged

OBPIH-6111 Fix substitution and calculation of each price#4529
awalkowiak merged 1 commit intofeature/product-supplier-list-redesignfrom
OBPIH-6111-fix

Conversation

@kchelstowski
Copy link
Collaborator

The bug has been introduced by this commit: ad70248

When editing a source, the product package quantity was cleared (set to undefined) after initialization of default values of the product source.
It was due to two useEffects impacting on each other - at first we were setting the default values in getDefaultValues method, and since the uom was also set, it triggered the useEffect that was eventually setting the product package quantity to undefined.

This useEffect would be OK, but if it was triggered only for manual editing of the uom- since we can't distiungish whether it has been run manually or by the uom change of the getDefaultValues, I refactored this to be a method that is triggered onChange of the uom input.

@awalkowiak awalkowiak merged commit aa9ac11 into feature/product-supplier-list-redesign Mar 4, 2024
@awalkowiak awalkowiak deleted the OBPIH-6111-fix branch March 4, 2024 17:37
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.

2 participants