/**
* Adds the delivery information from $order to $invoice
*
* @param InvoiceInterface $invoice
* @param OrderInterface $order
*/
protected function addDelivery(InvoiceInterface $invoice, OrderInterface $order)
{
/** @var InvoiceElementInterface $invoiceElement */
$invoiceElement = $this->invoiceElementManager->create();
$invoiceElement->setQuantity(1);
$invoiceElement->setPrice($order->getDeliveryCost());
$invoiceElement->setUnitPriceExcl($order->getDeliveryCost());
$invoiceElement->setUnitPriceInc($order->getDeliveryCost());
$invoiceElement->setTotal($order->getDeliveryCost());
$invoiceElement->setVatRate(0);
$invoiceElement->setDesignation($this->deliveryPool->getMethod($order->getDeliveryMethod())->getName());
$invoiceElement->setDescription($this->deliveryPool->getMethod($order->getDeliveryMethod())->getName());
$invoiceElement->setInvoice($invoice);
$invoice->addInvoiceElement($invoiceElement);
}