-
-
Notifications
You must be signed in to change notification settings - Fork 427
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-6813 shipped in po column when edits to shipped quantities in receiving #4941
OBPIH-6813 shipped in po column when edits to shipped quantities in receiving #4941
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #4941 +/- ##
=========================================
Coverage 7.57% 7.58%
- Complexity 803 805 +2
=========================================
Files 596 596
Lines 42170 42170
Branches 10258 10257 -1
=========================================
+ Hits 3195 3199 +4
+ Misses 38512 38506 -6
- Partials 463 465 +2 ☔ View full report in Codecov by Sentry. |
`containers[${parentIndex}].shipmentItems[${rowIndex}]`, | ||
{}, | ||
); | ||
const packsRequested = _.round(shipmentItem?.packsRequested, 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this rounding correct? Have you confirmed that behavior? This would give the same result for PK/6 and shipped 1 in each, and for PK/5 and shipped 1 in each, as 0.2. Feels like rounding to two decimal places would be more accurate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah on second thought I think this should be 2 decimal places, feels like quarters (.25
) might be a potential common case. In the current version this would be rounded up to 0.3
.
const shipmentItem = _.get( | ||
values, | ||
`containers[${parentIndex}].shipmentItems[${rowIndex}]`, | ||
{}, | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you use nullsafe here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had some issues when using
const shipmentItem = values?.containers[parentIndex]?.shipmentItems[rowIndex] ?? {};
I guess the values are very deeply nested and nulish operator does not handle it very well
✨ Description of Change
Link to GitHub issue or Jira ticket: OBPIH-6813
Description:
Main goal of this ticket was to display a propper Shipped (In PO UoM) quantity when splitting items.
Before if we had an item with shipped quantity
12
that was labeled with UoM3 PK/4
and we split the item in two items by 8 and 4 we still got the same label but instead we want it to be2 PK/4
and1 PK/4
📷 Screenshots & Recordings (optional)