error display undo shipment can applied only on posted order but not invoiced order why

Hi guys i have one problem when i make ship to order then this order damage so that i want to return when i make return to order i see this error undo shipment can applied only on posted order but not invoiced order why

how i solve this proplem

thanks

Are you trying to Undo Shipment from Posted Shipment or Created new return Order and used Applied to doc type and Applied to Doc No?

Did the Order already invoiced also?