HEX
Server: Apache/2.2.15 (CentOS)
System: Linux ip-10-0-2-146.eu-west-1.compute.internal 2.6.32-754.35.1.el6.centos.plus.x86_64 #1 SMP Sat Nov 7 11:33:42 UTC 2020 x86_64
User: root (0)
PHP: 5.6.40
Disabled: NONE
Upload Files
File: //www/exchange0old/exchange/cache/%%EF^EF2^EF21EB5A%%spool_file_report_contents.html.php
<?php /* Smarty version 2.6.19, created on 2024-06-17 08:39:39
         compiled from reports/spool_file_report_contents.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'number_format', 'reports/spool_file_report_contents.html', 199, false),)), $this); ?>
<?php if ($this->_tpl_vars['pdf'] == 1): ?>
    <b>Spool File Report</b><br>
    <b>Date from:</b>
        <?php if (isset ( $this->_tpl_vars['pdf_query']['from_date'] )): ?>
            <?php echo $this->_tpl_vars['pdf_query']['from_date']; ?>

        <?php endif; ?>
    <br>
    <b>Date to:</b>
        <?php if (isset ( $this->_tpl_vars['pdf_query']['to_date'] )): ?>
            <?php echo $this->_tpl_vars['pdf_query']['to_date']; ?>

        <?php endif; ?>
    <br>
    <b>Originator:</b>
    <?php if (isset ( $this->_tpl_vars['originators'] )): ?>
        <?php $_from = $this->_tpl_vars['originators']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['item']):
?>
            <?php echo $this->_tpl_vars['item']['organisation_name']; ?>
 (<?php echo $this->_tpl_vars['item']['organisation_reference_id']; ?>
)
        <?php endforeach; endif; unset($_from); ?>
    <?php endif; ?>
    <br>
    <b>Invoices/Transactions:</b>
    <?php if (isset ( $this->_tpl_vars['pdf_query']['transaction_ids'] )): ?>
        <?php echo $this->_tpl_vars['pdf_query']['transaction_ids']; ?>

    <?php endif; ?>
    <br>
    <b>Batches:</b>
        <?php if (isset ( $this->_tpl_vars['pdf_query']['batch_ids'] )): ?>
            <?php echo $this->_tpl_vars['pdf_query']['batch_ids']; ?>

        <?php endif; ?>
    <br>
    <b>Type:</b>
        <?php if (isset ( $this->_tpl_vars['pdf_query']['type'] )): ?>
            <?php echo $this->_tpl_vars['pdf_query']['type']; ?>

        <?php endif; ?>
    <br>
    <b>ETR Type:</b>
        <?php if (isset ( $this->_tpl_vars['pdf_query']['etr_type'] )): ?>
        <?php echo $this->_tpl_vars['pdf_query']['etr_type']; ?>

        <?php endif; ?>
    <br>
<?php endif; ?>

<table cellpadding="0" cellspacing="0" border="0" width="100%" class="table table-hover table-striped table-responsive dynamicTable">
    <thead>
    <tr>
        <th align="left" valign="top" class="nopadding" >#Id</th>
        <th align="left" valign="top" class="nopadding" >Date</th>
        <th align="left" valign="top" class="nopadding" ><nobr>Batch Id</nobr></th>
        <th align="left" valign="top" class="nopadding" >No</th>
        <th align="center" valign="top" class="nopadding" style="text-align: right;">Cncy</th>
        <th align="center" valign="top" class="nopadding" style="text-align: right;">Amount</th>

        <?php if ($this->_tpl_vars['pdf'] == 1): ?>
        <th align="center" valign="top" class="nopadding" style="text-align: right;">Fees</th>
        <th align="center" valign="top" class="nopadding" style="text-align: right;">Fee Comment</th>
        <th align="center" valign="top" class="nopadding" style="text-align: right;">Deduction</th>
        <th align="center" valign="top" class="nopadding" style="text-align: right;">Ded. Comment</th>
        <?php endif; ?>

        <th align="center" valign="top" class="nopadding" style="text-align: right;">Type</th>
        <th align="center" valign="top" class="nopadding"><nobr>Acc From</nobr></th>
        <th align="center" valign="top" class="nopadding"><nobr>Acc To</nobr></th>
        <th align="center" valign="top" class="nopadding" style="text-align: right;">Source</th>
        <th align="center" valign="top" class="nopadding" style="text-align: right;"><nobr>Source Id(s)</nobr></th>
    </tr>
    </thead>
    <tbody>

    <?php $this->assign('batch_id', 0); ?>
    <?php $this->assign('display_source', 0); ?>

    <?php $_from = $this->_tpl_vars['transactions']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['item']):
?>

    <?php if ($this->_tpl_vars['batch_id'] != $this->_tpl_vars['item']['batch_id']): ?>
    <tr>
        <td <?php if ($this->_tpl_vars['pdf'] == 1): ?>colspan="15"<?php else: ?>colspan="11"<?php endif; ?> align="left"><b>Batch #<?php echo $this->_tpl_vars['item']['batch_id']; ?>
 for <?php echo $this->_tpl_vars['item']['organisation_name']; ?>
 (<?php echo $this->_tpl_vars['item']['organisation_reference_id']; ?>
)</b>
        <b><?php if (isset ( $this->_tpl_vars['item']['debtor_type'] ) && $this->_tpl_vars['item']['debtor_type'] == 'creditor'): ?>c-ETR<?php endif; ?>
        <?php if (isset ( $this->_tpl_vars['item']['debtor_type'] ) && $this->_tpl_vars['item']['debtor_type'] == 'debtor'): ?>d-ETR<?php endif; ?></b> 
        <b>[GBP Fx Rate: <?php echo $this->_tpl_vars['item']['gbp_fx']; ?>
 |  USD Fx Rate: <?php echo $this->_tpl_vars['item']['usd_fx']; ?>
]</b>
        </td>
    </tr>
    <?php $this->assign('batch_id', $this->_tpl_vars['item']['batch_id']); ?>
    <?php $this->assign('display_source', 1); ?>
    <?php endif; ?>


    <tr>
        <td align="left" valign="top"  class="nopadding" >
            <?php echo $this->_tpl_vars['item']['id']; ?>

        </td>
        <td align="left" valign="top" class="nopadding" ><nobr><?php echo $this->_tpl_vars['item']['date']; ?>
</nobr></td>
        <td align="center" valign="top" class="nopadding" ><?php echo $this->_tpl_vars['item']['batch_id']; ?>
</td>
        <td align="center" valign="top" class="nopadding" ><?php echo $this->_tpl_vars['item']['transaction_id']; ?>
</td>
        <td align="center" valign="top" class="nopadding" ><?php echo $this->_tpl_vars['item']['currency']; ?>
</td>
        <td align="right" valign="top" class="nopadding" ><?php echo $this->_tpl_vars['item']['amount']; ?>
<?php 

            $item   = $this->get_template_vars('item');
            $pdf    = (int)$this->get_template_vars('pdf');

            if( !$pdf )
            {
                if ( isset($item['fees']) )
                {
                    foreach($item['fees'] as $fee)
                    {
                        if($fee['amount'] > 0)
                        {
                            echo "<br>"; echo "<span style='font-size: 80%; color: green; text-decoration: none;'>".$fee['amount']."</span>";
                        }

                    }
                }
            }
            else
            {
                    if ( isset($item['fees']) )
                    {
                        foreach($item['fees'] as $fee)
                        {
                            if($fee['amount'] > 0)
                            {
                                echo '<td align="left" valign="top" class="nopadding" >'; echo $fee['amount']."</td>";
                                echo '<td align="left" valign="top" class="nopadding" >'; echo htmlspecialchars($fee['comment'])."</td>";
                            }
                            else
                            {
                                echo '<td align="left" valign="top" class="nopadding" ></td>';
                                echo '<td align="left" valign="top" class="nopadding" ></td>';
                            }
                        }
                    }
                    else
                    {
                            echo '<td align="left" valign="top" class="nopadding" ></td>';
                            echo '<td align="left" valign="top" class="nopadding" ></td>';
                            echo '<td align="left" valign="top" class="nopadding" ></td>';
                            echo '<td align="left" valign="top" class="nopadding" ></td>';
                    }
            }
             ?></td>
        <td align="left" valign="top" class="nopadding" ><?php echo $this->_tpl_vars['item']['user_type']; ?>
<?php 

            $item = $this->get_template_vars('item');
            $pdf    = (int)$this->get_template_vars('pdf');

            if ( isset($item['fees']) and !$pdf )
            {
                foreach($item['fees'] as $fee)
                {
                    if($fee['amount'] > 0)
                    {
                        echo "<br>"; echo "<span style='font-size: 80%; color: green; text-decoration: none;'>".htmlspecialchars($fee['comment'])."</span>";
                    }
                }
            }

             ?></td>
        <td align="left" valign="top" class="nopadding" ><?php echo $this->_tpl_vars['item']['account_from']; ?>
</td>
        <td align="left" valign="top" class="nopadding" ><?php echo $this->_tpl_vars['item']['bank_to']; ?>
 : <?php echo $this->_tpl_vars['item']['account_to']; ?>
</td>
        <td align="center" valign="top" class="nopadding" >
            <?php 

            $item = $this->get_template_vars('item');

            if( stripos($item['type'], 'Purchase') !== false )
                echo "invoice";

            if( stripos($item['type'], 'Reserve') !== false )
                echo "reserve";

            if( stripos($item['type'], 'Return') !== false )
                echo "return";

             ?>
        </td>
        <td align="left" valign="top" class="nopadding"  width="200px;">
            <?php if ($this->_tpl_vars['display_source'] == 1): ?>
                <?php echo $this->_tpl_vars['batches_sources'][$this->_tpl_vars['batch_id']]; ?>

                <?php $this->assign('display_source', 0); ?>
            <?php endif; ?>
        </td>
    </tr>
    <?php endforeach; endif; unset($_from); ?>
    </tbody>
    <tfoot>
</table>
<?php if ($this->_tpl_vars['pdf'] == 1): ?>

<?php $_from = $this->_tpl_vars['totals']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['total_key'] => $this->_tpl_vars['total_item']):
?>
<br>
<b>Totals (<?php echo $this->_tpl_vars['total_key']; ?>
):</b><br>
    <table>
    <?php $_from = $this->_tpl_vars['total_item']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['k'] => $this->_tpl_vars['item']):
?>
        <tr>
            <td><?php echo $this->_tpl_vars['k']; ?>
:</td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td><?php echo ((is_array($_tmp=$this->_tpl_vars['item'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2, ".", "") : smarty_modifier_number_format($_tmp, 2, ".", "")); ?>
</td>
        </tr>
    <?php endforeach; endif; unset($_from); ?>
    </table>
<?php endforeach; endif; unset($_from); ?>
<?php endif; ?>