You cannot collapse the itinerary for a specific shipment leg unless all of the following are true:
The selected shipment leg is not the first leg for the shipment.
The selected leg and the previous leg for the shipment are not attached to a load.
Both the selected leg and the previous leg for the shipment are attached to the current plan (if requested from the context of a specific plan) or both legs are not attached to any plan (if requested from the context of shipment legs not attached to a plan).
The selected shipment leg and the previous leg for the shipment are in a status of Processed or Selected For Optimization.
Spot Rates have not been defined for the selected shipment leg or the previous leg.
The shipment is not hold.
The selected shipment leg and the previous shipment leg are not suspended.