fix(core-flows,order): return damaged items (#8818)
This commit is contained in:
@@ -237,12 +237,24 @@ export const confirmReturnReceiveWorkflow = createWorkflow(
|
||||
itemUpdates[itemId].received_quantity,
|
||||
act.details!.quantity as BigNumberInput
|
||||
)
|
||||
|
||||
if (act.action === ChangeActionType.RECEIVE_DAMAGED_RETURN_ITEM) {
|
||||
itemUpdates[itemId].damaged_quantity = MathBN.add(
|
||||
itemUpdates[itemId].damaged_quantity,
|
||||
act.details!.quantity as BigNumberInput
|
||||
)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
itemUpdates[itemId] = {
|
||||
id: itemMap[itemId],
|
||||
received_quantity: act.details!.quantity,
|
||||
damaged_quantity:
|
||||
act.action === ChangeActionType.RECEIVE_DAMAGED_RETURN_ITEM
|
||||
? act.details!.quantity
|
||||
: 0,
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user