  <?php 
    $this->load->view('templates/header');
  ?>
    <script>
        var link = "master";
        var sub_link = "bank_rate";
    </script>
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <h1>
       BANK RATE
        <small>Master</small>
      </h1>
      <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
        <li><a href="#">Forms</a></li>
        <li class="active">Bank Rate Master</li>
      </ol>
    </section>

    <!-- Main content -->
    <section class="content">
        <div class="row">
            <div class="col-md-2 col-md-offset-10">
                 <button type="button" class="btn btn-primary" onClick="add_update_bank_rate_popup(0);" title="Add Bank Rate" style="width: 100%;">Add Bank Rate</button>
            </div>
        </div>
        <div class="row">
            <div class="col-md-12">     
                <div class="box">
                    <div class="box-body">
                        <table class="table table-bordered table-striped master_table">
                            <thead>
                                <tr>
                                    <th>#</th>
                                    <th>Date</th>
                                    <th>Rate</th>
                                    <th>Edit</th>    
                                    <th>Delete</th>    
                                </tr>
                            </thead>
                            <tbody>
                        <?php
                            foreach ($bank_rate_data as $key => $value):
                        ?>
                                <tr>
                                    <td><?php echo $key+1?></td>
                                    <td><?php echo date('d-m-Y', strtotime($value['bank_rate_date']));?></td>
                                    <td><?php echo $value['bank_rate']?></td>
                                    <td><span class="glyphicon glyphicon-pencil" style="cursor:pointer;" onClick="add_update_bank_rate_popup(<?php echo $value['bank_rate_id']?>)"></span></td>
                                    <td><span class="glyphicon glyphicon-trash" onClick="delete_master_item(<?php echo $value['bank_rate_id']?>,'bank_rate_delete');"></span></td>
                                </tr> 
                        <?php
                            endforeach;
                        ?>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </section>
    
  <?php 
    $this->load->view('templates/footer');
   ?>
    <script src="<?php echo assets('js/master.js')?>"></script> 
 