fix(core-flows): fixes duplicate fulfillment issue (#8581)
what: - fixes a bug where fulfilling an outbound item was throwing an error due to the entire order being processed for fulfillment RESOLVES CC-298
This commit is contained in:
@@ -297,7 +297,13 @@ export const createOrderFulfillmentWorkflow = createWorkflow(
|
||||
const fulfillment = createFulfillmentWorkflow.runAsStep(fulfillmentData)
|
||||
|
||||
const registerOrderFulfillmentData = transform(
|
||||
{ order, fulfillment, input, inputItemsMap, itemsList: input.items_list },
|
||||
{
|
||||
order,
|
||||
fulfillment,
|
||||
input,
|
||||
inputItemsMap,
|
||||
itemsList: input.items ?? input.items_list,
|
||||
},
|
||||
prepareRegisterOrderFulfillmentData
|
||||
)
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ function prepareRegisterShipmentData({
|
||||
reference: Modules.FULFILLMENT,
|
||||
reference_id: fulfillment.id,
|
||||
created_by: input.created_by,
|
||||
items: order.items!.map((i) => {
|
||||
items: (input.items ?? order.items)!.map((i) => {
|
||||
return {
|
||||
id: i.id,
|
||||
quantity: i.quantity,
|
||||
|
||||
Reference in New Issue
Block a user