<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magento.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magento.com for more information.
 *
 * @category    design
 * @package     default_default
 * @copyright   Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
/* @var $this Mage_Tax_Block_Adminhtml_Notifications */
?>
<?php $messageDetails = $this->helper('tax')->__('Please see <a href="%s">source</a> for more details.', $this->getInfoUrl())
    . $this->helper('tax')->__('Click here to go to <a href="%s">Tax configuration</a> and change your settings.', $this->getManageUrl());
?>
<?php $discountStores = $this->getWebsitesWithWrongDiscountSettings() ?>
<?php if (!Mage::helper('tax')->isWrongDiscountSettingsIgnored() && $discountStores): ?>
<div class="notification-global">
    <strong><?php echo $this->helper('tax')->__('Warning tax discount configuration might result in different discounts than a customer might expect') ?></strong>
    <?php if (is_array($discountStores)): ?><strong><?php echo $this->helper('tax')->__('for store(s)') ?>
    : </strong><?php echo implode(', ', $discountStores) ?><?php endif; ?>.
    <?php echo $messageDetails ?>
    <span class="f-right">
        <a href="<?php echo $this->getIgnoreTaxNotificationUrl('discount') ?>"><?php echo $this->helper('tax')->__('Ignore this notification') ?></a>
    </span>
</div>
<?php endif; ?>

<?php $priceDisplayStores = $this->getStoresWithWrongDisplaySettings() ?>
<?php if (!Mage::helper('tax')->isWrongDisplaySettingsIgnored() && $priceDisplayStores): ?>
<div class="notification-global">
    <strong><?php echo $this->helper('tax')->__('Warning tax configuration can result in rounding errors') ?></strong>
    <?php if (is_array($priceDisplayStores)): ?><strong><?php echo $this->helper('tax')->__('for store(s)') ?>
    : </strong><?php echo implode(', ', $priceDisplayStores) ?><?php endif; ?>.
    <?php echo $messageDetails ?>
    <span class="f-right">
        <a href="<?php echo $this->getIgnoreTaxNotificationUrl('price_display') ?>"><?php echo $this->helper('tax')->__('Ignore this notification') ?></a>
    </span>
</div>
<?php endif; ?>

<?php $storesWithConflictingFptTaxConfigurationSettings = $this->getStoresWithConflictingFptTaxConfigurationSettings() ?>
<?php $isDefaultStoreConflictingFptTaxConfigurationSettings = $this->isDefaultStoreWithConflictingFptTaxConfigurationSettings() ?>

<?php if (!Mage::helper('tax')->isConflictingFptTaxConfigurationSettingsIgnored() &&
    ($isDefaultStoreConflictingFptTaxConfigurationSettings || $storesWithConflictingFptTaxConfigurationSettings)
): ?>
<div class="notification-global">
    <strong><?php echo $this->helper('tax')->__('Warning tax configuration can result in unexpected FPT prices on applicable devices') ?></strong>
    <!--        If the default store is fine, but the others aren't, list the ones that have conflicting settings-->
    <?php if (empty($storesWithConflictingFptTaxConfigurationSettings) && !$isDefaultStoreConflictingFptTaxConfigurationSettings): ?>
    <strong><?php echo $this->helper('tax')->__('for store(s)') ?>
        : </strong><?php echo implode(', ', $storesWithConflictingFptTaxConfigurationSettings) ?><?php endif; ?>.
        <span class="f-right">
        <a href="<?php echo $this->getIgnoreTaxNotificationUrl('fpt_configuration') ?>"><?php echo $this->helper('tax')->__('Ignore this notification') ?></a>
    </span>
</div>
<?php endif; ?>

