<?php
/*
 * @author     M2E Pro Developers Team
 * @copyright  M2E LTD
 * @license    Commercial use is forbidden
 */

// @codingStandardsIgnoreFile

/** @var $this Ess_M2ePro_Block_Adminhtml_Order_Debug */

?>

<div id="magento_block_debug_information" class="entry-edit box-left" collapseable="no">

    <div class="entry-edit-head">
        <h4><?php echo Mage::helper('M2ePro')->__('Store Debug Information');?></h4>
    </div>

    <div class="fieldset">

        <table cellspacing="0" width="100%" class="form-list">
            <tbody>

                <?php if ($this->getData('store_tax_calculation_algorithm') !== null) : ?>
                    <tr>
                        <td class="label">Tax Calculation Method Based On:</td>
                        <td class="value"><?php echo $this->getData('store_tax_calculation_algorithm') ?></td>
                    </tr>
                <?php endif; ?>

                <tr>
                    <td class="label">Tax Calculation Based On:</td>
                    <td class="value"><?php echo ucfirst($this->getData('store_tax_calculation_based_on')) ?> Address</td>
                </tr>

                <tr>
                    <td class="label">Catalog Prices:</td>
                    <td class="value"><?php echo $this->getData('product_price_includes_tax') ? 'Including Tax' : 'Excluding Tax' ?></td>
                </tr>

                <tr>
                    <td class="label">Shipping Prices:</td>
                    <td class="value"><?php echo $this->getData('shipping_price_includes_tax') ? 'Including Tax' : 'Excluding Tax' ?></td>
                </tr>

                <tr>
                    <td class="label">Store Shipping Tax Class:</td>
                    <td class="value"><?php echo $this->getData('store_shipping_tax_class') != '' ? $this->getData('store_shipping_tax_class') : 'None' ?></td>
                </tr>

                <?php if ($this->getData('store_shipping_tax_rate') !== null) : ?>
                    <tr>
                        <td class="label">Store Shipping Tax Rate:</td>
                        <td class="value"><?php echo $this->getData('store_shipping_tax_rate'); ?>%</td>
                    </tr>
                <?php endif; ?>

                <tr>
                    <td class="label">Actions:</td>
                    <td class="value">
                        <?php $url = $this->getUrl('*/adminhtml_controlPanel_module_integration/getPrintOrderQuoteData', array(
                            'print' => '1',
                            'order_id' => $this->getRequest()->getParam('id')
                        )); ?>
                        <a href="<?php echo $url; ?>" target="_blank">Build Quote</a>
                    </td>
                    <td class="value">
                        <?php $deleteUrl = $this->getUrl('*/*/delete', array('id' => $this->getRequest()->getParam('id'))); ?>
                        <a href="javascript:void(0);" onclick="if (!confirm('Are you sure?')) return; setLocation('<?php echo $deleteUrl; ?>')">Delete Order</a>
                    </td>
                </tr>

            </tbody>
        </table>

    </div>

</div>

<div style="clear: both;"></div>