protected function createInvoiceElementFromOrderElement(OrderElementInterface $orderElement)
    {
        $invoice = $this->invoiceElementManager->create();
        $invoice->setOrderElement($orderElement);
        $invoice->setDescription($orderElement->getDescription());
        $invoice->setDesignation($orderElement->getDesignation());
        $invoice->setPrice($orderElement->getPrice(true));
        $invoice->setUnitPriceExcl($orderElement->getUnitPrice(false));
        $invoice->setUnitPriceInc($orderElement->getUnitPrice(true));
        $invoice->setVatRate($orderElement->getVatRate());
        $invoice->setQuantity($orderElement->getQuantity());
        $invoice->setTotal($orderElement->getTotal(true));

        return $invoice;
    }
protected function createInvoiceElementFromOrderElement(OrderElementInterface $orderElement)
    {
        $invoice = $this->invoiceElementManager->create();
        $invoice->setOrderElement($orderElement);
        $invoice->setDescription($orderElement->getDescription());
        $invoice->setDesignation($orderElement->getDesignation());
        $invoice->setPrice($orderElement->getPrice(true));
        $invoice->setUnitPriceExcl($orderElement->getUnitPrice(false));
        $invoice->setUnitPriceInc($orderElement->getUnitPrice(true));
        $invoice->setVatRate($orderElement->getVatRate());
        $invoice->setQuantity($orderElement->getQuantity());
        $invoice->setTotal($orderElement->getTotal(true));

        return $invoice;
    }
protected function createInvoiceElementFromOrderElement ( OrderElementInterface $ orderElement ) { $ invoice = $ this -> invoiceElementManager -> create ( ) ; $ invoice -> setOrderElement ( $ orderElement ) ; $ invoice -> setDescription ( $ orderElement -> getDescription ( ) ) ; $ invoice -> setDesignation ( $ orderElement -> getDesignation ( ) ) ; $ invoice -> setPrice ( $ orderElement -> getPrice ( true ) ) ; $ invoice -> setUnitPriceExcl ( $ orderElement -> getUnitPrice ( false ) ) ; $ invoice -> setUnitPriceInc ( $ orderElement -> getUnitPrice ( true ) ) ; $ invoice -> setVatRate ( $ orderElement -> getVatRate ( ) ) ; $ invoice -> setQuantity ( $ orderElement -> getQuantity ( ) ) ; $ invoice -> setTotal ( $ orderElement -> getTotal ( true ) ) ; return $ invoice ; }
Creates an InvoiceElement based on an OrderElement.

@param OrderElementInterface $orderElement

@return \Sonata\Component\Invoice\InvoiceElementInterface
Creates an InvoiceElement based on an OrderElement .