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.
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.
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.
can you use nullsafe here?
There was a problem hiding this comment.
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
12that was labeled with UoM3 PK/4and 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/4and1 PK/4📷 Screenshots & Recordings (optional)