  <div class="content-wrapper" style="margin-bottom: 10px;margin-left: 20px;margin-right: 20px;margin-top: 10px">
  <div >
        <div align="center" class="no-print" id="formFilter" style="background-color: #F5F5F5;padding: 4px">
          <form class="form-inline" action="" method="get">
            <input type="hidden" name="filter" id="filter" value="ok">
              <div class="form-group">
                <label for="a">Tanggal : </label>
                <select name="a" id="a" class="form-control">
                <?php for ($i = 1; $i <= 31; $i++) {?>
                  <option <?php if ($i == $tgl) {echo 'selected';}?> value="<?php echo sprintf('%02d', $i) ?>"><?php echo sprintf('%02d', $i) ?></option>
                <?php }?>
                </select>
                <select name="b" id="b" class="form-control">
                <?php for ($i = 1; $i <= 12; $i++) {?>
                  <option <?php if ($i == $bln) {echo 'selected';}?> value="<?php echo sprintf('%02d', $i) ?>"><?php echo sprintf('%02d', $i) ?></option>
                <?php }?>
                </select>
                <select name="c" id="c" class="form-control">
                <?php for ($i = 2016; $i <= date('Y'); $i++) {?>
                  <option <?php if ($i == $thn) {echo 'selected';}?> value="<?php echo $i ?>"><?php echo $i ?></option>
                <?php }?>
                </select>
              </div>
              <div class="form-group">
                <label for="pwd"> s/d </label>
                <select name="d" id="d" class="form-control">
                    <?php for ($i = 1; $i <= 31; $i++) {?>
                    <option <?php if ($i == $tgl) {echo 'selected';}?> value="<?php echo sprintf('%02d', $i) ?>"><?php echo sprintf('%02d', $i) ?></option>
                    <?php }?>
                </select>
                <select name="e" id="e" class="form-control">
                <?php for ($i = 1; $i <= 12; $i++) {?>
                    <option <?php if ($i == $bln) {echo 'selected';}?> value="<?php echo sprintf('%02d', $i) ?>"><?php echo sprintf('%02d', $i) ?></option>
                <?php }?>
                </select>
                <select name="f" id="f" class="form-control">
                <?php for ($i = 2016; $i <= date('Y'); $i++) {?>
                  <option <?php if ($i == $thn) {echo 'selected';}?> value="<?php echo $i ?>"><?php echo $i ?></option>
                <?php }?>
                </select>
              </div>
              <button type="submit" class="btn btn-danger">Filter</button>
              <a href=""><button type="button" class="btn btn-success" onclick="window.print();return false;">Print</button></a>
              <a href="<?php echo base_url('dashboard/') ?>"><img height="30px" src="<?php echo base_url() ?>/assets/img/home.png" />Home</a>
          </form>
        </div>
            <h4 align="center">LAPORAN ALUR KAS KEDAI</h4>
            <?php if ($filter): ?>
                <h5 align="center">TANGGAL : <?php echo date_indo($awal) . " s/d " . date_indo($akhir) ?></h5>
            <?php else: ?>
            <h5 align="center">TANGGAL : <?php echo date_indo($tanggal) ?></h5>
            <?php endif?>
      <div class="row">
        <div class="col-lg-12">
            <table id="tbStok" class="table table-bordered table-striped table-responsive">
              <tbody>
                <?php foreach ($rekap->result() as $key): ?>
                <?php
                  $total1 +=$key->omset1;
                  
                ?>
                <?php endforeach?>
              </tbody>
              <tfoot>
                  <tr>
                      <td colspan='3'><b>TOTAL OMSET </b></td>     
                      <td align='right'><b><?php echo number_format($total1) ?></b></td>
                  </tr>
            </tfood>
            </table>
            
            <table id="tbStok" class="table table-bordered table-striped table-responsive">
                <thead>
                    <th>No Urut</th>        
                    <th>Kedai</th>
                    <th>Keterangan</th>
                    <th>Nilai</th>
                </thead> 
                <tbody>
                    <?php 
                        $total1=0; 
                        $no=1;
                    ?>
                    <?php foreach ($rekap->result() as $key): ?>
                     <tr>
                        <td><?php echo $no++ ?></td>
                        <td><?php echo $key->kd_toko ?></td>
                        <td><?php echo $key->nm_toko ?></td>
                        <td align='right'><?php echo number_format($key->transfer) ?></td>
                    </tr>    
                        <?php
                        $total1 +=$key->transfer;
                        ?>
                    <?php endforeach?>
              </tbody>
              <tfoot>
                  <tr>
                      <td colspan='3'><b>TOTAL TRANSFER </b></td>     
                      <td align='right'><b><?php echo number_format($total1) ?></b></td>
                  </tr>
            </tfood>
            </table>
            <table id="tbStok" class="table table-bordered table-striped table-responsive">
                <thead>
                    <th>No Urut</th>        
                    <th>Kedai</th>
                    <th>Keterangan</th>
                    <th>Nilai</th>
                </thead> 
                <tbody>
                    <?php 
                        $total1=0; 
                        $no=1;
                    ?>
                    <?php foreach ($rekap->result() as $key): ?>
                     <tr>
                        <td><?php echo $no++ ?></td>
                        <td><?php echo $key->kd_toko ?></td>
                        <td><?php echo $key->nm_toko ?></td>
                        <td align='right'><?php echo number_format($key->gojek) ?></td>
                    </tr>    
                        <?php
                        $total1 +=$key->gojek;
                        ?>
                    <?php endforeach?>
              </tbody>
              <tfoot>
                  <tr>
                      <td colspan='3'><b>TOTAL GOJEK </b></td>     
                      <td align='right'><b><?php echo number_format($total1) ?></b></td>
                  </tr>
            </tfood>
            </table>
            <table id="tbStok" class="table table-bordered table-striped table-responsive">
                <thead>
                    <th>No Urut</th>        
                    <th>Kedai</th>
                    <th>Keterangan</th>
                    <th>Nilai</th>
                </thead> 
                <tbody>
                    <?php 
                        $total1=0; 
                        $no=1;
                    ?>
                    <?php foreach ($rekap->result() as $key): ?>
                     <tr>
                        <td><?php echo $no++ ?></td>
                        <td><?php echo $key->kd_toko ?></td>
                        <td><?php echo $key->nm_toko ?></td>
                        <td align='right'><?php echo number_format($key->grab) ?></td>
                    </tr>    
                        <?php
                        $total1 +=$key->grab;
                        ?>
                    <?php endforeach?>
              </tbody>
              <tfoot>
                  <tr>
                      <td colspan='3'><b>TOTAL GRAB </b></td>     
                      <td align='right'><b><?php echo number_format($total1) ?></b></td>
                  </tr>
            </tfood>
            </table>
            <table id="tbStok" class="table table-bordered table-striped table-responsive">
                <thead>
                    <th>No Urut</th>        
                    <th>Kedai</th>
                    <th>Keterangan</th>
                    <th>Nilai</th>
                </thead> 
                <tbody>
                    <?php 
                        $total1=0; 
                        $no=1;
                    ?>
                    <?php foreach ($rekap->result() as $key): ?>
                     <tr>
                        <td><?php echo $no++ ?></td>
                        <td><?php echo $key->kd_toko ?></td>
                        <td><?php echo $key->nm_toko ?></td>
                        <td align='right'><?php echo number_format($key->sfood) ?></td>
                    </tr>    
                        <?php
                        $total1 +=$key->sfood;
                        ?>
                    <?php endforeach?>
              </tbody>
              <tfoot>
                  <tr>
                      <td colspan='3'><b>TOTAL SHOPEEFOOD </b></td>     
                      <td align='right'><b><?php echo number_format($total1) ?></b></td>
                  </tr>
            </tfood>
            </table>
            
             <table id="tbStok" class="table table-bordered table-striped table-responsive">
                <thead>
                    <th>No Urut</th>        
                    <th>Kedai</th>
                    <th>Keterangan</th>
                    <th>Nilai</th>
                </thead> 
                <tbody>
                    <?php 
                        $total1=0; 
                        $no=1;
                    ?>
                    <?php foreach ($rekap->result() as $key): ?>
                     <tr>
                        <td><?php echo $no++ ?></td>
                        <td><?php echo $key->kd_toko ?></td>
                        <td><?php echo $key->nm_toko ?></td>
                        <td align='right'><?php echo number_format($key->spay) ?></td>
                    </tr>    
                        <?php
                        $total1 +=$key->spay;
                        ?>
                    <?php endforeach?>
              </tbody>
              <tfoot>
                  <tr>
                      <td colspan='3'><b>TOTAL SHOPEE PAY </b></td>     
                      <td align='right'><b><?php echo number_format($total1) ?></b></td>
                  </tr>
            </tfood>
            </table>
             <table id="tbStok" class="table table-bordered table-striped table-responsive">
                <thead>
                    <th>No Urut</th>        
                    <th>Kedai</th>
                    <th>Keterangan</th>
                    <th>Nilai</th>
                </thead> 
                <tbody>
                    <?php 
                        $total1=0; 
                        $no=1;
                    ?>
                    <?php foreach ($rekap->result() as $key): ?>
                     <tr>
                        <td><?php echo $no++ ?></td>
                        <td><?php echo $key->kd_toko ?></td>
                        <td><?php echo $key->nm_toko ?></td>
                        <td align='right'><?php echo number_format($key->qris) ?></td>
                    </tr>    
                        <?php
                        $total1 +=$key->qris;
                        ?>
                    <?php endforeach?>
              </tbody>
              <tfoot>
                  <tr>
                      <td colspan='3'><b>TOTAL QRIS </b></td>     
                      <td align='right'><b><?php echo number_format($total1) ?></b></td>
                  </tr>
            </tfood>
            </table>
             <table id="tbStok" class="table table-bordered table-striped table-responsive">
                <thead>
                    <th>No Urut</th>        
                    <th>Kedai</th>
                    <th>Keterangan</th>
                    <th>Nilai</th>
                </thead> 
                <tbody>
                    <?php 
                        $total1=0; 
                        $no=1;
                    ?>
                    <?php foreach ($rekap->result() as $key): ?>
                     <tr>
                        <td><?php echo $no++ ?></td>
                        <td><?php echo $key->kd_toko ?></td>
                        <td><?php echo $key->nm_toko ?></td>
                        <td align='right'><?php echo number_format($key->pb11) ?></td>
                    </tr>    
                        <?php
                        $total1 +=$key->pb11;
                        ?>
                    <?php endforeach?>
              </tbody>
              <tfoot>
                  <tr>
                      <td colspan='3'><b>TOTAL PB1/PAJAK </b></td>     
                      <td align='right'><b><?php echo number_format($total1) ?></b></td>
                  </tr>
            </tfood>
            </table>
             <table id="tbStok" class="table table-bordered table-striped table-responsive">
                <thead>
                    <th>No Urut</th>        
                    <th>Kedai</th>
                    <th>Keterangan</th>
                    <th>Nilai</th>
                </thead> 
                <tbody>
                    <?php 
                        $total1=0; 
                        $no=1;
                    ?>
                    <?php foreach ($rekap->result() as $key): ?>
                     <tr>
                        <td><?php echo $no++ ?></td>
                        <td><?php echo $key->kd_toko ?></td>
                        <td><?php echo $key->nm_toko ?></td>
                        <td align='right'><?php echo number_format($key->biaya) ?></td>
                    </tr>    
                        <?php
                        $total1 +=$key->biaya;
                        ?>
                    <?php endforeach?>
              </tbody>
              <tfoot>
                  <tr>
                      <td colspan='3'><b>TOTAL BIAYA </b></td>     
                      <td align='right'><b><?php echo number_format($total1) ?></b></td>
                  </tr>
            </tfood>
            </table>
             <table id="tbStok" class="table table-bordered table-striped table-responsive">
                <thead>
                    <th>No Urut</th>        
                    <th>Kedai</th>
                    <th>Keterangan</th>
                    <th>Nilai</th>
                </thead> 
                <tbody>
                    <?php 
                        $total1=0; 
                        $no=1;
                    ?>
                    <?php foreach ($rekap->result() as $key): ?>
                     <tr>
                        <td><?php echo $no++ ?></td>
                        <td><?php echo $key->kd_toko ?></td>
                        <td><?php echo $key->nm_toko ?></td>
                        <td align='right'><?php echo number_format($key->ongkir) ?></td>
                    </tr>    
                        <?php
                        $total1 +=$key->ongkir;
                        ?>
                    <?php endforeach?>
              </tbody>
              <tfoot>
                  <tr>
                      <td colspan='3'><b>TOTAL ONGKIR </b></td>     
                      <td align='right'><b><?php echo number_format($total1) ?></b></td>
                  </tr>
            </tfood>
            </table>
             <table id="tbStok" class="table table-bordered table-striped table-responsive">
                <thead>
                    <th>No Urut</th>        
                    <th>Kedai</th>
                    <th>Keterangan</th>
                    <th>Nilai</th>
                </thead> 
                <tbody>
                    <?php 
                        $total1=0; 
                        $no=1;
                    ?>
                    <?php foreach ($rekap->result() as $key): ?>
                     <tr>
                        <td><?php echo $no++ ?></td>
                        <td><?php echo $key->kd_toko ?></td>
                        <td><?php echo $key->nm_toko ?></td>
                        <td align='right'><?php echo number_format($key->biaya1) ?></td>
                    </tr>    
                        <?php
                        $total1 +=$key->biaya1;
                        ?>
                    <?php endforeach?>
              </tbody>
              <tfoot>
                  <tr>
                      <td colspan='3'><b>TOTAL SUBSIDI ONGKIR </b></td>     
                      <td align='right'><b><?php echo number_format($total1) ?></b></td>
                  </tr>
            </tfood>
            </table>
             <table id="tbStok" class="table table-bordered table-striped table-responsive">
                <thead>
                    <th>No Urut</th>        
                    <th>Kedai</th>
                    <th>Keterangan</th>
                    <th>Nilai</th>
                </thead> 
                <tbody>
                    <?php 
                        $total1=0; 
                        $no=1;
                    ?>
                    <?php foreach ($rekap->result() as $key): ?>
                     <tr>
                        <td><?php echo $no++ ?></td>
                        <td><?php echo $key->kd_toko ?></td>
                        <td><?php echo $key->nm_toko ?></td>
                        <td align='right'><?php echo number_format($key->dapat) ?></td>
                    </tr>    
                        <?php
                        $total1 +=$key->dapat;
                        ?>
                    <?php endforeach?>
              </tbody>
              <tfoot>
                  <tr>
                      <td colspan='3'><b>TOTAL PENDAPATAN </b></td>     
                      <td align='right'><b><?php echo number_format($total1) ?></b></td>
                  </tr>
            </tfood>
            </table>
            <table id="tbStok" class="table table-bordered table-striped table-responsive">
              <tbody>
                <?php foreach ($rekap->result() as $key): ?>
                <?php
                  $total1 +=$key->omset1;
                  $total2 +=$key->dapat;
                  $total3 +=$key->pb11+$key->transfer+$key->gojek+$key->grab+$key->sfood+$key->biaya+$key->biaya1+$key->ongkir+$key->spay+$key->qris;
                  
                ?>
                <?php endforeach?>
              </tbody>
              <tfoot>
                  <tr>
                      <td colspan='3'><b>TOTAL OMSET </b></td>     
                      <td align='right'><b><?php echo number_format($total1) ?></b></td>
                  </tr>
                  <tr>
                      <td colspan='3'><b>TOTAL PENDAPATAN </b></td>     
                      <td align='right'><b><?php echo number_format($total2) ?></b></td>
                  </tr>
                  <tr>
                      <td colspan='3'><b>TOTAL PENGELUARAN </b></td>     
                      <td align='right'><b><?php echo number_format($total3) ?></b></td>
                  </tr>
                  <tr>
                      <td colspan='3'><b>TOTAL SALDO </b></td>     
                      <td align='right'><b><?php echo number_format($total1+$total2-$total3) ?></b></td>
                  </tr>
            </tfood>
            </table>
        </div>
      </div>
    </div>
  </div>
  
     
                  
                  
     <!-- CONTENT-WRAPPER SECTION END-->
    <section id="gradient11" class="footer-section">
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                   &copy; Copyright <?php echo date('Y') ?>, <a href="enambelasapp.my.id" target="_blank">Mandiri</a>
                </div>
            </div>
        </div>
    </section>
    

