<?php
/**
 * Maho
 *
 * @category    design
 * @package     default_default
 * @copyright   Copyright (c) 2006-2020 Magento, Inc. (https://magento.com)
 * @copyright   Copyright (c) 2021-2024 The OpenMage Contributors (https://openmage.org)
 * @copyright   Copyright (c) 2024 Maho (https://mahocommerce.com)
 * @license     https://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */

/** @var Mage_Adminhtml_Block_Sales_Order_Invoice_View_Form $this */
?>
<?php $_invoice = $this->getInvoice() ?>
<?php $_order = $_invoice->getOrder() ?>
<?= $this->getChildHtml('order_info') ?>
<?php if (!$_order->getIsVirtual()): ?>
<div class="box-left">
<?php else: ?>
<div class="box-right">
<?php endif ?>
    <!--Billing Address-->
    <div class="entry-edit">
        <div class="entry-edit-head">
            <h4><?= $this->helper('sales')->__('Payment Information') ?></h4>
        </div>
        <fieldset>
            <div><?= $this->getChildHtml('order_payment') ?></div>
            <div><?= Mage::helper('sales')->__('Order was placed using %s', $_order->getOrderCurrencyCode()) ?></div>
        </fieldset>
    </div>
</div>
<?php if (!$_order->getIsVirtual()): ?>
<div class="box-right">
    <!--Shipping Address-->
    <div class="entry-edit">
        <div class="entry-edit-head">
            <h4><?= $this->helper('sales')->__('Shipping Information') ?></h4>
        </div>
        <fieldset>
            <strong><?= $this->escapeHtml($_order->getShippingDescription()) ?></strong>
            <?= $this->helper('sales')->__('Total Shipping Charges') ?>:

            <?php if ($this->helper('tax')->displayShippingPriceIncludingTax()): ?>
                <?php $_excl = $this->displayShippingPriceInclTax($_order); ?>
            <?php else: ?>
                <?php $_excl = $this->displayPriceAttribute('shipping_amount', false, ' '); ?>
            <?php endif ?>
            <?php $_incl = $this->displayShippingPriceInclTax($_order); ?>

            <?= $_excl ?>
            <?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
                (<?= $this->__('Incl. Tax') ?> <?= $_incl ?>)
            <?php endif ?>
            <div><?= $this->getChildHtml('shipment_tracking') ?></div>
        </fieldset>
    </div>
<?php endif ?>
</div>
<div class="clear"></div>

<div class="entry-edit">
    <div class="entry-edit-head">
        <h4><?= $this->helper('sales')->__('Items Invoiced') ?></h4>
    </div>
    <div id="invoice_item_container">
        <?= $this->getChildHtml('invoice_items') ?>
    </div>
</div>

<div class="box-left entry-edit">
    <div class="entry-edit-head"><h4><?= $this->__('Invoice History') ?></h4></div>
    <fieldset><?= $this->getChildHtml('order_comments') ?></fieldset>
</div>

<div class="box-right entry-edit" id="history_form">
    <div class="entry-edit-head"><h4><?= $this->__('Invoice Totals') ?></h4></div>
    <div class="order-totals"><?= $this->getChildHtml('invoice_totals') ?></div>
</div>
<div class="clear"></div>
