<nav class="large-3 medium-4 columns" id="actions-sidebar">
      <?= $this->element('admin_sidebar') ?>
</nav>
<div class="mutualfunds index large-9 medium-8 columns content">
<h3><?= __('Mutual Funds') ?></h3>
	<div class="search-wrapper"> 
	
    <div class="btn-link"><?= $this->Html->link(__('Add Mutual Fund Entry'), ['action' => 'add'],['class'=>'green-btn', 'title' => 'Add Mutualfunds', 'type' => 'button']) ?></div>
    </div>
    <table class="tbl-wrapper" cellpadding="0" cellspacing="0">
        <thead>
            <tr>
                <th style="width:40px;" scope="col"><?= $this->Paginator->sort('id') ?></th>                
                <th scope="col"><?= $this->Paginator->sort('Applicant Name') ?></th>
                <th scope="col"><?= $this->Paginator->sort('Pan No') ?></th>
               <!--  <th scope="col"><?= $this->Paginator->sort('User Account No') ?></th>
                <th scope="col"><?= $this->Paginator->sort('User Company Name') ?></th>
                <th scope="col"><?= $this->Paginator->sort('Branch Name') ?></th>
                <th scope="col"><?= $this->Paginator->sort('Product Company Name') ?></th> -->
                <th scope="col"><?= $this->Paginator->sort('Type of Deposit') ?></th>
                <th scope="col"><?= $this->Paginator->sort('Cheque No') ?></th>
                <th scope="col"><?= $this->Paginator->sort('Amount') ?></th>
                <th scope="col"><?= $this->Paginator->sort('Period') ?></th>                
                <th scope="col"><?= $this->Paginator->sort('Customer Folio No') ?></th>
                <th scope="col"><?= $this->Paginator->sort('Company name') ?></th>
                <th scope="col" class="actions"><?= __('Actions') ?></th>
            </tr>
        </thead>
        <tbody>
            <?php $j = 1;
            
            foreach ($mutualfunds as $mutualfund): ?>
            <tr>
                <td style="width:40px;"><?=$j ?></td>               
                <td><?= h($mutualfund->firstapplicantname) ?></td>
                <td><?= h($mutualfund->panno) ?></td>
                <!-- <td><?= $mutualfund->has('user') ? $this->Html->link($mutualfund->customer->accountno, ['controller' => 'Customers', 'action' => 'view', $mutualfund->customer->id]) : '' ?></td>
               
                <td><?= $mutualfund->has('branch') ? $this->Html->link($mutualfund->branch->branchname, ['controller' => 'Branches', 'action' => 'view', $mutualfund->branch->id]) : '' ?></td>
                <td><?= $this->Number->format($mutualfund->productcompanyid) ?></td> -->
                <td><?= h($mutualfund->typeofdeposit) ?></td>
                <td><?= h($mutualfund->chequeno) ?></td>
                <td><?php echo (($mutualfund->swichall == 1)? 'All' : $mutualfund->amount) ?></td>
               <!-- <td><?= $mutualfund->has('euni') ? $this->Html->link($mutualfund->euni->eunisno, ['controller' => 'Eunis', 'action' => 'view', $mutualfund->euni_id]) : '' ?></td>-->
                 <td><?= h($mutualfund->tenure) ?></td>
                <td><?= h($mutualfund->customerFolioNo) ?></td>
                 <td><?= $mutualfund->has('company') ? $this->Html->link($mutualfund->company->company, ['controller' => 'Companies', 'action' => 'view', $mutualfund->company->id]) : '' ?></td>
                <td class="actions">
  <?= $this->Html->link(__('View'), ['action' => 'view', $mutualfund->id],['class' => 'view','title'=>__('View')]) ?>
<?php  if($this->request->session()->read('Auth.User.group_id')=='3'){ ?>  
                   
                    <?= $this->Html->link(__('Edit'), ['action' => 'edit', $mutualfund->id],['class' => 'edit','title'=>__('Edit')]) ?>
                    <!--<?= $this->Form->postLink(__('Delete'), ['action' => 'delete', $mutualfund->id], ['class' => 'delete','title'=>__('Delete'),'confirm' => __('Are you sure you want to delete # {0}?', $mutualfund->id)]) ?>-->
 <?php } ?>

 <?php  if($this->request->session()->read('Auth.User.group_id')=='2'){ ?>  

                    <?= $this->Html->link(__('Edit'), ['action' => 'edit', $mutualfund->id],['class' => 'edit','title'=>__('Edit')]) ?>
                    <?= $this->Form->postLink(__('Delete'), ['action' => 'delete', $mutualfund->id], ['class' => 'delete','title'=>__('Delete'),'confirm' => __('Are you sure you want to delete # {0}?', $mutualfund->id)]) ?>
 <?php } ?>
                </td>
            </tr>
            <?php 
             $j++;
            endforeach; ?>
        </tbody>
    </table>
    <div class="paginator">
        <ul class="pagination">
            <?= $this->Paginator->prev('< ' . __('previous')) ?>
            <?= $this->Paginator->numbers() ?>
            <?= $this->Paginator->next(__('next') . ' >') ?>
        </ul>
        <p><?= $this->Paginator->counter() ?></p>
    </div>
</div>