<div class="modal fade modalKecil" tabindex="-1" role="dialog" aria-hidden="true">
  <div class="modal-dialog modal-sm">
 
    <div class="modal-content">
      <div class="modal-header">
        <h4><font color='red'><b>Input Validasi Token</b></font></h4>
		<?php 
			$tgl=date('j');
			$jam=date('G');
			$detik=date('s');
			if ($detik==0)  $token=((($tgl*$jam*1)*1305));
			if ($detik>0) $token=((($tgl*$jam*$detik)*1305));
		?>
		
      </div>
        <div class="modal-body" align='center' >
          <form class="form-horizontal" action="<?php echo base_url('kasir/masuk_simpan_stok/')?>" method="post">
            <div  class="form-group">
              <label  class="control-label " for="id_fak">Kode Token</label>
              <div class="col-sm-10">
                <input  type="text" class="form-control" id="token" name="token"  value='<?php echo $token ?>' readonly>
              </div>
            </div>
            <div class="form-group" >
              <label class="control-label " for="idtoken">Password</label>
              <div class="col-sm-10">
                <input type="number" class="form-control" id="idtoken" name="idtoken" required >
              </div>
            </div>
			<div class="form-group" >
              <label class="control-label " for="note">Note</label>
              <div class="col-sm-10">
                <input type="text" class="form-control" id="note" name="note" required >
              </div>
            </div>
        </div>
        <div class="modal-footer">
		 <input type="hidden" name="nobuk" id="nobuk" value="<?php echo $nobukti ?>">
          <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
          <button type="submit" id="btnSimpan" class="btn btn-primary">Simpan</button>
        </div>
        </form>
    </div>
 
  </div>
