<?php foreach($kontak as $kontak) :   endforeach; ?>
<?php foreach($admin_login as $user) :   endforeach; ?> 
  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <div class="content-header">
      <div class="container-fluid">
        <div class="row mb-2">
          <div class="col-sm-6">
            <h1 class="m-0 text-dark"> 
            		TUtup dan Setoran Kasir
            </h1>
          </div><!-- /.col -->
          <div class="col-sm-6">
            <ol class="breadcrumb float-sm-right">
              <li class="breadcrumb-item"><a href="#">Home</a></li>
              <li class="breadcrumb-item active">TUtup dan Setoran Kasir</li>
            </ol>
          </div><!-- /.col -->
        </div><!-- /.row -->
      </div><!-- /.container-fluid -->
    </div>
    <!-- /.content-header -->
	    
          
    <!-- Main content -->
    <section class="content">
      <div class="container-fluid">
      	  <div class="card">
              <div class="card-header">
                Logout to Kasir
              </div>
              
              <div class="card-body">
                   <?php

              $username = $this->session->userdata("username");  
              $this->db->where('username',$username);
              $query = $this->db->get('tb_admin');
              $row = $query->row();
             
              $id_admin = $row->id;

              $tanggal_sekarang = date('Ymd');

                 $sql_menuxx= "SELECT keterangan FROM tb_kasir WHERE  id_admin = '$id_admin' and date(date)=' $tanggal_sekarang' and keterangan ='logout-kasir'  ";
                        $main_menuxx = $this->db->query($sql_menuxx)->result();
                        foreach ($main_menuxx as $rows) {
                          
                       
                          $cek=   $rows->keterangan; 
                       
                        }  
                  

                  if($cek == 'logout-kasir'){
                    ?>
                    Anda Sudah Menginput Setor 
                    <?php 
                  }else{
                 ?>


              	<form class="form-horizontal" action="<?php echo base_url('kasir/code_logout'); ?>" method="POST" enctype="multipart/form-data" /> 
              	<div class="col-sm-4"><!-- /.card-header -->
	              	<div class="form-group">
	              		<label for="exampleInputEmail1">Uang Setor</label>
	              		<input type="text" class="form-control" id="exampleInputEmail1" name="uang_tunai" placeholder="Masukkan Nominal Setoran di Laci" required="">
	              		<input type="hidden" name="id_admin" value="<?php  echo $id_admin; ?>">
	              		<input type="hidden" name="id_kantor" value="<?php  echo $id_kantor; ?>">
	              	</div>
	              	<button type="submit" class="btn btn-primary" onclick="return confirm('Apakah Yakin Untuk Setor , ? Klik Oke jika Lanjut')">Setor </button>
              	</div>
               	</form>

                <?php } ?>
 
              </div>
              <!-- /.card-body -->
            </div>
      </div><!-- /.container-fluid -->
    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->

   