<!-- page content -->
        <div class="right_col" role="main">
          <div class="">
            <div class="page-title">
              <div class="title_left">
                <h3>Fee</h3>
              </div>
            </div>

            <div class="clearfix"></div>

            <div class="row">

              <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_panel">
                  <div class="x_title">
                    <h2>Voucher List</h2>
                    <ul class="nav navbar-right panel_toolbox">
                      <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                      </li>
                    </ul>
                    <div class="clearfix"></div>
                  </div>


                  <div class="x_content">
                   
                    <table id="datatable-buttons" class="table table-striped table-bordered dt-responsive nowrap">
                      <thead>
                        <tr>
                          <th>#</th>
                          <th>GR#</th>
                          <th>Invoice</th>
                          <th>Student</th>
                          <th>Class</th>
                          <th>Section</th>
                          <th>Fee</th>
                          <th>Date</th>
                          <th>Expire Date</th>
                          <th>Status</th>
                          <th>Actions</th>
                        </tr>
                      </thead>

                      <tbody>


                        <?php $i=1; foreach ($voucher as $key => $value) { ?>
                        <tr>
                          <td><?php echo $i++; ?></td>
                          <td><?php echo $value['grno']; ?></td>
                          <td><?php echo $value['invoice']; ?></td>
                          <td><?php echo $value['student_name']; ?></td>
                          <td><?php echo $value['class_name']; ?></td>
                          <td><?php echo $value['section_name']; ?></td>
                          <td><?php echo ($this->voucher_model->countTotalFee($value['invoice'])); ?></td>
                          <td><?php echo date("d-m-Y",strtotime($value['date'])); ?></td>
                          <td><?php echo date("d-m-Y",strtotime($value['date_expire']." -1 day")); ?></td>
                          <?php
                          $due = date("Y-m-d",strtotime($value['date_expire']." -1 day"));
                          $date = date("Y-m-d");
                          if ($due<=$date && $value['status']==0) {
                            $status = "Defaulter";
                          }else if($due<=$date && $value['status']==1)
                          {
                            $status = "Paid";
                          }else{
                            if ($value['status']==0) {
                              $status = "Due";
                            }elseif ($value['status']==1) {
                              $status = "Paid";
                            }else {
                              $status = "Submitted";
                            } 
                          }?>
                          <td><?php echo $status; ?></td>
                          <td>
                            <a href='<?php echo base_url();?>fee/doPrint/<?php echo $value['invoice']; ?>'><i class="fa fa-eye"></i></a> 
                          </td>
                     
                        </tr>
                        <?php } ?>
                      </tbody>
                    </table>

            
                  </div>
                </div>
              </div>



            </div>
          </div>
        </div>
        <!-- /page content -->