Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
invoice.phtml
Go to the documentation of this file.
1 <?php
7 // @codingStandardsIgnoreFile
8 
9 ?>
10 <?php $_order = $block->getOrder() ?>
11 <?php $_invoice = $block->getInvoice() ?>
12 <?php if ($_invoice): ?>
13 <?php $_invoices = [$_invoice]; ?>
14 <?php else: ?>
15 <?php $_invoices = $_order->getInvoiceCollection() ?>
16 <?php endif; ?>
17 <?php foreach ($_invoices as $_invoice): ?>
18 <div class="order-details-items invoice">
19  <div class="order-title">
20  <strong><?= /* @escapeNotVerified */ __('Invoice #') ?><?= /* @escapeNotVerified */ $_invoice->getIncrementId() ?></strong>
21  </div>
22  <div class="table-wrapper table-order-items invoice">
23  <table class="data table table-order-items invoice" id="my-invoice-table-<?= /* @escapeNotVerified */ $_invoice->getId() ?>">
24  <caption class="table-caption"><?= /* @escapeNotVerified */ __('Items Invoiced') ?></caption>
25  <thead>
26  <tr>
27  <th class="col name"><?= /* @escapeNotVerified */ __('Product Name') ?></th>
28  <th class="col sku"><?= /* @escapeNotVerified */ __('SKU') ?></th>
29  <th class="col price"><?= /* @escapeNotVerified */ __('Price') ?></th>
30  <th class="col qty"><?= /* @escapeNotVerified */ __('Qty Invoiced') ?></th>
31  <th class="col subtotal"><?= /* @escapeNotVerified */ __('Subtotal') ?></th>
32  </tr>
33  </thead>
34  <?php $_items = $_invoice->getItemsCollection(); ?>
35  <?php foreach ($_items as $_item): ?>
36  <?php if (!$_item->getOrderItem()->getParentItem()): ?>
37  <tbody>
38  <?= $block->getItemHtml($_item) ?>
39  </tbody>
40  <?php endif; ?>
41  <?php endforeach; ?>
42  <tfoot>
43  <?= $block->getInvoiceTotalsHtml($_invoice) ?>
44  </tfoot>
45  </table>
46  </div>
47  <div class="block block-order-details-view">
48  <div class="block-title">
49  <strong><?= /* @escapeNotVerified */ __('Order Information') ?></strong>
50  </div>
51  <div class="block-content">
52  <?php if (!$_order->getIsVirtual()): ?>
53  <div class="box box-order-shipping-address">
54  <div class="box-title">
55  <strong><?= /* @escapeNotVerified */ __('Shipping Address') ?></strong>
56  </div>
57  <div class="box-content">
58  <?php $_shipping = $_invoice->getShippingAddress() ?>
59  <address><?= /* @escapeNotVerified */ $block->formatAddress($_shipping, 'html') ?></address>
60  </div>
61  </div>
62 
63  <div class="box box-order-shipping-method">
64  <div class="box-title">
65  <strong><?= /* @escapeNotVerified */ __('Shipping Method') ?></strong>
66  </div>
67  <div class="box-content">
68  <?php if ($_order->getShippingDescription()): ?>
69  <?= $block->escapeHtml($_order->getShippingDescription()) ?>
70  <?php else: ?>
71  <?= /* @escapeNotVerified */ __('No shipping information available') ?>
72  <?php endif; ?>
73  </div>
74  </div>
75  <?php endif; ?>
76  <div class="box box-order-billing-address">
77  <div class="box-title">
78  <strong><?= /* @escapeNotVerified */ __('Billing Address') ?></strong>
79  </div>
80  <div class="box-content">
81  <?php $_billing = $_invoice->getbillingAddress() ?>
82  <address><?= /* @escapeNotVerified */ $block->formatAddress($_order->getBillingAddress(), 'html') ?></address>
83  </div>
84  </div>
85 
86  <div class="box box-order-billing-method">
87  <div class="box-title">
88  <strong><?= /* @escapeNotVerified */ __('Payment Method') ?></strong>
89  </div>
90  <div class="box-content">
91  <?= $block->getPaymentInfoHtml() ?>
92  </div>
93  </div>
94  </div>
95  </div>
96 </div>
97 <?php endforeach; ?>
$parentItem $_order
Definition: default.phtml:12
__()
Definition: __.php:13
$block
Definition: block.php:8
$_item
Definition: default.phtml:11