<!-- DataTables -->
<link rel="stylesheet" href="<?php echo base_url();?>assets/plugins/datatables-bs4/css/dataTables.bootstrap4.min.css">
<link rel="stylesheet" href="<?php echo base_url();?>assets/plugins/datatables-responsive/css/responsive.bootstrap4.min.css">
<link rel="stylesheet" href="<?php echo base_url();?>assets/plugins/datatables-buttons/css/buttons.bootstrap4.min.css">

<div id = "errmsg"></div>
<div class="card">
  <div class="card-header">
    <h3 class="card-title"></h3>
  </div>

  
    <table id="example3" class="table table-bordered table-hover">
      <thead>
        <tr>
            <th>Tanggal Approve</th>
            <th>Tanggal Form</th>
            <th>Nomor Tiket</th>
            <?php if ($this->session->userdata('brandgroup') == 'P70') {?>
            <th>Web</th>
            <?}?>
            <th>Nama Rekening</th>
            <th>ID</th>
            <th>Nominal</th>
            <?php if ($this->session->userdata('brandgroup') == 'Africa_A' || $this->session->userdata('brandgroup') == 'Africa_B' || $this->session->userdata('brandgroup') == 'Ausie'  || $this->session->userdata('brandgroup') == 'NONA' ) {?>
            <th>Web</th>
            <?}?>
            <th>From Bank</th>
            <?php if ($this->session->userdata('brandgroup') <> 'Africa_A' && $this->session->userdata('brandgroup') <> 'Africa_B' && $this->session->userdata('brandgroup') <> 'Ausie'  && $this->session->userdata('brandgroup') <> 'NONA' && $this->session->userdata('brandgroup') <> 'P70' ) {?>
            <?}?>
            <th>Permata Trx ID</th>
            <th>MID</th>
            <th>Keterangan</th>
          </tr>
        </thead>
        <tbody>
          <?php for($i = 0; $i < count($listdepo); $i++){ ?>      
            <tr> 
                <td><?php echo $listdepo[$i]->approveddate; ?></td>
                <td><?php echo $listdepo[$i]->requestdate; ?></td>
                <td><?php echo $listdepo[$i]->ticketnumber; ?></td>
                <?php if ($this->session->userdata('brandgroup') == 'P70') {?>
                <td><?php echo $listdepo[$i]->brand; ?></td>
                <?}?>
            
                <td><?php echo $listdepo[$i]->from_name; ?></td>
                <td><?php echo $listdepo[$i]->username; ?></td>
                <!--php echo '-'. number_format($listwd[$i]->amount,2)-->
                
                <td><?php echo '-'. $listdepo[$i]->amount; ?></td>
                <?php if ($this->session->userdata('brandgroup') == 'Africa_A' || $this->session->userdata('brandgroup') == 'Africa_B' || $this->session->userdata('brandgroup') == 'Ausie'  || $this->session->userdata('brandgroup') == 'NONA' ) {?>
                <td><?php echo $listdepo[$i]->brand; ?></td>
                <?}?>
                <td><?php echo $listdepo[$i]->from_bank; ?></td>
                <?php if ($this->session->userdata('brandgroup') <> 'Africa_A' && $this->session->userdata('brandgroup') <> 'Africa_B' && $this->session->userdata('brandgroup') <> 'Ausie'  && $this->session->userdata('brandgroup') <> 'NONA' && $this->session->userdata('brandgroup') <> 'P70' ) {?>
                <?}?>
                <td><?php echo $listdepo[$i]->permata_id; ?></td>
                <td><?php echo $listdepo[$i]->mid; ?></td>
                <td><?php echo $listdepo[$i]->keterangan; ?></td>
            </tr>
          <?php                          
            }
          ?>
        </tbody>
      </table>


      
          
          
</div>

<!-- DataTables  & Plugins -->
<script src="<?php echo base_url();?>assets/plugins/datatables/jquery.dataTables.min.js"></script>
<script src="<?php echo base_url();?>assets/plugins/datatables-bs4/js/dataTables.bootstrap4.min.js"></script>
<script src="<?php echo base_url();?>assets/plugins/datatables-responsive/js/dataTables.responsive.min.js"></script>
<script src="<?php echo base_url();?>assets/plugins/datatables-responsive/js/responsive.bootstrap4.min.js"></script>
<script src="<?php echo base_url();?>assets/plugins/datatables-buttons/js/dataTables.buttons.min.js"></script>
<script src="<?php echo base_url();?>assets/plugins/datatables-buttons/js/buttons.bootstrap4.min.js"></script>
<script src="<?php echo base_url();?>assets/plugins/jszip/jszip.min.js"></script>
<script src="<?php echo base_url();?>assets/plugins/pdfmake/pdfmake.min.js"></script>
<script src="<?php echo base_url();?>assets/plugins/pdfmake/vfs_fonts.js"></script>
<script src="<?php echo base_url();?>assets/plugins/datatables-buttons/js/buttons.html5.min.js"></script>
<script src="<?php echo base_url();?>assets/plugins/datatables-buttons/js/buttons.print.min.js"></script>
<script src="<?php echo base_url();?>assets/plugins/datatables-buttons/js/buttons.colVis.min.js"></script>

<script>
  $(function () {
    $('#example2').DataTable({
      "paging": false,
      "lengthChange": false,
      "searching": true,
      "ordering": true,
      "info": true,
      "autoWidth": false,
      "responsive": true,
      "order": [[2,'asc'], [5,'asc']],

    });
  });
</script>