Skip to content

Commit

Permalink
PR feedback, make quantity to return dependent on quantity shipped Si…
Browse files Browse the repository at this point in the history
  • Loading branch information
Crhistian committed Jul 19, 2023
1 parent af29bc5 commit 287c6b6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export function ReturnItemsTable({control, lineItems, allOrderReturns, existingR
.map((orderReturn) => orderReturn.ItemsToReturn.filter((returnItem) => returnItem.LineItemID === lineItem.ID))
)
const quantityAlreadyReturned = otherReturnItems.reduce((acc, returnItem) => acc + returnItem.Quantity || 0, 0)
return lineItem.Quantity - quantityAlreadyReturned
return lineItem.QuantityShipped - quantityAlreadyReturned
}

const buildQuantityOptions = (lineItem: ILineItem) => {
Expand Down

0 comments on commit 287c6b6

Please sign in to comment.