Entity/BaseOrder.php
public function isElligibleForInvoice()
    {
        if ($this->getInvoiceReference() || !$this->getBillingAddress() || !$this->getShippingAddress() || !$this->getBillingAddress()->getCountry() || !$this->getShippingAddress()->getCountry()) {
            return false;
        }

        $to = [self::STATE_IN_PROGRESS, self::STATE_READY_FOR_SHIPPING, self::STATE_IN_SHIPPING, self::STATE_FINALIZED];

        if (!in_array($this->getState(), $to, true)) {
            return false;
        }

        //TODO gérer paiement

        return true;
    }
public function isElligibleForInvoice()
    {
        if ($this->getInvoiceReference() || !$this->getBillingAddress() || !$this->getShippingAddress() || !$this->getBillingAddress()->getCountry() || !$this->getShippingAddress()->getCountry()) {
            return false;
        }

        $to = [self::STATE_IN_PROGRESS, self::STATE_READY_FOR_SHIPPING, self::STATE_IN_SHIPPING, self::STATE_FINALIZED];

        if (!in_array($this->getState(), $to, true)) {
            return false;
        }

        //TODO gérer paiement

        return true;
    }
TODO savoir quand on a besoin de valider, est-ce que c'est dès qu'on a un paiement, ou que la commande passe en active?