private function throwIllegalOperationIfAdjustmentIsImmutable(ResourceEventInterface $event)
    {
        if ($event->getHard()) {
            return;
        }

        $adjustment = $this->getAdjustmentFromEvent($event);

        // Stop if adjustment is immutable.
        if ($adjustment->isImmutable()) {
            throw new IllegalOperationException('ekyna_commerce.sale.message.immutable_element');
        }
    }