




<div class="kt-content  kt-grid__item kt-grid__item--fluid kt-grid kt-grid--hor" id="kt_content">
  
            <!-- begin:: Content Head -->
            <div class="kt-subheader  kt-grid__item" id="kt_subheader">
              <div class="kt-container  kt-container--fluid ">
                <div class="kt-subheader__main">
                  <h3 class="kt-subheader__title"><a href="<?php echo base_url() ?>Dashboard/"><?php echo $this->lang->line('dashboard'); ?></a></h3>
                  <span class="kt-subheader__separator kt-subheader__separator--v"></span>
                  <span class="kt-subheader__desc"><a href="<?=base_url('expense/')?>"><?php echo $this->lang->line('expense') ?></a></span>
                </div>
              </div>
            </div>

      <div class="row">
        <div class="col-md-12 row" style="padding-left: 900px;">
          <div  style="float:left">
           <?php if(get_ap('bill_add',$this->operator_id)==1){ ?>
              <div class="col-md-12" ><a href="<?= base_url()?>/<?=$this->thispage?>/add/" class="btn btn-block btn-primary"  style="margin-bottom:5px"><i class="icon-pencil  icon-white"> </i><?php echo $this->lang->line('add') ?></a>  </div>
          <?php } ?>
          <div class="col-md-12"><a href="<?= base_url()?>/<?=$this->thispage?>/category_list/" class="btn btn-block btn-primary"  ><i class="icon-pencil  icon-white"> </i><?php echo $this->lang->line('category') ?></a>  </div>
        </div>   
      </div>
    </div>
  
  <div class="row">
    <!-- Main content -->
   
      <div class="row">
        <div class="col-md-12">
          <div class="box">
            <div class="box-header with-border">
              <h3 class="box-title"><?php echo $this->lang->line('invoices') ?> </h3>
            </div>
            <!-- /.box-header -->
            <div class="box-body">
              <table class="table table-bordered">
                <tr>
                  <th><?php echo $this->lang->line('date-added') ?></th>
                  <th><?php echo $this->lang->line('expense-name') ?></th>
                  <th><?php echo $this->lang->line('expense-price') ?></th>
                  <th><?php echo $this->lang->line('category') ?></th>
                  <th ><?php echo $this->lang->line('expense-date') ?></th>
                  <th ><?php echo $this->lang->line('update-by') ?></th>
                  <!-- <th ><?php echo $this->lang->line('status') ?></th> -->
                </tr>
                <?php  $count=0; foreach($all_groups as $row):?>
                <tr>
                  <td><?= substr($row['create_on'],0,10); ?></td>
                        <td><?= $row['expense_name']; ?></td>
                        <td><?= $row['expense_price']; ?></td>
                        <?php 
                          $this->db->where('id',$row['category_id']);
                        $cat = $this->db->get('expense_category')->row(); ?>
                        <td><?php echo $cat->category_name; ?></td>
                        <td><?= substr($row['expense_date'],0,10); ?></td>
                        <?php 
                        $this->db->where('id',$row['updated_by']);
                        $user = $this->db->get('user')->row_array();
                        ?>
                        <td><?= $user['name']; ?></td>
                </tr>
                    <?php endforeach; ?>
                
              </table>
            </div>
          </div>
          <!-- /.box -->

          
          <!-- /.box -->
        </div>
     </div>
      </div>
      <!-- /.row -->
  
