<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile

?>
<?php $_invoice = $block->getInvoice() ?>
<?php $_order = $_invoice->getOrder() ?>
<?= $block->getChildHtml('order_info') ?>

<section class="admin__page-section order-view-billing-shipping">
    <div class="admin__page-section-title">
        <span class="title"><?= /* @escapeNotVerified */ __('Payment &amp; Shipping Method') ?></span>
    </div>
    <div class="admin__page-section-content">
        <div class="admin__page-section-item order-payment-method<?php if ($_order->getIsVirtual()): ?> order-payment-method-virtual<?php endif; ?> admin__fieldset-wrapper">
            <?php /*Billing Address */ ?>
            <div class="admin__page-section-item-title">
                <span class="title"><?= /* @escapeNotVerified */ __('Payment Information') ?></span>
            </div>
            <div class="admin__page-section-item-content">
                <div class="order-payment-method-title"><?= $block->getChildHtml('order_payment') ?></div>
                <div class="order-payment-currency">
                    <?= /* @escapeNotVerified */ __('The order was placed using %1.', $_order->getOrderCurrencyCode()) ?>
                </div>
                <div class="order-payment-additional"><?= $block->getChildHtml('order_payment_additional') ?></div>
            </div>
        </div>

        <?php if (!$_order->getIsVirtual()): ?>
            <div class="admin__page-section-item order-shipping-address">
                <?php /*Shipping Address */ ?>
                <div class="admin__page-section-item-title">
                    <span class="title"><?= /* @escapeNotVerified */ __('Shipping Information') ?></span>
                </div>
                <div class="admin__page-section-item-content shipping-description-wrapper">
                    <div class="shipping-description-title">
                        <?= $block->escapeHtml($_order->getShippingDescription()) ?>
                    </div>
                    <div class="shipping-description-content">
                        <?= /* @escapeNotVerified */ __('Total Shipping Charges') ?>:

                        <?php if ($this->helper('Magento\Tax\Helper\Data')->displayShippingPriceIncludingTax()): ?>
                            <?php $_excl = $block->displayShippingPriceInclTax($_order); ?>
                        <?php else: ?>
                            <?php $_excl = $block->displayPriceAttribute('shipping_amount', false, ' '); ?>
                        <?php endif; ?>
                        <?php $_incl = $block->displayShippingPriceInclTax($_order); ?>

                        <?= /* @escapeNotVerified */ $_excl ?>
                        <?php if ($this->helper('Magento\Tax\Helper\Data')->displayShippingBothPrices() && $_incl != $_excl): ?>
                            (<?= /* @escapeNotVerified */ __('Incl. Tax') ?> <?= /* @escapeNotVerified */ $_incl ?>)
                        <?php endif; ?>
                        <div><?= $block->getChildHtml('shipment_tracking') ?></div>
                    </div>
                </div>
            </div>
        <?php endif; ?>

    </div>
</section>

<section class="admin__page-section">
    <div class="admin__page-section-title">
        <span class="title"><?= /* @escapeNotVerified */ __('Items Invoiced') ?></span>
    </div>

    <div id="invoice_item_container" class="admin__page-section-content">
        <?= $block->getChildHtml('invoice_items') ?>
    </div>
</section>

<section class="admin__page-section">
    <div class="admin__page-section-title">
        <span class="title"><?= /* @escapeNotVerified */ __('Order Total') ?></span>
    </div>
    <div class="admin__page-section-content">
        <div class="admin__page-section-item order-comments-history">
            <div class="admin__page-section-item-title">
                <span class="title"><?= /* @escapeNotVerified */ __('Invoice History') ?></span>
            </div>
            <div class="admin__page-section-item-content">
                <?= $block->getChildHtml('order_comments') ?>
            </div>
        </div>

        <div id="history_form" class="admin__page-section-item order-totals">
            <div class="admin__page-section-item-title">
                <span class="title"><?= /* @escapeNotVerified */ __('Invoice Totals') ?></span>
            </div>
            <?= $block->getChildHtml('invoice_totals') ?>
        </div>
    </div>
</section>
