123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <?php
- /**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
- namespace Magento\Sales\Block\Adminhtml\Order\Invoice\View;
- /**
- * Adminhtml sales item renderer
- *
- * @api
- * @since 100.0.2
- */
- class Items extends \Magento\Sales\Block\Adminhtml\Items\AbstractItems
- {
- /**
- * Retrieve invoice order
- *
- * @return \Magento\Sales\Model\Order
- */
- public function getOrder()
- {
- return $this->getInvoice()->getOrder();
- }
- /**
- * Retrieve source
- *
- * @return \Magento\Sales\Model\Order\Invoice
- */
- public function getSource()
- {
- return $this->getInvoice();
- }
- /**
- * Retrieve invoice model instance
- *
- * @return \Magento\Sales\Model\Order\Invoice
- */
- public function getInvoice()
- {
- return $this->_coreRegistry->registry('current_invoice');
- }
- /**
- * Retrieve order url
- *
- * @return string
- */
- public function getOrderUrl()
- {
- return $this->getUrl('sales/order/view', ['order_id' => $this->getInvoice()->getOrderId()]);
- }
- /**
- * Retrieve formatted price
- *
- * @param float $price
- * @return string
- */
- public function formatPrice($price)
- {
- return $this->getInvoice()->getOrder()->formatPrice($price);
- }
- }
|