<?php 
                $opt_year=array(''=>'-Year-');
               for($a=2016;$a<=date('Y');$a++){
                   $opt_year[$a]=$a;
               }
		$opt_brand=GetOptAll('master_brand','-Semua Merk-',array('status'=>'Aktif'));
                $opt_jenis=GetOptAll('master_jenis_produk','-Semua Jenis Produk-',array('status'=>'where/abcdefghijkl'));
                $opt_gudang=GetOptAll('master_gudang','-Semua Gudang-');
                ?>
<script>
    $(document).ready(function(e){
        cari_total_stok();
    });
    function cari_total_stok(){
        
        var brand=$('#brand6').val();
        var jp=$('#jp6').val();
        var gudang=$('#gudang6').val();
        
        $('#data_total').load('<?php echo base_url()?>dashboard/chart_total_stok',{b:brand,j:jp,g:gudang});
    }
    function gantiproduk6(v){
        var bg=6;
        $('#jenis_produk_sp6').load('<?php echo base_url()?>dashboard/loadjenis',{v:v,bg:bg});
    }
    </script>
<style>
    .centerz{
        float:none!important;
        margin:0 auto;
    }
    input[type="text"]{
        padding:0!important;
    }
</style>
<div class="col-md-12">
    <div class="col-md-12 centerz"><center>
            <label></label>
            &nbsp;&nbsp;&nbsp;<?php echo form_dropdown('brand',$opt_brand,$_POST['brand'],'class="select2" id="brand6" OnChange="gantiproduk6(this.value)"')?>&nbsp;-&nbsp;
            <span id="jenis_produk_sp6"><?php echo form_dropdown('jenis_produk',$opt_jenis,$_POST['jenis_produk'],'class="select2" id="jp6"')?>
            </span>    
                &nbsp;-&nbsp;
            <?php echo form_dropdown('gudang',$opt_gudang,$_POST['gudang'],'class="select2" id="gudang6"')?>&nbsp;-&nbsp;
        <button type="button" id="search" onclick="cari_total_stok()">Search</button></center>
    </div>
</div>
<div id="data_total"></div>