</div>    
    
    <!-- FOOTER SECTION END-->
    <!-- JAVASCRIPT FILES PLACED AT THE BOTTOM TO REDUCE THE LOADING TIME  -->
    <script src="<?php echo base_url() ?>/assets/js/jquery-3.3.1.js"></script>
    <script src="<?php echo base_url() ?>/assets/js/jquery.dataTables.min.js"></script>
    <script src="<?php echo base_url() ?>/assets/js/dataTables.buttons.min.js"></script>
    <script src="<?php echo base_url() ?>/assets/js/buttons.flash.min.js"></script>
    <script src="<?php echo base_url() ?>/assets/js/jszip.min.js"></script>
    <script src="<?php echo base_url() ?>/assets/js/pdfmake.min.js"></script>
    <script src="<?php echo base_url() ?>/assets/js/vfs_fonts.js"></script>
    <script src="<?php echo base_url() ?>/assets/js/buttons.html5.min.js"></script>
    <script src="<?php echo base_url() ?>/assets/js/buttons.print.min.js"></script>
    <script src="<?php echo base_url() ?>/assets/js/bootstrap.js"></script>
    <script src="<?php echo base_url() ?>/assets/js/custom.js"></script>
    <script src="<?php echo base_url() ?>/assets/js/sweetalert.min.js"></script>
    <script src="<?php echo base_url() ?>/assets/js/toastr.min.js"></script>
    
    <script>
      $('#tbStok').DataTable({
          "paging":   false,
          "ordering": false,
          "info":     false,
          "searching":     false,
          "dom": 'Bfrtip',
          "buttons": [
            'copy', 'pdf', 'print', 'excel'
        ]
      });
      $('form').attr('autocomplete', 'off');
      $("ul.nav li.dropdown").hover(function(){$(this).find(".dropdown-menu").stop(!0,!0).delay(100).fadeIn(500)},function(){$(this).find(".dropdown-menu").stop(!0,!0).delay(100).fadeOut(500)});
      var pesan="<?php echo $this->session->flashdata('msg'); ?>",error="<?php echo $this->session->flashdata('error'); ?>";pesan?(toastr.options={positionClass:"toast-top-right"},toastr.success(pesan)):error&&swal(error);
      
	function isNumber(evt) {
        evt = (evt) ? evt : window.event;
        var charCode = (evt.which) ? evt.which : evt.keyCode;
        if (charCode > 31 && (charCode < 48 || charCode > 57)) {
            return false;
        }
      return true;
    } 

	$("#jml").keypress(function(e){
        var kd_barang= $('#kbrg').val();
        if(e.which==13){
			document.getElementById('jml').focus();  
        }
    });
    
    </script>
<style type="text/css">
	#gradient11 {
	  background-image: radial-gradient(circle, red, yellow, green);
	}
</style>

<script src="<?php echo base_url() . 'assets/js/grafik/jquery.js' ?>"></script>
<script src="<?php echo base_url() . 'assets/js/grafik/highcharts.js' ?>"></script>

</body>
</html>