<!DOCTYPE html>
<html>


<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">

	
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
	<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
	<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
	
	<script type="text/javascript" src="/wawan/public/adminLTE/dist/css/sweetalert.min.js"></script>
	
	<style>
		
			.tbl_stn {
			    position:absolute;
				top: 110px;
				left: 240px;
				width: 355px;
				height: 520px;
			    //border: 1px solid #543535;
			}				

			.tbl_kms {
			    position:absolute;
				top: 110px;
				right: 10px;
				width: 730px;
				height: 520px;
				//border: 1px solid #543535;
			}	
			
			.wrap {
			  width: 50%;
			  display: inline-block;
			  margin: 10px;
			}
			
		
			.tblheader {
				background: #2F4F4F;
				color: white;
				font-size: 15px;
				alignment: center;
			}

	</style>


</head>

<?php $__env->startSection('title'); ?>
  Data Stock &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  	<!--	<button onclick="window.location='<?php echo e(route('home')); ?>'" class="btn btn-success"><i class="fa fa-home"></i> Home </button>	-->

<?php $__env->stopSection(); ?>

<!------------------>

<?php $__env->startSection('content'); ?>
<div class="row">
    
    <div class="col-sm-4 col-md-4 col-xs-12">
    <!--<div class="tbl_stn">-->
        <div class="box">
            <div class="box-body">
            
<table class="table table-striped table-padding table-bordered" id="tbl-stock1" width="100%">
<thead>
   <tr class="tblheader">
   
      <th>Deskripsi</th>
	  <th>STOCK</th>
      <th>det</th> 	  
 
	</tr>
</thead>

<tbody></tbody>	 

</table>
            </div>
        </div>
    </div>
<!--</div>-->

<!---------------------------->

<!--
<div class="row">
    <div class="tbl_kms">
    -->
<div class="col-sm-8 col-md-8 col-xs-12">    
        <div class="box">
            <div class="box-body">
<table class="table table-striped table-padding table-bordered" id="tbl-stock0" width="100%">
<thead>
   <tr class="tblheader">
   
      <th>Deskripsi</th>
 	  <th>STK IN</th>
 	  <th>SALE</th>
	  <th>MTS</th>
	  <th>ADJ</th>
	  <th>SISA</th>
      <th>det</th> 	  
 
	</tr>
</thead>

<tbody></tbody>	 

</table>
            </div>
        </div>
    </div>
</div>

<?php echo $__env->make('stock.detail', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php echo $__env->make('stock.detail2', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

<?php $__env->stopSection(); ?>

<!-------------------------------->

<?php $__env->startSection('script'); ?>

<script type="text/javascript">
var table, tbl_stock, save_method;

// type barang satuan
	jQuery(document).ready(function($){
	table = $('#tbl-stock1').DataTable({
        "scrollY": '62vh',
        "scrollCollapse": true,
        "paging": false,
        "processing" : true,
	    "searching" : false,
	    "destroy" : true,
	    "dom" : 'bti',	 
        "ajax" : {
            "url" : "/wawan/stock/getdata1",
            "type" : "GET"
            }
        });
    });
    
// type barang kemasan
	jQuery(document).ready(function($){
	table = $('#tbl-stock0').DataTable({
        "scrollY": '62vh',
        "scrollCollapse": true,
        "paging": false,
        "processing" : true,
	    "searching" : false,
	    "destroy" : true,
	    "dom" : 'bti',	 
        "ajax" : {
            "url" : "/wawan/stock/getdata0",
            "type" : "GET"
            }
        });
    });

//detail kemasan
	tbldetail1 = $('.tabel-detail1').DataTable({
         "bSort": false,
         "processing" : true,
		 "paging" : false,
    	 "dom" : 'bt',
    });	
    
	tbldetail3 = $('.tabel-detail3').DataTable({
         "bSort": false,
         "processing" : true,
		 "paging" : false,
    	 "dom" : 'bt',
    });	
	
	tbldetail2 = $('.tabel-detail2').DataTable({
        "scrollY": '15vh',
        "scrollCollapse": true,
		"paging" : false,
        "bSort": false,
        "processing" : true,
    	"dom" : 'bti',
    });	
    
	tbldetail7 = $('.tabel-detail7').DataTable({
        "scrollY": '15vh',
        "scrollCollapse": true,
		"paging" : false,
        "bSort": false,
        "processing" : true,
    	"dom" : 'bti',
    });	
    
    
//detail satuan    
	tbldetail6 = $('.tabel-detail6').DataTable({
         "bSort": false,
         "processing" : true,
		 "paging" : false,
    	 "dom" : 'bt',
    });	
    
	tbldetail4 = $('.tabel-detail4').DataTable({
        "scrollY": '15vh',
        "scrollCollapse": true,
		"paging" : false,
        "bSort": false,
        "processing" : true,
    	"dom" : 'bti',
    });	
 
	tbldetail5 = $('.tabel-detail5').DataTable({
        "scrollY": '15vh',
        "scrollCollapse": true,
		"paging" : false,
        "bSort": false,
        "processing" : true,
    	"dom" : 'bti',
    });	 
    

//historystock kemasan    
function showDetail(id){
	
    $('#modal-detail').modal('show');
	
    tbldetail1.ajax.url("stock/"+id+"/detail1");
	tbldetail1.ajax.reload();
	tbldetail2.ajax.url("stock/"+id+"/detail2");
	tbldetail2.ajax.reload();
	tbldetail3.ajax.url("stock/"+id+"/detail3");
	tbldetail3.ajax.reload();
	tbldetail7.ajax.url("stock/"+id+"/detail7");
	tbldetail7.ajax.reload();	

}

//history stock satuan
function showDetail1(id){
  	
    $('#modal-detail2').modal('show');

    tbldetail4.ajax.url("stock/"+id+"/detail4");
	tbldetail4.ajax.reload();
	tbldetail5.ajax.url("stock/"+id+"/detail5");
	tbldetail5.ajax.reload();
	tbldetail6.ajax.url("stock/"+id+"/detail6");
	tbldetail6.ajax.reload();

}

</script>

<?php $__env->stopSection(); ?>
</html>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/myprojeq/public_html/wawan/resources/views/stock/index.blade.php ENDPATH**/ ?>