diff --git a/packages/admin-ui/src/lib/order/src/components/order-detail/order-detail.component.ts b/packages/admin-ui/src/lib/order/src/components/order-detail/order-detail.component.ts index ae6b8b3573..e1f123026e 100644 --- a/packages/admin-ui/src/lib/order/src/components/order-detail/order-detail.component.ts +++ b/packages/admin-ui/src/lib/order/src/components/order-detail/order-detail.component.ts @@ -257,10 +257,9 @@ export class OrderDetailComponent } canAddFulfillment(order: OrderDetailFragment): boolean { - const allFulfillmentLines: FulfillmentFragment['lines'] = (order.fulfillments ?? []).reduce( - (all, fulfillment) => [...all, ...fulfillment.lines], - [] as FulfillmentFragment['lines'], - ); + const allFulfillmentLines: FulfillmentFragment['lines'] = (order.fulfillments ?? []) + .filter(fulfillment => fulfillment.state !== 'Cancelled') + .reduce((all, fulfillment) => [...all, ...fulfillment.lines], [] as FulfillmentFragment['lines']); let allItemsFulfilled = true; for (const line of order.lines) { const totalFulfilledCount = allFulfillmentLines