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/%%B9^B9C^B9CF01D7%%creditors_statements.html.php
<?php /* Smarty version 2.6.19, created on 2024-06-18 10:22:54
         compiled from statements/creditors_statements.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'siteUrl', 'statements/creditors_statements.html', 2, false),array('modifier', 'number_format', 'statements/creditors_statements.html', 120, false),array('function', 'getDebtorStatus', 'statements/creditors_statements.html', 216, false),)), $this); ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "header.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<script type="text/javascript" src="<?php echo ((is_array($_tmp='/js/jquery.ui.core.js')) ? $this->_run_mod_handler('siteUrl', true, $_tmp) : smarty_modifier_siteUrl($_tmp)); ?>
"></script>
<script type="text/javascript" src="<?php echo ((is_array($_tmp='/js/ui.datepicker.js')) ? $this->_run_mod_handler('siteUrl', true, $_tmp) : smarty_modifier_siteUrl($_tmp)); ?>
"></script>
<script type="text/javascript" src="<?php echo ((is_array($_tmp='/js/jquery.form.js')) ? $this->_run_mod_handler('siteUrl', true, $_tmp) : smarty_modifier_siteUrl($_tmp)); ?>
"></script>
<link type="text/css" href="<?php echo ((is_array($_tmp='/css/bootstrap.min.css')) ? $this->_run_mod_handler('siteUrl', true, $_tmp) : smarty_modifier_siteUrl($_tmp)); ?>
" rel="stylesheet" />


<table cellspacing="0" cellpadding="0" border="0" width="100%">
  <tbody>
    <tr>
      <td align="left" valign="top"><table cellspacing="0" cellpadding="0" border="0" width="100%">
          <tbody>
            <tr>
              <td align="center" valign="top">&nbsp;</td>
            </tr>
            <tr>
              <td align="left" valign="middle" class="login_bg"><table cellspacing="0" cellpadding="0" border="0" width="100%">
                  <tbody>
                    <tr>
                      <td align="left" valign="middle" class="login_bg_t">Exchange Trade Centre | Statement Summary</td>
                      <td width="" align="left" valign="middle" class="txt_11">Originator Organisation ID: <?php echo $_SESSION['user']['org_ref_id']; ?>
  </td>
                      <td align="right"  valign="middle" class="txt_11"><?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'originator_top_dashboard_links.html', 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?></td>
                    </tr>
                  </tbody>
                </table>
            <tr>
              <td align="center" valign="top" class="about_c"><table cellspacing="5" cellpadding="5" border="0" width="100%">
                  <tbody>
                    <tr>
                      <td align="left" width="18%" valign="top"><?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'left_sidebar.html', 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?></td>
                      
                      <td align="right" width="82%" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td align="left" valign="top" class="hdr_center">

                              <table cellpadding="0" cellspacing="0" border="0" width="100%" class="clsoverride">
                                <tr>
                                  <td valign="top" align="center" class="inves_top1" colspan="3" width="50%">Overview</td>
                                  <td valign="top" align="right" class="inves_top1" colspan="3" width="50%">
                                    <?php if ($_GET['uid'] != ''): ?>
                                    <a href="index.php?do=intermediaryhome" class="trade_floor_bttn">Dashboard</a>
                                    <?php else: ?>
                                    <a href="index.php?do=retailerhome" class="trade_floor_bttn">Dashboard</a>
                                    <?php endif; ?>
                                    &nbsp;</td>
                                </tr>
                                <tr >
                                    <td colspan="5"> 
                                        <div style="display:none;" class="error-msgbox"></div>
                                        <?php if (! empty ( $this->_tpl_vars['result'] )): ?>
                                        <div class="success-msgbox">
                                            <?php echo $this->_tpl_vars['result']; ?>

                                        </div>
                                        <?php endif; ?>
                                    </td>
                                </tr>
                                </table>
                                
                                <?php $_from = $this->_tpl_vars['data']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['country_id'] => $this->_tpl_vars['creditors']):
?>
                                
                                <table cellpadding="0" cellspacing="0" border="0" width="100%">
                                 <tr class="grays_bg4">
                                    <td></td>
                                    <td align="center"><b><?php echo $this->_tpl_vars['creditors']['currency']['currency_code']; ?>
</b></td>
                                    <td colspan="2"></td>
                                    <td align="center"><b><?php echo $this->_tpl_vars['creditors']['currency']['country_name']; ?>
</b></td>
                                    <td></td>
                                 </tr>   
                                 <tr class="row1">
                                    <td valign="bottom" align="right"><strong>Statement From :</strong></td>
                                    <td valign="middle" align="left">
                                    
                                      <?php if ($_GET['stmt_from'] == ''): ?>
                                      <?php echo $this->_tpl_vars['rate']['3']['3']; ?>

                                      <input type="hidden" name="stmt_from_date<?php echo $this->_tpl_vars['country_id']; ?>
" id="stmt_from_date<?php echo $this->_tpl_vars['country_id']; ?>
"  value="<?php echo $this->_tpl_vars['rate']['3']['3']; ?>
">
                                       <?php else: ?>
                                       <?php echo $_GET['stmt_from']; ?>

                                      <input type="hidden" name="stmt_from_date<?php echo $this->_tpl_vars['country_id']; ?>
" id="stmt_from_date<?php echo $this->_tpl_vars['country_id']; ?>
"  value="<?php echo $_GET['stmt_from']; ?>
">
                                      <?php endif; ?>
                                  
                                        <input type="hidden" name="statement_date" id="statement_date<?php echo $this->_tpl_vars['country_id']; ?>
" value="" />
                                        <input type="hidden" name="statement_month" id="statement_month<?php echo $this->_tpl_vars['country_id']; ?>
" value="" />
                                        <input type="hidden" name="statement_year" id="statement_year<?php echo $this->_tpl_vars['country_id']; ?>
" value="" />
                                       <script>
                                          //For Date Picker
                                          $(function() {
                                            $( "#statement_year<?php echo $this->_tpl_vars['country_id']; ?>
" ).datepicker({
                                            minDate: null,
                                            showOn: "button",
                                            buttonImage: "<?php echo ((is_array($_tmp='/images/calender_month.png')) ? $this->_run_mod_handler('siteUrl', true, $_tmp) : smarty_modifier_siteUrl($_tmp)); ?>
",
                                            buttonImageOnly: true,
                                            onSelect: function( selectedDate ) {

                                            var i =0;selDate = selectedDate.split('/');var dates = new Array("statement_month<?php echo $this->_tpl_vars['country_id']; ?>
","statement_date<?php echo $this->_tpl_vars['country_id']; ?>
","statement_year<?php echo $this->_tpl_vars['country_id']; ?>
");

                                             var datasplited= selDate[2]+'-'+selDate[0]+'-'+selDate[1];
                                                    var toDate = $('#stmt_to_date<?php echo $this->_tpl_vars['country_id']; ?>
').val();

                                                    if (datasplited > toDate) {
                                                      $('.error-msgbox<?php echo $this->_tpl_vars['country_id']; ?>
').css('display','block').html('Statement from date is greater than statement to date.');
                                                    } else{
                                                    
                                                     window.location.href='index.php?do=mytrastatements&stmt_from='+datasplited+'&stmt_to='+toDate+'&type=creditor';
                                                   }

                                            for(i = 0; i <=2; i++){
                                              $( "#"+dates[i] ).val(selDate[i]);
                                            }
                                            }
                                            });
                                            });
                                        </script>
                                    </td>
                                    <td valign="top" align="right" width="17%"><strong>Start Date :</strong> </td>

                                    <td valign="top" align="left" width="15%"><?php echo $this->_tpl_vars['rate']['3']['3']; ?>
</td>
                                    <td valign="top" align="right"><strong>Total ETR Face Value :</strong></td>
                                    <td valign="top" align="left" width="">
                                        <span id="traded<?php echo $this->_tpl_vars['country_id']; ?>
">
                                            <?php echo ((is_array($_tmp=$this->_tpl_vars['creditors']['stat']['tradedTPurchase'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : smarty_modifier_number_format($_tmp, 2)); ?>

                                        </span>
                                    </td>
                                </tr>
                                <tr class="row1">
                                    <td valign="bottom" align="right"><strong>Statement To :</strong></td>
                                  <td valign="middle" align="left">
                                    <?php if ($_GET['stmt_to'] == ''): ?>
                                       <?php echo $this->_tpl_vars['rate']['3']['2']; ?>

                                      <input type="hidden" name="stmt_to_date<?php echo $this->_tpl_vars['country_id']; ?>
" id="stmt_to_date<?php echo $this->_tpl_vars['country_id']; ?>
" value="<?php echo $this->_tpl_vars['rate']['3']['2']; ?>
">
                                       <?php else: ?>
                                       <?php echo $_GET['stmt_to']; ?>

                                      <input type="hidden" name="stmt_to_date<?php echo $this->_tpl_vars['country_id']; ?>
" id="stmt_to_date<?php echo $this->_tpl_vars['country_id']; ?>
" value="<?php echo $_GET['stmt_to']; ?>
">
                                      <?php endif; ?>
                                  
                                    <input type="hidden" name="statement_date_to" id="statement_date_to<?php echo $this->_tpl_vars['country_id']; ?>
" value="" />
                                    <input type="hidden" name="statement_month_to" id="statement_month_to<?php echo $this->_tpl_vars['country_id']; ?>
" value="" />
                                    <input type="hidden" name="statement_year_to" id="statement_year_to<?php echo $this->_tpl_vars['country_id']; ?>
" value="" />
                                   <script>
                                      //For Date Picker
                                      $(function() {
                                        $( "#statement_year_to<?php echo $this->_tpl_vars['country_id']; ?>
" ).datepicker({
                                        minDate: null,
                                        showOn: "button",
                                        buttonImage: "<?php echo ((is_array($_tmp='/images/calender_month.png')) ? $this->_run_mod_handler('siteUrl', true, $_tmp) : smarty_modifier_siteUrl($_tmp)); ?>
",
                                        buttonImageOnly: true,
                                        onSelect: function( selectedDate ) {

                                        var i =0;selDate = selectedDate.split('/');var dates = new Array("statement_month_to<?php echo $this->_tpl_vars['country_id']; ?>
","statement_date_to<?php echo $this->_tpl_vars['country_id']; ?>
","statement_year_to<?php echo $this->_tpl_vars['country_id']; ?>
");
                                         var datasplited= selDate[2]+'-'+selDate[0]+'-'+selDate[1];                              
                                            var fromDate = $('#stmt_from_date<?php echo $this->_tpl_vars['country_id']; ?>
').val();

                                              if (datasplited < fromDate) {
                                                  $('.error-msgbox<?php echo $this->_tpl_vars['country_id']; ?>
').css('display','block').html('Statement to date is less than statement from date.');
                                            } else{
                                               
                                             window.location.href='index.php?do=mytrastatements&stmt_from='+fromDate+'&stmt_to='+datasplited+'&type=creditor';
                                           }

                                        for(i = 0; i <=2; i++){
                                          $( "#"+dates[i] ).val(selDate[i]);
                                        }
                                        }
                                        });
                                        });
                                    </script>
                                  </td>
                                    <td valign="top" align="right"></td>
                                    <td valign="top" align="left"></td>
                                    <td valign="top" align="right"><strong>Total Purchase Price :</strong></td>
                                    <td valign="top" align="left" width="">
                                        <span id="total<?php echo $this->_tpl_vars['country_id']; ?>
">
                                            <?php echo ((is_array($_tmp=$this->_tpl_vars['creditors']['stat']['tradedTotal'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : smarty_modifier_number_format($_tmp, 2)); ?>

                                        </span>
                                    </td>
                                </tr>
                              </table>

                               <table cellpadding="0" cellspacing="0" border="0" width="100%">
                                <tr>
                                  <td valign="top" align="center" class="inves_top1" width="29%">Creditor Details</td>
                                  <td valign="top" align="center" class="inves_top1" width="31%">Transaction Overview</td>
                                </tr>
                              </table>
                              
                              <table cellpadding="0" cellspacing="0" border="0" width="100%" id="listDebtor" class="table table-hover table-striped table-responsive">
                                <tr class="grays_bg4">
                                    <td valign="top" align="left">ID</td>
                                    <td valign="top" align="center">Name</td>
                                    <td valign="top" align="left">Receipts</td>
                                    <td valign="top" align="left">Paid</td>
                                    <td valign="top" align="center" style="border-right:4px solid #FFF;">Status</td>
                                    <td valign="top" align="right" colspan="2">Traded</td>
                                    <td valign="top" align="right">Overdue Now</td>
                                    <td valign="top" align="center">Total</td>
                                </tr>
                                <tbody>
                                <?php if ($this->_tpl_vars['old_balance']): ?>
                                <tr>
                                    <td colspan="2" align="right">Balance from Previous period :</td>
                                    <td align="right"><?php echo ((is_array($_tmp=$this->_tpl_vars['old_balance'][$this->_tpl_vars['country_id']]['stat']['totalReceipts'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : smarty_modifier_number_format($_tmp, 2)); ?>
</td>
                                    <td align="right"><?php echo ((is_array($_tmp=$this->_tpl_vars['old_balance'][$this->_tpl_vars['country_id']]['stat']['tot_paid'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : smarty_modifier_number_format($_tmp, 2)); ?>
</td>
                                    <td colspan="2"></td>
                                    <td align="right"><?php echo ((is_array($_tmp=$this->_tpl_vars['old_balance'][$this->_tpl_vars['country_id']]['stat']['tradedTotal'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : smarty_modifier_number_format($_tmp, 2)); ?>
</td>
                                    <td valign="top" align="right" style="color:#FF0000; font-weight: bold; text-align: right;"><?php echo ((is_array($_tmp=$this->_tpl_vars['old_balance'][$this->_tpl_vars['country_id']]['stat']['totOverdueNow'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : smarty_modifier_number_format($_tmp, 2)); ?>
</td>
                                    <td align="right"><?php echo ((is_array($_tmp=$this->_tpl_vars['old_balance'][$this->_tpl_vars['country_id']]['stat']['tot_outstanding'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : smarty_modifier_number_format($_tmp, 2)); ?>
</td>
                                </tr>
                                <?php endif; ?>
                                    <?php $_from = $this->_tpl_vars['creditors']['creditors']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['creditor']):
?>
                                    <tr>
                                      <td valign="top" align="left">
                                        <a class="btn-link" href="index.php?do=trastatusmgnt&id=<?php echo $this->_tpl_vars['creditor']['debtor_id']; ?>
&type=creditor"><?php echo $this->_tpl_vars['creditor']['debtor_reference_id']; ?>
</a>
                                      </td>
                                      <td valign="top" align="left"><?php echo $this->_tpl_vars['creditor']['debtor_name']; ?>
</td>
                                      <td valign="top" align="right"><?php echo ((is_array($_tmp=$this->_tpl_vars['creditor']['total_receipts'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : smarty_modifier_number_format($_tmp, 2)); ?>
</td>
                                      <td valign="top" align="right"><?php echo ((is_array($_tmp=$this->_tpl_vars['creditor']['paid'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : smarty_modifier_number_format($_tmp, 2)); ?>
</td>
                                      <td valign="top" align="center" style="border-right:3px solid #FFF;"><?php echo smarty_function_getDebtorStatus(array('data' => $this->_tpl_vars['creditor']), $this);?>
</td>
                                      <td valign="top" align="right" colspan="2"><?php echo ((is_array($_tmp=$this->_tpl_vars['creditor']['outstanding_traded'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : smarty_modifier_number_format($_tmp, 2)); ?>
</td>
                                      <td valign="top" align="right">
                                        <?php if ($this->_tpl_vars['creditor']['overdue_now'] > 0): ?>
                                        <strong style="color:#FF0000;"><?php echo ((is_array($_tmp=$this->_tpl_vars['creditor']['overdue_now'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : smarty_modifier_number_format($_tmp, 2)); ?>
</strong>
                                        <?php else: ?>
                                        <?php echo ((is_array($_tmp=$this->_tpl_vars['creditor']['overdue_now'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : smarty_modifier_number_format($_tmp, 2)); ?>

                                        <?php endif; ?>
                                      </td>
                                      <td valign="top" align="right"><?php echo ((is_array($_tmp=$this->_tpl_vars['creditor']['balance'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : smarty_modifier_number_format($_tmp, 2)); ?>
</td>
                                    </tr>
                                    <?php endforeach; endif; unset($_from); ?>
                                    
                                    <?php if ($this->_tpl_vars['OPA'][$this->_tpl_vars['country_id']]): ?>
                                     <?php $this->assign('tot_outstanding', $this->_tpl_vars['creditors']['stat']['tot_outstanding']-$this->_tpl_vars['OPA'][$this->_tpl_vars['country_id']]); ?>
                                     <?php $this->assign('tot_receipts', $this->_tpl_vars['creditors']['stat']['totalReceipts']+$this->_tpl_vars['OPA'][$this->_tpl_vars['country_id']]); ?>
                                     <?php $this->assign('tot_overdue', $this->_tpl_vars['creditors']['stat']['totOverdueNow']-$this->_tpl_vars['OPA'][$this->_tpl_vars['country_id']]); ?>
                                     <tr>
                                        <td valign="top" align="left">
                                            <a class="btn-link" style="cursor: pointer;" onclick="showOcpaList(<?php echo $this->_tpl_vars['country_id']; ?>
); return false"><?php echo $this->_tpl_vars['organisation']['organisation_reference_id']; ?>
</a>
                                        </td>
                                        <td valign="top" align="left"> Payments on Account</td>
                                        <td valign="top" align="right" style="padding-right:25px;">
                                            <?php echo ((is_array($_tmp=$this->_tpl_vars['OPA'][$this->_tpl_vars['country_id']])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : smarty_modifier_number_format($_tmp, 2)); ?>

                                        </td>
                                        <td valign="top" align="left" style="border-right:4px solid #FFF;"></td>
                                        <td valign="top" align="right" colspan="3"></td>
                                        <td valign="top" align="right"> - <?php echo $this->_tpl_vars['creditor']['currency']['currency_code']; ?>
 <?php echo ((is_array($_tmp=$this->_tpl_vars['OPA'][$this->_tpl_vars['country_id']])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : smarty_modifier_number_format($_tmp, 2)); ?>
</td>
                                        <td valign="top" align="right"> - <?php echo $this->_tpl_vars['creditor']['currency']['currency_code']; ?>
 <?php echo ((is_array($_tmp=$this->_tpl_vars['OPA'][$this->_tpl_vars['country_id']])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : smarty_modifier_number_format($_tmp, 2)); ?>
</td>
                                        </tr>
                                    <?php else: ?> 
                                    <?php $this->assign('tot_outstanding', $this->_tpl_vars['creditors']['stat']['tot_outstanding']); ?>
                                    <?php $this->assign('tot_receipts', $this->_tpl_vars['creditors']['stat']['totalReceipts']); ?>
                                    <?php $this->assign('tot_overdue', $this->_tpl_vars['creditors']['stat']['totOverdueNow']); ?>
                                    <?php endif; ?>
                                    <?php if (isset ( $this->_tpl_vars['isFees'][$this->_tpl_vars['country_id']]['count'] ) && $this->_tpl_vars['isFees'][$this->_tpl_vars['country_id']]['count'] > 0): ?>
                                    <?php $this->assign('tot_outstanding', $this->_tpl_vars['tot_outstanding']+$this->_tpl_vars['isFees'][$this->_tpl_vars['country_id']]['amount']); ?>
                                    <tr>
                                        <td valign="top" align="left">
                                            <a class="btn-link" style="cursor: pointer;" onclick="showFeesList(<?php echo $this->_tpl_vars['country_id']; ?>
);"><?php echo $this->_tpl_vars['organisation']['organisation_reference_id']; ?>
</a>
                                        </td>
                                        <td valign="top" align="left">Fees and Charges</td>
                                        <td valign="top" align="right" style="padding-right:25px;"></td>
                                        <td valign="top" align="left" style="border-right:4px solid #FFF;"></td>
                                        <td valign="top" align="right" colspan="4"></td>
                                        <td valign="top" align="right"><?php echo ((is_array($_tmp=$this->_tpl_vars['isFees'][$this->_tpl_vars['country_id']]['amount'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : smarty_modifier_number_format($_tmp, 2)); ?>
</td>
                                    </tr>
                                    <?php endif; ?>
                                </tbody>
                                <tfoot>
                                    <tr class="row1">
                                        <th valign="top" align="left" colspan="2" style="padding-left:15px;text-align: left;"><strong>Balances</strong></th>
                                        <th valign="top" align="right" style="text-align: right;"><strong><?php echo ((is_array($_tmp=$this->_tpl_vars['tot_receipts'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : smarty_modifier_number_format($_tmp, 2)); ?>
</strong></th>
                                        <th valign="top" align="right" style="text-align: right;"><strong><?php echo ((is_array($_tmp=$this->_tpl_vars['creditors']['stat']['tot_paid'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : smarty_modifier_number_format($_tmp, 2)); ?>
</strong></th>
                                        <th valign="top" align="right" style="text-align: right;"></th>
                                        <th valign="top" align="left"  colspan="2" style="text-align: right;"><strong><?php echo ((is_array($_tmp=$this->_tpl_vars['creditors']['stat']['tradedTotal'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : smarty_modifier_number_format($_tmp, 2)); ?>
</strong></th>
                                        <th valign="top" align="right" style="text-align: right;"><strong style="color:#FF0000;"><?php echo ((is_array($_tmp=$this->_tpl_vars['tot_overdue'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : smarty_modifier_number_format($_tmp, 2)); ?>
</strong></th>
                                        <th valign="top" align="right" style="text-align: right;"><strong><?php echo ((is_array($_tmp=$this->_tpl_vars['tot_outstanding'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : smarty_modifier_number_format($_tmp, 2)); ?>
</strong></th>
                                    </tr>
                                </tfoot>
                              </table>
                              <?php endforeach; endif; unset($_from); ?>
                              </td>
                          </tr>
                        </table></td>
                    </tr>
                  </tbody>
                </table></td>
            </tr>
          </tbody>
        </table></td>
    </tr>
    <tr>
      <td align="left" valign="top">&nbsp;</td>
    </tr>
  </tbody>
</table>
<style>
#listDebtor td{
  padding:5px;
  font-size:11px;
}
#listDebtor td b{
 font-size:11px;
}
.clsoverride .row1 td{
    padding:5px 3px !important;    
    line-height: 15px !important;    
    
}
.clsoverride .row1 td img{
vertical-align: bottom;
}

.grays_bg4 td{font-weight: bolder;}

</style>

<script type="text/javascript">

function changeDeb(id){

  window.location = 'index.php?do=mytrastatements&type=<?php echo $this->_tpl_vars['type']; ?>
&cid='+id;
}
</script>
<div id="ocpa_dialog">
    <table class="table table-hover table-striped table-responsive" width="100%" cellspacing="0" cellpadding="0" border="0">
        <tr class="grays_bg4">
            <td>Id</td>
            <td>Date</td>
            <td>Ccy</td>
            <td>Amount</td>
            <td>Notes</td>
            <td>Type</td>
        </tr>

        <tbody>
        <?php if (isset ( $this->_tpl_vars['ocpa_list']['ocpa'] )): ?>
        <?php $_from = $this->_tpl_vars['ocpa_list']['ocpa']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['trans']):
?>
        <?php if (! $_GET['stmt_from'] || ( $_GET['stmt_from'] <= $this->_tpl_vars['trans']['transaction_date'] && $this->_tpl_vars['trans']['transaction_date'] <= $_GET['stmt_to'] )): ?>
        <tr class="ocpa_currency ocpa_currency_<?php echo $this->_tpl_vars['trans']['currency_id']; ?>
">
            <td><?php echo $this->_tpl_vars['trans']['manual_transaction_id']; ?>
</td>
            <td><nobr><?php echo $this->_tpl_vars['trans']['transaction_date']; ?>
</nobr></td>
            <td><?php echo $this->_tpl_vars['trans']['currency_code']; ?>
</td>
            <td style="text-align: right"><?php echo ((is_array($_tmp=$this->_tpl_vars['trans']['amount'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : smarty_modifier_number_format($_tmp, 2)); ?>
</td>
            <td><?php echo $this->_tpl_vars['trans']['notes']; ?>
</td>
            <td>
                <?php if ($this->_tpl_vars['trans']['transaction_type'] == @OCPA_RETURN): ?>
                Return
                <?php else: ?>
                On Account
                <?php endif; ?>
            </td>
        </tr>
        <?php endif; ?>
        <?php endforeach; endif; unset($_from); ?>
        <?php endif; ?>
        </tbody>
    </table>
</div>
<div id="fees_dialog">
    <table class="table table-hover table-striped table-responsive" width="100%" cellspacing="0" cellpadding="0" border="0">
        <tr class="grays_bg4">
            <td>Id</td>
            <td>Date</td>
            <td>Ccy</td>
            <td>Amount</td>
            <td>Notes</td>
            <td>Type</td>
        </tr>

        <tbody>
        <?php if (isset ( $this->_tpl_vars['ocpa_list']['fees'] )): ?>

        <?php $this->assign('fees_balance_1', 0); ?>
        <?php $this->assign('fees_balance_2', 0); ?>
        <?php $this->assign('fees_balance_3', 0); ?>

        <?php $_from = $this->_tpl_vars['ocpa_list']['fees']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['trans']):
?>
        <?php if (! $_GET['stmt_from'] || ( $_GET['stmt_from'] <= $this->_tpl_vars['trans']['transaction_date'] && $this->_tpl_vars['trans']['transaction_date'] <= $_GET['stmt_to'] )): ?>
        <tr class="fees_currency fees_currency_<?php echo $this->_tpl_vars['trans']['currency_id']; ?>
">
            <td><?php echo $this->_tpl_vars['trans']['manual_transaction_id']; ?>
</td>
            <td><nobr><?php echo $this->_tpl_vars['trans']['transaction_date']; ?>
</nobr></td>
            <td><?php echo $this->_tpl_vars['trans']['currency_code']; ?>
</td>
            <td style="text-align: right"><?php echo ((is_array($_tmp=$this->_tpl_vars['trans']['amount'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : smarty_modifier_number_format($_tmp, 2)); ?>
</td>
            <td>
                <?php echo $this->_tpl_vars['trans']['notes']; ?>


                <?php if ($this->_tpl_vars['trans']['currency_id'] == 1): ?>
                <?php $this->assign('fees_balance_1', $this->_tpl_vars['fees_balance_1']+$this->_tpl_vars['trans']['amount']); ?>
                <?php endif; ?>

                <?php if ($this->_tpl_vars['trans']['currency_id'] == 2): ?>
                <?php $this->assign('fees_balance_2', $this->_tpl_vars['fees_balance_2']+$this->_tpl_vars['trans']['amount']); ?>
                <?php endif; ?>

                <?php if ($this->_tpl_vars['trans']['currency_id'] == 3): ?>
                <?php $this->assign('fees_balance_3', $this->_tpl_vars['fees_balance_3']+$this->_tpl_vars['trans']['amount']); ?>
                <?php endif; ?>
            </td>
            <td>
                <?php if ($this->_tpl_vars['trans']['transaction_type'] == @CREDITOR_FEES_CHARGES): ?>
                Fees & Charges
                <?php endif; ?>

                <?php if ($this->_tpl_vars['trans']['transaction_type'] == @ORIGINATOR_PAYMENT_ON_ACCOUNT): ?>
                On Account
                <?php endif; ?>

                <?php if ($this->_tpl_vars['trans']['transaction_type'] == @OCPA_RETURN): ?>
                Return
                <?php endif; ?>
            </td>
        </tr>
        <?php endif; ?>
        <?php endforeach; endif; unset($_from); ?>

        </tbody>

        <tr class="grays_bg4">
            <td></td>
            <td></td>
            <td></td>
            <td align="right" style="text-align: right">
                <span class="fees_currency fees_currency_1"><b><?php echo ((is_array($_tmp=$this->_tpl_vars['fees_balance_1'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : smarty_modifier_number_format($_tmp, 2)); ?>
</b></span>
                <span class="fees_currency fees_currency_2"><b><?php echo ((is_array($_tmp=$this->_tpl_vars['fees_balance_2'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : smarty_modifier_number_format($_tmp, 2)); ?>
</b></span>
                <span class="fees_currency fees_currency_3"><b><?php echo ((is_array($_tmp=$this->_tpl_vars['fees_balance_3'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : smarty_modifier_number_format($_tmp, 2)); ?>
</b></span>
            </td>
            <td></td>
            <td></td>
        </tr>
        <?php endif; ?>

    </table>
</div>
<style>
    #ocpa_dialog, #fees_dialog
    {
        display: none;
    }

    #cell_with_tabs .ui-widget-content,#cell_with_tabs .ui-widget-header{background: none !important;border: none !important;}
    #listDebtor td{
        padding:5px;
        font-size:11px;
    }
    #listDebtor td b{
        font-size:11px;
    }
    .clsoverride .row1 td{
        padding:5px 3px !important;
        line-height: 15px !important;

    }
    .clsoverride .row1 td img{
        vertical-align: bottom;
    }
    * {
        color: #000000;
        font-family: Verdana,Geneva,sans-serif;
        font-size: 11px;
        margin: 0;
    }

    .inves_top1{ background:#848284;height:35px;color:#fff;line-height:32px; padding-left:10px;font-weight:bold;}
    .inves_top3{ background:#e4e3e3;height:15px;line-height:32px; padding-left:10px;font-weight:bold;}
    .inves_top1 span{ background:#848284;height:35px;color:#fff;line-height:32px; padding-left:10px;font-weight:bold;cursor:pointer;}
    .inves_top1 span:hover{ background:#848284;height:35px;color:#fff;line-height:32px; padding-left:10px;font-weight:bold;text-decoration:underline;}


    .row3 td {
        background: none repeat scroll 0 0 #FFFFFF;
        font-size: 11px;
        line-height: 18px;
        padding: 5px 10px;
        border-bottom: none;
    }

    .grays_bg4 td{background:#c0c0c0; padding:10px 0px; font-size:11px; line-height:16px; border-top:2px solid #fff; font-weight: bolder;}

</style>

<script type="text/javascript">

    $(function () {
        $("#ocpa_dialog").dialog({
            autoOpen: false,
            width: 900,
            height: 600,
            modal: true,
            dialogClass: 'popup-creditor-payments-on-account',
            title: 'Creditor Payments on Account',
            open: function () {

            }
        });
        $("#fees_dialog").dialog({
            autoOpen: false,
            width: 900,
            height: 600,
            modal: true,
            dialogClass: 'popup-creditor-payments-on-account',
            title: 'Fees and Charges',
            open: function () {

            }
        });
    });

    function showOcpaList(currency_id) {
        $(".ocpa_currency").hide();
        $('#ocpa_dialog').dialog('open');
        $(".ocpa_currency_"+currency_id).show();
        return false;
    }
    function showFeesList(currency_id) {
        $(".fees_currency").hide();
        $('#fees_dialog').dialog('open');
        $(".fees_currency_"+currency_id).show();
        return false;
    }
</script>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "footer.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>