@extends('layout')


@section('content')

<div class="page-header page-header-default">
	<div class="breadcrumb-line">
		<ul class="breadcrumb">
			<li><a href="index.html"><i class="icon-home2 position-left"></i> Produksi</a></li>
			<li class="active">Laporan Produksi</li>
		</ul>
	</div>
</div>

<div class="content">

	<div class="col-sm-12">

	<div class="col-sm-4">
		<div class="panel panel-flat">
			<div class="panel-heading">
				<h5 class="panel-title">Laporan Stok Barang (Dalam Proses)</h5>
				<div class="heading-elements">
					<ul class="icons-list">
			      		<li><a data-action="collapse"></a></li>
			      	</ul>
		       	</div>
		    </div>
		    <div class="panel-body">
		    	<form class="form-horizontal" id="" method="get" action="{{ url('laporanproduksi/mutasiproduksi_') }}" target="_blank" autocomplete="off">
		    		
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Kategori Barang</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_kategoribarang" id="id_kategori_proses">
		    					<option value=""> -- Pilih Kategori -- </option>
		    					@foreach($data['kategori']->get() as $b)
		    					<option value="{{$b->id_kb}}" inisial="{{$b->inisial}}" nama="{{$b->nama}}">{{$b->nama}}</option>
		    					@endforeach
		    				</select>
		    			</div>
		    		</div>		    		
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Nama Barang</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_barang" id="id_barang_proses">
		    					<option value="">Semua Barang</option>
		    					@php
		    					foreach($data['barang']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id }}">{{ $b->nama_kategori." - ".$b->nama_sub." - ".$b->kode_barang." - ".$b->nama_barang }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Pegawai</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_pegawai_proses" id="id_pegawai_proses">
		    					<option value="">Tidak Ada</option>
		    					<option value="0">Semua Pegawai</option>
		    					@php
		    					foreach($data['pegawai'] as $b){
		    					@endphp
		    					<option value="{{ $b->id_pegawai }}">{{ $b->nama_pegawai }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>		    				
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Makelar</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_makelar_proses" id="id_makelar_proses">
		    					<option value="">Tidak Ada</option>
		    					<option value="0" nama="Petenun">Semua Makelar</option>
		    					@php
		    					foreach($data['makelar'] as $b){
		    					@endphp
		    					<option value="{{ $b->id_kelompok }}" nama="{{ $b->nama }}">{{ $b->nama }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>		    				
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Rekanan</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_rekanan_proses" id="id_rekanan_proses">
		    					{{-- <option value="">Tidak Ada</option> --}}
		    					<option value="0">Semua Rekanan</option>
		    					@php
		    					foreach($data['rekanan'] as $b){
		    					@endphp
		    					<option value="{{ $b->id_rekanan }}">{{ $b->nama.' - '.$b->nama_kelompok }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>		    				
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Mesin</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_mesin_proses" id="id_mesin_proses">
		    					<option value="">Tidak Ada</option>
		    					<option value="0">Semua Mesin</option>
		    					@php
		    					foreach($data['mesin'] as $b){
		    					@endphp
		    					<option value="{{ $b->id_mesin }}">{{ $b->nama }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>		    				
		    			</div>
		    		</div>
		    		{{-- <div class="form-group">
		    			<label class="control-label col-sm-4">Nama Barang</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_barang">
		    					<option value="">Semua Barang</option>
		    					@php
		    					foreach($data['barang']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id }}">{{ $b->nama_kategori." - ".$b->nama_sub." - ".$b->kode_barang." - ".$b->nama_barang }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>
		    			</div>
		    		</div> --}}
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Proses</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_proses">
		    					{{-- <option value="">Semua Proses</option> --}}
		    					@php
		    					foreach($data['proses']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id_proses }}">{{ $b->nama_proses }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>		    				
		    			</div>
		    		</div>
		    		<!-- <div class="form-group">
		    			<label class="control-label col-sm-4">Gudang</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_gudang">
		    					<option value=""> -- Pilih Gudang -- </option>
		    					@php
		    					foreach($data['gudang']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id_gudang }}">{{ $b->nama_gudang }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>
		    			</div>
		    		</div> -->
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Nama Motif</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_motif">
		    					<option value="">Semua Motif</option>
		    					@foreach($data['motif']->get() as $b)
		    					<option value="{{$b->id_motif}}">{{$b->nama_motif}}</option>
		    					@endforeach
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Nama Corak</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_corak">
		    					<option value="">Semua Corak</option>
		    					@foreach($data['corak']->get() as $b)
		    					<option value="{{$b->id_motif_barang}}">{{$b->motif_keterangan}}</option>
		    					@endforeach
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Lokasi</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_lokasistok">
		    					@php
		    					foreach($data['lokasi']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id_lokasi }}">{{ $b->nama_lokasi }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Warna</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_warna">
		    					<option value="">Semua Warna</option>
		    					@php
		    					foreach($data['warna']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id_komposisi }}">{{ $b->nama." ( ".$b->inisial." )" }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Jenis</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="jenis">
		    					<option value="1">Detail</option>
		    					<option value="2">Rekap</option>
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Tanggal</label>
		    			<div class="col-sm-4">
		    				<input type="text" name="tgl_awal" class="form-control date_awal" value="{{ date('d-m-Y') }}" required>
		    			</div>
		    			<div class="col-sm-4">
		    				<input type="text" name="tgl_akhir" class="form-control date_akhir" value="{{ date('d-m-Y') }}" required>
		    			</div>
		    		</div>
		    		<div class="form-group pull-right">
		    			<button class="btn btn-primary" type="submit">Cetak</button>
		    		</div>
		    	</form>
		    </div>
		    
		</div>
	</div>

	<div class="col-sm-4">
		<div class="panel panel-flat">
			<div class="panel-heading">
				<h5 class="panel-title">Laporan Bon Bahan Produksi</h5>
				<div class="heading-elements">
					<ul class="icons-list">
			      		<li><a data-action="collapse"></a></li>
			      	</ul>
		       	</div>
		    </div>
		    <div class="panel-body">
		    	<form class="form-horizontal" id="" method="get" action="{{ url('laporanproduksi/laporan_bonproduksi') }}" target="_blank" autocomplete="off">
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Pegawai</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_pegawai_bon" id="id_pegawai_bon">
		    					<option value="">Tidak Ada</option>
		    					<option value="0">Semua Pegawai</option>
		    					@php
		    					foreach($data['pegawai'] as $b){
		    					@endphp
		    					<option value="{{ $b->id_pegawai }}">{{ $b->nama_pegawai }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>		    				
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Makelar</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_makelar_bon" id="id_makelar_bon">
		    					<option value="">Tidak Ada</option>
		    					<option value="0" nama="Petenun">Semua Makelar</option>
		    					@php
		    					foreach($data['makelar'] as $b){
		    					@endphp
		    					<option value="{{ $b->id_kelompok }}" nama="{{ $b->nama }}">{{ $b->nama }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>		    				
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Rekanan</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_rekanan_bon" id="id_rekanan_bon">
		    					<option value="">Tidak Ada</option>
		    					<option value="0">Semua Rekanan</option>
		    					@php
		    					foreach($data['rekanan'] as $b){
		    					@endphp
		    					<option value="{{ $b->id_rekanan }}">{{ $b->nama.' - '.$b->nama_kelompok }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>		    				
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Mesin</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_mesin_bon" id="id_mesin_bon">
		    					<option value="">Tidak Ada</option>
		    					<option value="0">Semua Mesin</option>
		    					@php
		    					foreach($data['mesin'] as $b){
		    					@endphp
		    					<option value="{{ $b->id_mesin }}">{{ $b->nama }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>		    				
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Proses</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_proses_bon">
		    					<option value="">Semua Proses</option>
		    					@php
		    					foreach($data['proses']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id_proses }}">{{ $b->nama_proses }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>		    				
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Lokasi</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_lokasi_bon">
		    					@php
		    					foreach($data['lokasi']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id_lokasi }}">{{ $b->nama_lokasi }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Jenis</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_jenis_bon">
		    					<option value="1">Rekap</option>
		    					<option value="3">Detail</option>
		    					<option value="2">Detail Perjenis Barang</option>
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Tanggal</label>
		    			<div class="col-sm-4">
		    				<input type="text" name="tgl_awal" class="form-control date_awal" value="{{ date('d-m-Y') }}" required>
		    			</div>
		    			<div class="col-sm-4">
		    				<input type="text" name="tgl_akhir" class="form-control date_akhir" value="{{ date('d-m-Y') }}" required>
		    			</div>
		    		</div>
		    		<div class="form-group pull-right">
		    			<button class="btn btn-primary" type="submit">Cetak</button>
		    		</div>
		    	</form>
		    </div>
		    
		</div>
	</div>

	<div class="col-sm-4">
		<div class="panel panel-flat">
			<div class="panel-heading">
				<h5 class="panel-title">Laporan Hasil Produksi</h5>
				<div class="heading-elements">
					<ul class="icons-list">
			      		<li><a data-action="collapse"></a></li>
			      	</ul>
		       	</div>
		    </div>
		    <div class="panel-body">
		    	<form class="form-horizontal" id="" method="get" action="{{ url('laporanproduksi/laporan_hasilproduksi') }}" target="_blank" autocomplete="off">
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Pegawai</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_pegawai_hasil" id="id_pegawai_hasil">
		    					<option value="">Tidak Ada</option>
		    					<option value="0">Semua Pegawai</option>
		    					@php
		    					foreach($data['pegawai'] as $b){
		    					@endphp
		    					<option value="{{ $b->id_pegawai }}">{{ $b->nama_pegawai }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>		    				
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Makelar</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_makelar_hasil" id="id_makelar_hasil">
		    					<option value="">Tidak Ada</option>
		    					<option value="0" nama="Petenun">Semua Makelar</option>
		    					@php
		    					foreach($data['makelar'] as $b){
		    					@endphp
		    					<option value="{{ $b->id_kelompok }}" nama="{{ $b->nama }}">{{ $b->nama }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>		    				
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Rekanan</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_rekanan_hasil" id="id_rekanan_hasil">
		    					<option value="">Tidak Ada</option>
		    					<option value="0">Semua Rekanan</option>
		    					@php
		    					foreach($data['rekanan'] as $b){
		    					@endphp
		    					<option value="{{ $b->id_rekanan }}">{{ $b->nama.' - '.$b->nama_kelompok }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>		    				
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Mesin</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_mesin_hasil" id="id_mesin_hasil">
		    					<option value="">Tidak Ada</option>
		    					<option value="0" nama="Petenun">Semua Mesin</option>
		    					@php
		    					foreach($data['mesin'] as $b){
		    					@endphp
		    					<option value="{{ $b->id_mesin }}" nama="{{ $b->nama }}">{{ $b->nama }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>		    				
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Proses</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_proses_hasil">
		    					<option value="0">Semua Proses</option>
		    					@php
		    					foreach($data['proses']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id_proses }}">{{ $b->nama_proses }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>		    				
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Lokasi</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_lokasi_hasil">
		    					@php
		    					foreach($data['lokasi']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id_lokasi }}">{{ $b->nama_lokasi }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Jenis</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_jenis_hasil">
		    					<option value="0">Rekap</option>
		    					<option value="3">Detail</option>
		    					<option value="1">Detail Pertanggal</option>
		    					<option value="2">Detail Perpekerja</option>
		    					<option value="4">Detail Per Jenis Barang</option>
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Tanggal</label>
		    			<div class="col-sm-4">
		    				<input type="text" name="tgl_awal" class="form-control date_awal" value="{{ date('d-m-Y') }}" required>
		    			</div>
		    			<div class="col-sm-4">
		    				<input type="text" name="tgl_akhir" class="form-control date_akhir" value="{{ date('d-m-Y') }}" required>
		    			</div>
		    		</div>
		    		<div class="form-group pull-right">
		    			<button class="btn btn-primary" type="submit">Cetak</button>
		    		</div>
		    	</form>
		    </div>
		    
		</div>
	</div>
	
	</div>

	<div class="col-sm-12">
		
		<div class="col-sm-4">
		<div class="panel panel-flat">
			<div class="panel-heading">
				<h5 class="panel-title">Laporan Hasil Produksi Tenun</h5>
				<div class="heading-elements">
					<ul class="icons-list">
			      		<li><a data-action="collapse"></a></li>
			      	</ul>
		       	</div>
		    </div>
		    <div class="panel-body">
		    	<form class="form-horizontal" id="" method="get" action="{{ url('laporanproduksi/laporan_hasiltenun') }}" target="_blank" autocomplete="off">
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Makelar</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_makelar" id="id_makelar_tenun">
		    					<option value="">Tidak Ada</option>
		    					@php
		    					foreach($data['makelar'] as $b){
		    					@endphp
		    					<option value="{{ $b->id_kelompok }}" nama="{{ $b->nama }}">{{ $b->nama }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>		    				
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Rekanan</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_rekanan" id="id_rekanan_tenun">
		    					<option value="">Semua Rekanan</option>
		    					@php
		    					foreach($data['rekanan'] as $b){
		    					@endphp
		    					<option value="{{ $b->id_rekanan }}">{{ $b->nama.' - '.$b->nama_kelompok }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>		    				
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Nama Motif</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_motif">
		    					<option value="">Semua Motif</option>
		    					@foreach($data['motif']->get() as $b)
		    					<option value="{{$b->id_motif}}">{{$b->nama_motif}}</option>
		    					@endforeach
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Kualitas Tenun</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_kualitas">
		    					<option value="">Semua Kualitas</option>
		    					@foreach($data['kualitas_tenun']->get() as $b )
		    					<option value="{{$b->id_kualitas}}">{{$b->nama_kualitas}}</option>
		    					@endforeach
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Lokasi</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_lokasi" id="id_lokasi_tenun">
		    					@php
		    					foreach($data['lokasi']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id_lokasi }}">{{ $b->nama_lokasi }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Jenis</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_jenis">
		    					<option value="0">Rekap Tenun Makelar per Tanggal</option>
		    					<option value="1">Detail Per Nomor</option>
		    					<option value="2">Detail Per Kualitas</option>
		    					<option value="3">Detail Per Jenis Barang</option>
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Tanggal</label>
		    			<div class="col-sm-4">
		    				<input type="text" name="tgl_awal" class="form-control date_awal" value="{{ date('d-m-Y') }}" required>
		    			</div>
		    			<div class="col-sm-4">
		    				<input type="text" name="tgl_akhir" class="form-control date_akhir" value="{{ date('d-m-Y') }}" required>
		    			</div>
		    		</div>
		    		<div class="form-group pull-right">
		    			<button class="btn btn-primary" type="submit">Cetak</button>
		    		</div>
		    	</form>
		    </div>
		    
		</div>
	</div>

		<div class="col-sm-4">
			<div class="panel panel-flat">
			<div class="panel-heading">
				<h5 class="panel-title">Laporan Beam</h5>
				<div class="heading-elements">
					<ul class="icons-list">
			      		<li><a data-action="collapse"></a></li>
			      	</ul>
		       	</div>
		    </div>
		    <div class="panel-body">
		    	<form class="form-horizontal" id="" method="get" action="{{ url('laporanproduksi/laporan_bom') }}" target="_blank" autocomplete="off">
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Makelar</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_makelar" id="id_makelar_bom">
		    					<option value="">Tidak Ada</option>
		    					@php
		    					foreach($data['makelar'] as $b){
		    					@endphp
		    					<option value="{{ $b->id_kelompok }}" nama="{{ $b->nama }}">{{ $b->nama }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>		    				
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Rekanan</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_rekanan" id="id_rekanan_bom">
		    					<option value="">Semua Rekanan</option>
		    					@php
		    					foreach($data['rekanan'] as $b){
		    					@endphp
		    					<option value="{{ $b->id_rekanan }}">{{ $b->nama.' - '.$b->nama_kelompok }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>		    				
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Nama Motif</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_motif">
		    					<option value="">Semua Motif</option>
		    					@foreach($data['motif']->get() as $b)
		    					<option value="{{$b->id_motif}}">{{$b->nama_motif}}</option>
		    					@endforeach
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Gudang</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_gudang" id="id_gudang_bom">
		    					<option value=""> -- Pilih Gudang -- </option>
		    					@php
		    					foreach($data['gudang']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id_gudang }}">{{ $b->nama_gudang }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Lokasi</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_lokasi" id="id_lokasi_bom">
		    					@php
		    					foreach($data['lokasi']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id_lokasi }}">{{ $b->nama_lokasi }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Jenis</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_jenis">
		    					<option value="0">Persediaan Beam</option>
		    					<option value="1">Rekap Persediaan Beam</option>
		    					<option value="2">Daftar Habis Beam</option>
		    					<option value="3">Detail Pengambilan Beam</option>
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Tanggal</label>
		    			<div class="col-sm-4">
		    				<input type="text" name="tgl_awal" class="form-control date_awal" value="{{ date('d-m-Y') }}" required>
		    			</div>
		    			<div class="col-sm-4">
		    				<input type="text" name="tgl_akhir" class="form-control date_akhir" value="{{ date('d-m-Y') }}" required>
		    			</div>
		    		</div>
		    		<div class="form-group pull-right">
		    			<button class="btn btn-primary" type="submit">Cetak</button>
		    		</div>
		    	</form>
		    </div>
		    
		</div>

	</div>
	

	<div class="col-sm-12">

	<div class="col-sm-4">
		<div class="panel panel-flat">
			<div class="panel-heading">
				<h5 class="panel-title">Laporan Mutasi Gudang</h5>
				<div class="heading-elements">
					<ul class="icons-list">
			      		<li><a data-action="collapse"></a></li>
			      	</ul>
		       	</div>
		    </div>
		    <div class="panel-body">
		    	<form class="form-horizontal" id="" method="get" action="{{ url('laporanproduksi/mutasigudang') }}" target="_blank" autocomplete="off">
		    		<input type="hidden" name="jenis" value="1">
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Kategori Barang</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_kategoribarang" id="id_kategoribarang_gudang" required>
		    					<option value=""> -- Pilih Kategori -- </option>
		    					@foreach($data['kategori']->get() as $b)
		    					<option value="{{$b->id_kb}}" inisial="{{$b->inisial}}" nama="{{$b->nama}}">{{$b->nama}}</option>
		    					@endforeach
		    				</select>
		    			</div>
		    		</div>		    		
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Nama Barang</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_barang" id="id_barang_gudang">
		    					<option value="">Semua Barang</option>
		    					@php
		    					foreach($data['barang']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id }}">{{ $b->nama_kategori." - ".$b->nama_sub." - ".$b->kode_barang." - ".$b->nama_barang }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Proses</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_proses">
		    					<option value="">Semua Proses</option>
		    					<option value="0">Tanpa Proses</option>
		    					@php
		    					foreach($data['proses']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id_proses }}">{{ $b->nama_proses }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>		    				
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Gudang</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_gudang" id="id_gudang_mutasi1">
		    					<option value=""> -- Pilih Gudang -- </option>
		    					@php
		    					foreach($data['gudang']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id_gudang }}">{{ $b->nama_gudang }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Lokasi</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_lokasi" id="id_lokasi_mutasi1">
		    					@php
		    					foreach($data['lokasi']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id_lokasi }}">{{ $b->nama_lokasi }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Warna</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_warna">
		    					<option value="">Semua Warna</option>
		    					@php
		    					foreach($data['warna']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id_komposisi }}">{{ $b->nama." ( ".$b->inisial." )" }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Tanggal</label>
		    			<div class="col-sm-4">
		    				<input type="text" name="tgl_awal" class="form-control date_awal" value="{{ date('d-m-Y') }}" required>
		    			</div>
		    			<div class="col-sm-4">
		    				<input type="text" name="tgl_akhir" class="form-control date_akhir" value="{{ date('d-m-Y') }}" required>
		    			</div>
		    		</div>
		    		<div class="form-group pull-right">
		    			<button class="btn btn-primary" type="submit">Cetak</button>
		    		</div>
		    	</form>
		    </div>
		    
		</div>
	</div>

	<div class="col-sm-4">
		<div class="panel panel-flat">
			<div class="panel-heading">
				<h5 class="panel-title">Laporan Rekap Mutasi</h5>
				<div class="heading-elements">
					<ul class="icons-list">
			      		<li><a data-action="collapse"></a></li>
			      	</ul>
		       	</div>
		    </div>
		    <div class="panel-body">
		    	<form class="form-horizontal" id="form_rekapgudang" method="get" action="{{ url('laporanproduksi/mutasirekapbaru') }}" target="_blank" autocomplete="off">
		    	{{-- 	<input type="hidden" name="jenis" value="1"> --}}
		    		<input type="hidden" name="is_excelrekapgudang" id="is_excelrekapgudang" value="0">
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Kategori Barang</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_kategoribarang" id="id_kategoribarang_rekap" required>
		    					<option value=""> -- Pilih Kategori -- </option>
		    					@foreach($data['kategori']->get() as $b)
		    					<option value="{{$b->id_kb}}" inisial="{{$b->inisial}}" nama="{{$b->nama}}">{{$b->nama}}</option>
		    					@endforeach
		    				</select>
		    			</div>
		    		</div>		    		
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Nama Barang</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_barang" id="id_barang_rekap">
		    					<option value="">Semua Barang</option>
		    					@php
		    					foreach($data['barang']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id }}">{{ $b->nama_kategori." - ".$b->nama_sub." - ".$b->kode_barang." - ".$b->nama_barang }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Proses</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_proses">
		    					<option value="">Semua Proses</option>
		    					<option value="0">Tanpa Proses</option>
		    					@php
		    					foreach($data['proses']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id_proses }}">{{ $b->nama_proses }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>		    				
		    			</div>
		    		</div>
		    		<!-- <div class="form-group">
		    			<label class="control-label col-sm-4">Nama Motif</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_motif">
		    					<option value="">Semua Motif</option>
		    					@foreach($data['motif']->get() as $b)
		    					<option value="{{$b->id_motif}}">{{$b->nama_motif}}</option>
		    					@endforeach
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Nama Corak</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_corak">
		    					<option value="">Semua Corak</option>
		    					@foreach($data['corak']->get() as $b)
		    					<option value="{{$b->id_motif_barang}}">{{$b->motif_keterangan}}</option>
		    					@endforeach
		    				</select>
		    			</div>
		    		</div> -->
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Gudang</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_gudang" id="id_gudang_mutasi">
		    					<option value=""> -- Pilih Gudang -- </option>
		    					@php
		    					foreach($data['gudang']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id_gudang }}">{{ $b->nama_gudang }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Lokasi</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_lokasi" id="id_lokasi_mutasi">
		    					@php
		    					foreach($data['lokasi']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id_lokasi }}">{{ $b->nama_lokasi }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Warna</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_warna">
		    					<option value="">Semua Warna</option>
		    					@php
		    					foreach($data['warna']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id_komposisi }}">{{ $b->nama." ( ".$b->inisial." )" }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Jenis</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="jenis" id="jenis_rekapgudang">
		    					<option value="0">Mutasi</option>
		    					<option value="1">Mutasi Per Kategori</option>
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Tanggal</label>
		    			<div class="col-sm-4">
		    				<input type="text" name="tgl_awal" class="form-control date_awal" value="{{ date('d-m-Y') }}" required>
		    			</div>
		    			<div class="col-sm-4">
		    				<input type="text" name="tgl_akhir" class="form-control date_akhir" value="{{ date('d-m-Y') }}" required>
		    			</div>
		    		</div>
		    		<div class="form-group pull-right">
		    			<button class="btn btn-primary" type="submit">Cetak</button>
		    			<button class="btn btn-success" type="button" id="excel_rekapgudang"><i class="icon-file-excel position-left"></i>Cetak</button>
		    		</div>
		    	</form>
		    </div>
		    
		</div>
	</div>


	


	

	</div>
	
	<div class="col-sm-12">

	<div class="col-sm-4">
		<div class="panel panel-flat">
			<div class="panel-heading">
				<h5 class="panel-title">Kartu Stok Mutasi Gudang Warna</h5>
				<div class="heading-elements">
					<ul class="icons-list">
			      		<li><a data-action="collapse"></a></li>
			      	</ul>
		       	</div>
		    </div>
		    <div class="panel-body">
		    	<form class="form-horizontal" id="form_gudangwarna" method="get" action="{{ url('laporanproduksi/mutasibenang') }}" target="_blank" autocomplete="off">
		    		<!-- <input type="hidden" name="jenis" value="1">		    		 -->
		    		<input type="hidden" name="id_kategoribarang" value="5">
		    		<input type="hidden" name="id_motif" value="0">
		    		<input type="hidden" name="id_corak" value="0">
		    		<input type="hidden" name="is_excelgudangwarna" id="is_excelgudangwarna" value="0">
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Nama Barang</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_barang">
		    					<option value="">Semua Benang</option>
		    					@php
		    					foreach($data['benang']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id }}">{{ $b->nama_kategori." - ".$b->nama_sub." - ".$b->kode_barang." - ".$b->nama_barang }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Proses</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_proses">
		    					<option value="">Semua Proses</option>
		    					<option value="0">Tanpa Proses</option>
		    					@php
		    					foreach($data['proses']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id_proses }}">{{ $b->nama_proses }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>		    				
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Gudang</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_gudang" id="id_gudangcorak1">
		    					<option value=""> -- Pilih Gudang -- </option>
		    					@php
		    					foreach($data['gudang']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id_gudang }}">{{ $b->nama_gudang }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Lokasi</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_lokasi" id="id_lokasicorak1">
		    					@php
		    					foreach($data['lokasi']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id_lokasi }}">{{ $b->nama_lokasi }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Warna</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_warna">
		    					<option value="">Semua Warna</option>
		    					@php
		    					foreach($data['warna']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id_komposisi }}">{{ $b->nama." ( ".$b->inisial." )" }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Tanggal</label>
		    			<div class="col-sm-4">
		    				<input type="text" name="tgl_awal" class="form-control date_awal" value="{{ date('d-m-Y') }}" required>
		    			</div>
		    			<div class="col-sm-4">
		    				<input type="text" name="tgl_akhir" class="form-control date_akhir" value="{{ date('d-m-Y') }}" required>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Jenis Mutasi</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="jenis" id="jenis_gudangwarna">
		    					<option value="1">Per-Barang</option>
		    					<option value="2">Mutasi</option>
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group pull-right">
		    			<button class="btn btn-primary" type="submit">Cetak</button>
		    			<button class="btn btn-success" type="button" id="excel_gudangwarna"><i class="icon-file-excel position-left"></i>Cetak</button>
		    		</div>
		    	</form>
		    </div>
		    
		</div>
	</div>

	<div class="col-sm-4">
		<div class="panel panel-flat">
			<div class="panel-heading">
				<h5 class="panel-title">Kartu Stok Mutasi Gudang Corak</h5>
				<div class="heading-elements">
					<ul class="icons-list">
			      		<li><a data-action="collapse"></a></li>
			      	</ul>
		       	</div>
		    </div>
		    <div class="panel-body">
		    	<form class="form-horizontal" id="form_gudangcorak" method="get" action="{{ url('laporanproduksi/mutasicorak') }}" target="_blank" autocomplete="off">
		    		<!-- <input type="hidden" name="jenis" value="1">		    		 -->
		    		<input type="hidden" name="id_kategoribarang" value="5">
		    		<input type="hidden" name="id_motif" value="0">
		    		<input type="hidden" name="is_excelgudangcorak" id="is_excelgudangcorak" value="0">
		    		<!-- <input type="hidden" name="id_warna" value="0"> -->
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Nama Barang</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_barang">
		    					<option value="">Semua Benang</option>
		    					@php
		    					foreach($data['benang']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id }}">{{ $b->nama_kategori." - ".$b->nama_sub." - ".$b->kode_barang." - ".$b->nama_barang }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Proses</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_proses">
		    					<option value="">Semua Proses</option>
		    					@php
		    					foreach($data['proses']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id_proses }}">{{ $b->nama_proses }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>		    				
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Gudang</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_gudang" id="id_gudangcorak2">
		    					<option value=""> -- Pilih Gudang -- </option>
		    					@php
		    					foreach($data['gudang']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id_gudang }}">{{ $b->nama_gudang }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Lokasi</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_lokasi" id="id_lokasicorak2">
		    					@php
		    					foreach($data['lokasi']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id_lokasi }}">{{ $b->nama_lokasi }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Nama Corak</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_corak">
		    					<option value="">Semua Corak</option>
		    					@foreach($data['corak']->get() as $b)
		    					<option value="{{$b->id_motif_barang}}">{{$b->motif_keterangan}}</option>
		    					@endforeach
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Warna</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_warna">
		    					<option value="">Semua Warna</option>
		    					@php
		    					foreach($data['warna']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id_komposisi }}">{{ $b->nama." ( ".$b->inisial." )" }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Tanggal</label>
		    			<div class="col-sm-4">
		    				<input type="text" name="tgl_awal" class="form-control date_awal" value="{{ date('d-m-Y') }}" required>
		    			</div>
		    			<div class="col-sm-4">
		    				<input type="text" name="tgl_akhir" class="form-control date_akhir" value="{{ date('d-m-Y') }}" required>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Jenis Mutasi</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="jenis" id="jenis_gudangcorak">
		    					<option value="1">Per-Barang</option>
		    					<option value="2">Mutasi</option>
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group pull-right">
		    			<button class="btn btn-primary" type="submit">Cetak</button>
		    			<button class="btn btn-success" type="button" id="excel_gudangcorak"><i class="icon-file-excel position-left"></i>Cetak</button>
		    		</div>
		    	</form>
		    </div>
		    
		</div>
	</div>

	<div class="col-sm-4">
			<div class="panel panel-flat">
			<div class="panel-heading">
				<h5 class="panel-title">Laporan Gudang Corak</h5>
				<div class="heading-elements">
					<ul class="icons-list">
			      		<li><a data-action="collapse"></a></li>
			      	</ul>
		       	</div>
		    </div>
		    <div class="panel-body">
		    	<form class="form-horizontal" id="form_gudangcorakmulti" method="get" action="{{ url('laporanproduksi/mutasicorak_proses') }}" target="_blank" autocomplete="off">
		    		<!-- <input type="hidden" name="jenis" value="1">		    		 -->
		    		<input type="hidden" name="id_kategoribarang" value="5">
		    		<input type="hidden" name="id_motif" value="0">
		    		<input type="hidden" name="is_excelgudangcorakmulti" id="is_excelgudangcorakmulti" value="0">
		    		<!-- <input type="hidden" name="id_warna" value="0"> -->
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Nama Barang</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_barang">
		    					<option value="">Semua Benang</option>
		    					@php
		    					foreach($data['benang']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id }}">{{ $b->nama_kategori." - ".$b->nama_sub." - ".$b->kode_barang." - ".$b->nama_barang }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Proses</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-icons" name="id_proses[]" multiple="multiple">
		    					<option value="" selected="">Semua Proses</option>
		    					@php
		    					foreach($data['proses_stok']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id_proses }}">{{ $b->nama_proses }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>		    				
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Gudang</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_gudang_corak">
		    					<option value=""> -- Pilih Gudang -- </option>
		    					@php
		    					foreach($data['gudang']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id_gudang }}">{{ $b->nama_gudang }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Lokasi</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_lokasi_corak">
		    					@php
		    					foreach($data['lokasi']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id_lokasi }}">{{ $b->nama_lokasi }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Nama Corak</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_corak">
		    					<option value="">Semua Corak</option>
		    					@foreach($data['corak']->get() as $b)
		    					<option value="{{$b->id_motif_barang}}">{{$b->motif_keterangan}}</option>
		    					@endforeach
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Warna</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_warna">
		    					<option value="">Semua Warna</option>
		    					@php
		    					foreach($data['warna']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id_komposisi }}">{{ $b->nama." ( ".$b->inisial." )" }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Tanggal</label>
		    			<div class="col-sm-4">
		    				<input type="text" name="tgl_awal" class="form-control date_awal" value="{{ date('d-m-Y') }}" required>
		    			</div>
		    			<div class="col-sm-4">
		    				<input type="text" name="tgl_akhir" class="form-control date_akhir" value="{{ date('d-m-Y') }}" required>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Jenis Mutasi</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="jenis" id="jenis_gudangcorakmulti">
		    					<option value="1">Per Barang</option>
		    					<option value="2">Mutasi</option>
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group pull-right">
		    			<button class="btn btn-primary" type="submit">Cetak</button>
		    			<button class="btn btn-success" type="button" id="excel_gudangcorakmulti"><i class="icon-file-excel position-left"></i>Cetak</button>
		    		</div>
		    	</form>
		    </div>
		    
			</div>
	</div>

	</div>

	<div class="col-sm-12">
		
		<div class="col-sm-4">
			<div class="panel panel-flat">
			<div class="panel-heading">
				<h5 class="panel-title">Kartu Stok Mutasi Gudang Tenun</h5>
				<div class="heading-elements">
					<ul class="icons-list">
			      		<li><a data-action="collapse"></a></li>
			      	</ul>
		       	</div>
		    </div>
		    <div class="panel-body">
		    	<form class="form-horizontal" id="form_gudangtenun" method="get" action="{{ url('laporanproduksi/mutasitenun') }}" target="_blank" autocomplete="off">
		    		<input type="hidden" name="id_kategoribarang" value="5">
		    		<input type="hidden" name="id_corak" value="0">
		    		<input type="hidden" name="is_exceltenun" id="is_exceltenun" value="0">
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Kategori Barang</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_kategoribarang" id="id_kategoribarang_tenun">
		    					<option value=""> -- Pilih Kategori -- </option>
		    					@foreach($data['kategori']->get() as $b)
		    					<option value="{{$b->id_kb}}" inisial="{{$b->inisial}}" nama="{{$b->nama}}">{{$b->nama}}</option>
		    					@endforeach
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Nama Barang</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_barang" id="id_barang_tenun">
		    					<option value="">Semua Benang</option>
		    					@php
		    					foreach($data['barang']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id }}">{{ $b->nama_kategori." - ".$b->nama_sub." - ".$b->kode_barang." - ".$b->nama_barang }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Proses</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_proses">
		    					<option value="">Semua Proses</option>
		    					@php
		    					foreach($data['proses_tenun']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id_proses }}">{{ $b->nama_proses }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>		    				
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Gudang</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_gudang" id="id_gudangtenun">
		    					<option value=""> -- Pilih Gudang -- </option>
		    					@php
		    					foreach($data['gudang']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id_gudang }}">{{ $b->nama_gudang }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Lokasi</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_lokasi" id="id_lokasitenun">
		    					@php
		    					foreach($data['lokasi']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id_lokasi }}">{{ $b->nama_lokasi }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">No.Order</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_workorder_barang">
		    					<option value=""> -- Pilih No.Order -- </option>
		    					@foreach($data['workorder']->get() as $b)
		    					<option value="{{ $b->id_workorder_barang}}">{{ $b->no_workorder }}</option>
		    					@endforeach
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Nama Motif</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_motif">
		    					<option value="">Semua Motif</option>
		    					@foreach($data['motif']->get() as $b)
		    					<option value="{{$b->id_motif}}">{{$b->nama_motif}}</option>
		    					@endforeach
		    				</select>
		    			</div>
		    		</div>
		    		{{-- <div class="form-group">
		    			<label class="control-label col-sm-4">Pick</label>
		    			<div class="col-sm-8">
		    				<input type="text" name="pick" class="form-control number-only" placeholder="Pick">
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Lebar</label>
		    			<div class="col-sm-8">
		    				<input type="text" name="lebar" class="form-control number-only" placeholder="Lebar">
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Panjang</label>
		    			<div class="col-sm-8">
		    				<input type="text" name="panjang" class="form-control number-only" placeholder="panjang">
		    			</div>
		    		</div> --}}
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Warna</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_warnatenun">
		    					<option value="">Semua Warna</option>
		    					@php
		    					foreach($data['warna']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id_komposisi }}">{{ $b->nama." ( ".$b->inisial." )" }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Kualitas Tenun</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_kualitas">
		    					<option value=""> -- Pilih Kualitas Tenun  -- </option>
		    					@foreach($data['kualitas_tenun']->get() as $b )
		    					<option value="{{$b->id_kualitas}}">{{$b->nama_kualitas}}</option>
		    					@endforeach
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Tanggal</label>
		    			<div class="col-sm-4">
		    				<input type="text" name="tgl_awal" class="form-control date_awal" value="{{ date('d-m-Y') }}" required>
		    			</div>
		    			<div class="col-sm-4">
		    				<input type="text" name="tgl_akhir" class="form-control date_akhir" value="{{ date('d-m-Y') }}" required>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Jenis Mutasi</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="jenis" id="jenis_gudangtenun">
		    					<option value="1">Per-Barang</option>
		    					<option value="2">Mutasi</option>
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group pull-right">
		    			<button class="btn btn-primary" type="submit">Cetak</button>
		    			<button class="btn btn-success" type="button" id="excel_gudangtenun"><i class="icon-file-excel position-left"></i>Cetak</button>
		    		</div>
		    	</form>
		    </div>
		    
		</div>
		</div>

		<div class="col-sm-4">
			<div class="panel panel-flat">
			<div class="panel-heading">
				<h5 class="panel-title">Laporan Mutasi Setelah Tenun</h5>
				<div class="heading-elements">
					<ul class="icons-list">
			      		<li><a data-action="collapse"></a></li>
			      	</ul>
		       	</div>
		    </div>
		    <div class="panel-body">
		    	<form class="form-horizontal" id="form_multi" method="get" action="{{ url('laporanproduksi/mutasimulti') }}" target="_blank" autocomplete="off">
		    		<!-- <input type="hidden" name="jenis" value="1">		    		 -->
		    		<input type="hidden" name="id_kategoribarang" value="5">
		    		<input type="hidden" name="id_motif" value="0">
		    		<input type="hidden" name="is_excelmulti" id="is_excelmulti" value="0">
		    		<!-- <input type="hidden" name="id_warna" value="0"> -->
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Kategori Barang</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_kategoribarang" id="id_kategoribarang_multi">
		    					<option value=""> -- Pilih Kategori -- </option>
		    					@foreach($data['kategori']->get() as $b)
		    					<option value="{{$b->id_kb}}" inisial="{{$b->inisial}}" nama="{{$b->nama}}">{{$b->nama}}</option>
		    					@endforeach
		    				</select>
		    			</div>
		    		</div>	
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Nama Barang</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_barangmulti" id="id_barang_multi">
		    					<option value="">Semua Barang</option>
		    					@php
		    					foreach($data['barang']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id }}">{{ $b->nama_kategori." - ".$b->nama_sub." - ".$b->kode_barang." - ".$b->nama_barang }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Proses</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_prosesmulti">
		    					<option value="" selected="">Semua Proses</option>
		    					@php
		    					foreach($data['proses_multi']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id_proses }}">{{ $b->nama_proses }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>		    				
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Gudang</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_gudangmulti" id="id_gudangmulti">
		    					<option value=""> -- Pilih Gudang -- </option>
		    					@php
		    					foreach($data['gudang']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id_gudang }}">{{ $b->nama_gudang }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Lokasi</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_lokasimulti" id="id_lokasimulti">
		    					@php
		    					foreach($data['lokasi']->get() as $b){
		    					@endphp
		    					<option value="{{ $b->id_lokasi }}">{{ $b->nama_lokasi }}</option>
		    					@php
		    					}
		    					@endphp
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Nama Motif</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_motifmulti">
		    					<option value="">Semua Motif</option>
		    					@foreach($data['motif']->get() as $b)
		    					<option value="{{$b->id_motif}}">{{$b->nama_motif}}</option>
		    					@endforeach
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Kualitas</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="id_kualitasmulti">
		    					<option value="">Semua Kualitas</option>
		    					<option value="0">Baik</option>
		    					<option value="1">BS</option>
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Tanggal</label>
		    			<div class="col-sm-4">
		    				<input type="text" name="tgl_awalmulti" class="form-control date_awal" value="{{ date('d-m-Y') }}" required>
		    			</div>
		    			<div class="col-sm-4">
		    				<input type="text" name="tgl_akhirmulti" class="form-control date_akhir" value="{{ date('d-m-Y') }}" required>
		    			</div>
		    		</div>
		    		<div class="form-group">
		    			<label class="control-label col-sm-4">Jenis Mutasi</label>
		    			<div class="col-sm-8">
		    				<select class="form-control select-search" name="jenis_multi" id="jenis_multi">
		    					<option value="1">Per Barang</option>
		    					<option value="2">Mutasi</option>
		    				</select>
		    			</div>
		    		</div>
		    		<div class="form-group pull-right">
		    			<button class="btn btn-primary" type="submit">Cetak</button>
		    			<button class="btn btn-success" type="button" id="excel_multi"><i class="icon-file-excel position-left"></i>Cetak</button>
		    		</div>
		    	</form>
		    </div>
		    
			</div>
		</div>

	</div>
	

	
