<?php
/**
 * This file is part of the Itabs_Debit module.
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/osl-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@magentocommerce.com so we can send you a copy immediately.
 *
 * @category  Itabs
 * @package   Itabs_Debit
 * @author    Rouven Alexander Rieker <rouven.rieker@itabs.de>
 * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
 * @license   http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @version   1.0.2
 * @link      http://www.magentocommerce.com/magento-connect/debitpayment.html
 */
?>
<?php
/**
 * @see Itabs_Debit_Block_Info
 * @var $this Itabs_Debit_Block_Info
 */
?>
<?php if ($_info = $this->getMethod()): ?>
    <?php echo $this->escapeHtml($_info->getTitle()) ?><br />

    <?php if ($this->isEmailContext()): ?>
        <?php if ($this->sendDataInEmail()): ?>
            <?php $_data = $this->getEmailData() ?>
            <?php if ($_data['debit_type'] == Itabs_Debit_Helper_Data::DEBIT_TYPE_BANK): ?>
                <?php if (!empty($_data['bank_name'])): ?>
                    <?php echo $this->__('Bank name: %s', $this->escapeHtml($_data['bank_name'])) ?><br />
                <?php endif; ?>

                <?php echo $this->__('Bank code: %s', $this->escapeHtml($_data['account_blz'])) ?><br />
                <?php echo $this->__('Account holder: %s', $this->escapeHtml($_data['account_name'])) ?><br />
                <?php echo $this->__('Account number: %s', $this->escapeHtml($_data['account_number'])) ?><br />
            <?php else: ?>
                <?php echo $this->__('Account holder: %s', $this->escapeHtml($_data['account_name'])) ?><br />
                <?php echo $this->__('SWIFT Code: %s', $this->escapeHtml($_data['account_swift'])) ?><br />
                <?php echo $this->__('IBAN: %s', $this->escapeHtml($_data['account_iban'])) ?><br />
            <?php endif; ?>
        <?php endif; ?>

    <?php else: ?>
        <?php if ($this->getDebitType() == Itabs_Debit_Helper_Data::DEBIT_TYPE_BANK): ?>
            <?php echo $this->__('Bank name: %s', $this->escapeHtml($_info->getAccountBankname())) ?><br />
            <?php echo $this->__('Bank code: %s', $this->escapeHtml($_info->getAccountBLZ())) ?><br />
            <?php echo $this->__('Account holder: %s', $this->escapeHtml($_info->getAccountName())) ?><br />
            <?php echo $this->__('Account number: %s', $this->escapeHtml($_info->getAccountNumber())) ?><br />
        <?php else: ?>
            <?php echo $this->__('Account holder: %s', $this->escapeHtml($_info->getAccountName())) ?><br />
            <?php echo $this->__('SWIFT Code: %s', $this->escapeHtml($_info->getAccountSwift())) ?><br />
            <?php echo $this->__('IBAN: %s', $this->escapeHtml($_info->getAccountIban())) ?><br />
        <?php endif; ?>
    <?php endif; ?>

    <?php if ($_customText = $_info->getCustomText()): ?>
        <br />
        <?php echo $this->escapeHtml($_customText) ?><br />
    <?php endif; ?>
<?php endif; ?>
