<!DOCTYPE html>
<!--
This is a starter template page. Use this page to start your new project from
scratch. This page gets rid of all links and provides the needed markup only.
-->
<?php foreach($kontak as $kontak) :   endforeach; ?> 
 
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta http-equiv="x-ua-compatible" content="ie=edge">

  <title>Laporan Transaksi</title>
  <!-- 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">
  <!-- SweetAlert2 -->
  <link rel="stylesheet" href="<?php echo base_url();?>assets/plugins/sweetalert2-theme-bootstrap-4/bootstrap-4.min.css">
  <!-- Toastr -->
  <link rel="stylesheet" href="<?php echo base_url();?>assets/plugins/toastr/toastr.min.css">
  <link rel="icon" href="<?php echo base_url();?>images/kontak/<?php echo $kontak->logo ;?>" type="image/png" /> 
  <!-- Font Awesome Icons -->
  <link rel="stylesheet" href="<?php echo base_url();?>assets/plugins/fontawesome-free/css/all.min.css">
  <!-- Theme style -->
  <link rel="stylesheet" href="<?php echo base_url();?>assets/dist/css/adminlte.min.css">
  <!-- Google Font: Source Sans Pro -->
  
</head>
<body class="hold-transition sidebar-collapse layout-top-nav"  >
<div class="wrapper">

   

 

  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <div class="content-header">
       
      
      
    </div>
    <!-- /.content-header -->

    <!-- Main content -->
    <div class="content">

        <div class="row">
          <div class="col-lg-12">
            <div class="card card-success card-outline">
              <div class="card-body">
              	<div class="row">
              		<div class="col-lg-12">
              			
              			<h2>LAPORAN BARANG TERLARIS <?php echo  strtoupper($jenis_laporan.' '.$kontak->nama_toko) ;?> </h2>
              			<h5>Alamat <?php echo  $kontak->alamat ;?> </h5>
              			<h5>Laporan <?php echo  ucwords($jenis_laporan).", " ;?>  <?php if($jenis_laporan =='harian'){
              				echo "Tanggal : ".$tanggal;
              			}else if($jenis_laporan =='bulanan'){
              				echo "Bulan : ".bulan_cetak(date($bulan))." Tahun ".$tahun;
              			} else if($jenis_laporan =='pilihan'){
              				echo "Tanggal : ".tgl_indo(date($tanggal_awal))." s/d ".tgl_indo(date($tanggal_akhir));

              			} else if($jenis_laporan =='kasir'){
              					$username = $this->session->userdata("username");  
												$this->db->where('username',$username);
												$query = $this->db->get('tb_admin');
												$row = $query->row();
											 
												$nama_admin = $row->nama_admin;
              				echo "Tanggal : ".tgl_indo(date($tanggal))." , Kasir : ".$nama_admin;

              			} 
              			?> </h5>
              				 
              		</div>
              	</div><!-- /.row -->
              	<table class="table ">
									<thead>
										<tr>
											<th>No</th>
											<th>Nama Barang</th>
											<th>Terjual</th>
										</tr>
									</thead>
									<tbody>
										<?php $no=1; foreach($transaksi as $rows) : ?>
										<tr>
											<td><?php echo $no; ?></td>
											<td><?php echo $rows->nama_barang;  ?></td>
											<td><?php echo $rows->total_terjual;  ?></td>
										</tr>
										<?php $no++; endforeach; ?>
									</tbody>
									

								</table>

              <br>
              <hr>
              <div class="row">
              	<div class="col-lg-12">
              		<table width="100%" border="0">
              			<tr>

              				<td >Mangetahui,</td>
              				<td width="400px;"  ></td>
              				<td ><?php echo $kontak->kab_kota ; ?>, <?php echo tgl_indo(date('Y-m-d'));  ?></td>
              			</tr>
              			<tr>
              				<td>Manager </td>
              				<td width="400px;"></td>
              				<td>Admin</td>
              			</tr>
              			<tr height="70px;">
              				<td></td>
              				<td></td>
              				<td></td>
              			</tr>
              			<tr>
              				<td> (............................) </td>
              				<td width="400px;"></td>
              				<td><strong><?php echo $nama_admin; ?></strong></td>
              			</tr>
              		</table>

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

             
          </div>
          <!-- /.col-md-6 -->
          
          <!-- /.col-md-6 -->
        </div>
        <!-- /.row -->
      
    </div>
   
  </div>
  <!-- /.content-wrapper -->

   
 




 
<!-- jQuery -->
<script src="<?php echo base_url();?>assets/plugins/jquery/jquery.min.js"></script>
<script src="<?php echo base_url().'assets/js/jquery.js'?>"></script>
<script src="<?php echo base_url().'assets/js/numeral.min.js'?>"></script>
<!-- Bootstrap 4 -->
<script src="<?php echo base_url();?>assets/plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- AdminLTE App -->
<script src="<?php echo base_url();?>assets/dist/js/adminlte.min.js"></script>
 
<!-- DataTables -->
<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>
 
<!-- AdminLTE for demo purposes -->
<script src="<?php echo base_url();?>assets/dist/js/demo.js"></script>
 
</body>
</html>