</div>


</form>

<script type="text/javascript">
	$(document).ready(function(){

		$("#id_gudang_mutasi").val('').trigger('change');

		$("[name=id_pegawai_hasil]").val(0).trigger('change');

		$("#id_pegawai_bon").val(0).trigger('change');
		$("#id_pegawai_proses").val(0).trigger('change');
	//	disabled('[name=id_rekanan_hasil]', true);

		$("#jenis_gudangwarna").val('1').trigger('change');
		$("#jenis_gudangcorak").val('1').trigger('change');
		$("#jenis_gudangcorakmulti").val('1').trigger('change');
		$("#jenis_gudangtenun").val('1').trigger('change');
		$("#jenis_multi").val('1').trigger('change');
	})

	$("#id_gudang_mutasi").change(function(){
		if($(this).val() != ''){
			disabled('#id_lokasi_mutasi', true);
		}else{
			disabled('#id_lokasi_mutasi', false);
		}
	})

	$("#id_lokasi_mutasi").change(function(){
		if($(this).val() != ''){
			disabled('#id_gudang_mutasi', true);
		}else{
			disabled('#id_gudang_mutasi', false);
		}
	})

	$("[name=id_gudang_corak]").change(function(){
		if($(this).val() != ''){
			disabled('[name=id_lokasi_corak]', true);
		}else{
			disabled('[name=id_lokasi_corak]', false);
		}
	})

	$("[name=id_lokasi_corak]").change(function(){
		if($(this).val() != ''){
			disabled('[name=id_gudang_corak]', true);
		}else{
			disabled('[name=id_gudang_corak]', false);
		}
	})

	$("[name=id_pegawai_proses]").change(function(){
		if($(this).val() != ''){
			disabled('[name=id_rekanan_proses]', true);
			// $('[name=id_rekanan_proses]').attr('required', false);

			disabled('[name=id_makelar_proses]', true);
			$('[name=id_makelar_proses]').attr('required', false);
			disabled('[name=id_mesin_proses]', true);
			$('[name=id_mesin_proses]').attr('required', false);
		}else{
			disabled('[name=id_rekanan_proses]', false);
			// $('[name=id_rekanan_proses]').attr('required', true);

			disabled('[name=id_makelar_proses]', false);
			$('[name=id_makelar_proses]').attr('required', true);

			disabled('[name=id_mesin_proses]', false);
			$('[name=id_mesin_proses]').attr('required', true);
		}
	})

	$("[name=id_makelar_proses]").change(function(){
		if($(this).val() != ''){
			disabled('[name=id_pegawai_proses]', true);
			$('[name=id_pegawai_proses]').attr('required', false);

			disabled('[name=id_mesin_proses]', true);
			$('[name=id_mesin_proses]').attr('required', false);
		}else{
			disabled('[name=id_pegawai_proses]', false);
			$('[name=id_pegawai_proses]').attr('required', true);

			disabled('[name=id_mesin_proses]', false);
			$('[name=id_mesin_proses]').attr('required', true);
		}
	})


	$("[name=id_mesin_proses]").change(function(){
		if($(this).val() != ''){
			disabled('[name=id_pegawai_proses]', true);
			$('[name=id_pegawai_proses]').attr('required', false);

			disabled('[name=id_makelar_proses]', true);
			$('[name=id_makelar_proses]').attr('required', false);
			disabled('[name=id_rekanan_proses]', true);
			
		}else{
			disabled('[name=id_pegawai_proses]', false);
			$('[name=id_pegawai_proses]').attr('required', true);

			disabled('[name=id_makelar_proses]', false);
			$('[name=id_makelar_proses]').attr('required', true);

			disabled('[name=id_rekanan_proses]', false);
			
		}
	})

	$("[name=id_pegawai_hasil]").change(function(){
		if($(this).val() != ''){
			disabled('[name=id_rekanan_hasil]', true);
			disabled('[name=id_makelar_hasil]', true);
			$('#id_makelar_hasil').attr('required', false);
			disabled('[name=id_mesin_hasil]', true);
			$('#id_mesin_hasil').attr('required', false);
		}else{
			disabled('[name=id_rekanan_hasil]', false);
			disabled('[name=id_makelar_hasil]', false);
			$('#id_makelar_hasil').attr('required', true);
			disabled('[name=id_mesin_hasil]', false);
			$('#id_mesin_hasil').attr('required', true);
		}
	})

	$("#id_makelar_hasil").change(function(){
		if($(this).val() != ''){
			disabled('#id_pegawai_hasil', true);
			$('#id_pegawai_hasil').attr('required', false);
			disabled('#id_mesin_hasil', true);
			$('#id_mesin_hasil').attr('required', false);
		}else{
			disabled('#id_pegawai_hasil', false);
			$('#id_pegawai_hasil').attr('required', true);
			disabled('#id_mesin_hasil', false);
			$('#id_mesin_hasil').attr('required', true);
		}
	})

	$("#id_mesin_hasil").change(function(){
		if($(this).val() != ''){
			disabled('#id_pegawai_hasil', true);
			$('#id_pegawai_hasil').attr('required', false);
			disabled('#id_rekanan_hasil', true);
			$('#id_rekanan_hasil').attr('required', false);
			disabled('#id_makelar_hasil', true);
			$('#id_makelar_hasil').attr('required', false);
		}else{
			disabled('#id_pegawai_hasil', false);
			$('#id_pegawai_hasil').attr('required', true);
			disabled('#id_rekanan_hasil', false);
			$('#id_rekanan_hasil').attr('required', true);
			disabled('#id_makelar_hasil', false);
			$('#id_makelar_hasil').attr('required', true);
		}
	})

	// $("[name=id_rekanan_hasil]").change(function(){
	// 	if($(this).val() != ''){
	// 		disabled('[name=id_pegawai_hasil]', true);
	// 		$('[name=id_pegawai_hasil]').attr('required', false);
	// 	}else{
	// 		disabled('[name=id_pegawai_hasil]', false);
	// 		$('[name=id_pegawai_hasil]').attr('required', true);
	// 	}
	// })

	$("#id_pegawai_bon").change(function(){
		if($(this).val() != ''){
			disabled('#id_rekanan_bon', true);
			disabled('[name=id_makelar_bon]', true);
			$('#id_makelar_bon').attr('required', false);
			disabled('[name=id_mesin_bon]', true);
			$('#id_mesin_bon').attr('required', false);
		}else{
			disabled('#id_rekanan_bon', false);
			disabled('[name=id_makelar_bon]', false);
			$('#id_makelar_bon').attr('required', true);
			disabled('[name=id_mesin_bon]', false);
			$('#id_mesin_bon').attr('required', true);
		}
	})

	$("#id_makelar_bon").change(function(){
		if($(this).val() != ''){
			disabled('#id_pegawai_bon', true);
			$('#id_pegawai_bon').attr('required', false);
			disabled('#id_mesin_bon', true);
			$('#id_mesin_bon').attr('required', false);
		}else{
			disabled('#id_pegawai_bon', false);
			$('#id_pegawai_bon').attr('required', true);
			disabled('#id_mesin_bon', false);
			$('#id_mesin_bon').attr('required', true);
		}
	})

	$("#id_mesin_bon").change(function(){
		if($(this).val() != ''){
			disabled('#id_pegawai_bon', true);
			$('#id_pegawai_bon').attr('required', false);
			disabled('#id_makelar_bon', true);
			$('#id_makelar_bon').attr('required', false);
		}else{
			disabled('#id_pegawai_bon', false);
			$('#id_pegawai_bon').attr('required', true);
			disabled('#id_makelar_bon', false);
			$('#id_makelar_bon').attr('required', true);
		}
	})

	$("#id_gudang_mutasi1").change(function(){
		if($(this).val() != ''){
			disabled('#id_lokasi_mutasi1', true);
		}else{
			disabled('#id_lokasi_mutasi1', false);
		}
	})

	$("#id_lokasi_mutasi1").change(function(){
		if($(this).val() != ''){
			disabled('#id_gudang_mutasi1', true);
		}else{
			disabled('#id_gudang_mutasi1', false);
		}
	})

	$("#id_gudangcorak1").change(function(){
		if($(this).val() != ''){
			disabled('#id_lokasicorak1', true);
		}else{
			disabled('#id_lokasicorak1', false);
		}
	})

	$("#id_lokasicorak1").change(function(){
		if($(this).val() != ''){
			disabled('#id_gudangcorak1', true);
		}else{
			disabled('#id_gudangcorak1', false);
		}
	})

	$("#id_gudangcorak2").change(function(){
		if($(this).val() != ''){
			disabled('#id_lokasicorak2', true);
		}else{
			disabled('#id_lokasicorak2', false);
		}
	})

	$("#id_lokasicorak2").change(function(){
		if($(this).val() != ''){
			disabled('#id_gudangcorak2', true);
		}else{
			disabled('#id_gudangcorak2', false);
		}
	})

	$("#id_gudangtenun").change(function(){
		if($(this).val() != ''){
			disabled('#id_lokasitenun', true);
		}else{
			disabled('#id_lokasitenun', false);
		}
	})

	$("#id_lokasitenun").change(function(){
		if($(this).val() != ''){
			disabled('#id_gudangtenun', true);
		}else{
			disabled('#id_gudangtenun', false);
		}
	})

	$("#id_gudangmulti").change(function(){
		if($(this).val() != ''){
			disabled('#id_lokasimulti', true);
		}else{
			disabled('#id_lokasimulti', false);
		}
	})

	$("#id_lokasimulti").change(function(){
		if($(this).val() != ''){
			disabled('#id_gudangmulti', true);
		}else{
			disabled('#id_gudangmulti', false);
		}
	})

	$("#id_gudang_bom").change(function(){
		if($(this).val() != ''){
			disabled('#id_lokasi_bom', true);
		}else{
			disabled('#id_lokasi_bom', false);
		}
	})

	$("#id_lokasi_bom").change(function(){
		if($(this).val() != ''){
			disabled('#id_gudang_bom', true);
		}else{
			disabled('#id_gudang_bom', false);
		}
	})

	$("[id=id_kategoribarang_rekap]").change(function(){
		var id = $(this).val();
		var nama = $("[id=id_kategoribarang_rekap] :selected").attr('nama');
		var inisial = $("[id=id_kategoribarang_rekap] :selected").attr('inisial');
		if(id != ''){
		var jenis = 1;
			get_barang_rekap(id, nama, jenis);
		}else{
			get_barang_rekap(id, nama);
		}
	})

	$("[id=id_kategoribarang_gudang]").change(function(){
		var id = $(this).val();
		var nama = $("[id=id_kategoribarang_gudang] :selected").attr('nama');
		var inisial = $("[id=id_kategoribarang_gudang] :selected").attr('inisial');
		if(id != ''){
		var jenis = 1;
			get_barang_gudang(id, nama, jenis);
		}else{
			get_barang_gudang(id, nama);
		}
	})

	$("[id=id_kategoribarang_multi]").change(function(){
		var id = $(this).val();
		var nama = $("[id=id_kategoribarang_multi] :selected").attr('nama');
		var inisial = $("[id=id_kategoribarang_multi] :selected").attr('inisial');
		if(id != ''){
		var jenis = 1;
			get_barang_bykat(id, nama, jenis, "id_barang_multi");
		}else{
			get_barang_bykat(id, nama, 0, "id_barang_multi");
		}
	})

	$("[id=id_kategoribarang_tenun]").change(function(){
		var id = $(this).val();
		var nama = $("[id=id_kategoribarang_tenun] :selected").attr('nama');
		var inisial = $("[id=id_kategoribarang_tenun] :selected").attr('inisial');
		if(id != ''){
		var jenis = 1;
			get_barang_bykat(id, nama, jenis, "id_barang_tenun");
		}else{
			get_barang_bykat(id, nama, 0, "id_barang_tenun");
		}
	})

	$("[id=id_kategori_proses]").change(function(){
		var id = $(this).val();
		var nama = $("[id=id_kategori_proses] :selected").attr('nama');
		var inisial = $("[id=id_kategori_proses] :selected").attr('inisial');
		if(id != ''){
		var jenis = 1;
			get_barang_bykat(id, nama, jenis, "id_barang_proses");
		}else{
			get_barang_bykat(id, nama, 0, "id_barang_proses");
		}
	})

	$("#id_makelar_tenun").change(function(){
		var id = $(this).val();
		var makelar = $("#id_makelar_tenun :selected").attr("nama");

		get_rekanan_bykat(id, makelar, "id_rekanan_tenun");
	})

	$("#id_makelar_bom").change(function(){
		var id = $(this).val();
		var makelar = $("#id_makelar_bom :selected").attr("nama");

		get_rekanan_bykat(id, makelar, "id_rekanan_bom");
	})

	$("#id_makelar_proses").change(function(){
		var id = $(this).val();
		var makelar = $("#id_makelar_proses :selected").attr("nama");

		get_rekanan_bykat(id, makelar, "id_rekanan_proses");
	})

	$("#id_makelar_bon").change(function(){
		var id = $(this).val();
		var makelar = $("#id_makelar_bon :selected").attr("nama");

		get_rekanan_bykat(id, makelar, "id_rekanan_bon");
	})

	$("#id_makelar_hasil").change(function(){
		var id = $(this).val();
		var makelar = $("#id_makelar_hasil :selected").attr("nama");

		get_rekanan_bykat(id, makelar, "id_rekanan_hasil");
	})

	$("#jenis_gudangwarna").change(function(){
		var id = $(this).val();
		if(id == 2){
			$("#excel_gudangwarna").show();
		}else{
			$("#excel_gudangwarna").hide();
		}
	})

	$("#jenis_gudangcorak").change(function(){
		var id = $(this).val();
		if(id == 2){
			$("#excel_gudangcorak").show();
		}else{
			$("#excel_gudangcorak").hide();
		}
	})

	$("#jenis_gudangcorakmulti").change(function(){
		var id = $(this).val();
		if(id == 2){
			$("#excel_gudangcorakmulti").show();
		}else{
			$("#excel_gudangcorakmulti").hide();
		}
	})

	$("#jenis_gudangtenun").change(function(){
		var id = $(this).val();
		if(id == 2){
			$("#excel_gudangtenun").show();
		}else{
			$("#excel_gudangtenun").hide();
		}
	})

	$("#jenis_multi").change(function(){
		var id = $(this).val();
		if(id == 2){
			$("#excel_multi").show();
		}else{
			$("#excel_multi").hide();
		}
	})

	$("[name=id_proses_bon]").change(function(){
		var id_proses = $(this).val();

		if(id_proses == '37'){
			$("[name=id_jenis_bon]").append("<option value='4'>Pengeluaran Beam Per Pemroses</option>");
			$("[name=id_jenis_bon]").append("<option value='5'>Pengeluaran Beam / Pakan Per Pemroses</option>");
		}else{
			var jum = $("[name=id_jenis_bon] option[value='4']");
			var jum_5 = $("[name=id_jenis_bon] option[value='5']");
			jum.remove();
			jum_5.remove();
		}
	})


	function get_barang_rekap(id, nama, jenis=0){
		$.ajax({
			url: "{{ url('laporanproduksi/get_barang') }}",
			type: 'post',
			dataType: 'json',
			data: {id : id, nama : nama, jenis : jenis},
			headers : {
					'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
				},
			success: function(result){				
				if(result.status == 1){
					$("[id=id_barang_rekap]").html('');
					$("[id=id_barang_rekap]").append('<option value="" kode="">Semua '+nama+'</option>');
					for(i in result.data){
						$("[id=id_barang_rekap]").append('<option value="'+result.data[i].id+'">'+result.data[i].nama_kategori+' - '+result.data[i].nama_sub+' - '+result.data[i].kode_barang+' - '+result.data[i].nama_barang+'</option>');
					}
				}else if(result.status == 2){
					$("[id=id_barang_rekap]").html('');
					$("[id=id_barang_rekap]").append('<option value="" kode="">Semua Barang</option>');
					for(i in result.data){
						$("[id=id_barang_rekap]").append('<option value="'+result.data[i].id+'">'+result.data[i].nama_kategori+' - '+result.data[i].nama_sub+' - '+result.data[i].kode_barang+' - '+result.data[i].nama_barang+'</option>');
					}
				}else{
					$("[id=id_barang_rekap]").html('');
					$("[id=id_barang_rekap]").append('<option value="" kode="">Data Barang Kosong</option>');
				}
			}
		})
	}


	function get_barang_gudang(id, nama, jenis=0){
		$.ajax({
			url: "{{ url('laporanproduksi/get_barang') }}",
			type: 'post',
			dataType: 'json',
			data: {id : id, nama : nama, jenis : jenis},
			headers : {
					'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
				},
			success: function(result){				
				if(result.status == 1){
					$("[id=id_barang_gudang]").html('');
					$("[id=id_barang_gudang]").append('<option value="" kode="">Semua '+nama+'</option>');
					for(i in result.data){
						$("[id=id_barang_gudang]").append('<option value="'+result.data[i].id+'">'+result.data[i].nama_kategori+' - '+result.data[i].nama_sub+' - '+result.data[i].kode_barang+' - '+result.data[i].nama_barang+'</option>');
					}
				}else if(result.status == 2){
					$("[id=id_barang_gudang]").html('');
					$("[id=id_barang_gudang]").append('<option value="" kode="">Semua Barang</option>');
					for(i in result.data){
						$("[id=id_barang_gudang]").append('<option value="'+result.data[i].id+'">'+result.data[i].nama_kategori+' - '+result.data[i].nama_sub+' - '+result.data[i].kode_barang+' - '+result.data[i].nama_barang+'</option>');
					}
				}else{
					$("[id=id_barang_gudang]").html('');
					$("[id=id_barang_gudang]").append('<option value="" kode="">Data Barang Kosong</option>');
				}
			}
		})
	}

	function get_barang_bykat(id, nama, jenis=0, id_elemen){
		$.ajax({
			url: "{{ url('laporanproduksi/get_barang') }}",
			type: 'post',
			dataType: 'json',
			data: {id : id, nama : nama, jenis : jenis},
			headers : {
					'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
				},
			success: function(result){				
				if(result.status == 1){
					$("[id="+id_elemen+"]").html('');
					$("[id="+id_elemen+"]").append('<option value="" kode="">Semua '+nama+'</option>');
					for(i in result.data){
						$("[id="+id_elemen+"]").append('<option value="'+result.data[i].id+'">'+result.data[i].nama_kategori+' - '+result.data[i].nama_sub+' - '+result.data[i].kode_barang+' - '+result.data[i].nama_barang+'</option>');
					}
				}else if(result.status == 2){
					$("[id="+id_elemen+"]").html('');
					$("[id="+id_elemen+"]").append('<option value="" kode="">Semua Barang</option>');
					for(i in result.data){
						$("[id="+id_elemen+"]").append('<option value="'+result.data[i].id+'">'+result.data[i].nama_kategori+' - '+result.data[i].nama_sub+' - '+result.data[i].kode_barang+' - '+result.data[i].nama_barang+'</option>');
					}
				}else{
					$("[id="+id_elemen+"]").html('');
					$("[id="+id_elemen+"]").append('<option value="" kode="">Data Barang Kosong</option>');
				}
			}
		})
	}

	function get_rekanan_bykat(id_makelar, nama_makelar, id_elemen){
		$.ajax({
			url: "{{ url('laporanproduksi/get_bymakelar') }}",
			type: 'get',
			data: {id_makelar : id_makelar},
			success : function(respon){
				if(respon.length > 0){
					$("#"+id_elemen+"").html("");
					$("#"+id_elemen+"").append('<option value="">Semua Petenun</option>');
					for(i in respon){
						var nama_rekanan = '';
						if(respon[i].nama !== null){
							nama_rekanan = respon[i].nama;
						}
						$("#"+id_elemen+"").append('<option value="'+respon[i].id_rekanan+'">'+nama_rekanan+' - '+respon[i].nama_rekanan+'</option>');
					}
				}else{
					$("#"+id_elemen+"").html("");
					$("#"+id_elemen+"").append('<option value="">Tidak Ada Petenun</option>');
				}
			}
		})
	}

	$("#excel_rekapgudang").click(function(){

		$("#is_excelrekapgudang").val(1);
		$("#form_rekapgudang").submit();

		$("#is_excelrekapgudang").val(0);
	})

	$("#excel_gudangwarna").click(function(){
		$("#is_excelgudangwarna").val(1);
		$("#form_gudangwarna").submit();

		$("#is_excelgudangwarna").val(0);
	})

	$("#excel_gudangcorak").click(function(){
		$("#is_excelgudangcorak").val(1);
		$("#form_gudangcorak").submit();

		$("#is_excelgudangcorak").val(0);
	})

	$("#excel_gudangcorakmulti").click(function(){
		$("#is_excelgudangcorakmulti").val(1);
		$("#form_gudangcorakmulti").submit();

		$("#is_excelgudangcorakmulti").val(0);
	})

	$("#excel_gudangtenun").click(function(){
		$("#is_exceltenun").val(1);
		$("#form_gudangtenun").submit();

		$("#is_exceltenun").val(0);
	})

	$("#excel_multi").click(function(){
		$("#is_excelmulti").val(1);
		$("#form_multi").submit();

		$("#is_excelmulti").val(0);
	})
	

</script>
@endsection