@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> Pembelian</a></li>
			<li class="active">Surat Perintah kerja</li>
		</ul>
	</div>
</div>

<div class="content">
	<div class="panel panel-flat">
		<div class="panel-heading">
			<h5 class="panel-title">Form Input Surat Perintah Kerja</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" action="{{ url('workorder/simpan')}}" method="post" autocomplete="off">
	    	<input type="hidden" name="_token" value="{{ csrf_token() }}">
	    	<input type="hidden" name="id_workorder" value="{{ $data['data']['id_workorder']}}">
	    	<div class="col-sm-6">
	    		<div class="form-group">
	    			<label class="control-label col-sm-4">Nomor.</label>
	    			<div class="col-sm-8">
	    				<input type="text" class="form-control" name="nomor" value="{{($data['data']['nomor'] == '') ? $data['no_auto']:$data['data']['nomor']}}" readonly="">
	    			</div>
	    		</div>
	    		<div class="form-group">
	    			<label class="control-label col-sm-4">Tanggal </label>
	    			<div class="col-sm-8">
	    				<input type="text" class="form-control datepicker" name="tanggal" value="{{ ($data['data']['tanggal'] == '') ? date('d-m-Y'):$data['data']['tanggal'] }}" placeholder="Masukan Tanggal" required="">
	    			</div>
	    		</div>
	    		<div class="form-group">
	    			<label class="control-label col-sm-4">Barang </label>
	    			<div class="col-sm-8">
	    				<select class="form-control select-search" name="id_barang">
	    					<option value="">--- Pilih Barang ---</option>
	    					@php $sel = $data['data']['barang'];
	    					foreach($data['barang'] as $d){@endphp
	    					<option value="{{$d->id}}" {{ ($d->id == $sel) ? "selected":"" }} >{{$d->nama_kategori.' - '.$d->nama_sub.' - '.$d->kode_barang.' - '.$d->nama_barang }}</option>
	    					@php } @endphp
	    				</select>
	    			</div>
	    		</div>
	    		<div class="form-group">
	    			<label class="control-label col-sm-4">Jenis Produksi </label>
	    			<div class="col-sm-8">
	    				<select class="form-control select-search" name="id_jenis">
	    					<option value="">--- Pilih Jenis ---</option>
	    					@php $sel = $data['data']['jenis'];
	    					foreach($data['produksi'] as $d){@endphp
	    					<option value="{{$d->id_lokasi}}" {{ ($d->id_lokasi == $sel) ? "selected":"" }} >{{ $d->nama_lokasi }}</option>
	    					@php } @endphp
	    				</select>
	    			</div>
	    		</div>	    		
	    	</div>
	    	<div class="panel panel-primary col-sm-12"></div>
	    	
	    	
	    
        	<div class="col-sm-12 form-group">
        	<h5 class="panel-title">Detail Order</h5>
        		<br>
        		<button href="#" class="btn btn-success" style="margin-bottom: 1%;" id="btn_tambah_item" type="button">Tambah</button>
        	</div>
            <div class="col-sm-12 table-responsive">
            <table class="table datatable-basic table-stripped table_barang">
	    	<thead>
				<tr>
					<th rowspan="2">No</th>
					<th rowspan="2"></th>
					<th rowspan="2">No.Order</th>
					<th rowspan="2">Motif</th>
					<th rowspan="2">Tgl Celup</th>
                    <th rowspan="2">HB</th>
                    <th rowspan="2">JML BOOM</th>
                    <th colspan="11" align="text-center" width="200px">Warna</th>
                    <th colspan="3" align="text-center" width="300px">Warna Kombinasi</th>
                    <th colspan="4" align="text-center" width="400px">Warna Kluwungan</th>
                    <th colspan="3" align="text-center" width="300px">Timbulan</th>
                    <th colspan="15" align="text-center" width="400px">Warna Songketan</th>
                    <th colspan="2" align="text-center" width="200px">Warna Pancingan</th>
                    <th colspan="3" align="text-center" width="300px">Warna Gunungan Atas</th>
                    <th colspan="3" align="text-center" width="300px">Warna Gunungan  Bawah</th>
                    <th colspan="2" align="text-center" width="200px">Garis-garis</th>
                    <th colspan="2" align="text-center">Tgl Setor</th>
					<th rowspan="2" class="text-center">Aksi</th>
				</tr>
				<tr>
					<th width="100px">DSR 1</th>
					<th width="100px">DSR 2</th>
					<th width="100px">DSR 3</th>
					<th width="100px">DSR 4</th>
					<th width="100px">DSR 5</th>
					<th width="100px">DSR 6</th>
					<th width="100px">DSR 7</th>
					<th width="100px">DSR 8</th>
					<th width="100px">DSR 9</th>
					<th width="100px">DSR 10</th>
					<th width="100px">Streep</th>
					<th width="100px">WRN 1</th>
					<th width="100px">WRN 2</th>
					<th width="100px">WRN 3</th>
					<th width="100px">KLW 1</th>
					<th width="100px">KLW 2</th>
					<th width="100px">KLW 3</th>
					<th width="100px">KLW 4</th>
					<th width="100px">TMB 1</th>
					<th width="100px">TMB 2</th>
					<th width="100px">TMB 3</th>
					<th width="100px">SKT 1</th>
					<th width="100px">SKT 2</th>
					<th width="100px">SKT 3</th>
					<th width="100px">SKT 4</th>
					<th width="100px">SKT 5</th>
					<th width="100px">SKT 6</th>
					<th width="100px">SKT 7</th>
					<th width="100px">SKT 8</th>
					<th width="100px">SKT 9</th>
					<th width="100px">SKT 10</th>
					<th width="100px">SKT 11</th>
					<th width="100px">SKT 12</th>
					<th width="100px">SKT 13</th>
					<th width="100px">SKT 14</th>
					<th width="100px">SKT 15</th>
					<th width="100px">PNC 1</th>
					<th width="100px">PNC 2</th>
					<th width="100px">GN 1</th>
					<th width="100px">Gn 2</th>
					<th width="100px">GN 3</th>
					<th width="100px">GN 1</th>
					<th width="100px">Gn 2</th>
					<th width="100px">GN 3</th>
					<th width="100px">GRS 1</th>
					<th width="100px">GRS 2</th>
					<th width="100px">Boom</th>
					<th width="100px">Pakan</th>
				</tr>
				<tr>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
					<td width="100px"><input type="text" name="dasar_jumlah" value="{{ $data['data']['dasar_jumlah']}}" class="form-control"> <select name="dasar_satuan" class="form-control">
						@php $sel = $data['data']['dasar_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
						<option></option>
					</select></td>
					<td width="100px"><input type="text" name="dasar2_jumlah" value="{{ $data['data']['dasar2_jumlah']}}" class="form-control"> <select name="dasar2_satuan" class="form-control">
						@php $sel = $data['data']['dasar2_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
						<option></option>
					</select></td>
					<td width="100px"><input type="text" name="dasar3_jumlah" value="{{ $data['data']['dasar3_jumlah']}}" class="form-control"> <select name="dasar3_satuan" class="form-control">
						@php $sel = $data['data']['dasar3_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
						<option></option>
					</select></td>
					<td width="100px"><input type="text" name="dasar4_jumlah" value="{{ $data['data']['dasar4_jumlah']}}" class="form-control"> <select name="dasar4_satuan" class="form-control">
						@php $sel = $data['data']['dasar4_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
						<option></option>
					</select></td>
					<td width="100px"><input type="text" name="dasar5_jumlah" value="{{ $data['data']['dasar5_jumlah']}}" class="form-control"> <select name="dasar5_satuan" class="form-control">
						@php $sel = $data['data']['dasar5_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
						<option></option>
					</select></td>
					<td width="100px"><input type="text" name="dasar6_jumlah" value="{{ $data['data']['dasar6_jumlah']}}" class="form-control"> <select name="dasar6_satuan" class="form-control">
						@php $sel = $data['data']['dasar6_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
						<option></option>
					</select></td>
					<td width="100px"><input type="text" name="dasar7_jumlah" value="{{ $data['data']['dasar7_jumlah']}}" class="form-control"> <select name="dasar7_satuan" class="form-control">
						@php $sel = $data['data']['dasar7_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
						<option></option>
					</select></td>
					<td width="100px"><input type="text" name="dasar8_jumlah" value="{{ $data['data']['dasar8_jumlah']}}" class="form-control"> <select name="dasar8_satuan" class="form-control">
						@php $sel = $data['data']['dasar8_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
						<option></option>
					</select></td>
					<td width="100px"><input type="text" name="dasar9_jumlah" value="{{ $data['data']['dasar9_jumlah']}}" class="form-control"> <select name="dasar9_satuan" class="form-control">
						@php $sel = $data['data']['dasar9_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
						<option></option>
					</select></td>
					<td width="100px"><input type="text" name="dasar10_jumlah" value="{{ $data['data']['dasar10_jumlah']}}" class="form-control"> <select name="dasar10_satuan" class="form-control">
						@php $sel = $data['data']['dasar10_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
						<option></option>
					</select></td>
					<td width="100px"><input type="text" name="streep_jumlah" value="{{ $data['data']['streep_jumlah']}}" class="form-control"> <select name="streep_satuan" class="form-control">
						@php $sel = $data['data']['streep_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
					</select></td>
					<td width="100px"><input type="text" name="kombinasi1_jumlah" value="{{ $data['data']['kombinasi1_jumlah']}}" class="form-control"> <select name="kombinasi1_satuan" class="form-control">
						@php $sel = $data['data']['kombinasi1_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
					</select></td>
					<td width="100px"><input type="text" name="kombinasi2_jumlah" value="{{ $data['data']['kombinasi2_jumlah']}}" class="form-control"> <select name="kombinasi2_satuan" class="form-control">
						@php $sel = $data['data']['kombinasi2_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
					</select></td>
					<td width="100px"><input type="text" name="kombinasi3_jumlah" value="{{ $data['data']['kombinasi3_jumlah']}}" class="form-control"> <select name="kombinasi3_satuan" class="form-control">
						@php $sel = $data['data']['kombinasi3_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
					</select></td>
					<td width="100px"><input type="text" name="kluwungan1_jumlah" value="{{ $data['data']['kluwungan1_jumlah']}}" class="form-control"> <select name="kluwungan1_satuan" class="form-control">
						@php $sel = $data['data']['kluwungan1_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
					</select></td>
					<td width="100px"><input type="text" name="kluwungan2_jumlah" value="{{ $data['data']['kluwungan2_jumlah']}}" class="form-control"> <select name="kluwungan2_satuan" class="form-control">
						@php $sel = $data['data']['kluwungan2_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
					</select></td>
					<td width="100px"><input type="text" name="kluwungan3_jumlah" value="{{ $data['data']['kluwungan3_jumlah']}}" class="form-control"> <select name="kluwungan3_satuan" class="form-control">
						@php $sel = $data['data']['kluwungan3_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
					</select></td>
					<td width="100px"><input type="text" name="kluwungan4_jumlah" value="{{ $data['data']['kluwungan4_jumlah']}}" class="form-control"> <select name="kluwungan4_satuan" class="form-control">
						@php $sel = $data['data']['kluwungan4_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
					</select></td>
					<td width="100px"><input type="text" name="timbulan1_jumlah" value="{{ $data['data']['timbulan1_jumlah']}}" class="form-control"> <select name="timbulan1_satuan" class="form-control">
						@php $sel = $data['data']['timbulan1_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
					</select></td>
					<td width="100px"><input type="text" name="timbulan2_jumlah" value="{{ $data['data']['timbulan2_jumlah']}}" class="form-control"> <select name="timbulan2_satuan" class="form-control">
						@php $sel = $data['data']['timbulan2_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
					</select></td>
					<td width="100px"><input type="text" name="timbulan3_jumlah" value="{{ $data['data']['timbulan3_jumlah']}}" class="form-control"> <select name="timbulan3_satuan" class="form-control">
						@php $sel = $data['data']['timbulan3_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
					</select></td>
					<td width="100px"><input type="text" name="songketan1_jumlah" value="{{ $data['data']['songketan1_jumlah']}}" class="form-control"> <select name="songketan1_satuan" class="form-control">
						@php $sel = $data['data']['songketan1_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
					</select></td>
					<td width="100px"><input type="text" name="songketan2_jumlah" value="{{ $data['data']['songketan2_jumlah']}}" class="form-control"> <select name="songketan2_satuan" class="form-control">
						@php $sel = $data['data']['songketan2_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
					</select></td>
					<td width="100px"><input type="text" name="songketan3_jumlah" value="{{ $data['data']['songketan3_jumlah']}}" class="form-control"> <select name="songketan3_satuan" class="form-control">
						@php $sel = $data['data']['songketan3_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
					</select></td>
					<td width="100px"><input type="text" name="songketan4_jumlah" value="{{ $data['data']['songketan4_jumlah']}}" class="form-control"> <select name="songketan4_satuan" class="form-control">
						@php $sel = $data['data']['songketan4_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
					</select></td>
					<td width="100px"><input type="text" name="songketan5_jumlah" value="{{ $data['data']['songketan5_jumlah']}}" class="form-control"> <select name="songketan5_satuan" class="form-control">
						@php $sel = $data['data']['songketan5_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
					</select></td>
					<td width="100px"><input type="text" name="songketan6_jumlah" value="{{ $data['data']['songketan6_jumlah']}}" class="form-control"> <select name="songketan6_satuan" class="form-control">
						@php $sel = $data['data']['songketan6_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
					</select></td>
					<td width="100px"><input type="text" name="songketan7_jumlah" value="{{ $data['data']['songketan7_jumlah']}}" class="form-control"> <select name="songketan7_satuan" class="form-control">
						@php $sel = $data['data']['songketan7_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
					</select></td>
					<td width="100px"><input type="text" name="songketan8_jumlah" value="{{ $data['data']['songketan8_jumlah']}}" class="form-control"> <select name="songketan8_satuan" class="form-control">
						@php $sel = $data['data']['songketan8_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
					</select></td>
					<td width="100px"><input type="text" name="songketan9_jumlah" value="{{ $data['data']['songketan9_jumlah']}}" class="form-control"> <select name="songketan9_satuan" class="form-control">
						@php $sel = $data['data']['songketan9_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
					</select></td>
					<td width="100px"><input type="text" name="songketan10_jumlah" value="{{ $data['data']['songketan10_jumlah']}}" class="form-control"> <select name="songketan10_satuan" class="form-control">
						@php $sel = $data['data']['songketan10_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
					</select></td>
					<td width="100px"><input type="text" name="songketan11_jumlah" value="{{ $data['data']['songketan11_jumlah']}}" class="form-control"> <select name="songketan11_satuan" class="form-control">
						@php $sel = $data['data']['songketan11_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
					</select></td>
					<td width="100px"><input type="text" name="songketan12_jumlah" value="{{ $data['data']['songketan12_jumlah']}}" class="form-control"> <select name="songketan12_satuan" class="form-control">
						@php $sel = $data['data']['songketan12_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
					</select></td>
					<td width="100px"><input type="text" name="songketan13_jumlah" value="{{ $data['data']['songketan13_jumlah']}}" class="form-control"> <select name="songketan13_satuan" class="form-control">
						@php $sel = $data['data']['songketan13_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
					</select></td>
					<td width="100px"><input type="text" name="songketan14_jumlah" value="{{ $data['data']['songketan14_jumlah']}}" class="form-control"> <select name="songketan14_satuan" class="form-control">
						@php $sel = $data['data']['songketan14_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
					</select></td>
					<td width="100px"><input type="text" name="songketan15_jumlah" value="{{ $data['data']['songketan15_jumlah']}}" class="form-control"> <select name="songketan15_satuan" class="form-control">
						@php $sel = $data['data']['songketan15_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
					</select></td>
					<td width="100px"><input type="text" name="pancingan1_jumlah" value="{{ $data['data']['pancingan1_jumlah']}}" class="form-control"> <select name="pancingan1_satuan" class="form-control">
						@php $sel = $data['data']['pancingan1_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
					</select></td>
					<td width="100px"><input type="text" name="pancingan2_jumlah" value="{{ $data['data']['pancingan2_jumlah']}}" class="form-control"> <select name="pancingan2_satuan" class="form-control">
						@php $sel = $data['data']['pancingan2_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
					</select></td>
					<td width="100px"><input type="text" name="gunungan1_atas_jumlah" value="{{ $data['data']['gunungan1_atas_jumlah']}}" class="form-control"> <select name="gunungan1_atas_satuan" class="form-control">
						@php $sel = $data['data']['gunungan1_atas_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
					</select></td>
					<td width="100px"><input type="text" name="gunungan2_atas_jumlah" value="{{ $data['data']['gunungan2_atas_jumlah']}}" class="form-control"> <select name="gunungan2_atas_satuan" class="form-control">
						@php $sel = $data['data']['gunungan2_atas_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
					</select></td>
					<td width="100px"><input type="text" name="gunungan3_atas_jumlah" value="{{ $data['data']['gunungan3_atas_jumlah']}}" class="form-control"> <select name="gunungan3_atas_satuan" class="form-control">
						@php $sel = $data['data']['gunungan3_atas_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
					</select></td>
					<td width="100px"><input type="text" name="gunungan1_bawah_jumlah" value="{{ $data['data']['gunungan1_bawah_jumlah']}}" class="form-control"> <select name="gunungan1_bawah_satuan" class="form-control">
						@php $sel = $data['data']['gunungan1_bawah_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
					</select></td>
					<td width="100px"><input type="text" name="gunungan2_bawah_jumlah" value="{{ $data['data']['gunungan2_bawah_jumlah']}}" class="form-control"> <select name="gunungan2_bawah_satuan" class="form-control">
						@php $sel = $data['data']['gunungan2_bawah_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
					</select></td>
					<td width="100px"><input type="text" name="gunungan3_bawah_jumlah" value="{{ $data['data']['gunungan3_bawah_jumlah']}}" class="form-control"> <select name="gunungan3_bawah_satuan" class="form-control">
						@php $sel = $data['data']['gunungan3_bawah_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
					</select></td>
					<td width="100px"><input type="text" name="garis1_jumlah" value="{{ $data['data']['garis1_jumlah']}}" class="form-control"> <select name="garis1_satuan" class="form-control">
						@php $sel = $data['data']['garis1_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
					</select></td>
					<td width="100px"><input type="text" name="garis2_jumlah" value="{{ $data['data']['garis2_jumlah']}}" class="form-control"> <select name="garis2_satuan" class="form-control">
						@php $sel = $data['data']['garis2_satuan'];
						foreach($data['satuan'] as $d){@endphp
							<option value="{{$d->id_satuan}}" {{ ($d->id_satuan == $sel) ? "selected":""}}>{{$d->nama_satuan}}</option>
						@php } @endphp
					</select></td>
					<td></td>
					<td></td>
					<td></td>
				</tr>
			</thead>
			<tbody id="cek_motif">
				
			</tbody>
	    </table>
        </div>
        	<div class="col-sm-12 form-group">
        	<h5 class="panel-title">Keterangan</h5>
        		<br>
        		<button href="#" class="btn btn-success" style="margin-bottom: 1%;" id="btn_tambah_ket" type="button">Tambah</button>
        	</div>
        <div class="col-sm-12">
        	<table class="table table-stripped datatable-basic table_ket">
        		<thead>
        			<tr>
        				<th>No.</th>
        				<th>Keterangan</th>
        				<th>Barang</th>
        				<th>Jumlah</th>
        				<th>Jumlah Konversi</th>
        				<th align="text-center"></th>
        			</tr>
        		</thead>
        		<tbody>
        			
        		</tbody>
        	</table>
        </div>
        <div class="col-sm-12">
        	<a href="{{url('workorder')}}" class="btn bg-warning-400">Kembali</a>
             <div class="form-group pull-right">
             	<button class="btn btn-primary">Simpan</button>
             </div>
        </div>
             </form>
	    </div>

	    
	</div>
</div>

<!---Modal--->
<div class="modal fade" id="exampleModal" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
	<div class="modal-dialog" role="document">
	    <div class="modal-content">
	    	<div class="modal-header">
	    		<h5 class="modal-title" id="exampleModalLabel">Data</h5>
	    		<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">&times;</span></button>
	      	</div>
	      	<div class="modal-body">
	      		<form class="form-horizontal" autocomplete="off">
	      			<input type="hidden" name="popup_id_table">
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Motif</label>
	      				<div class="col-sm-8">
	      					<!-- <input type="text" name="popup_motif" class="form-control"> -->
	      					<select class="form-control select-search" name="popup_motif">
	      						
	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">No. Order</label>
	      				<div class="col-sm-8">
	      					<input type="text" name="popup_order" class="form-control" readonly="">
	      					
	      				</div>
	      			</div>	      			
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Tgl Celup</label>
	      				<div class="col-sm-8">
	      					<input type="text" name="popup_tgl" class="form-control datepicker">
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">HB</label>
	      				<div class="col-sm-8">
	      					<input type="text" name="popup_hb" class="form-control datepicker">
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Jml Beem</label>
	      				<div class="col-sm-8">
	      					<input type="text" name="popup_jumlah_beem" class="form-control number-only">
	      				</div>
	      			</div>
	      			<h5>Warna</h5>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Dasar</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_dasar">
	      						
	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Dasar 2</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_dasar2">

	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Dasar 3</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_dasar3">

	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Dasar 4</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_dasar4">

	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Dasar 5</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_dasar5">

	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Dasar 6</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_dasar6">

	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Dasar 7</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_dasar7">

	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Dasar 8</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_dasar8">

	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Dasar 9</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_dasar9">

	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Dasar 10</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_dasar10">

	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Streep</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_streep">

	      					</select>
	      				</div>
	      			</div>
	      			<h5>Warna Kombinasi</h5>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Kombinasi 1</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_kombinasi1">

	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Kombinasi 2</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_kombinasi2">

	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Kombinasi 3</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_kombinasi3">

	      					</select>
	      				</div>
	      			</div>
	      			<h5>Warna Kluwungan</h5>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Kluwungan 1</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_kluwungan1">

	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Kluwungan 2</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_kluwungan2">

	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Kluwungan 3</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_kluwungan3">

	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Kluwungan 4</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_kluwungan4">

	      					</select>
	      				</div>
	      			</div>
	      			<h5>Timbulan</h5>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Timbulan 1</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_timbulan1">

	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Timbulan 2</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_timbulan2">

	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Timbulan 3</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_timbulan3">

	      					</select>
	      				</div>
	      			</div>
	      			<h5>Warna Songketan</h5>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Songketan 1</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_songketan1">

	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Songketan 2</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_songketan2">

	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Songketan 3</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_songketan3">

	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Songketan 4</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_songketan4">

	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Songketan 5</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_songketan5">

	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Songketan 6</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_songketan6">

	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Songketan 7</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_songketan7">

	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Songketan 8</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_songketan8">

	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Songketan 9</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_songketan9">

	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Songketan 10</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_songketan10">

	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Songketan 11</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_songketan11">

	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Songketan 12</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_songketan12">

	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Songketan 13</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_songketan13">

	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Songketan 14</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_songketan14">

	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Songketan 15</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_songketan15">

	      					</select>
	      				</div>
	      			</div>
	      			<h5>Warna Pancingann</h5>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Pancingan 1</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_pancingan1">

	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Pancingan 2</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_pancingan2">

	      					</select>
	      				</div>
	      			</div>
	      			<h5>Warna gunung atas</h5>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Gunungan 1 Atas </label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_gunungan1_atas">

	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Gunungan 2 Atas </label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_gunungan2_atas">

	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Gunungan 3 Atas </label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_gunungan3_atas">

	      					</select>
	      				</div>
	      			</div>
	      			<h5>Warna gunung bawah</h5>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Gunungan 1 Bawah </label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_gunungan1_bawah">

	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Gunungan 2 Bawah </label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_gunungan2_bawah">

	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Gunungan 3 Bawah </label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_gunungan3_bawah">

	      					</select>
	      				</div>
	      			</div>
	      			<h5>Garis-garis</h5>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Garis 1 </label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_garis1">

	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Garis 2 </label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup_garis2">

	      					</select>
	      				</div>
	      			</div>
	      			<h5>Tgl Setor</h5>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Beem</label>
	      				<div class="col-sm-8">
	      					<input type="text" name="popup_beem" class="form-control datepicker">
	      				</div>
	      			</div>
					<div class="form-group">
	      				<label class="control-label col-sm-4">Pakan</label>
	      				<div class="col-sm-8">
	      					<input type="text" name="popup_pakan" class="form-control datepicker">
	      				</div>
	      			</div>	      			
	      		</form>
	      	</div>
	      	<div class="modal-footer">
	        	<button type="button" class="btn btn-primary" id="btn_popup_simpan">Simpan</button>
	      	</div>
	    </div>
	</div>
</div>

<div class="modal fade" id="exampleModal2" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
	<div class="modal-dialog" role="document">
	    <div class="modal-content">
	    	<div class="modal-header">
	    		<h5 class="modal-title" id="exampleModalLabel">Data</h5>
	    		<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">&times;</span></button>
	      	</div>
	      	<div class="modal-body">
	      		<form class="form-horizontal" autocomplete="off">
	      			<input type="hidden" name="popup2_id_table">
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Keterangan</label>
	      				<div class="col-sm-8">
	      					<!-- <input type="text" name="popup2_ket" class="form-control"> -->
	      					<select class="form-control select-search" name="popup2_ket">
	      						
	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Barang</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup2_barang">
	      						
	      					</select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Jumlah</label>
	      				<div class="col-sm-8">
	      					<input type="text" name="popup2_jumlah" class="form-control number-only">
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Satuan jumlah</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup2_satuan_jumlah"></select>
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Jumlah Konversi</label>
	      				<div class="col-sm-8">
	      					<input type="text" name="popup2_jumlah_konversi" class="form-control number-only">
	      				</div>
	      			</div>
	      			<div class="form-group">
	      				<label class="control-label col-sm-4">Satuan Konversi</label>
	      				<div class="col-sm-8">
	      					<select class="form-control select-search" name="popup2_satuan_konversi">
	      						
	      					</select>
	      				</div>
	      			</div>
	      		</form>
	      	</div>
	      	<div class="modal-footer">
	        	<button type="button" class="btn btn-primary" id="btn_popup_simpan_ket">Simpan</button>
	      	</div>
	    </div>
	</div>
</div>
<input type="hidden" name="store_idmotif">
<!----Modal---->
<script type="text/javascript">
	var id_motif = '';

	$("#btn_tambah_item").click(function(){
		$("[name=popup_id_table]").val('');
		$("[name=popup_idorder]").val('');
		$("[name=popup_order]").val('');
		$("[name=popup_motif]").val(null).trigger('change');
		$("[name=popup_tgl]").val('');
		$("[name=popup_hb]").val('');
		$("[name=popup_jumlah_beem]").val('');
		$("[name=popup_dasar]").val(null).trigger('change');
		$("[name=popup_dasar2]").val(null).trigger('change');
		$("[name=popup_dasar3]").val(null).trigger('change');
		$("[name=popup_dasar4]").val(null).trigger('change');
		$("[name=popup_dasar5]").val(null).trigger('change');
		$("[name=popup_dasar6]").val(null).trigger('change');
		$("[name=popup_dasar7]").val(null).trigger('change');
		$("[name=popup_dasar8]").val(null).trigger('change');
		$("[name=popup_dasar9]").val(null).trigger('change');
		$("[name=popup_dasar10]").val(null).trigger('change');
		$("[name=popup_streep]").val(null).trigger('change');
		$("[name=popup_kombinasi1]").val(null).trigger('change');
		$("[name=popup_kombinasi2]").val(null).trigger('change');
		$("[name=popup_kombinasi3]").val(null).trigger('change');
		$("[name=popup_kluwungan1]").val(null).trigger('change');
		$("[name=popup_kluwungan2]").val(null).trigger('change');
		$("[name=popup_kluwungan3]").val(null).trigger('change');
		$("[name=popup_kluwungan4]").val(null).trigger('change');
		$("[name=popup_timbulan1]").val(null).trigger('change');
		$("[name=popup_timbulan2]").val(null).trigger('change');
		$("[name=popup_timbulan3]").val(null).trigger('change');
		$("[name=popup_songketan1]").val(null).trigger('change');
		$("[name=popup_songketan2]").val(null).trigger('change');
		$("[name=popup_songketan3]").val(null).trigger('change');
		$("[name=popup_songketan4]").val(null).trigger('change');
		$("[name=popup_songketan5]").val(null).trigger('change');
		$("[name=popup_songketan6]").val(null).trigger('change');
		$("[name=popup_songketan7]").val(null).trigger('change');
		$("[name=popup_songketan8]").val(null).trigger('change');
		$("[name=popup_songketan9]").val(null).trigger('change');
		$("[name=popup_songketan10]").val(null).trigger('change');
		$("[name=popup_songketan11]").val(null).trigger('change');
		$("[name=popup_songketan12]").val(null).trigger('change');
		$("[name=popup_songketan13]").val(null).trigger('change');
		$("[name=popup_songketan14]").val(null).trigger('change');
		$("[name=popup_songketan15]").val(null).trigger('change');
		$("[name=popup_pancingan1]").val(null).trigger('change');
		$("[name=popup_pancingan2]").val(null).trigger('change');
		$("[name=popup_gunungan1_atas]").val(null).trigger('change');
		$("[name=popup_gunungan2_atas]").val(null).trigger('change');
		$("[name=popup_gunungan3_atas]").val(null).trigger('change');
		$("[name=popup_gunungan1_bawah]").val(null).trigger('change');
		$("[name=popup_gunungan2_bawah]").val(null).trigger('change');
		$("[name=popup_gunungan3_bawah]").val(null).trigger('change');
		$("[name=popup_garis1]").val(null).trigger('change');
		$("[name=popup_garis2]").val(null).trigger('change');
		$("[name=popup_beem]").val('');
		$("[name=popup_pakan]").val('');
		$("#exampleModal").modal('show');
	})
	$("#btn_tambah_ket").click(function(){
		$("[name=popup2_id_table]").val('');
		$("[name=popup2_ket]").val('');
		$("[name=popup2_barang]").val('').trigger('change');
		$("[name=popup2_jumlah]").val('');
		$("[name=popup2_jumlah_konversi]").val('');
		$("[name=popup2_satuan_jumlah]").val('').trigger('change');
		$("[name=popup2_satuan_konversi]").val('').trigger('change');
		$("#exampleModal2").modal('show');
	})


	var table_barang;
	var table_ket;
	var tb_no = 10000;
	var tb_ket = 10000;
	$(document).ready(function(){
		table_barang = $(".table_barang").DataTable();
		table_barang.on( 'order.dt search.dt', function () {
            table_barang.column(0, {search:'applied', order:'applied'}).nodes().each( function (cell, i) {
                cell.innerHTML = i+1;
            } );
        } ).draw();

        table_ket = $(".table_ket").DataTable();
		table_ket.on( 'order.dt search.dt', function () {
            table_ket.column(0, {search:'applied', order:'applied'}).nodes().each( function (cell, i) {
                cell.innerHTML = i+1;
            } );
        } ).draw();

		get_barang();
		get_warna();	
		id_motif = $("[name=store_idmotif]").val();
		id_work = '{{ $data['data']['id_workorder']}}';
		if(id_work != ''){
			get_edit(id_work);
			get_edit_ket(id_work);
		}

	})

	function get_barang(){
		$.ajax({
			url: '{{ url('workorder/get_barang') }}',
			success: function(respon){
				$("[name=popup2_barang]").html('');
				$("[name=popup2_barang]").append('<option value="">--- Pilih Barang ---</option');
				if(respon.barang.length > 0){
					for(i in respon.barang){
						$("[name=popup2_barang]").append('<option value="'+respon.barang[i].id_barang+'" barang="'+respon.barang[i].nama_barang+'" kode="'+respon.barang[i].kode_barang+'" satuan="'+respon.barang[i].satuan+'">'+respon.barang[i].kategori+' - '+respon.barang[i].nama_sub+' - '+respon.barang[i].kode_barang+' - '+respon.barang[i].nama_barang+'</option>');
					}
				}

				$("[name=popup2_satuan_jumlah]").html('');
				$("[name=popup2_satuan_konversi]").html('');
				$("[name=popup2_satuan_jumlah]").append('<option value="">--- Pilih Satuan ---</option');
				$("[name=popup2_satuan_konversi]").append('<option value="">--- Pilih Satuan ---</option');
				if(respon.satuan.length > 0){
					for(i in respon.satuan){
						$("[name=popup2_satuan_jumlah]").append('<option value="'+respon.satuan[i].id_satuan+'" nama="'+respon.satuan[i].nama_satuan+'">'+respon.satuan[i].nama_satuan+'</option>');
					}
					for(i in respon.satuan){
						$("[name=popup2_satuan_konversi]").append('<option value="'+respon.satuan[i].id_satuan+'" nama="'+respon.satuan[i].nama_satuan+'">'+respon.satuan[i].nama_satuan+'</option>');
					}
				}

				$("[name=popup_motif]").html();
				$("[name=popup_motif]").append('<option value="">--- Pilih Motif ---</option');
				if(respon.motif.length > 0){
					for(i in respon.motif){
						$("[name=popup_motif]").append('<option value="'+respon.motif[i].id_motif+'" kode="'+respon.motif[i].kode_motif+'" nama="'+respon.motif[i].nama_motif+'">'+respon.motif[i].nama_motif+'</option>');
					}
				}
			}
		})
	}

	$("[name=popup_motif]").change(function(){
		var id_data = $("[name=popup_id_table]").val();
		var id_motif = $(this).val();
		var kode = $("[name=popup_motif] :selected").attr('kode');
		var id = $(".table_barang tr:last td:eq(1)").text();
		var kode_str = id.substring(0,1);
		if(kode==kode_str){
			var last = id;	
		}else{
			var last = '';
		}
		$.ajax({
			url : '{{url('workorder/get_motif_kode')}}',
			data: {id_motif: id_motif, kode_motif : kode, last:last},
			type: 'POST',
			dataType : 'json',
			headers : {
				'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
			},
			success : function(respon){
				if(id_data == '' || id_data == null || id_data == 0){
				$("[name=popup_order]").val(respon.id);
				get_ket_motif(id_motif);
				$("[name=store_idmotif]").val(id_motif);
				}
			}
		})

	})

	function get_ket_motif(id){
		$.ajax({
			url: '{{url('workorder/get_ket_motif')}}',
			data: {id : id},
			type: 'post',
			dataType: 'json',
			headers : {
				'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
			},
			success: function(respon){
				$("[name=popup2_ket]").html('');
				if(respon.length > 0){
				$("[name=popup2_ket]").append('<option value="">--- Pilih Ket Motif ---</option');
					for(i in respon){
						$("[name=popup2_ket]").append('<option value="'+respon[i].id_motif_barang+'" nama="'+respon[i].motif_keterangan+'">'+respon[i].motif_keterangan+'</option>');
					}
				}
			}
		})
	}

	function get_warna(){
		$.ajax({
			url: '{{ url('workorder/get_warna') }}',
			success: function(respon){
				$("[name=popup_dasar]").html('');
				$("[name=popup_dasar]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_dasar]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_dasar]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_dasar2]").html('');
				$("[name=popup_dasar2]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_dasar2]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_dasar2]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_dasar3]").html('');
				$("[name=popup_dasar3]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_dasar3]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_dasar3]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_dasar4]").html('');
				$("[name=popup_dasar4]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_dasar4]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_dasar4]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_dasar5]").html('');
				$("[name=popup_dasar5]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_dasar5]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_dasar5]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_dasar6]").html('');
				$("[name=popup_dasar6]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_dasar6]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_dasar6]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_dasar7]").html('');
				$("[name=popup_dasar7]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_dasar7]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_dasar7]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_dasar8]").html('');
				$("[name=popup_dasar8]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_dasar8]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_dasar8]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_dasar9]").html('');
				$("[name=popup_dasar9]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_dasar9]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_dasar9]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_dasar10]").html('');
				$("[name=popup_dasar10]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_dasar10]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_dasar10]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_streep]").html('');
				$("[name=popup_streep]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_streep]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_streep]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_kombinasi1]").html('');
				$("[name=popup_kombinasi1]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_kombinasi1]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_kombinasi1]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_kombinasi2]").html('');
				$("[name=popup_kombinasi2]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_kombinasi2]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_kombinasi2]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_kombinasi3]").html('');
				$("[name=popup_kombinasi3]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_kombinasi3]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_kombinasi3]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_kluwungan1]").html('');
				$("[name=popup_kluwungan1]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_kluwungan1]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_kluwungan1]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_kluwungan2]").html('');
				$("[name=popup_kluwungan2]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_kluwungan2]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_kluwungan2]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_kluwungan3]").html('');
				$("[name=popup_kluwungan3]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_kluwungan3]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_kluwungan3]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_kluwungan4]").html('');
				$("[name=popup_kluwungan4]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_kluwungan4]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_kluwungan4]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_timbulan1]").html('');
				$("[name=popup_timbulan1]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_timbulan1]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_timbulan1]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_timbulan2]").html('');
				$("[name=popup_timbulan2]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_timbulan2]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_timbulan2]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_timbulan3]").html('');
				$("[name=popup_timbulan3]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_timbulan3]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_timbulan3]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_songketan1]").html('');
				$("[name=popup_songketan1]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_songketan1]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_songketan1]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_songketan2]").html('');
				$("[name=popup_songketan2]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_songketan2]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_songketan2]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_songketan3]").html('');
				$("[name=popup_songketan3]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_songketan3]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_songketan3]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_songketan4]").html('');
				$("[name=popup_songketan4]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_songketan4]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_songketan4]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_songketan5]").html('');
				$("[name=popup_songketan5]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_songketan5]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_songketan5]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_songketan5]").html('');
				$("[name=popup_songketan5]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_songketan5]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_songketan5]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_songketan6]").html('');
				$("[name=popup_songketan6]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_songketan6]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_songketan6]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_songketan7]").html('');
				$("[name=popup_songketan7]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_songketan7]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_songketan7]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_songketan8]").html('');
				$("[name=popup_songketan8]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_songketan8]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_songketan8]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_songketan9]").html('');
				$("[name=popup_songketan9]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_songketan9]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_songketan9]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_songketan10]").html('');
				$("[name=popup_songketan10]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_songketan10]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_songketan10]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_songketan11]").html('');
				$("[name=popup_songketan11]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_songketan11]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_songketan11]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_songketan12]").html('');
				$("[name=popup_songketan12]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_songketan12]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_songketan12]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_songketan13]").html('');
				$("[name=popup_songketan13]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_songketan13]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_songketan13]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_songketan14]").html('');
				$("[name=popup_songketan14]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_songketan14]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_songketan14]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_songketan15]").html('');
				$("[name=popup_songketan15]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_songketan15]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_songketan15]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_pancingan1]").html('');
				$("[name=popup_pancingan1]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_pancingan1]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_pancingan1]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_pancingan2]").html('');
				$("[name=popup_pancingan2]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_pancingan2]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_pancingan2]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_gunungan1_atas]").html('');
				$("[name=popup_gunungan1_atas]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_gunungan1_atas]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_gunungan1_atas]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_gunungan2_atas]").html('');
				$("[name=popup_gunungan2_atas]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_gunungan2_atas]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_gunungan2_atas]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_gunungan3_atas]").html('');
				$("[name=popup_gunungan3_atas]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_gunungan3_atas]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_gunungan3_atas]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_gunungan1_bawah]").html('');
				$("[name=popup_gunungan1_bawah]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_gunungan1_bawah]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_gunungan1_bawah]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_gunungan2_bawah]").html('');
				$("[name=popup_gunungan2_bawah]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_gunungan2_bawah]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_gunungan2_bawah]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_gunungan3_bawah]").html('');
				$("[name=popup_gunungan3_bawah]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_gunungan3_bawah]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_gunungan3_bawah]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_garis1]").html('');
				$("[name=popup_garis1]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_garis1]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_garis1]").append('<option value="">Data Kosong</option');	
				}

				$("[name=popup_garis2]").html('');
				$("[name=popup_garis2]").append('<option value="">--- Pilih Warna ---</option');
				if(respon.length > 0){
					for(i in respon){
						$("[name=popup_garis2]").append('<option value="'+respon[i].id_warnakomposisi+'" nama="'+respon[i].nama_warnakomposisi+'" kode="'+respon[i].inisial_warnakomposisi+'">'+respon[i].nama_warnakomposisi+' ('+respon[i].inisial_warnakomposisi+')'+'</option>');
					}
				}else{
					$("[name=popup_garis2]").append('<option value="">Data Kosong</option');	
				}

			}
		})
	}

	function get_edit(id){
		$.ajax({
			url: "{{ url('workorder/get_edit')}} ",
			type: 'post',
			data: {id : id,},
			headers : {
				'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
			},
			success: function(respon){
				if(respon.length > 0){
					for(i in respon){
						var dasar = '';
						var nama_dasar = '';
						var inisial_dasar = '';
						var dasar2 = '';
						var nama_dasar2 = '';
						var inisial_dasar2 = '';
						var dasar3 = '';
						var nama_dasar3 = '';
						var inisial_dasar3 = '';
						var dasar4 = '';
						var nama_dasar4 = '';
						var kode_dasar4 = '';
						var dasar5 = '';
						var nama_dasar5 = '';
						var kode_dasar5 = '';
						var dasar6 = '';
						var nama_dasar6 = '';
						var kode_dasar6 = '';
						var dasar7 = '';
						var nama_dasar7 = '';
						var kode_dasar7 = '';
						var dasar8 = '';
						var nama_dasar8 = '';
						var kode_dasar8 = '';
						var dasar9 = '';
						var nama_dasar9 = '';
						var kode_dasar9 = '';
						var dasar10 = '';
						var nama_dasar10 = '';
						var kode_dasar10 = '';
						var streep = '';
						var nama_streep = '';
						var inisial_streep = '';
						var kombinasi1 = '';
						var nama_kombinasi1 = '';
						var inisial_kombinasi1 = '';
						var kombinasi2 = '';
						var nama_kombinasi2 = '';
						var inisial_kombinasi2 = '';
						var kombinasi3 = '';
						var nama_kombinasi3 = '';
						var inisial_kombinasi3 = '';
						var kluwungan1 = '';
						var nama_kluwungan1 = '';
						var inisial_kluwungan1 = '';
						var kluwungan2 = '';
						var nama_kluwungan2 = '';
						var inisial_kluwungan2 = '';
						var kluwungan3 = '';
						var nama_kluwungan3 = '';
						var inisial_kluwungan3 = '';
						var kluwungan4 = '';
						var nama_kluwungan4 = '';
						var inisial_kluwungan4 = '';
						var timbulan1 = '';
						var nama_timbulan1 = '';
						var inisial_timbulan1 = '';
						var timbulan2 = '';
						var nama_timbulan2 = '';
						var inisial_timbulan2 = '';
						var timbulan3 = '';
						var nama_timbulan3 = '';
						var inisial_timbulan3 = '';
						var songketan1 = '';
						var nama_songketan1 = '';
						var inisial_songketan1 = '';
						var songketan2 = '';
						var nama_songketan2 = '';
						var inisial_songketan2 = '';
						var songketan3 = '';
						var nama_songketan3 = '';
						var inisial_songketan3 = '';
						var songketan4 = '';
						var nama_songketan4 = '';
						var inisial_songketan4 = '';
						var songketan5 ='';
						var nama_songketan5 ='';
						var kode_songketan5 ='';
						var songketan6 ='';
						var nama_songketan6 ='';
						var kode_songketan6 ='';
						var songketan7 ='';
						var nama_songketan7 ='';
						var kode_songketan7 ='';
						var songketan8 ='';
						var nama_songketan8 ='';
						var kode_songketan8 ='';
						var songketan9 ='';
						var nama_songketan9 ='';
						var kode_songketan9 ='';
						var songketan10 ='';
						var nama_songketan10 ='';
						var kode_songketan10 ='';
						var songketan11 ='';
						var nama_songketan11 ='';
						var kode_songketan11 ='';
						var songketan12 ='';
						var nama_songketan12 ='';
						var kode_songketan12 ='';
						var songketan13 ='';
						var nama_songketan13 ='';
						var kode_songketan13 ='';
						var songketan14 ='';
						var nama_songketan14 ='';
						var kode_songketan14 ='';
						var songketan15 ='';
						var nama_songketan15 ='';
						var kode_songketan15 ='';
						var pancingan1 = '';
						var nama_pancingan1 = '';
						var inisial_pancingan1 = '';
						var pancingan2 = '';
						var nama_pancingan2 = '';
						var inisial_pancingan2 = '';
						var gunungan1_atas = '';
						var nama_gunungan1_atas = '';
						var inisial_gunungan1_atas = '';
						var gunungan2_atas = '';
						var nama_gunungan2_atas = '';
						var inisial_gunungan2_atas = '';
						var gunungan3_atas = '';
						var nama_gunungan3_atas = '';
						var inisial_gunungan3_atas = '';
						var gunungan1_bawah = '';
						var nama_gunungan1_bawah = '';
						var inisial_gunungan1_bawah = '';
						var gunungan2_bawah = '';
						var nama_gunungan2_bawah = '';
						var inisial_gunungan2_bawah = '';
						var gunungan3_bawah = '';
						var nama_gunungan3_bawah = '';
						var inisial_gunungan3_bawah = '';
						var garis1 = '';
						var nama_garis1 = '';
						var inisial_garis1 = '';
						var garis2 = '';
						var nama_garis2 = '';
						var inisial_garis2 = '';
						
						table_barang.row.add(['<div><center></center></div>',
							'<div><button type="button" class="btn bg-warning-400" onclick="edit_table('+respon[i].id_workorder_barang+')"><i class="icon-pencil"></i> </button><button class="btn bg-danger-800" type="button" onclick="hapus($(this))"><i class="icon-eraser"></i></button></div>',
							'<div id="list_idorder'+respon[i].id_workorder_barang+'">'+respon[i].no_workorder+'</div>',
							'<div id="list_moti'+respon[i].id_workorder_barang+'">'+respon[i].nama_motif+'</div>',
							'<div id="list_tanggal'+respon[i].id_workorder_barang+'">'+respon[i].tanggal+'</div>',
							'<div id="list_hb'+respon[i].id_workorder_barang+'">'+respon[i].hb+'</div>',
							'<div id="list_jumlah_beem'+respon[i].id_workorder_barang+'">'+respon[i].jumlah_beem+'</div>',
							'<div id="list_dasar'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_dasar+'('+respon[i].inisial_dasar+')'+'</div>',
							'<div id="list_dasar2'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_dasar2+'('+respon[i].inisial_dasar2+')'+'</div>',
							'<div id="list_dasar3'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_dasar3+'('+respon[i].inisial_dasar3+')'+'</div>',
							'<div id="list_dasar4'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_dasar4+'('+respon[i].inisial_dasar4+')'+'</div>',
							'<div id="list_dasar5'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_dasar5+'('+respon[i].inisial_dasar5+')'+'</div>',
							'<div id="list_dasar6'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_dasar6+'('+respon[i].inisial_dasar6+')'+'</div>',
							'<div id="list_dasar7'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_dasar7+'('+respon[i].inisial_dasar7+')'+'</div>',
							'<div id="list_dasar8'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_dasar8+'('+respon[i].inisial_dasar8+')'+'</div>',
							'<div id="list_dasar9'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_dasar9+'('+respon[i].inisial_dasar9+')'+'</div>',
							'<div id="list_dasar10'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_dasar10+'('+respon[i].inisial_dasar10+')'+'</div>',
							'<div id="list_streep'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_streep+'('+respon[i].inisial_streep+')'+'</div>',
							'<div id="list_kombinasi1'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_kombinasi1+'('+respon[i].inisial_kombinasi1+')'+'</div>',
							'<div id="list_kombinasi2'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_kombinasi2+'('+respon[i].inisial_kombinasi2+')'+'</div>',
							'<div id="list_kombinasi3'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_kombinasi3+'('+respon[i].inisial_kombinasi3+')'+'</div>',
							'<div id="list_kluwungan1'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_kluwungan1+'('+respon[i].inisial_kluwungan1+')'+'</div>',
							'<div id="list_kluwungan2'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_kluwungan2+'('+respon[i].inisial_kluwungan2+')'+'</div>',
							'<div id="list_kluwungan3'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_kluwungan3+'('+respon[i].inisial_kluwungan3+')'+'</div>',
							'<div id="list_kluwungan4'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_kluwungan4+'('+respon[i].inisial_kluwungan4+')'+'</div>',
							'<div id="list_timbulan1'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_timbulan1+'('+respon[i].inisial_timbulan1+')'+'</div>',
							'<div id="list_timbulan2'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_timbulan2+'('+respon[i].inisial_timbulan2+')'+'</div>',
							'<div id="list_timbulan3'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_timbulan3+'('+respon[i].inisial_timbulan3+')'+'</div>',
							'<div id="list_songketan1'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_songketan1+'('+respon[i].inisial_songketan1+')'+'</div>',
							'<div id="list_songketan2'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_songketan2+'('+respon[i].inisial_songketan2+')'+'</div>',
							'<div id="list_songketan3'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_songketan3+'('+respon[i].inisial_songketan3+')'+'</div>',
							'<div id="list_songketan4'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_songketan4+'('+respon[i].inisial_songketan4+')'+'</div>',
							'<div id="list_songketan5'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_songketan5+'('+respon[i].inisial_songketan5+')'+'</div>',
							'<div id="list_songketan6'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_songketan6+'('+respon[i].inisial_songketan6+')'+'</div>',
							'<div id="list_songketan7'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_songketan7+'('+respon[i].inisial_songketan7+')'+'</div>',
							'<div id="list_songketan8'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_songketan8+'('+respon[i].inisial_songketan8+')'+'</div>',
							'<div id="list_songketan9'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_songketan9+'('+respon[i].inisial_songketan9+')'+'</div>',
							'<div id="list_songketan10'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_songketan10+'('+respon[i].inisial_songketan10+')'+'</div>',
							'<div id="list_songketan11'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_songketan11+'('+respon[i].inisial_songketan11+')'+'</div>',
							'<div id="list_songketan12'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_songketan12+'('+respon[i].inisial_songketan12+')'+'</div>',
							'<div id="list_songketan13'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_songketan13+'('+respon[i].inisial_songketan13+')'+'</div>',
							'<div id="list_songketan14'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_songketan14+'('+respon[i].inisial_songketan14+')'+'</div>',
							'<div id="list_songketan15'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_songketan15+'('+respon[i].inisial_songketan15+')'+'</div>',
							'<div id="list_pancingan1'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_pancingan1+'('+respon[i].inisial_pancingan1+')'+'</div>',
							'<div id="list_pancingan2'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_pancingan2+'('+respon[i].inisial_pancingan2+')'+'</div>',
							'<div id="list_gunungan1_atas'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_gunungan1_atas+'('+respon[i].inisial_gunungan1_atas+')'+'</div>',
							'<div id="list_gunungan2_atas'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_gunungan2_atas+'('+respon[i].inisial_gunungan2_atas+')'+'</div>',
							'<div id="list_gunungan3_atas'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_gunungan3_atas+'('+respon[i].inisial_gunungan3_atas+')'+'</div>',
							'<div id="list_gunungan1_bawah'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_gunungan1_bawah+'('+respon[i].inisial_gunungan1_bawah+')'+'</div>',
							'<div id="list_gunungan2_bawah'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_gunungan2_bawah+'('+respon[i].inisial_gunungan2_bawah+')'+'</div>',
							'<div id="list_gunungan3_bawah'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_gunungan3_bawah+'('+respon[i].inisial_gunungan3_bawah+')'+'</div>',
							'<div id="list_garis1'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_garis1+'('+respon[i].inisial_garis1+')'+'</div>',
							'<div id="list_garis2'+respon[i].id_workorder_barang+'" style="width: 100px;">'+respon[i].nama_garis2+'('+respon[i].inisial_garis2+')'+'</div>',
							'<div id="list_beem'+respon[i].id_workorder_barang+'">'+respon[i].beem+'</div>',
							'<div id="list_pakan'+respon[i].id_workorder_barang+'">'+respon[i].pakan+'</div>',
							'<div><button type="button" class="btn bg-warning-400" onclick="edit_table('+respon[i].id_workorder_barang+')"><i class="icon-pencil"></i> </button><button class="btn bg-danger-800" type="button" onclick="hapus($(this))"><i class="icon-eraser"></i></button></div>'+
							'<input type="hidden" name="tabel_id[]" id="tabel_id'+respon[i].id_workorder_barang+'" value="'+respon[i].id_workorder_barang+'">'+
							'<input type="hidden" name="tabel_idorder[]" id="tabel_idorder'+respon[i].id_workorder_barang+'" value="'+respon[i].no_workorder+'">'+
							'<input type="hidden" name="tabel_motif[]" id="tabel_motif'+respon[i].id_workorder_barang+'" value="'+respon[i].motif+'">'+
							'<input type="hidden" name="tabel_tanggal[]" id="tabel_tanggal'+respon[i].id_workorder_barang+'" value="'+respon[i].tanggal+'">'+
							'<input type="hidden" name="tabel_hb[]" id="tabel_hb'+respon[i].id_workorder_barang+'" value="'+respon[i].hb+'">'+
							'<input type="hidden" name="tabel_jumlah_beem[]" id="tabel_jumlah_beem'+respon[i].id_workorder_barang+'" value="'+respon[i].jumlah_beem+'">'+
							'<input type="hidden" name="tabel_dasar[]" id="tabel_dasar'+respon[i].id_workorder_barang+'" value="'+respon[i].dasar+'">'+
							'<input type="hidden" name="tabel_namadasar[]" id="tabel_namadasar'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_dasar+'">'+
							'<input type="hidden" name="tabel_kodedasar[]" id="tabel_kodedasar'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_dasar+'">'+
							'<input type="hidden" name="tabel_dasar2[]" id="tabel_dasar2'+respon[i].id_workorder_barang+'" value="'+respon[i].dasar2+'">'+
							'<input type="hidden" name="tabel_namadasar2[]" id="tabel_namadasar2'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_dasar2+'">'+
							'<input type="hidden" name="tabel_kodedasar2[]" id="tabel_kodedasar2'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_dasar2+'">'+
							'<input type="hidden" name="tabel_dasar3[]" id="tabel_dasar3'+respon[i].id_workorder_barang+'" value="'+respon[i].dasar3+'">'+
							'<input type="hidden" name="tabel_namadasar3[]" id="tabel_namadasar3'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_dasar3+'">'+
							'<input type="hidden" name="tabel_kodedasar3[]" id="tabel_kodedasar3'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_dasar3+'">'+
							'<input type="hidden" name="tabel_dasar4[]" id="tabel_dasar4'+respon[i].id_workorder_barang+'" value="'+respon[i].dasar4+'">'+
							'<input type="hidden" name="tabel_namadasar4[]" id="tabel_namadasar4'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_dasar4+'">'+
							'<input type="hidden" name="tabel_kodedasar4[]" id="tabel_kodedasar4'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_dasar4+'">'+
							'<input type="hidden" name="tabel_dasar5[]" id="tabel_dasar5'+respon[i].id_workorder_barang+'" value="'+respon[i].dasar5+'">'+
							'<input type="hidden" name="tabel_namadasar5[]" id="tabel_namadasar5'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_dasar5+'">'+
							'<input type="hidden" name="tabel_kodedasar5[]" id="tabel_kodedasar5'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_dasar5+'">'+
							'<input type="hidden" name="tabel_dasar6[]" id="tabel_dasar6'+respon[i].id_workorder_barang+'" value="'+respon[i].dasar6+'">'+
							'<input type="hidden" name="tabel_namadasar6[]" id="tabel_namadasar6'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_dasar6+'">'+
							'<input type="hidden" name="tabel_kodedasar6[]" id="tabel_kodedasar6'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_dasar6+'">'+
							'<input type="hidden" name="tabel_dasar7[]" id="tabel_dasar7'+respon[i].id_workorder_barang+'" value="'+respon[i].dasar7+'">'+
							'<input type="hidden" name="tabel_namadasar7[]" id="tabel_namadasar7'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_dasar7+'">'+
							'<input type="hidden" name="tabel_kodedasar7[]" id="tabel_kodedasar7'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_dasar7+'">'+
							'<input type="hidden" name="tabel_dasar8[]" id="tabel_dasar8'+respon[i].id_workorder_barang+'" value="'+respon[i].dasar8+'">'+
							'<input type="hidden" name="tabel_namadasar8[]" id="tabel_namadasar8'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_dasar8+'">'+
							'<input type="hidden" name="tabel_kodedasar8[]" id="tabel_kodedasar8'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_dasar8+'">'+
							'<input type="hidden" name="tabel_dasar9[]" id="tabel_dasar9'+respon[i].id_workorder_barang+'" value="'+respon[i].dasar9+'">'+
							'<input type="hidden" name="tabel_namadasar9[]" id="tabel_namadasar9'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_dasar9+'">'+
							'<input type="hidden" name="tabel_kodedasar9[]" id="tabel_kodedasar9'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_dasar9+'">'+
							'<input type="hidden" name="tabel_dasar10[]" id="tabel_dasar10'+respon[i].id_workorder_barang+'" value="'+respon[i].dasar10+'">'+
							'<input type="hidden" name="tabel_namadasar10[]" id="tabel_namadasar10'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_dasar10+'">'+
							'<input type="hidden" name="tabel_kodedasar10[]" id="tabel_kodedasar10'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_dasar10+'">'+
							'<input type="hidden" name="tabel_streep[]" id="tabel_streep'+respon[i].id_workorder_barang+'" value="'+respon[i].streep+'">'+
							'<input type="hidden" name="tabel_namastreep[]" id="tabel_namastreep'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_streep+'">'+
							'<input type="hidden" name="tabel_kodestreep[]" id="tabel_kodestreep'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_streep+'">'+
							'<input type="hidden" name="tabel_beem[]" id="tabel_beem'+respon[i].id_workorder_barang+'" value="'+respon[i].beem+'">'+
							'<input type="hidden" name="tabel_kombinasi1[]" id="tabel_kombinasi1'+respon[i].id_workorder_barang+'" value="'+respon[i].kombinasi1+'">'+
							'<input type="hidden" name="tabel_namakombinasi1[]" id="tabel_namakombinasi1'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_kombinasi1+'">'+
							'<input type="hidden" name="tabel_kodekombinasi1[]" id="tabel_kodekombinasi1'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_kombinasi1+'">'+
							'<input type="hidden" name="tabel_kombinasi2[]" id="tabel_kombinasi2'+respon[i].id_workorder_barang+'" value="'+respon[i].kombinasi2+'">'+
							'<input type="hidden" name="tabel_namakombinasi2[]" id="tabel_namakombinasi2'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_kombinasi2+'">'+
							'<input type="hidden" name="tabel_kodekombinasi2[]" id="tabel_kodekombinasi2'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_kombinasi2+'">'+
							'<input type="hidden" name="tabel_kombinasi3[]" id="tabel_kombinasi3'+respon[i].id_workorder_barang+'" value="'+respon[i].kombinasi3+'">'+
							'<input type="hidden" name="tabel_namakombinasi3[]" id="tabel_namakombinasi3'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_kombinasi3+'">'+
							'<input type="hidden" name="tabel_kodekombinasi3[]" id="tabel_kodekombinasi3'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_kombinasi3+'">'+
							'<input type="hidden" name="tabel_kluwungan1[]" id="tabel_kluwungan1'+respon[i].id_workorder_barang+'" value="'+respon[i].kluwungan1+'">'+
							'<input type="hidden" name="tabel_namakluwungan1[]" id="tabel_namakluwungan1'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_kluwungan1+'">'+
							'<input type="hidden" name="tabel_kodekluwungan1[]" id="tabel_kodekluwungan1'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_kluwungan1+'">'+
							'<input type="hidden" name="tabel_kluwungan2[]" id="tabel_kluwungan2'+respon[i].id_workorder_barang+'" value="'+respon[i].kluwungan2+'">'+
							'<input type="hidden" name="tabel_namakluwungan2[]" id="tabel_namakluwungan2'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_kluwungan2+'">'+
							'<input type="hidden" name="tabel_kodekluwungan2[]" id="tabel_kodekluwungan2'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_kluwungan2+'">'+
							'<input type="hidden" name="tabel_kluwungan3[]" id="tabel_kluwungan3'+respon[i].id_workorder_barang+'" value="'+respon[i].kluwungan3+'">'+
							'<input type="hidden" name="tabel_namakluwungan3[]" id="tabel_namakluwungan3'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_kluwungan3+'">'+
							'<input type="hidden" name="tabel_kodekluwungan3[]" id="tabel_kodekluwungan3'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_kluwungan3+'">'+
							'<input type="hidden" name="tabel_kluwungan4[]" id="tabel_kluwungan4'+respon[i].id_workorder_barang+'" value="'+respon[i].kluwungan4+'">'+
							'<input type="hidden" name="tabel_namakluwungan4[]" id="tabel_namakluwungan4'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_kluwungan4+'">'+
							'<input type="hidden" name="tabel_kodekluwungan4[]" id="tabel_kodekluwungan4'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_kluwungan4+'">'+
							'<input type="hidden" name="tabel_timbulan1[]" id="tabel_timbulan1'+respon[i].id_workorder_barang+'" value="'+respon[i].timbulan1+'">'+
							'<input type="hidden" name="tabel_namatimbulan1[]" id="tabel_namatimbulan1'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_timbulan1+'">'+
							'<input type="hidden" name="tabel_kodetimbulan1[]" id="tabel_kodetimbulan1'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_timbulan1+'">'+
							'<input type="hidden" name="tabel_timbulan2[]" id="tabel_timbulan2'+respon[i].id_workorder_barang+'" value="'+respon[i].timbulan2+'">'+
							'<input type="hidden" name="tabel_namatimbulan2[]" id="tabel_namatimbulan2'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_timbulan2+'">'+
							'<input type="hidden" name="tabel_kodetimbulan2[]" id="tabel_kodetimbulan2'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_timbulan2+'">'+
							'<input type="hidden" name="tabel_timbulan3[]" id="tabel_timbulan3'+respon[i].id_workorder_barang+'" value="'+respon[i].timbulan3+'">'+
							'<input type="hidden" name="tabel_namatimbulan3[]" id="tabel_namatimbulan3'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_timbulan3+'">'+
							'<input type="hidden" name="tabel_kodetimbulan3[]" id="tabel_kodetimbulan3'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_timbulan3+'">'+
							'<input type="hidden" name="tabel_songketan1[]" id="tabel_songketan1'+respon[i].id_workorder_barang+'" value="'+respon[i].songketan1+'">'+
							'<input type="hidden" name="tabel_namasongketan1[]" id="tabel_namasongketan1'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_songketan1+'">'+
							'<input type="hidden" name="tabel_kodesongketan1[]" id="tabel_kodesongketan1'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_songketan1+'">'+
							'<input type="hidden" name="tabel_songketan2[]" id="tabel_songketan2'+respon[i].id_workorder_barang+'" value="'+respon[i].songketan2+'">'+
							'<input type="hidden" name="tabel_namasongketan2[]" id="tabel_namasongketan2'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_songketan2+'">'+
							'<input type="hidden" name="tabel_kodesongketan2[]" id="tabel_kodesongketan2'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_songketan2+'">'+
							'<input type="hidden" name="tabel_songketan3[]" id="tabel_songketan3'+respon[i].id_workorder_barang+'" value="'+respon[i].songketan3+'">'+
							'<input type="hidden" name="tabel_namasongketan3[]" id="tabel_namasongketan3'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_songketan3+'">'+
							'<input type="hidden" name="tabel_kodesongketan3[]" id="tabel_kodesongketan3'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_songketan3+'">'+
							'<input type="hidden" name="tabel_songketan4[]" id="tabel_songketan4'+respon[i].id_workorder_barang+'" value="'+respon[i].songketan4+'">'+
							'<input type="hidden" name="tabel_namasongketan4[]" id="tabel_namasongketan4'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_songketan4+'">'+
							'<input type="hidden" name="tabel_kodesongketan4[]" id="tabel_kodesongketan4'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_songketan4+'">'+
							'<input type="hidden" name="tabel_songketan5[]" id="tabel_songketan5'+respon[i].id_workorder_barang+'" value="'+respon[i].songketan5+'">'+
							'<input type="hidden" name="tabel_namasongketan5[]" id="tabel_namasongketan5'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_songketan5+'">'+
							'<input type="hidden" name="tabel_kodesongketan5[]" id="tabel_kodesongketan5'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_songketan5+'">'+
							'<input type="hidden" name="tabel_songketan6[]" id="tabel_songketan6'+respon[i].id_workorder_barang+'" value="'+respon[i].songketan6+'">'+
							'<input type="hidden" name="tabel_namasongketan6[]" id="tabel_namasongketan6'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_songketan6+'">'+
							'<input type="hidden" name="tabel_kodesongketan6[]" id="tabel_kodesongketan6'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_songketan6+'">'+
							'<input type="hidden" name="tabel_songketan7[]" id="tabel_songketan7'+respon[i].id_workorder_barang+'" value="'+respon[i].songketan7+'">'+
							'<input type="hidden" name="tabel_namasongketan7[]" id="tabel_namasongketan7'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_songketan7+'">'+
							'<input type="hidden" name="tabel_kodesongketan7[]" id="tabel_kodesongketan7'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_songketan7+'">'+
							'<input type="hidden" name="tabel_songketan8[]" id="tabel_songketan8'+respon[i].id_workorder_barang+'" value="'+respon[i].songketan8+'">'+
							'<input type="hidden" name="tabel_namasongketan8[]" id="tabel_namasongketan8'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_songketan8+'">'+
							'<input type="hidden" name="tabel_kodesongketan8[]" id="tabel_kodesongketan8'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_songketan8+'">'+
							'<input type="hidden" name="tabel_songketan9[]" id="tabel_songketan9'+respon[i].id_workorder_barang+'" value="'+respon[i].songketan9+'">'+
							'<input type="hidden" name="tabel_namasongketan9[]" id="tabel_namasongketan9'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_songketan9+'">'+
							'<input type="hidden" name="tabel_kodesongketan9[]" id="tabel_kodesongketan9'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_songketan9+'">'+
							'<input type="hidden" name="tabel_songketan10[]" id="tabel_songketan10'+respon[i].id_workorder_barang+'" value="'+respon[i].songketan10+'">'+
							'<input type="hidden" name="tabel_namasongketan10[]" id="tabel_namasongketan10'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_songketan10+'">'+
							'<input type="hidden" name="tabel_kodesongketan10[]" id="tabel_kodesongketan10'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_songketan10+'">'+
							'<input type="hidden" name="tabel_songketan11[]" id="tabel_songketan11'+respon[i].id_workorder_barang+'" value="'+respon[i].songketan11+'">'+
							'<input type="hidden" name="tabel_namasongketan11[]" id="tabel_namasongketan11'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_songketan11+'">'+
							'<input type="hidden" name="tabel_kodesongketan11[]" id="tabel_kodesongketan11'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_songketan11+'">'+
							'<input type="hidden" name="tabel_songketan12[]" id="tabel_songketan12'+respon[i].id_workorder_barang+'" value="'+respon[i].songketan12+'">'+
							'<input type="hidden" name="tabel_namasongketan12[]" id="tabel_namasongketan12'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_songketan12+'">'+
							'<input type="hidden" name="tabel_kodesongketan12[]" id="tabel_kodesongketan12'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_songketan12+'">'+
							'<input type="hidden" name="tabel_songketan13[]" id="tabel_songketan13'+respon[i].id_workorder_barang+'" value="'+respon[i].songketan13+'">'+
							'<input type="hidden" name="tabel_namasongketan13[]" id="tabel_namasongketan13'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_songketan13+'">'+
							'<input type="hidden" name="tabel_kodesongketan13[]" id="tabel_kodesongketan13'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_songketan13+'">'+
							'<input type="hidden" name="tabel_songketan14[]" id="tabel_songketan14'+respon[i].id_workorder_barang+'" value="'+respon[i].songketan14+'">'+
							'<input type="hidden" name="tabel_namasongketan14[]" id="tabel_namasongketan14'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_songketan14+'">'+
							'<input type="hidden" name="tabel_kodesongketan14[]" id="tabel_kodesongketan14'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_songketan14+'">'+
							'<input type="hidden" name="tabel_songketan15[]" id="tabel_songketan15'+respon[i].id_workorder_barang+'" value="'+respon[i].songketan15+'">'+
							'<input type="hidden" name="tabel_namasongketan15[]" id="tabel_namasongketan15'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_songketan15+'">'+
							'<input type="hidden" name="tabel_kodesongketan15[]" id="tabel_kodesongketan15'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_songketan15+'">'+
							'<input type="hidden" name="tabel_pancingan1[]" id="tabel_pancingan1'+respon[i].id_workorder_barang+'" value="'+respon[i].pancingan1+'">'+
							'<input type="hidden" name="tabel_namapancingan1[]" id="tabel_namapancingan1'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_pancingan1+'">'+
							'<input type="hidden" name="tabel_kodepancingan1[]" id="tabel_kodepancingan1'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_pancingan1+'">'+
							'<input type="hidden" name="tabel_pancingan2[]" id="tabel_pancingan2'+respon[i].id_workorder_barang+'" value="'+respon[i].pancingan2+'">'+
							'<input type="hidden" name="tabel_namapancingan2[]" id="tabel_namapancingan2'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_pancingan2+'">'+
							'<input type="hidden" name="tabel_kodepancingan2[]" id="tabel_kodepancingan2'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_pancingan2+'">'+
							'<input type="hidden" name="tabel_gunungan1_atas[]" id="tabel_gunungan1_atas'+respon[i].id_workorder_barang+'" value="'+respon[i].gunungan1_atas+'">'+
							'<input type="hidden" name="tabel_namagunungan1_atas[]" id="tabel_namagunungan1_atas'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_gunungan1_atas+'">'+
							'<input type="hidden" name="tabel_kodegunungan1_atas[]" id="tabel_kodegunungan1_atas'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_gunungan1_atas+'">'+
							'<input type="hidden" name="tabel_gunungan2_atas[]" id="tabel_gunungan2_atas'+respon[i].id_workorder_barang+'" value="'+respon[i].gunungan2_atas+'">'+
							'<input type="hidden" name="tabel_namagunungan2_atas[]" id="tabel_namagunungan2_atas'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_gunungan2_atas+'">'+
							'<input type="hidden" name="tabel_kodegunungan2_atas[]" id="tabel_kodegunungan2_atas'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_gunungan2_atas+'">'+
							'<input type="hidden" name="tabel_gunungan3_atas[]" id="tabel_gunungan3_atas'+respon[i].id_workorder_barang+'" value="'+respon[i].gunungan3_atas+'">'+
							'<input type="hidden" name="tabel_namagunungan3_atas[]" id="tabel_namagunungan3_atas'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_gunungan3_atas+'">'+
							'<input type="hidden" name="tabel_kodegunungan3_atas[]" id="tabel_kodegunungan3_atas'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_gunungan3_atas+'">'+
							'<input type="hidden" name="tabel_gunungan1_bawah[]" id="tabel_gunungan1_bawah'+respon[i].id_workorder_barang+'" value="'+respon[i].gunungan1_bawah+'">'+
							'<input type="hidden" name="tabel_namagunungan1_bawah[]" id="tabel_namagunungan1_bawah'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_gunungan1_bawah+'">'+
							'<input type="hidden" name="tabel_kodegunungan1_bawah[]" id="tabel_kodegunungan1_bawah'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_gunungan1_bawah+'">'+
							'<input type="hidden" name="tabel_gunungan2_bawah[]" id="tabel_gunungan2_bawah'+respon[i].id_workorder_barang+'" value="'+respon[i].gunungan2_bawah+'">'+
							'<input type="hidden" name="tabel_namagunungan2_bawah[]" id="tabel_namagunungan2_bawah'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_gunungan2_bawah+'">'+
							'<input type="hidden" name="tabel_kodegunungan2_bawah[]" id="tabel_kodegunungan2_bawah'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_gunungan2_bawah+'">'+
							'<input type="hidden" name="tabel_gunungan3_bawah[]" id="tabel_gunungan3_bawah'+respon[i].id_workorder_barang+'" value="'+respon[i].gunungan3_bawah+'">'+
							'<input type="hidden" name="tabel_namagunungan3_bawah[]" id="tabel_namagunungan3_bawah'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_gunungan3_bawah+'">'+
							'<input type="hidden" name="tabel_kodegunungan3_bawah[]" id="tabel_kodegunungan3_bawah'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_gunungan3_bawah+'">'+
							'<input type="hidden" name="tabel_garis1[]" id="tabel_garis1'+respon[i].id_workorder_barang+'" value="'+respon[i].garis1+'">'+
							'<input type="hidden" name="tabel_namagaris1[]" id="tabel_namagaris1'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_garis1+'">'+
							'<input type="hidden" name="tabel_kodegaris1[]" id="tabel_kodegaris1'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_garis1+'">'+
							'<input type="hidden" name="tabel_garis2[]" id="tabel_garis2'+respon[i].id_workorder_barang+'" value="'+respon[i].garis2+'">'+
							'<input type="hidden" name="tabel_namagaris2[]" id="tabel_namagaris2'+respon[i].id_workorder_barang+'" value="'+respon[i].nama_garis2+'">'+
							'<input type="hidden" name="tabel_kodegaris2[]" id="tabel_kodegaris2'+respon[i].id_workorder_barang+'" value="'+respon[i].inisial_garis2+'">'+
							'<input type="hidden" name="tabel_pakan[]" id="tabel_pakan'+respon[i].id_workorder_barang+'" value="'+respon[i].pakan+'">'
							]).draw(false);
					}
					$("[name=store_idmotif]").val(respon[0].motif);
					get_ket_motif(respon[0].motif);
				}
				
			}
		})
	}

	function get_edit_ket(id){
		$.ajax({
			url: "{{ url('workorder/get_edit_ket')}} ",
			type: 'post',
			data: {id : id,},
			headers : {
				'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
			},
			success: function(respon){
				if(respon.length > 0){
					for(i in respon){
						table_ket.row.add(['<div><center></center></div>',
							'<div id="list2_ket'+respon[i].id_workorder_ket+'">'+respon[i].nama_keterangan+'</div>',
							'<div id="list2_idbarang'+respon[i].id_workorder_ket+'">'+respon[i].nama_barang+'</div>',
							'<div id="list2_pd'+respon[i].id_workorder_ket+'">'+respon[i].jumlah+' '+respon[i].nama_satuanjumlah+'</div>',
							'<div id="list2_pak'+respon[i].id_workorder_ket+'">'+respon[i].jumlah_konversi+' '+respon[i].nama_satuankonversi+'</div>',
							'<div><button type="button" class="btn bg-warning-400" onclick="edit_table_ket('+respon[i].id_workorder_ket+')"><i class="icon-pencil"></i> </button><button class="btn bg-danger-800" type="button" onclick="hapus_ket($(this))"><i class="icon-eraser"></i></button></div>'+
							'<input type="hidden" name="tabel2_id[]" id="tabel2_id'+respon[i].id_workorder_ket+'" value="'+respon[i].id_workorder_ket+'">'+
							'<input type="hidden" name="tabel2_idbarang[]" id="tabel2_idbarang'+respon[i].id_workorder_ket+'" value="'+respon[i].id_barang+'">'+
							'<input type="hidden" name="tabel2_ket[]" id="tabel2_ket'+respon[i].id_workorder_ket+'" value="'+respon[i].keterangan+'">'+
							'<input type="hidden" name="tabel2_jumlah[]" id="tabel2_jumlah'+respon[i].id_workorder_ket+'" value="'+respon[i].jumlah+'">'+
							'<input type="hidden" name="tabel2_jumlah_konversi[]" id="tabel2_jumlah_konversi'+respon[i].id_workorder_ket+'" value="'+respon[i].jumlah_konversi+'">'+
							'<input type="hidden" name="tabel2_satuan_jumlah[]" id="tabel2_satuan_jumlah'+respon[i].id_workorder_ket+'" value="'+respon[i].satuan_jumlah+'">'+
							'<input type="hidden" name="tabel2_satuan_konversi[]" id="tabel2_satuan_konversi'+respon[i].id_workorder_ket+'" value="'+respon[i].satuan_konversi+'">'
							]).draw(false);
					}

				}
				
			}
		})
	}

	$("#btn_popup_simpan_ket").click(function(){
		var id_data = $("[name=popup2_id_table]").val();
		var ket = $("[name=popup2_ket]").val();
		var nama_ket = $("[name=popup2_ket] :selected").attr('nama');
		var id_barang = $("[name=popup2_barang]").val();
		var nama_barang = $("[name=popup2_barang] :selected").attr('barang');
		var kode_barang = $("[name=popup2_barang] :selected").attr('kode');
		var jumlah = $("[name=popup2_jumlah]").val();
		var jumlah_konversi = $("[name=popup2_jumlah_konversi]").val();
		var satuan_jumlah = $("[name=popup2_satuan_jumlah]").val();	
		var satuan_konversi = $("[name=popup2_satuan_konversi]").val();	
		var nama_satuanjumlah = $("[name=popup2_satuan_jumlah] :selected").attr('nama');
		var nama_satuankonversi = $("[name=popup2_satuan_konversi] :selected").attr('nama');
		if(ket != '' && id_barang != '' && jumlah != '' && jumlah_konversi != ''){
			if(id_data == ''){
				table_ket.row.add(['<div><center></center></div>',
					'<div id="list2_ket'+tb_ket+'">'+nama_ket+'</div>',
					'<div id="list2_idbarang'+tb_ket+'">'+nama_barang+'</div>',
					'<div id="list2_pd'+tb_ket+'">'+jumlah+' '+nama_satuanjumlah+'</div>',
					'<div id="list2_pak'+tb_ket+'">'+jumlah_konversi+' '+nama_satuankonversi+'</div>',
					'<div><button type="button" class="btn bg-warning-400" onclick="edit_table_ket('+tb_ket+')"><i class="icon-pencil"></i> </button><button class="btn bg-danger-800" type="button" onclick="hapus_ket($(this))"><i class="icon-eraser"></i></button></div>'+
					'<input type="hidden" name="tabel2_id[]" id="tabel2_id'+tb_ket+'" value="">'+
					'<input type="hidden" name="tabel2_idbarang[]" id="tabel2_idbarang'+tb_ket+'" value="'+id_barang+'">'+
					'<input type="hidden" name="tabel2_ket[]" id="tabel2_ket'+tb_ket+'" value="'+ket+'">'+
					'<input type="hidden" name="tabel2_jumlah[]" id="tabel2_jumlah'+tb_ket+'" value="'+jumlah+'">'+
					'<input type="hidden" name="tabel2_jumlah_konversi[]" id="tabel2_jumlah_konversi'+tb_ket+'" value="'+jumlah_konversi+'">'+
					'<input type="hidden" name="tabel2_satuan_jumlah[]" id="tabel2_satuan_jumlah'+tb_ket+'" value="'+satuan_jumlah+'">'+
					'<input type="hidden" name="tabel2_satuan_konversi[]" id="tabel2_satuan_konversi'+tb_ket+'" value="'+satuan_konversi+'">'
					]).draw(false);
			}else{
				$("#list2_ket"+id_data).text(nama_ket);
				$("#list2_idbarang"+id_data).text(nama_barang);
				$("#list2_pd"+id_data).text(jumlah+' '+nama_satuanjumlah);
				$("#list2_pak"+id_data).text(jumlah_konversi+' '+nama_satuankonversi);

				$("#tabel2_id"+id_data).val(id_data);
				$("#tabel2_ket"+id_data).val(ket);				
				$("#tabel2_idbarang"+id_data).val(id_barang);
				$("#tabel2_jumlah"+id_data).val(jumlah);
				$("#tabel2_jumlah_konversi"+id_data).val(jumlah_konversi);
				$("#tabel2_satuan_jumlah"+id_data).val(satuan_jumlah);
				$("#tabel2_satuan_konversi"+id_data).val(satuan_konversi);
			}


			$("#exampleModal2").modal('hide');
			tb_ket++;
		}
	})

	function edit_table_ket(id){
		var ket = $("#tabel2_ket"+id).val();
		var id_barang = $("#tabel2_idbarang"+id).val();
		var jumlah = $("#tabel2_jumlah"+id).val();
		var jumlah_konversi = $("#tabel2_jumlah_konversi"+id).val();
		var satuan_jumlah = $("#tabel2_satuan_jumlah"+id).val();
		var satuan_konversi = $("#tabel2_satuan_konversi"+id).val();

		$("[name=popup2_id_table]").val(id);
		$("[name=popup2_ket]").val(ket).trigger('change');
		$("[name=popup2_barang]").val(id_barang).trigger('change');
		$("[name=popup2_jumlah]").val(jumlah);
		$("[name=popup2_jumlah_konversi]").val(jumlah_konversi);
		$("[name=popup2_satuan_jumlah]").val(satuan_jumlah).trigger('change');
		$("[name=popup2_satuan_konversi]").val(satuan_konversi).trigger('change');
		
		$("#exampleModal2").modal('show');
	}


	$("#btn_popup_simpan").click(function(){
		var id_data = $("[name=popup_id_table]").val();
		var id_order = $("[name=popup_order]").val();
		var motif = $("[name=popup_motif]").val();
		var nama_motif = $("[name=popup_motif] :selected").attr('nama');
		var tanggal = $("[name=popup_tgl]").val();;
		var hb = $("[name=popup_hb]").val();
		var jml_beem = $("[name=popup_jumlah_beem]").val();
		var c_dasar = $("[name=popup_dasar]").val();
		var c_nama_dasar = $("[name=popup_dasar] :selected").attr('nama');
		var c_kode_dasar = $("[name=popup_dasar] :selected").attr('kode');
		var c_dasar2 = $("[name=popup_dasar2]").val();
		var c_nama_dasar2 = $("[name=popup_dasar2] :selected").attr('nama');
		var c_kode_dasar2 = $("[name=popup_dasar2] :selected").attr('kode'); 
		var c_dasar3 = $("[name=popup_dasar3]").val();
		var c_nama_dasar3 = $("[name=popup_dasar3] :selected").attr('nama');
		var c_kode_dasar3 = $("[name=popup_dasar3] :selected").attr('kode');
		var c_dasar4 = $("[name=popup_dasar4]").val();
		var c_nama_dasar4 = $("[name=popup_dasar4] :selected").attr('nama');
		var c_kode_dasar4 = $("[name=popup_dasar4] :selected").attr('kode');
		var c_dasar5 = $("[name=popup_dasar5]").val();
		var c_nama_dasar5 = $("[name=popup_dasar5] :selected").attr('nama');
		var c_kode_dasar5 = $("[name=popup_dasar5] :selected").attr('kode');
		var c_dasar6 = $("[name=popup_dasar6]").val();
		var c_nama_dasar6 = $("[name=popup_dasar6] :selected").attr('nama');
		var c_kode_dasar6 = $("[name=popup_dasar6] :selected").attr('kode');
		var c_dasar7 = $("[name=popup_dasar7]").val();
		var c_nama_dasar7 = $("[name=popup_dasar7] :selected").attr('nama');
		var c_kode_dasar7 = $("[name=popup_dasar7] :selected").attr('kode');
		var c_dasar8 = $("[name=popup_dasar8]").val();
		var c_nama_dasar8 = $("[name=popup_dasar8] :selected").attr('nama');
		var c_kode_dasar8 = $("[name=popup_dasar8] :selected").attr('kode');
		var c_dasar9 = $("[name=popup_dasar9]").val();
		var c_nama_dasar9 = $("[name=popup_dasar9] :selected").attr('nama');
		var c_kode_dasar9 = $("[name=popup_dasar9] :selected").attr('kode');
		var c_dasar10 = $("[name=popup_dasar10]").val();
		var c_nama_dasar10 = $("[name=popup_dasar10] :selected").attr('nama');
		var c_kode_dasar10 = $("[name=popup_dasar10] :selected").attr('kode');
		var c_streep = $("[name=popup_streep]").val();
		var c_nama_streep = $("[name=popup_streep] :selected").attr('nama');
		var c_kode_streep = $("[name=popup_streep] :selected").attr('kode') ;
		var c_kombinasi1 = $("[name=popup_kombinasi1]").val();
		var c_nama_kombinasi1 = $("[name=popup_kombinasi1] :selected").attr('nama');
		var c_kode_kombinasi1 = $("[name=popup_kombinasi1] :selected").attr('kode');
		var c_kombinasi2 = $("[name=popup_kombinasi2]").val();
		var c_nama_kombinasi2 = $("[name=popup_kombinasi2] :selected").attr('nama');
		var c_kode_kombinasi2 = $("[name=popup_kombinasi2] :selected").attr('kode');
		var c_kombinasi3 = $("[name=popup_kombinasi3]").val();
		var c_nama_kombinasi3 = $("[name=popup_kombinasi3] :selected").attr('nama');
		var c_kode_kombinasi3 = $("[name=popup_kombinasi3] :selected").attr('kode');
		var c_kluwungan1 = $("[name=popup_kluwungan1]").val();
		var c_nama_kluwungan1 = $("[name=popup_kluwungan1] :selected").attr('nama');
		var c_kode_kluwungan1 = $("[name=popup_kluwungan1] :selected").attr('kode');
		var c_kluwungan2 = $("[name=popup_kluwungan2]").val();
		var c_nama_kluwungan2 = $("[name=popup_kluwungan2] :selected").attr('nama');
		var c_kode_kluwungan2 = $("[name=popup_kluwungan2] :selected").attr('kode');
		var c_kluwungan3 = $("[name=popup_kluwungan3]").val();
		var c_nama_kluwungan3 = $("[name=popup_kluwungan3] :selected").attr('nama');
		var c_kode_kluwungan3 = $("[name=popup_kluwungan3] :selected").attr('kode');
		var c_kluwungan4 = $("[name=popup_kluwungan4]").val();
		var c_nama_kluwungan4 = $("[name=popup_kluwungan4] :selected").attr('nama');
		var c_kode_kluwungan4 = $("[name=popup_kluwungan4] :selected").attr('kode');
		var c_timbulan1 = $("[name=popup_timbulan1]").val();
		var c_nama_timbulan1 = $("[name=popup_timbulan1] :selected").attr('nama');
		var c_kode_timbulan1 = $("[name=popup_timbulan1] :selected").attr('kode');
		var c_timbulan2 = $("[name=popup_timbulan2]").val();
		var c_nama_timbulan2 = $("[name=popup_timbulan2] :selected").attr('nama');
		var c_kode_timbulan2 = $("[name=popup_timbulan2] :selected").attr('kode');
		var c_timbulan3 = $("[name=popup_timbulan3]").val();
		var c_nama_timbulan3 = $("[name=popup_timbulan3] :selected").attr('nama');
		var c_kode_timbulan3 = $("[name=popup_timbulan3] :selected").attr('kode');
		var c_songketan1 = $("[name=popup_songketan1]").val();
		var c_nama_songketan1 = $("[name=popup_songketan1] :selected").attr('nama');
		var c_kode_songketan1 = $("[name=popup_songketan1] :selected").attr('kode');
		var c_songketan2 = $("[name=popup_songketan2]").val();
		var c_nama_songketan2 = $("[name=popup_songketan2] :selected").attr('nama');
		var c_kode_songketan2 = $("[name=popup_songketan2] :selected").attr('kode');
		var c_songketan3 = $("[name=popup_songketan3]").val();
		var c_nama_songketan3 = $("[name=popup_songketan3] :selected").attr('nama');
		var c_kode_songketan3 = $("[name=popup_songketan3] :selected").attr('kode');
		var c_songketan4 = $("[name=popup_songketan4]").val();
		var c_nama_songketan4 = $("[name=popup_songketan4] :selected").attr('nama');
		var c_kode_songketan4 = $("[name=popup_songketan4] :selected").attr('kode');
		var c_songketan5 = $("[name=popup_songketan5]").val();
		var c_nama_songketan5 = $("[name=popup_songketan5] :selected").attr('nama');
		var c_kode_songketan5 = $("[name=popup_songketan5] :selected").attr('kode');
		var c_songketan6 = $("[name=popup_songketan6]").val();
		var c_nama_songketan6 = $("[name=popup_songketan6] :selected").attr('nama');
		var c_kode_songketan6 = $("[name=popup_songketan6] :selected").attr('kode');
		var c_songketan7 = $("[name=popup_songketan7]").val();
		var c_nama_songketan7 = $("[name=popup_songketan7] :selected").attr('nama');
		var c_kode_songketan7 = $("[name=popup_songketan7] :selected").attr('kode');
		var c_songketan8 = $("[name=popup_songketan8]").val();
		var c_nama_songketan8 = $("[name=popup_songketan8] :selected").attr('nama');
		var c_kode_songketan8 = $("[name=popup_songketan8] :selected").attr('kode');
		var c_songketan9 = $("[name=popup_songketan9]").val();
		var c_nama_songketan9 = $("[name=popup_songketan9] :selected").attr('nama');
		var c_kode_songketan9 = $("[name=popup_songketan9] :selected").attr('kode');
		var c_songketan10 = $("[name=popup_songketan10]").val();
		var c_nama_songketan10 = $("[name=popup_songketan10] :selected").attr('nama');
		var c_kode_songketan10 = $("[name=popup_songketan10] :selected").attr('kode');
		var c_songketan11 = $("[name=popup_songketan11]").val();
		var c_nama_songketan11 = $("[name=popup_songketan11] :selected").attr('nama');
		var c_kode_songketan11 = $("[name=popup_songketan11] :selected").attr('kode');
		var c_songketan12 = $("[name=popup_songketan12]").val();
		var c_nama_songketan12 = $("[name=popup_songketan12] :selected").attr('nama');
		var c_kode_songketan12 = $("[name=popup_songketan12] :selected").attr('kode');
		var c_songketan13 = $("[name=popup_songketan13]").val();
		var c_nama_songketan13 = $("[name=popup_songketan13] :selected").attr('nama');
		var c_kode_songketan13 = $("[name=popup_songketan13] :selected").attr('kode');
		var c_songketan14 = $("[name=popup_songketan14]").val();
		var c_nama_songketan14 = $("[name=popup_songketan14] :selected").attr('nama');
		var c_kode_songketan14 = $("[name=popup_songketan14] :selected").attr('kode');
		var c_songketan15 = $("[name=popup_songketan15]").val();
		var c_nama_songketan15 = $("[name=popup_songketan15] :selected").attr('nama');
		var c_kode_songketan15 = $("[name=popup_songketan15] :selected").attr('kode');
		var c_songketan4 = $("[name=popup_songketan4]").val();
		var c_nama_songketan4 = $("[name=popup_songketan4] :selected").attr('nama');
		var c_kode_songketan4 = $("[name=popup_songketan4] :selected").attr('kode');
		var c_pancingan1 = $("[name=popup_pancingan1]").val();
		var c_nama_pancingan1 = $("[name=popup_pancingan1] :selected").attr('nama');
		var c_kode_pancingan1 = $("[name=popup_pancingan1] :selected").attr('kode');
		var c_pancingan2 = $("[name=popup_pancingan2]").val();
		var c_nama_pancingan2 = $("[name=popup_pancingan2] :selected").attr('nama');
		var c_kode_pancingan2 = $("[name=popup_pancingan2] :selected").attr('kode');
		var c_gunungan1_atas = $("[name=popup_gunungan1_atas]").val();
		var c_nama_gunungan1_atas = $("[name=popup_gunungan1_atas] :selected").attr('nama');
		var c_kode_gunungan1_atas = $("[name=popup_gunungan1_atas] :selected").attr('kode');
		var c_gunungan2_atas = $("[name=popup_gunungan2_atas]").val();
		var c_nama_gunungan2_atas = $("[name=popup_gunungan2_atas] :selected").attr('nama');
		var c_kode_gunungan2_atas = $("[name=popup_gunungan2_atas] :selected").attr('kode');
		var c_gunungan3_atas = $("[name=popup_gunungan3_atas]").val();
		var c_nama_gunungan3_atas = $("[name=popup_gunungan3_atas] :selected").attr('nama');
		var c_kode_gunungan3_atas = $("[name=popup_gunungan3_atas] :selected").attr('kode');
		var c_gunungan1_bawah = $("[name=popup_gunungan1_bawah]").val();
		var c_nama_gunungan1_bawah = $("[name=popup_gunungan1_bawah] :selected").attr('nama');
		var c_kode_gunungan1_bawah = $("[name=popup_gunungan1_bawah] :selected").attr('kode');
		var c_gunungan2_bawah = $("[name=popup_gunungan2_bawah]").val();
		var c_nama_gunungan2_bawah = $("[name=popup_gunungan2_bawah] :selected").attr('nama');
		var c_kode_gunungan2_bawah = $("[name=popup_gunungan2_bawah] :selected").attr('kode');
		var c_gunungan3_bawah = $("[name=popup_gunungan3_bawah]").val();
		var c_nama_gunungan3_bawah = $("[name=popup_gunungan3_bawah] :selected").attr('nama');
		var c_kode_gunungan3_bawah = $("[name=popup_gunungan3_bawah] :selected").attr('kode');
		var c_garis1 = $("[name=popup_garis1]").val();
		var c_nama_garis1 = $("[name=popup_garis1] :selected").attr('nama');
		var c_kode_garis1 = $("[name=popup_garis1] :selected").attr('kode');
		var c_garis2 = $("[name=popup_garis2]").val();
		var c_nama_garis2 = $("[name=popup_garis2] :selected").attr('nama');
		var c_kode_garis2 = $("[name=popup_garis2] :selected").attr('kode');
		var c_beem = $("[name=popup_beem]").val();
		var c_pakan = $("[name=popup_pakan]").val();


		var dasar ='';
		var nama_dasar ='';
		var kode_dasar ='';
		var dasar2 ='';
		var nama_dasar2 ='';
		var kode_dasar2 ='';
		var dasar3 ='';
		var nama_dasar3 ='';
		var kode_dasar3 ='';
		var dasar4 ='';
		var nama_dasar4 ='';
		var kode_dasar4 ='';
		var dasar5 ='';
		var nama_dasar5 ='';
		var kode_dasar5 ='';
		var dasar6 ='';
		var nama_dasar6 ='';
		var kode_dasar6 ='';
		var dasar7 ='';
		var nama_dasar7 ='';
		var kode_dasar7 ='';
		var dasar8 ='';
		var nama_dasar8 ='';
		var kode_dasar8 ='';
		var dasar9 ='';
		var nama_dasar9 ='';
		var kode_dasar9 ='';
		var dasar10 ='';
		var nama_dasar10 ='';
		var kode_dasar10 ='';
		var streep ='';
		var nama_streep ='';
		var kode_streep ='';
		var kombinasi1 ='';
		var nama_kombinasi1 ='';
		var kode_kombinasi1 ='';
		var kombinasi2 ='';
		var nama_kombinasi2 ='';
		var kode_kombinasi2 ='';
		var kombinasi3 ='';
		var nama_kombinasi3 ='';
		var kode_kombinasi3 ='';
		var kluwungan1 ='';
		var nama_kluwungan1 ='';
		var kode_kluwungan1 ='';
		var kluwungan2 ='';
		var nama_kluwungan2 ='';
		var kode_kluwungan2 ='';
		var kluwungan3 ='';
		var nama_kluwungan3 ='';
		var kode_kluwungan3 ='';
		var kluwungan4 ='';
		var nama_kluwungan4 ='';
		var kode_kluwungan4 ='';
		var timbulan1 ='';
		var nama_timbulan1 ='';
		var kode_timbulan1 ='';
		var timbulan2 ='';
		var nama_timbulan2 ='';
		var kode_timbulan2 ='';
		var timbulan3 ='';
		var nama_timbulan3 ='';
		var kode_timbulan3 ='';
		var songketan1 ='';
		var nama_songketan1 ='';
		var kode_songketan1 ='';
		var songketan2 ='';
		var nama_songketan2 ='';
		var kode_songketan2 ='';
		var songketan3 ='';
		var nama_songketan3 ='';
		var kode_songketan3 ='';
		var songketan4 ='';
		var nama_songketan4 ='';
		var kode_songketan4 ='';
		var songketan5 ='';
		var nama_songketan5 ='';
		var kode_songketan5 ='';
		var songketan6 ='';
		var nama_songketan6 ='';
		var kode_songketan6 ='';
		var songketan7 ='';
		var nama_songketan7 ='';
		var kode_songketan7 ='';
		var songketan8 ='';
		var nama_songketan8 ='';
		var kode_songketan8 ='';
		var songketan9 ='';
		var nama_songketan9 ='';
		var kode_songketan9 ='';
		var songketan10 ='';
		var nama_songketan10 ='';
		var kode_songketan10 ='';
		var songketan11 ='';
		var nama_songketan11 ='';
		var kode_songketan11 ='';
		var songketan12 ='';
		var nama_songketan12 ='';
		var kode_songketan12 ='';
		var songketan13 ='';
		var nama_songketan13 ='';
		var kode_songketan13 ='';
		var songketan14 ='';
		var nama_songketan14 ='';
		var kode_songketan14 ='';
		var songketan15 ='';
		var nama_songketan15 ='';
		var kode_songketan15 ='';
		var pancingan1 ='';
		var nama_pancingan1 ='';
		var kode_pancingan1 ='';
		var pancingan2 ='';
		var nama_pancingan2 ='';
		var kode_pancingan2 ='';
		var gunungan1_atas ='';
		var nama_gunungan1_atas ='';
		var kode_gunungan1_atas ='';
		var gunungan2_atas ='';
		var nama_gunungan2_atas ='';
		var kode_gunungan2_atas ='';
		var gunungan3_atas ='';
		var nama_gunungan3_atas ='';
		var kode_gunungan3_atas ='';
		var gunungan1_bawah ='';
		var nama_gunungan1_bawah ='';
		var kode_gunungan1_bawah ='';
		var gunungan2_bawah ='';
		var nama_gunungan2_bawah ='';
		var kode_gunungan2_bawah ='';
		var gunungan3_bawah ='';
		var nama_gunungan3_bawah ='';
		var kode_gunungan3_bawah ='';
		var garis1 ='';
		var nama_garis1 ='';
		var kode_garis1 ='';
		var garis2 ='';
		var nama_garis2 ='';
		var kode_garis2 ='';
		var beem ='';
		var pakan ='';

		if(c_dasar != '' || c_dasar != 0){
		var dasar = $("[name=popup_dasar]").val();
		var nama_dasar = $("[name=popup_dasar] :selected").attr('nama');
		var kode_dasar = $("[name=popup_dasar] :selected").attr('kode');
		}
		if(c_dasar2 != '' || c_dasar2 != 0){
		var dasar2 = $("[name=popup_dasar2]").val();
		var nama_dasar2 = $("[name=popup_dasar2] :selected").attr('nama');
		var kode_dasar2 = $("[name=popup_dasar2] :selected").attr('kode'); 
		}
		if(c_dasar3 != '' || c_dasar3 != 0){
		var dasar3 = $("[name=popup_dasar3]").val();
		var nama_dasar3 = $("[name=popup_dasar3] :selected").attr('nama');
		var kode_dasar3 = $("[name=popup_dasar3] :selected").attr('kode');
		}
		if(c_dasar4 != '' || c_dasar4 != 0){
		var dasar4 = $("[name=popup_dasar4]").val();
		var nama_dasar4 = $("[name=popup_dasar4] :selected").attr('nama');
		var kode_dasar4 = $("[name=popup_dasar4] :selected").attr('kode');
		}
		if(c_dasar5 != '' || c_dasar5 != 0){
		var dasar5 = $("[name=popup_dasar5]").val();
		var nama_dasar5 = $("[name=popup_dasar5] :selected").attr('nama');
		var kode_dasar5 = $("[name=popup_dasar5] :selected").attr('kode');
		}
		if(c_dasar6 != '' || c_dasar6 != 0){
		var dasar6 = $("[name=popup_dasar6]").val();
		var nama_dasar6 = $("[name=popup_dasar6] :selected").attr('nama');
		var kode_dasar6 = $("[name=popup_dasar6] :selected").attr('kode');
		}
		if(c_dasar7 != '' || c_dasar7 != 0){
		var dasar7 = $("[name=popup_dasar7]").val();
		var nama_dasar7 = $("[name=popup_dasar7] :selected").attr('nama');
		var kode_dasar7 = $("[name=popup_dasar7] :selected").attr('kode');
		}
		if(c_dasar8 != '' || c_dasar8 != 0){
		var dasar8 = $("[name=popup_dasar8]").val();
		var nama_dasar8 = $("[name=popup_dasar8] :selected").attr('nama');
		var kode_dasar8 = $("[name=popup_dasar8] :selected").attr('kode');
		}
		if(c_dasar9 != '' || c_dasar9 != 0){
		var dasar9 = $("[name=popup_dasar9]").val();
		var nama_dasar9 = $("[name=popup_dasar9] :selected").attr('nama');
		var kode_dasar9 = $("[name=popup_dasar9] :selected").attr('kode');
		}
		if(c_dasar10 != '' || c_dasar10 != 0){
		var dasar10 = $("[name=popup_dasar10]").val();
		var nama_dasar10 = $("[name=popup_dasar10] :selected").attr('nama');
		var kode_dasar10 = $("[name=popup_dasar10] :selected").attr('kode');
		}
		if(c_streep != '' || c_streep != 0){
		var streep = $("[name=popup_streep]").val();
		var nama_streep = $("[name=popup_streep] :selected").attr('nama');
		var kode_streep = $("[name=popup_streep] :selected").attr('kode') ;
		}
		if(c_kombinasi1 != '' || c_kombinasi1 != 0){
		var kombinasi1 = $("[name=popup_kombinasi1]").val();
		var nama_kombinasi1 = $("[name=popup_kombinasi1] :selected").attr('nama');
		var kode_kombinasi1 = $("[name=popup_kombinasi1] :selected").attr('kode');
		}
		if(c_kombinasi2 != '' || c_kombinasi2 != 0){
		var kombinasi2 = $("[name=popup_kombinasi2]").val();
		var nama_kombinasi2 = $("[name=popup_kombinasi2] :selected").attr('nama');
		var kode_kombinasi2 = $("[name=popup_kombinasi2] :selected").attr('kode');
		}
		if(c_kombinasi3 != '' || c_kombinasi3 != 0){
		var kombinasi3 = $("[name=popup_kombinasi3]").val();
		var nama_kombinasi3 = $("[name=popup_kombinasi3] :selected").attr('nama');
		var kode_kombinasi3 = $("[name=popup_kombinasi3] :selected").attr('kode');
		}
		if(c_kluwungan1 != '' || c_kluwungan1 != 0){
		var kluwungan1 = $("[name=popup_kluwungan1]").val();
		var nama_kluwungan1 = $("[name=popup_kluwungan1] :selected").attr('nama');
		var kode_kluwungan1 = $("[name=popup_kluwungan1] :selected").attr('kode');
		}
		if(c_kluwungan2 != '' || c_kluwungan2 != 0){
		var kluwungan2 = $("[name=popup_kluwungan2]").val();
		var nama_kluwungan2 = $("[name=popup_kluwungan2] :selected").attr('nama');
		var kode_kluwungan2 = $("[name=popup_kluwungan2] :selected").attr('kode');
		}
		if(c_kluwungan3 != '' || c_kluwungan3 != 0){
		var kluwungan3 = $("[name=popup_kluwungan3]").val();
		var nama_kluwungan3 = $("[name=popup_kluwungan3] :selected").attr('nama');
		var kode_kluwungan3 = $("[name=popup_kluwungan3] :selected").attr('kode');
		}
		if(c_kluwungan4 != '' || c_kluwungan4 != 0){
		var kluwungan4 = $("[name=popup_kluwungan4]").val();
		var nama_kluwungan4 = $("[name=popup_kluwungan4] :selected").attr('nama');
		var kode_kluwungan4 = $("[name=popup_kluwungan4] :selected").attr('kode');
		}
		if(c_timbulan1 != '' || c_timbulan1 != 0){
		var timbulan1 = $("[name=popup_timbulan1]").val();
		var nama_timbulan1 = $("[name=popup_timbulan1] :selected").attr('nama');
		var kode_timbulan1 = $("[name=popup_timbulan1] :selected").attr('kode');
		}
		if(c_timbulan2 != '' || c_timbulan2 != 0){
		var timbulan2 = $("[name=popup_timbulan2]").val();
		var nama_timbulan2 = $("[name=popup_timbulan2] :selected").attr('nama');
		var kode_timbulan2 = $("[name=popup_timbulan2] :selected").attr('kode');
		}
		if(c_timbulan3 != '' || c_timbulan3 != 0){
		var timbulan3 = $("[name=popup_timbulan3]").val();
		var nama_timbulan3 = $("[name=popup_timbulan3] :selected").attr('nama');
		var kode_timbulan3 = $("[name=popup_timbulan3] :selected").attr('kode');
		}
		if(c_songketan1 != '' || c_songketan1 != 0){
		var songketan1 = $("[name=popup_songketan1]").val();
		var nama_songketan1 = $("[name=popup_songketan1] :selected").attr('nama');
		var kode_songketan1 = $("[name=popup_songketan1] :selected").attr('kode');
		}
		if(c_songketan2 != '' || c_songketan2 != 0){
		var songketan2 = $("[name=popup_songketan2]").val();
		var nama_songketan2 = $("[name=popup_songketan2] :selected").attr('nama');
		var kode_songketan2 = $("[name=popup_songketan2] :selected").attr('kode');
		}
		if(c_songketan3 != '' || c_songketan3 != 0){
		var songketan3 = $("[name=popup_songketan3]").val();
		var nama_songketan3 = $("[name=popup_songketan3] :selected").attr('nama');
		var kode_songketan3 = $("[name=popup_songketan3] :selected").attr('kode');
		}
		if(c_songketan4 != '' || c_songketan4 != 0){
		var songketan4 = $("[name=popup_songketan4]").val();
		var nama_songketan4 = $("[name=popup_songketan4] :selected").attr('nama');
		var kode_songketan4 = $("[name=popup_songketan4] :selected").attr('kode');
		}
		if(c_songketan5 != '' || c_songketan5 != 0){
		var songketan5 = $("[name=popup_songketan5]").val();
		var nama_songketan5 = $("[name=popup_songketan5] :selected").attr('nama');
		var kode_songketan5 = $("[name=popup_songketan5] :selected").attr('kode');
		}
		if(c_songketan6 != '' || c_songketan6 != 0){
		var songketan6 = $("[name=popup_songketan6]").val();
		var nama_songketan6 = $("[name=popup_songketan6] :selected").attr('nama');
		var kode_songketan6 = $("[name=popup_songketan6] :selected").attr('kode');
		}
		if(c_songketan7 != '' || c_songketan7 != 0){
		var songketan7 = $("[name=popup_songketan7]").val();
		var nama_songketan7 = $("[name=popup_songketan7] :selected").attr('nama');
		var kode_songketan7 = $("[name=popup_songketan7] :selected").attr('kode');
		}
		if(c_songketan8 != '' || c_songketan8 != 0){
		var songketan8 = $("[name=popup_songketan8]").val();
		var nama_songketan8 = $("[name=popup_songketan8] :selected").attr('nama');
		var kode_songketan8 = $("[name=popup_songketan8] :selected").attr('kode');
		}
		if(c_songketan9 != '' || c_songketan9 != 0){
		var songketan9 = $("[name=popup_songketan9]").val();
		var nama_songketan9 = $("[name=popup_songketan9] :selected").attr('nama');
		var kode_songketan9 = $("[name=popup_songketan9] :selected").attr('kode');
		}
		if(c_songketan10 != '' || c_songketan10 != 0){
		var songketan10 = $("[name=popup_songketan10]").val();
		var nama_songketan10 = $("[name=popup_songketan10] :selected").attr('nama');
		var kode_songketan10 = $("[name=popup_songketan10] :selected").attr('kode');
		}
		if(c_songketan11 != '' || c_songketan11 != 0){
		var songketan11 = $("[name=popup_songketan11]").val();
		var nama_songketan11 = $("[name=popup_songketan11] :selected").attr('nama');
		var kode_songketan11 = $("[name=popup_songketan11] :selected").attr('kode');
		}
		if(c_songketan12 != '' || c_songketan12 != 0){
		var songketan12 = $("[name=popup_songketan12]").val();
		var nama_songketan12 = $("[name=popup_songketan12] :selected").attr('nama');
		var kode_songketan12 = $("[name=popup_songketan12] :selected").attr('kode');
		}
		if(c_songketan13 != '' || c_songketan13 != 0){
		var songketan13 = $("[name=popup_songketan13]").val();
		var nama_songketan13 = $("[name=popup_songketan13] :selected").attr('nama');
		var kode_songketan13 = $("[name=popup_songketan13] :selected").attr('kode');
		}
		if(c_songketan14 != '' || c_songketan14 != 0){
		var songketan14 = $("[name=popup_songketan14]").val();
		var nama_songketan14 = $("[name=popup_songketan14] :selected").attr('nama');
		var kode_songketan14 = $("[name=popup_songketan14] :selected").attr('kode');
		}
		if(c_songketan15 != '' || c_songketan15 != 0){
		var songketan15 = $("[name=popup_songketan15]").val();
		var nama_songketan15 = $("[name=popup_songketan15] :selected").attr('nama');
		var kode_songketan15 = $("[name=popup_songketan15] :selected").attr('kode');
		}
		if(c_pancingan1 != '' || c_pancingan1 != 0){
		var pancingan1 = $("[name=popup_pancingan1]").val();
		var nama_pancingan1 = $("[name=popup_pancingan1] :selected").attr('nama');
		var kode_pancingan1 = $("[name=popup_pancingan1] :selected").attr('kode');
		}
		if(c_pancingan2 != '' || c_pancingan2 != 0){
		var pancingan2 = $("[name=popup_pancingan2]").val();
		var nama_pancingan2 = $("[name=popup_pancingan2] :selected").attr('nama');
		var kode_pancingan2 = $("[name=popup_pancingan2] :selected").attr('kode');
		}
		if(c_gunungan1_atas != '' || c_gunungan1_atas != 0){
		var gunungan1_atas = $("[name=popup_gunungan1_atas]").val();
		var nama_gunungan1_atas = $("[name=popup_gunungan1_atas] :selected").attr('nama');
		var kode_gunungan1_atas = $("[name=popup_gunungan1_atas] :selected").attr('kode');
		}
		if(c_gunungan2_atas != '' || c_gunungan2_atas != 0){
		var gunungan2_atas = $("[name=popup_gunungan2_atas]").val();
		var nama_gunungan2_atas = $("[name=popup_gunungan2_atas] :selected").attr('nama');
		var kode_gunungan2_atas = $("[name=popup_gunungan2_atas] :selected").attr('kode');
		}
		if(c_gunungan3_atas != '' || c_gunungan3_atas != 0){
		var gunungan3_atas = $("[name=popup_gunungan3_atas]").val();
		var nama_gunungan3_atas = $("[name=popup_gunungan3_atas] :selected").attr('nama');
		var kode_gunungan3_atas = $("[name=popup_gunungan3_atas] :selected").attr('kode');
		}
		if(c_gunungan1_bawah != '' || c_gunungan1_bawah != 0){
		var gunungan1_bawah = $("[name=popup_gunungan1_bawah]").val();
		var nama_gunungan1_bawah = $("[name=popup_gunungan1_bawah] :selected").attr('nama');
		var kode_gunungan1_bawah = $("[name=popup_gunungan1_bawah] :selected").attr('kode');
		}
		if(c_gunungan2_bawah != '' || c_gunungan2_bawah != 0){
		var gunungan2_bawah = $("[name=popup_gunungan2_bawah]").val();
		var nama_gunungan2_bawah = $("[name=popup_gunungan2_bawah] :selected").attr('nama');
		var kode_gunungan2_bawah = $("[name=popup_gunungan2_bawah] :selected").attr('kode');
		}
		if(c_gunungan3_bawah != '' || c_gunungan3_bawah != 0){
		var gunungan3_bawah = $("[name=popup_gunungan3_bawah]").val();
		var nama_gunungan3_bawah = $("[name=popup_gunungan3_bawah] :selected").attr('nama');
		var kode_gunungan3_bawah = $("[name=popup_gunungan3_bawah] :selected").attr('kode');
		}
		if(c_garis1 != '' || c_garis1 != 0){
		var garis1 = $("[name=popup_garis1]").val();
		var nama_garis1 = $("[name=popup_garis1] :selected").attr('nama');
		var kode_garis1 = $("[name=popup_garis1] :selected").attr('kode');
		}
		if(c_garis2 != '' || c_garis2 != 0){
		var garis2 = $("[name=popup_garis2]").val();
		var nama_garis2 = $("[name=popup_garis2] :selected").attr('nama');
		var kode_garis2 = $("[name=popup_garis2] :selected").attr('kode');
		}
		var beem = $("[name=popup_beem]").val();
		var pakan = $("[name=popup_pakan]").val();
		
		if(id_order != '' && motif != '' && jml_beem != '' && dasar != ''){
			if(id_data == ''){
				table_barang.row.add(['<div><center></center></div>',
					'<div><button type="button" class="btn bg-warning-400" onclick="edit_table('+tb_no+')"><i class="icon-pencil"></i> </button><button class="btn bg-danger-800" type="button" onclick="hapus($(this))"><i class="icon-eraser"></i></button></div>',
					'<div id="list_idorder'+tb_no+'">'+id_order+'</div>',
					'<div id="list_motif'+tb_no+'">'+nama_motif+'</div>',
					'<div id="list_tanggal'+tb_no+'">'+tanggal+'</div>',
					'<div id="list_hb'+tb_no+'">'+hb+'</div>',
					'<div id="list_jumlah_beem'+tb_no+'">'+jml_beem+'</div>',
					'<div id="list_dasar'+tb_no+'" style="width: 100px;">'+nama_dasar+'('+kode_dasar+')'+'</div>',
					'<div id="list_dasar2'+tb_no+'" style="width: 100px;">'+nama_dasar2+'('+kode_dasar2+')'+'</div>',
					'<div id="list_dasar3'+tb_no+'" style="width: 100px;">'+nama_dasar3+'('+kode_dasar3+')'+'</div>',
					'<div id="list_dasar4'+tb_no+'" style="width: 100px;">'+nama_dasar4+'('+kode_dasar4+')'+'</div>',
					'<div id="list_dasar5'+tb_no+'" style="width: 100px;">'+nama_dasar5+'('+kode_dasar5+')'+'</div>',
					'<div id="list_dasar6'+tb_no+'" style="width: 100px;">'+nama_dasar6+'('+kode_dasar6+')'+'</div>',
					'<div id="list_dasar7'+tb_no+'" style="width: 100px;">'+nama_dasar7+'('+kode_dasar7+')'+'</div>',
					'<div id="list_dasar8'+tb_no+'" style="width: 100px;">'+nama_dasar8+'('+kode_dasar8+')'+'</div>',
					'<div id="list_dasar9'+tb_no+'" style="width: 100px;">'+nama_dasar9+'('+kode_dasar9+')'+'</div>',
					'<div id="list_dasar10'+tb_no+'" style="width: 100px;">'+nama_dasar10+'('+kode_dasar10+')'+'</div>',
					'<div id="list_streep'+tb_no+'" style="width: 100px;">'+nama_streep+'('+kode_streep+')'+'</div>',
					'<div id="list_kombinasi1'+tb_no+'" style="width: 100px;">'+nama_kombinasi1+'('+kode_kombinasi1+')'+'</div>',
					'<div id="list_kombinasi2'+tb_no+'" style="width: 100px;">'+nama_kombinasi2+'('+kode_kombinasi2+')'+'</div>',
					'<div id="list_kombinasi3'+tb_no+'" style="width: 100px;">'+nama_kombinasi3+'('+kode_kombinasi3+')'+'</div>',
					'<div id="list_kluwungan1'+tb_no+'" style="width: 100px;">'+nama_kluwungan1+'('+kode_kluwungan1+')'+'</div>',
					'<div id="list_kluwungan2'+tb_no+'" style="width: 100px;">'+nama_kluwungan2+'('+kode_kluwungan2+')'+'</div>',
					'<div id="list_kluwungan3'+tb_no+'" style="width: 100px;">'+nama_kluwungan3+'('+kode_kluwungan3+')'+'</div>',
					'<div id="list_kluwungan4'+tb_no+'" style="width: 100px;">'+nama_kluwungan4+'('+kode_kluwungan4+')'+'</div>',
					'<div id="list_timbulan1'+tb_no+'" style="width: 100px;">'+nama_timbulan1+'('+kode_timbulan1+')'+'</div>',
					'<div id="list_timbulan2'+tb_no+'" style="width: 100px;">'+nama_timbulan2+'('+kode_timbulan2+')'+'</div>',
					'<div id="list_timbulan3'+tb_no+'" style="width: 100px;">'+nama_timbulan3+'('+kode_timbulan3+')'+'</div>',
					'<div id="list_songketan1'+tb_no+'" style="width: 100px;">'+nama_songketan1+'('+kode_songketan1+')'+'</div>',
					'<div id="list_songketan2'+tb_no+'" style="width: 100px;">'+nama_songketan2+'('+kode_songketan2+')'+'</div>',
					'<div id="list_songketan3'+tb_no+'" style="width: 100px;">'+nama_songketan3+'('+kode_songketan3+')'+'</div>',
					'<div id="list_songketan4'+tb_no+'" style="width: 100px;">'+nama_songketan4+'('+kode_songketan4+')'+'</div>',
					'<div id="list_songketan5'+tb_no+'" style="width: 100px;">'+nama_songketan5+'('+kode_songketan5+')'+'</div>',
					'<div id="list_songketan6'+tb_no+'" style="width: 100px;">'+nama_songketan6+'('+kode_songketan6+')'+'</div>',
					'<div id="list_songketan7'+tb_no+'" style="width: 100px;">'+nama_songketan7+'('+kode_songketan7+')'+'</div>',
					'<div id="list_songketan8'+tb_no+'" style="width: 100px;">'+nama_songketan8+'('+kode_songketan8+')'+'</div>',
					'<div id="list_songketan9'+tb_no+'" style="width: 100px;">'+nama_songketan9+'('+kode_songketan9+')'+'</div>',
					'<div id="list_songketan10'+tb_no+'" style="width: 100px;">'+nama_songketan10+'('+kode_songketan10+')'+'</div>',
					'<div id="list_songketan11'+tb_no+'" style="width: 100px;">'+nama_songketan11+'('+kode_songketan11+')'+'</div>',
					'<div id="list_songketan12'+tb_no+'" style="width: 100px;">'+nama_songketan12+'('+kode_songketan12+')'+'</div>',
					'<div id="list_songketan13'+tb_no+'" style="width: 100px;">'+nama_songketan13+'('+kode_songketan13+')'+'</div>',
					'<div id="list_songketan14'+tb_no+'" style="width: 100px;">'+nama_songketan14+'('+kode_songketan14+')'+'</div>',
					'<div id="list_songketan15'+tb_no+'" style="width: 100px;">'+nama_songketan15+'('+kode_songketan15+')'+'</div>',
					'<div id="list_pancingan1'+tb_no+'" style="width: 100px;">'+nama_pancingan1+'('+kode_pancingan1+')'+'</div>',
					'<div id="list_pancingan2'+tb_no+'" style="width: 100px;">'+nama_pancingan2+'('+kode_pancingan2+')'+'</div>',
					'<div id="list_gunungan1_atas'+tb_no+'" style="width: 100px;">'+nama_gunungan1_atas+'('+kode_gunungan1_atas+')'+'</div>',
					'<div id="list_gunungan2_atas'+tb_no+'" style="width: 100px;">'+nama_gunungan2_atas+'('+kode_gunungan2_atas+')'+'</div>',
					'<div id="list_gunungan3_atas'+tb_no+'" style="width: 100px;">'+nama_gunungan3_atas+'('+kode_gunungan3_atas+')'+'</div>',
					'<div id="list_gunungan1_bawah'+tb_no+'" style="width: 100px;">'+nama_gunungan1_bawah+'('+kode_gunungan1_bawah+')'+'</div>',
					'<div id="list_gunungan2_bawah'+tb_no+'" style="width: 100px;">'+nama_gunungan2_bawah+'('+kode_gunungan2_bawah+')'+'</div>',
					'<div id="list_gunungan3_bawah'+tb_no+'" style="width: 100px;">'+nama_gunungan3_bawah+'('+kode_gunungan3_bawah+')'+'</div>',
					'<div id="list_garis1'+tb_no+'" style="width: 100px;">'+nama_garis1+'('+kode_garis1+')'+'</div>',
					'<div id="list_garis2'+tb_no+'" style="width: 100px;">'+nama_garis2+'('+kode_garis2+')'+'</div>',
					'<div id="list_beem'+tb_no+'">'+beem+'</div>',
					'<div id="list_pakan'+tb_no+'">'+pakan+'</div>',
					'<div><button type="button" class="btn bg-warning-400" onclick="edit_table('+tb_no+')"><i class="icon-pencil"></i> </button><button class="btn bg-danger-800" type="button" onclick="hapus($(this))"><i class="icon-eraser"></i></button></div>'+
					'<input type="hidden" name="tabel_id[]" id="tabel_id'+tb_no+'" value="">'+
					'<input type="hidden" name="tabel_idorder[]" id="tabel_idorder'+tb_no+'" value="'+id_order+'">'+
					'<input type="hidden" name="tabel_motif[]" id="tabel_motif'+tb_no+'" value="'+motif+'">'+
					'<input type="hidden" name="tabel_tanggal[]" id="tabel_tanggal'+tb_no+'" value="'+tanggal+'">'+
					'<input type="hidden" name="tabel_hb[]" id="tabel_hb'+tb_no+'" value="'+hb+'">'+
					'<input type="hidden" name="tabel_jumlah_beem[]" id="tabel_jumlah_beem'+tb_no+'" value="'+jml_beem+'">'+
					'<input type="hidden" name="tabel_dasar[]" id="tabel_dasar'+tb_no+'" value="'+dasar+'">'+
					'<input type="hidden" name="tabel_namadasar[]" id="tabel_namadasar'+tb_no+'" value="'+nama_dasar+'">'+
					'<input type="hidden" name="tabel_kodedasar[]" id="tabel_kodedasar'+tb_no+'" value="'+kode_dasar+'">'+
					'<input type="hidden" name="tabel_dasar2[]" id="tabel_dasar2'+tb_no+'" value="'+dasar2+'">'+
					'<input type="hidden" name="tabel_namadasar2[]" id="tabel_namadasar2'+tb_no+'" value="'+nama_dasar2+'">'+
					'<input type="hidden" name="tabel_kodedasar2[]" id="tabel_kodedasar2'+tb_no+'" value="'+kode_dasar2+'">'+
					'<input type="hidden" name="tabel_dasar3[]" id="tabel_dasar3'+tb_no+'" value="'+dasar3+'">'+
					'<input type="hidden" name="tabel_namadasar3[]" id="tabel_namadasar3'+tb_no+'" value="'+nama_dasar3+'">'+
					'<input type="hidden" name="tabel_kodedasar3[]" id="tabel_kodedasar3'+tb_no+'" value="'+kode_dasar3+'">'+
					'<input type="hidden" name="tabel_dasar4[]" id="tabel_dasar4'+tb_no+'" value="'+dasar4+'">'+
					'<input type="hidden" name="tabel_namadasar4[]" id="tabel_namadasar4'+tb_no+'" value="'+nama_dasar4+'">'+
					'<input type="hidden" name="tabel_kodedasar4[]" id="tabel_kodedasar4'+tb_no+'" value="'+kode_dasar4+'">'+
					'<input type="hidden" name="tabel_dasar5[]" id="tabel_dasar5'+tb_no+'" value="'+dasar5+'">'+
					'<input type="hidden" name="tabel_namadasar5[]" id="tabel_namadasar5'+tb_no+'" value="'+nama_dasar5+'">'+
					'<input type="hidden" name="tabel_kodedasar5[]" id="tabel_kodedasar5'+tb_no+'" value="'+kode_dasar5+'">'+
					'<input type="hidden" name="tabel_dasar6[]" id="tabel_dasar6'+tb_no+'" value="'+dasar6+'">'+
					'<input type="hidden" name="tabel_namadasar6[]" id="tabel_namadasar6'+tb_no+'" value="'+nama_dasar6+'">'+
					'<input type="hidden" name="tabel_kodedasar6[]" id="tabel_kodedasar6'+tb_no+'" value="'+kode_dasar6+'">'+
					'<input type="hidden" name="tabel_dasar7[]" id="tabel_dasar7'+tb_no+'" value="'+dasar7+'">'+
					'<input type="hidden" name="tabel_namadasar7[]" id="tabel_namadasar7'+tb_no+'" value="'+nama_dasar7+'">'+
					'<input type="hidden" name="tabel_kodedasar7[]" id="tabel_kodedasar7'+tb_no+'" value="'+kode_dasar7+'">'+
					'<input type="hidden" name="tabel_dasar8[]" id="tabel_dasar8'+tb_no+'" value="'+dasar8+'">'+
					'<input type="hidden" name="tabel_namadasar8[]" id="tabel_namadasar8'+tb_no+'" value="'+nama_dasar8+'">'+
					'<input type="hidden" name="tabel_kodedasar8[]" id="tabel_kodedasar8'+tb_no+'" value="'+kode_dasar8+'">'+
					'<input type="hidden" name="tabel_dasar9[]" id="tabel_dasar9'+tb_no+'" value="'+dasar9+'">'+
					'<input type="hidden" name="tabel_namadasar9[]" id="tabel_namadasar9'+tb_no+'" value="'+nama_dasar9+'">'+
					'<input type="hidden" name="tabel_kodedasar9[]" id="tabel_kodedasar9'+tb_no+'" value="'+kode_dasar9+'">'+
					'<input type="hidden" name="tabel_dasar10[]" id="tabel_dasar10'+tb_no+'" value="'+dasar10+'">'+
					'<input type="hidden" name="tabel_namadasar10[]" id="tabel_namadasar10'+tb_no+'" value="'+nama_dasar10+'">'+
					'<input type="hidden" name="tabel_kodedasar10[]" id="tabel_kodedasar10'+tb_no+'" value="'+kode_dasar10+'">'+
					'<input type="hidden" name="tabel_streep[]" id="tabel_streep'+tb_no+'" value="'+streep+'">'+
					'<input type="hidden" name="tabel_namastreep[]" id="tabel_namastreep'+tb_no+'" value="'+nama_streep+'">'+
					'<input type="hidden" name="tabel_kodestreep[]" id="tabel_kodestreep'+tb_no+'" value="'+kode_streep+'">'+
					'<input type="hidden" name="tabel_kombinasi1[]" id="tabel_kombinasi1'+tb_no+'" value="'+kombinasi1+'">'+
					'<input type="hidden" name="tabel_namakombinasi1[]" id="tabel_namakombinasi1'+tb_no+'" value="'+nama_kombinasi1+'">'+
					'<input type="hidden" name="tabel_kodekombinasi1[]" id="tabel_kodekombinasi1'+tb_no+'" value="'+kode_kombinasi1+'">'+
					'<input type="hidden" name="tabel_kombinasi2[]" id="tabel_kombinasi2'+tb_no+'" value="'+kombinasi2+'">'+
					'<input type="hidden" name="tabel_namakombinasi2[]" id="tabel_namakombinasi2'+tb_no+'" value="'+nama_kombinasi2+'">'+
					'<input type="hidden" name="tabel_kodekombinasi2[]" id="tabel_kodekombinasi2'+tb_no+'" value="'+kode_kombinasi2+'">'+
					'<input type="hidden" name="tabel_kombinasi3[]" id="tabel_kombinasi3'+tb_no+'" value="'+kombinasi3+'">'+
					'<input type="hidden" name="tabel_namakombinasi3[]" id="tabel_namakombinasi3'+tb_no+'" value="'+nama_kombinasi3+'">'+
					'<input type="hidden" name="tabel_kodekombinasi3[]" id="tabel_kodekombinasi3'+tb_no+'" value="'+kode_kombinasi3+'">'+
					'<input type="hidden" name="tabel_kluwungan1[]" id="tabel_kluwungan1'+tb_no+'" value="'+kluwungan1+'">'+
					'<input type="hidden" name="tabel_namakluwungan1[]" id="tabel_namakluwungan1'+tb_no+'" value="'+nama_kluwungan1+'">'+
					'<input type="hidden" name="tabel_kodekluwungan1[]" id="tabel_kodekluwungan1'+tb_no+'" value="'+kode_kluwungan1+'">'+
					'<input type="hidden" name="tabel_kluwungan2[]" id="tabel_kluwungan2'+tb_no+'" value="'+kluwungan2+'">'+
					'<input type="hidden" name="tabel_namakluwungan2[]" id="tabel_namakluwungan2'+tb_no+'" value="'+nama_kluwungan2+'">'+
					'<input type="hidden" name="tabel_kodekluwungan2[]" id="tabel_kodekluwungan2'+tb_no+'" value="'+kode_kluwungan2+'">'+
					'<input type="hidden" name="tabel_kluwungan3[]" id="tabel_kluwungan3'+tb_no+'" value="'+kluwungan3+'">'+
					'<input type="hidden" name="tabel_namakluwungan3[]" id="tabel_namakluwungan3'+tb_no+'" value="'+nama_kluwungan3+'">'+
					'<input type="hidden" name="tabel_kodekluwungan3[]" id="tabel_kodekluwungan3'+tb_no+'" value="'+kode_kluwungan3+'">'+
					'<input type="hidden" name="tabel_kluwungan4[]" id="tabel_kluwungan4'+tb_no+'" value="'+kluwungan4+'">'+
					'<input type="hidden" name="tabel_namakluwungan4[]" id="tabel_namakluwungan4'+tb_no+'" value="'+nama_kluwungan4+'">'+
					'<input type="hidden" name="tabel_kodekluwungan4[]" id="tabel_kodekluwungan4'+tb_no+'" value="'+kode_kluwungan4+'">'+
					'<input type="hidden" name="tabel_timbulan1[]" id="tabel_timbulan1'+tb_no+'" value="'+timbulan1+'">'+
					'<input type="hidden" name="tabel_namatimbulan1[]" id="tabel_namatimbulan1'+tb_no+'" value="'+nama_timbulan1+'">'+
					'<input type="hidden" name="tabel_kodetimbulan1[]" id="tabel_kodetimbulan1'+tb_no+'" value="'+kode_timbulan1+'">'+
					'<input type="hidden" name="tabel_timbulan2[]" id="tabel_timbulan2'+tb_no+'" value="'+timbulan2+'">'+
					'<input type="hidden" name="tabel_namatimbulan2[]" id="tabel_namatimbulan2'+tb_no+'" value="'+nama_timbulan2+'">'+
					'<input type="hidden" name="tabel_kodetimbulan2[]" id="tabel_kodetimbulan2'+tb_no+'" value="'+kode_timbulan2+'">'+
					'<input type="hidden" name="tabel_timbulan3[]" id="tabel_timbulan3'+tb_no+'" value="'+timbulan3+'">'+
					'<input type="hidden" name="tabel_namatimbulan3[]" id="tabel_namatimbulan3'+tb_no+'" value="'+nama_timbulan3+'">'+
					'<input type="hidden" name="tabel_kodetimbulan3[]" id="tabel_kodetimbulan3'+tb_no+'" value="'+kode_timbulan3+'">'+
					'<input type="hidden" name="tabel_songketan1[]" id="tabel_songketan1'+tb_no+'" value="'+songketan1+'">'+
					'<input type="hidden" name="tabel_namasongketan1[]" id="tabel_namasongketan1'+tb_no+'" value="'+nama_songketan1+'">'+
					'<input type="hidden" name="tabel_kodesongketan1[]" id="tabel_kodesongketan1'+tb_no+'" value="'+kode_songketan1+'">'+
					'<input type="hidden" name="tabel_songketan2[]" id="tabel_songketan2'+tb_no+'" value="'+songketan2+'">'+
					'<input type="hidden" name="tabel_namasongketan2[]" id="tabel_namasongketan2'+tb_no+'" value="'+nama_songketan2+'">'+
					'<input type="hidden" name="tabel_kodesongketan2[]" id="tabel_kodesongketan2'+tb_no+'" value="'+kode_songketan2+'">'+
					'<input type="hidden" name="tabel_songketan3[]" id="tabel_songketan3'+tb_no+'" value="'+songketan3+'">'+
					'<input type="hidden" name="tabel_namasongketan3[]" id="tabel_namasongketan3'+tb_no+'" value="'+nama_songketan3+'">'+
					'<input type="hidden" name="tabel_kodesongketan3[]" id="tabel_kodesongketan3'+tb_no+'" value="'+kode_songketan3+'">'+
					'<input type="hidden" name="tabel_songketan4[]" id="tabel_songketan4'+tb_no+'" value="'+songketan4+'">'+
					'<input type="hidden" name="tabel_namasongketan4[]" id="tabel_namasongketan4'+tb_no+'" value="'+nama_songketan4+'">'+
					'<input type="hidden" name="tabel_kodesongketan4[]" id="tabel_kodesongketan4'+tb_no+'" value="'+kode_songketan4+'">'+
					'<input type="hidden" name="tabel_songketan5[]" id="tabel_songketan5'+tb_no+'" value="'+songketan5+'">'+
					'<input type="hidden" name="tabel_namasongketan5[]" id="tabel_namasongketan5'+tb_no+'" value="'+nama_songketan5+'">'+
					'<input type="hidden" name="tabel_kodesongketan5[]" id="tabel_kodesongketan5'+tb_no+'" value="'+kode_songketan5+'">'+
					'<input type="hidden" name="tabel_songketan6[]" id="tabel_songketan6'+tb_no+'" value="'+songketan6+'">'+
					'<input type="hidden" name="tabel_namasongketan6[]" id="tabel_namasongketan6'+tb_no+'" value="'+nama_songketan6+'">'+
					'<input type="hidden" name="tabel_kodesongketan6[]" id="tabel_kodesongketan6'+tb_no+'" value="'+kode_songketan6+'">'+
					'<input type="hidden" name="tabel_songketan7[]" id="tabel_songketan7'+tb_no+'" value="'+songketan7+'">'+
					'<input type="hidden" name="tabel_namasongketan7[]" id="tabel_namasongketan7'+tb_no+'" value="'+nama_songketan7+'">'+
					'<input type="hidden" name="tabel_kodesongketan7[]" id="tabel_kodesongketan7'+tb_no+'" value="'+kode_songketan7+'">'+
					'<input type="hidden" name="tabel_songketan8[]" id="tabel_songketan8'+tb_no+'" value="'+songketan8+'">'+
					'<input type="hidden" name="tabel_namasongketan8[]" id="tabel_namasongketan8'+tb_no+'" value="'+nama_songketan8+'">'+
					'<input type="hidden" name="tabel_kodesongketan8[]" id="tabel_kodesongketan8'+tb_no+'" value="'+kode_songketan8+'">'+
					'<input type="hidden" name="tabel_songketan9[]" id="tabel_songketan9'+tb_no+'" value="'+songketan9+'">'+
					'<input type="hidden" name="tabel_namasongketan9[]" id="tabel_namasongketan9'+tb_no+'" value="'+nama_songketan9+'">'+
					'<input type="hidden" name="tabel_kodesongketan9[]" id="tabel_kodesongketan9'+tb_no+'" value="'+kode_songketan9+'">'+
					'<input type="hidden" name="tabel_songketan10[]" id="tabel_songketan10'+tb_no+'" value="'+songketan10+'">'+
					'<input type="hidden" name="tabel_namasongketan10[]" id="tabel_namasongketan10'+tb_no+'" value="'+nama_songketan10+'">'+
					'<input type="hidden" name="tabel_kodesongketan10[]" id="tabel_kodesongketan10'+tb_no+'" value="'+kode_songketan10+'">'+
					'<input type="hidden" name="tabel_songketan11[]" id="tabel_songketan11'+tb_no+'" value="'+songketan11+'">'+
					'<input type="hidden" name="tabel_namasongketan11[]" id="tabel_namasongketan11'+tb_no+'" value="'+nama_songketan11+'">'+
					'<input type="hidden" name="tabel_kodesongketan11[]" id="tabel_kodesongketan11'+tb_no+'" value="'+kode_songketan11+'">'+
					'<input type="hidden" name="tabel_songketan12[]" id="tabel_songketan12'+tb_no+'" value="'+songketan12+'">'+
					'<input type="hidden" name="tabel_namasongketan12[]" id="tabel_namasongketan12'+tb_no+'" value="'+nama_songketan12+'">'+
					'<input type="hidden" name="tabel_kodesongketan12[]" id="tabel_kodesongketan12'+tb_no+'" value="'+kode_songketan12+'">'+
					'<input type="hidden" name="tabel_songketan13[]" id="tabel_songketan13'+tb_no+'" value="'+songketan13+'">'+
					'<input type="hidden" name="tabel_namasongketan13[]" id="tabel_namasongketan13'+tb_no+'" value="'+nama_songketan13+'">'+
					'<input type="hidden" name="tabel_kodesongketan13[]" id="tabel_kodesongketan13'+tb_no+'" value="'+kode_songketan13+'">'+
					'<input type="hidden" name="tabel_songketan14[]" id="tabel_songketan14'+tb_no+'" value="'+songketan14+'">'+
					'<input type="hidden" name="tabel_namasongketan14[]" id="tabel_namasongketan14'+tb_no+'" value="'+nama_songketan14+'">'+
					'<input type="hidden" name="tabel_kodesongketan14[]" id="tabel_kodesongketan14'+tb_no+'" value="'+kode_songketan14+'">'+
					'<input type="hidden" name="tabel_songketan15[]" id="tabel_songketan15'+tb_no+'" value="'+songketan15+'">'+
					'<input type="hidden" name="tabel_namasongketan15[]" id="tabel_namasongketan15'+tb_no+'" value="'+nama_songketan15+'">'+
					'<input type="hidden" name="tabel_kodesongketan15[]" id="tabel_kodesongketan15'+tb_no+'" value="'+kode_songketan15+'">'+
					'<input type="hidden" name="tabel_pancingan1[]" id="tabel_pancingan1'+tb_no+'" value="'+pancingan1+'">'+
					'<input type="hidden" name="tabel_namapancingan1[]" id="tabel_namapancingan1'+tb_no+'" value="'+nama_pancingan1+'">'+
					'<input type="hidden" name="tabel_kodepancingan1[]" id="tabel_kodepancingan1'+tb_no+'" value="'+kode_pancingan1+'">'+
					'<input type="hidden" name="tabel_pancingan2[]" id="tabel_pancingan2'+tb_no+'" value="'+pancingan2+'">'+
					'<input type="hidden" name="tabel_namapancingan2[]" id="tabel_namapancingan2'+tb_no+'" value="'+nama_pancingan2+'">'+
					'<input type="hidden" name="tabel_kodepancingan2[]" id="tabel_kodepancingan2'+tb_no+'" value="'+kode_pancingan2+'">'+
					'<input type="hidden" name="tabel_gunungan1_atas[]" id="tabel_gunungan1_atas'+tb_no+'" value="'+gunungan1_atas+'">'+
					'<input type="hidden" name="tabel_namagunungan1_atas[]" id="tabel_namagunungan1_atas'+tb_no+'" value="'+nama_gunungan1_atas+'">'+
					'<input type="hidden" name="tabel_kodegunungan1_atas[]" id="tabel_kodegunungan1_atas'+tb_no+'" value="'+kode_gunungan1_atas+'">'+
					'<input type="hidden" name="tabel_gunungan2_atas[]" id="tabel_gunungan2_atas'+tb_no+'" value="'+gunungan2_atas+'">'+
					'<input type="hidden" name="tabel_namagunungan2_atas[]" id="tabel_namagunungan2_atas'+tb_no+'" value="'+nama_gunungan2_atas+'">'+
					'<input type="hidden" name="tabel_kodegunungan2_atas[]" id="tabel_kodegunungan2_atas'+tb_no+'" value="'+kode_gunungan2_atas+'">'+
					'<input type="hidden" name="tabel_gunungan3_atas[]" id="tabel_gunungan3_atas'+tb_no+'" value="'+gunungan3_atas+'">'+
					'<input type="hidden" name="tabel_namagunungan3_atas[]" id="tabel_namagunungan3_atas'+tb_no+'" value="'+nama_gunungan3_atas+'">'+
					'<input type="hidden" name="tabel_kodegunungan3_atas[]" id="tabel_kodegunungan3_atas'+tb_no+'" value="'+kode_gunungan3_atas+'">'+
					'<input type="hidden" name="tabel_gunungan1_bawah[]" id="tabel_gunungan1_bawah'+tb_no+'" value="'+gunungan1_bawah+'">'+
					'<input type="hidden" name="tabel_namagunungan1_bawah[]" id="tabel_namagunungan1_bawah'+tb_no+'" value="'+nama_gunungan1_bawah+'">'+
					'<input type="hidden" name="tabel_kodegunungan1_bawah[]" id="tabel_kodegunungan1_bawah'+tb_no+'" value="'+kode_gunungan1_bawah+'">'+
					'<input type="hidden" name="tabel_gunungan2_bawah[]" id="tabel_gunungan2_bawah'+tb_no+'" value="'+gunungan2_bawah+'">'+
					'<input type="hidden" name="tabel_namagunungan2_bawah[]" id="tabel_namagunungan2_bawah'+tb_no+'" value="'+nama_gunungan2_bawah+'">'+
					'<input type="hidden" name="tabel_kodegunungan2_bawah[]" id="tabel_kodegunungan2_bawah'+tb_no+'" value="'+kode_gunungan2_bawah+'">'+
					'<input type="hidden" name="tabel_gunungan3_bawah[]" id="tabel_gunungan3_bawah'+tb_no+'" value="'+gunungan3_bawah+'">'+
					'<input type="hidden" name="tabel_namagunungan3_bawah[]" id="tabel_namagunungan3_bawah'+tb_no+'" value="'+nama_gunungan3_bawah+'">'+
					'<input type="hidden" name="tabel_kodegunungan3_bawah[]" id="tabel_kodegunungan3_bawah'+tb_no+'" value="'+kode_gunungan3_bawah+'">'+
					'<input type="hidden" name="tabel_garis1[]" id="tabel_garis1'+tb_no+'" value="'+garis1+'">'+
					'<input type="hidden" name="tabel_namagaris1[]" id="tabel_namagaris1'+tb_no+'" value="'+nama_garis1+'">'+
					'<input type="hidden" name="tabel_kodegaris1[]" id="tabel_kodegaris1'+tb_no+'" value="'+kode_garis1+'">'+
					'<input type="hidden" name="tabel_garis2[]" id="tabel_garis2'+tb_no+'" value="'+garis2+'">'+
					'<input type="hidden" name="tabel_namagaris2[]" id="tabel_namagaris2'+tb_no+'" value="'+nama_garis2+'">'+
					'<input type="hidden" name="tabel_kodegaris2[]" id="tabel_kodegaris2'+tb_no+'" value="'+kode_garis2+'">'+
					'<input type="hidden" name="tabel_beem[]" id="tabel_beem'+tb_no+'" value="'+beem+'">'+
					'<input type="hidden" name="tabel_pakan[]" id="tabel_pakan'+tb_no+'" value="'+pakan+'">'
					]).draw(false);
			}else{
				$("#list_idorder"+id_data).text(id_order);
				$("#list_motif"+id_data).text(nama_motif);
				$("#list_tanggal"+id_data).text(tanggal);
				$("#list_hb"+id_data).text(hb);
				$("#list_jumlah_beem"+id_data).text(jml_beem);
				$("#list_dasar"+id_data).text(nama_dasar+'('+kode_dasar+')');
				$("#list_dasar2"+id_data).text(nama_dasar2+'('+kode_dasar2+')');
				$("#list_dasar3"+id_data).text(nama_dasar3+'('+kode_dasar3+')');
				$("#list_dasar4"+id_data).text(nama_dasar4+'('+kode_dasar4+')');
				$("#list_dasar5"+id_data).text(nama_dasar5+'('+kode_dasar5+')');
				$("#list_dasar6"+id_data).text(nama_dasar6+'('+kode_dasar6+')');
				$("#list_dasar7"+id_data).text(nama_dasar7+'('+kode_dasar7+')');
				$("#list_dasar8"+id_data).text(nama_dasar8+'('+kode_dasar8+')');
				$("#list_dasar9"+id_data).text(nama_dasar9+'('+kode_dasar9+')');
				$("#list_dasar10"+id_data).text(nama_dasar10+'('+kode_dasar10+')');
				$("#list_streep"+id_data).text(nama_streep+'('+kode_streep+')');
				$("#list_kombinasi1"+id_data).text(nama_kombinasi1+'('+kode_kombinasi1+')');
				$("#list_kombinasi2"+id_data).text(nama_kombinasi2+'('+kode_kombinasi2+')');
				$("#list_kombinasi3"+id_data).text(nama_kombinasi3+'('+kode_kombinasi3+')');
				$("#list_kluwungan1"+id_data).text(nama_kluwungan1+'('+kode_kluwungan1+')');
				$("#list_kluwungan2"+id_data).text(nama_kluwungan2+'('+kode_kluwungan2+')');
				$("#list_kluwungan3"+id_data).text(nama_kluwungan3+'('+kode_kluwungan3+')');
				$("#list_kluwungan4"+id_data).text(nama_kluwungan4+'('+kode_kluwungan4+')');
				$("#list_timbulan1"+id_data).text(nama_timbulan1+'('+kode_timbulan1+')');
				$("#list_timbulan2"+id_data).text(nama_timbulan2+'('+kode_timbulan2+')');
				$("#list_timbulan3"+id_data).text(nama_timbulan3+'('+kode_timbulan3+')');
				$("#list_songketan1"+id_data).text(nama_songketan1+'('+kode_songketan1+')');
				$("#list_songketan2"+id_data).text(nama_songketan2+'('+kode_songketan2+')');
				$("#list_songketan3"+id_data).text(nama_songketan3+'('+kode_songketan3+')');
				$("#list_songketan4"+id_data).text(nama_songketan4+'('+kode_songketan4+')');
				$("#list_songketan5"+id_data).text(nama_songketan5+'('+kode_songketan5+')');
				$("#list_songketan6"+id_data).text(nama_songketan6+'('+kode_songketan6+')');
				$("#list_songketan7"+id_data).text(nama_songketan7+'('+kode_songketan7+')');
				$("#list_songketan8"+id_data).text(nama_songketan8+'('+kode_songketan8+')');
				$("#list_songketan9"+id_data).text(nama_songketan9+'('+kode_songketan9+')');
				$("#list_songketan10"+id_data).text(nama_songketan10+'('+kode_songketan10+')');
				$("#list_songketan11"+id_data).text(nama_songketan11+'('+kode_songketan11+')');
				$("#list_songketan12"+id_data).text(nama_songketan12+'('+kode_songketan12+')');
				$("#list_songketan13"+id_data).text(nama_songketan13+'('+kode_songketan13+')');
				$("#list_songketan14"+id_data).text(nama_songketan14+'('+kode_songketan14+')');
				$("#list_songketan15"+id_data).text(nama_songketan15+'('+kode_songketan15+')');
				$("#list_pancingan1"+id_data).text(nama_pancingan1+'('+kode_pancingan1+')');
				$("#list_pancingan2"+id_data).text(nama_pancingan2+'('+kode_pancingan2+')');
				$("#list_gunungan1_atas"+id_data).text(nama_gunungan1_atas+'('+kode_gunungan1_atas+')');
				$("#list_gunungan2_atas"+id_data).text(nama_gunungan2_atas+'('+kode_gunungan2_atas+')');
				$("#list_gunungan3_atas"+id_data).text(nama_gunungan3_atas+'('+kode_gunungan3_atas+')');
				$("#list_gunungan1_bawah"+id_data).text(nama_gunungan1_bawah+'('+kode_gunungan1_bawah+')');
				$("#list_gunungan2_bawah"+id_data).text(nama_gunungan2_bawah+'('+kode_gunungan2_bawah+')');
				$("#list_gunungan3_bawah"+id_data).text(nama_gunungan3_bawah+'('+kode_gunungan3_bawah+')');
				$("#list_garis1"+id_data).text(nama_garis1+'('+kode_garis1+')');
				$("#list_garis2"+id_data).text(nama_garis2+'('+kode_garis2+')');
				$("#list_beem"+id_data).text(beem);
				$("#list_pakan"+id_data).text(pakan);

				$("#tabel_id"+id_data).val(id_data);
				$("#tabel_idorder"+id_data).val(id_order);				
				$("#tabel_motif"+id_data).val(motif);
				$("#tabel_tanggal"+id_data).val(tanggal);
				$("#tabel_hb"+id_data).val(hb);
				$("#tabel_jumlah_beem"+id_data).val(jml_beem);
				$("#tabel_dasar"+id_data).val(dasar);
				$("#tabel_namadasar"+id_data).val(nama_dasar);
				$("#tabel_kodedasar"+id_data).val(kode_dasar);
				$("#tabel_dasar2"+id_data).val(dasar2);
				$("#tabel_namadasar2"+id_data).val(nama_dasar2);
				$("#tabel_kodedasar2"+id_data).val(kode_dasar2);
				$("#tabel_dasar3"+id_data).val(dasar3);
				$("#tabel_namadasar3"+id_data).val(nama_dasar3);
				$("#tabel_kodedasar3"+id_data).val(kode_dasar3);
				$("#tabel_dasar4"+id_data).val(dasar4);
				$("#tabel_namadasar4"+id_data).val(nama_dasar4);
				$("#tabel_kodedasar4"+id_data).val(kode_dasar4);
				$("#tabel_dasar5"+id_data).val(dasar5);
				$("#tabel_namadasar5"+id_data).val(nama_dasar5);
				$("#tabel_kodedasar5"+id_data).val(kode_dasar5);
				$("#tabel_dasar6"+id_data).val(dasar6);
				$("#tabel_namadasar6"+id_data).val(nama_dasar6);
				$("#tabel_kodedasar6"+id_data).val(kode_dasar6);
				$("#tabel_dasar7"+id_data).val(dasar7);
				$("#tabel_namadasar7"+id_data).val(nama_dasar7);
				$("#tabel_kodedasar7"+id_data).val(kode_dasar7);
				$("#tabel_dasar8"+id_data).val(dasar8);
				$("#tabel_namadasar8"+id_data).val(nama_dasar8);
				$("#tabel_kodedasar8"+id_data).val(kode_dasar8);
				$("#tabel_dasar9"+id_data).val(dasar9);
				$("#tabel_namadasar9"+id_data).val(nama_dasar9);
				$("#tabel_kodedasar9"+id_data).val(kode_dasar9);
				$("#tabel_dasar10"+id_data).val(dasar10);
				$("#tabel_namadasar10"+id_data).val(nama_dasar10);
				$("#tabel_kodedasar10"+id_data).val(kode_dasar10);
				$("#tabel_streep"+id_data).val(streep);
				$("#tabel_namastreep"+id_data).val(nama_streep);
				$("#tabel_kodestreep"+id_data).val(kode_streep);
				$("#tabel_kombinasi1"+id_data).val(kombinasi1);
				$("#tabel_namakombinasi1"+id_data).val(nama_kombinasi1);
				$("#tabel_kodekombinasi1"+id_data).val(kode_kombinasi1);
				$("#tabel_kombinasi2"+id_data).val(kombinasi2);
				$("#tabel_namakombinasi2"+id_data).val(nama_kombinasi2);
				$("#tabel_kodekombinasi2"+id_data).val(kode_kombinasi2);
				$("#tabel_kombinasi3"+id_data).val(kombinasi3);
				$("#tabel_namakombinasi3"+id_data).val(nama_kombinasi3);
				$("#tabel_kodekombinasi3"+id_data).val(kode_kombinasi3);
				$("#tabel_kluwungan1"+id_data).val(kluwungan1);
				$("#tabel_namakluwungan1"+id_data).val(nama_kluwungan1);
				$("#tabel_kodekluwungan1"+id_data).val(kode_kluwungan1);
				$("#tabel_kluwungan2"+id_data).val(kluwungan2);
				$("#tabel_namakluwungan2"+id_data).val(nama_kluwungan2);
				$("#tabel_kodekluwungan2"+id_data).val(kode_kluwungan2);
				$("#tabel_kluwungan3"+id_data).val(kluwungan3);
				$("#tabel_namakluwungan3"+id_data).val(nama_kluwungan3);
				$("#tabel_kodekluwungan3"+id_data).val(kode_kluwungan3);
				$("#tabel_kluwungan4"+id_data).val(kluwungan4);
				$("#tabel_namakluwungan4"+id_data).val(nama_kluwungan4);
				$("#tabel_kodekluwungan4"+id_data).val(kode_kluwungan4);
				$("#tabel_timbulan1"+id_data).val(timbulan1);
				$("#tabel_namatimbulan1"+id_data).val(nama_timbulan1);
				$("#tabel_kodetimbulan1"+id_data).val(kode_timbulan1);
				$("#tabel_timbulan2"+id_data).val(timbulan2);
				$("#tabel_namatimbulan2"+id_data).val(nama_timbulan2);
				$("#tabel_kodetimbulan2"+id_data).val(kode_timbulan2);
				$("#tabel_timbulan3"+id_data).val(timbulan3);
				$("#tabel_namatimbulan3"+id_data).val(nama_timbulan3);
				$("#tabel_kodetimbulan3"+id_data).val(kode_timbulan3);
				$("#tabel_songketan1"+id_data).val(songketan1);
				$("#tabel_namasongketan1"+id_data).val(nama_songketan1);
				$("#tabel_kodesongketan1"+id_data).val(kode_songketan1);
				$("#tabel_songketan2"+id_data).val(songketan2);
				$("#tabel_namasongketan2"+id_data).val(nama_songketan2);
				$("#tabel_kodesongketan2"+id_data).val(kode_songketan2);
				$("#tabel_songketan3"+id_data).val(songketan3);
				$("#tabel_namasongketan3"+id_data).val(nama_songketan3);
				$("#tabel_kodesongketan3"+id_data).val(kode_songketan3);
				$("#tabel_songketan4"+id_data).val(songketan4);
				$("#tabel_namasongketan4"+id_data).val(nama_songketan4);
				$("#tabel_kodesongketan4"+id_data).val(kode_songketan4);
				$("#tabel_songketan5"+id_data).val(songketan5);
				$("#tabel_namasongketan5"+id_data).val(nama_songketan5);
				$("#tabel_kodesongketan5"+id_data).val(kode_songketan5);
				$("#tabel_songketan6"+id_data).val(songketan6);
				$("#tabel_namasongketan6"+id_data).val(nama_songketan6);
				$("#tabel_kodesongketan6"+id_data).val(kode_songketan6);
				$("#tabel_songketan7"+id_data).val(songketan7);
				$("#tabel_namasongketan7"+id_data).val(nama_songketan7);
				$("#tabel_kodesongketan7"+id_data).val(kode_songketan7);
				$("#tabel_songketan8"+id_data).val(songketan8);
				$("#tabel_namasongketan8"+id_data).val(nama_songketan8);
				$("#tabel_kodesongketan8"+id_data).val(kode_songketan8);
				$("#tabel_songketan9"+id_data).val(songketan9);
				$("#tabel_namasongketan9"+id_data).val(nama_songketan9);
				$("#tabel_kodesongketan9"+id_data).val(kode_songketan9);
				$("#tabel_songketan10"+id_data).val(songketan10);
				$("#tabel_namasongketan10"+id_data).val(nama_songketan10);
				$("#tabel_kodesongketan10"+id_data).val(kode_songketan10);
				$("#tabel_songketan11"+id_data).val(songketan11);
				$("#tabel_namasongketan11"+id_data).val(nama_songketan11);
				$("#tabel_kodesongketan11"+id_data).val(kode_songketan11);
				$("#tabel_songketan12"+id_data).val(songketan12);
				$("#tabel_namasongketan12"+id_data).val(nama_songketan12);
				$("#tabel_kodesongketan12"+id_data).val(kode_songketan12);
				$("#tabel_songketan13"+id_data).val(songketan13);
				$("#tabel_namasongketan13"+id_data).val(nama_songketan13);
				$("#tabel_kodesongketan13"+id_data).val(kode_songketan13);
				$("#tabel_songketan14"+id_data).val(songketan14);
				$("#tabel_namasongketan14"+id_data).val(nama_songketan14);
				$("#tabel_kodesongketan14"+id_data).val(kode_songketan14);
				$("#tabel_songketan15"+id_data).val(songketan15);
				$("#tabel_namasongketan15"+id_data).val(nama_songketan15);
				$("#tabel_kodesongketan15"+id_data).val(kode_songketan15);
				$("#tabel_pancingan1"+id_data).val(pancingan1);
				$("#tabel_namapancingan1"+id_data).val(nama_pancingan1);
				$("#tabel_kodepancingan1"+id_data).val(kode_pancingan1);
				$("#tabel_pancingan2"+id_data).val(pancingan2);
				$("#tabel_namapancingan2"+id_data).val(nama_pancingan2);
				$("#tabel_kodepancingan2"+id_data).val(kode_pancingan2);
				$("#tabel_gunungan1_atas"+id_data).val(gunungan1_atas);
				$("#tabel_namagunungan1_atas"+id_data).val(nama_gunungan1_atas);
				$("#tabel_kodegunungan1_atas"+id_data).val(kode_gunungan1_atas);
				$("#tabel_gunungan2_atas"+id_data).val(gunungan2_atas);
				$("#tabel_namagunungan2_atas"+id_data).val(nama_gunungan2_atas);
				$("#tabel_kodegunungan2_atas"+id_data).val(kode_gunungan2_atas);
				$("#tabel_gunungan3_atas"+id_data).val(gunungan3_atas);
				$("#tabel_namagunungan3_atas"+id_data).val(nama_gunungan3_atas);
				$("#tabel_kodegunungan3_atas"+id_data).val(kode_gunungan3_atas);
				$("#tabel_gunungan1_bawah"+id_data).val(gunungan1_bawah);
				$("#tabel_namagunungan1_bawah"+id_data).val(nama_gunungan1_bawah);
				$("#tabel_kodegunungan1_bawah"+id_data).val(kode_gunungan1_bawah);
				$("#tabel_gunungan2_bawah"+id_data).val(gunungan2_bawah);
				$("#tabel_namagunungan2_bawah"+id_data).val(nama_gunungan2_bawah);
				$("#tabel_kodegunungan2_bawah"+id_data).val(kode_gunungan2_bawah);
				$("#tabel_gunungan3_bawah"+id_data).val(gunungan3_bawah);
				$("#tabel_namagunungan3_bawah"+id_data).val(nama_gunungan3_bawah);
				$("#tabel_kodegunungan3_bawah"+id_data).val(kode_gunungan3_bawah);
				$("#tabel_garis1"+id_data).val(garis1);
				$("#tabel_namagaris1"+id_data).val(nama_garis1);
				$("#tabel_kodegaris1"+id_data).val(kode_garis1);
				$("#tabel_garis2"+id_data).val(garis2);
				$("#tabel_namagaris2"+id_data).val(nama_garis2);
				$("#tabel_kodegaris2"+id_data).val(kode_garis2);
				$("#tabel_beem"+id_data).val(beem);
				$("#tabel_pakan"+id_data).val(pakan);
			}


			$("#exampleModal").modal('hide');
			tb_no++;
		}
	})

	function edit_table(id){
		var id_order = $("#tabel_idorder"+id).val();
		var motif = $("#tabel_motif"+id).val();
		var tanggal = $("#tabel_tanggal"+id).val();
		var hb = $("#tabel_hb"+id).val();
		var jumlah_beem = $("#tabel_jumlah_beem"+id).val();
		var dasar = $("#tabel_dasar"+id).val();
		var dasar2 = $("#tabel_dasar2"+id).val();
		var dasar3 = $("#tabel_dasar3"+id).val();
		var dasar4 = $("#tabel_dasar4"+id).val();
		var dasar5 = $("#tabel_dasar5"+id).val();
		var dasar6 = $("#tabel_dasar6"+id).val();
		var dasar7 = $("#tabel_dasar7"+id).val();
		var dasar8 = $("#tabel_dasar8"+id).val();
		var dasar9 = $("#tabel_dasar9"+id).val();
		var dasar10 = $("#tabel_dasar10"+id).val();
		var streep = $("#tabel_streep"+id).val();
		var kombinasi1 = $("#tabel_kombinasi1"+id).val();
		var kombinasi2 = $("#tabel_kombinasi2"+id).val();
		var kombinasi3 = $("#tabel_kombinasi3"+id).val();
		var kluwungan1 = $("#tabel_kluwungan1"+id).val();
		var kluwungan2 = $("#tabel_kluwungan2"+id).val();
		var kluwungan3 = $("#tabel_kluwungan3"+id).val();
		var kluwungan4 = $("#tabel_kluwungan4"+id).val();
		var timbulan1 = $("#tabel_timbulan1"+id).val();
		var timbulan2 = $("#tabel_timbulan2"+id).val();
		var timbulan3 = $("#tabel_timbulan3"+id).val();
		var songketan1 = $("#tabel_songketan1"+id).val();
		var songketan2 = $("#tabel_songketan2"+id).val();
		var songketan3 = $("#tabel_songketan3"+id).val();
		var songketan4 = $("#tabel_songketan4"+id).val();
		var songketan5 = $("#tabel_songketan5"+id).val();
		var songketan6 = $("#tabel_songketan6"+id).val();
		var songketan7 = $("#tabel_songketan7"+id).val();
		var songketan8 = $("#tabel_songketan8"+id).val();
		var songketan9 = $("#tabel_songketan9"+id).val();
		var songketan10 = $("#tabel_songketan10"+id).val();
		var songketan11 = $("#tabel_songketan11"+id).val();
		var songketan12 = $("#tabel_songketan12"+id).val();
		var songketan13 = $("#tabel_songketan13"+id).val();
		var songketan14 = $("#tabel_songketan14"+id).val();
		var songketan15 = $("#tabel_songketan15"+id).val();
		var pancingan1 = $("#tabel_pancingan1"+id).val();
		var pancingan2 = $("#tabel_pancingan2"+id).val();
		var gunungan1_atas = $("#tabel_gunungan1_atas"+id).val();
		var gunungan2_atas = $("#tabel_gunungan2_atas"+id).val();
		var gunungan3_atas = $("#tabel_gunungan3_atas"+id).val();
		var gunungan1_bawah = $("#tabel_gunungan1_bawah"+id).val();
		var gunungan2_bawah = $("#tabel_gunungan2_bawah"+id).val();
		var gunungan3_bawah = $("#tabel_gunungan3_bawah"+id).val();
		var garis1 = $("#tabel_garis1"+id).val();
		var garis2 = $("#tabel_garis2"+id).val();
		var beem = $("#tabel_beem"+id).val();
		var pakan = $("#tabel_pakan"+id).val();

		$("[name=popup_id_table]").val(id);
		$("[name=popup_order]").val(id_order);
		$("[name=popup_motif]").val(motif).trigger('change');
		$("[name=popup_tgl]").val(tanggal);
		$("[name=popup_hb]").val(hb);
		$("[name=popup_jumlah_beem]").val(jumlah_beem);
		$("[name=popup_dasar]").val(dasar).trigger('change');
		$("[name=popup_dasar2]").val(dasar2).trigger('change');
		$("[name=popup_dasar3]").val(dasar3).trigger('change');
		$("[name=popup_dasar4]").val(dasar4).trigger('change');
		$("[name=popup_dasar5]").val(dasar5).trigger('change');
		$("[name=popup_dasar6]").val(dasar6).trigger('change');
		$("[name=popup_dasar7]").val(dasar7).trigger('change');
		$("[name=popup_dasar8]").val(dasar8).trigger('change');
		$("[name=popup_dasar9]").val(dasar9).trigger('change');
		$("[name=popup_dasar10]").val(dasar10).trigger('change');
		$("[name=popup_streep]").val(streep).trigger('change');
		$("[name=popup_kombinasi1]").val(kombinasi1).trigger('change');
		$("[name=popup_kombinasi2]").val(kombinasi2).trigger('change');
		$("[name=popup_kombinasi3]").val(kombinasi3).trigger('change');
		$("[name=popup_kluwungan1]").val(kluwungan1).trigger('change');
		$("[name=popup_kluwungan2]").val(kluwungan2).trigger('change');
		$("[name=popup_kluwungan3]").val(kluwungan3).trigger('change');
		$("[name=popup_kluwungan4]").val(kluwungan4).trigger('change');
		$("[name=popup_timbulan1]").val(timbulan1).trigger('change');
		$("[name=popup_timbulan2]").val(timbulan2).trigger('change');
		$("[name=popup_timbulan3]").val(timbulan3).trigger('change');
		$("[name=popup_songketan1]").val(songketan1).trigger('change');
		$("[name=popup_songketan2]").val(songketan2).trigger('change');
		$("[name=popup_songketan3]").val(songketan3).trigger('change');
		$("[name=popup_songketan4]").val(songketan4).trigger('change');
		$("[name=popup_songketan5]").val(songketan5).trigger('change');
		$("[name=popup_songketan6]").val(songketan6).trigger('change');
		$("[name=popup_songketan7]").val(songketan7).trigger('change');
		$("[name=popup_songketan8]").val(songketan8).trigger('change');
		$("[name=popup_songketan9]").val(songketan9).trigger('change');
		$("[name=popup_songketan10]").val(songketan10).trigger('change');
		$("[name=popup_songketan11]").val(songketan11).trigger('change');
		$("[name=popup_songketan12]").val(songketan12).trigger('change');
		$("[name=popup_songketan13]").val(songketan13).trigger('change');
		$("[name=popup_songketan14]").val(songketan14).trigger('change');
		$("[name=popup_songketan15]").val(songketan15).trigger('change');
		$("[name=popup_pancingan1]").val(pancingan1).trigger('change');
		$("[name=popup_pancingan2]").val(pancingan2).trigger('change');
		$("[name=popup_gunungan1_atas]").val(gunungan1_atas).trigger('change');
		$("[name=popup_gunungan2_atas]").val(gunungan2_atas).trigger('change');
		$("[name=popup_gunungan3_atas]").val(gunungan3_atas).trigger('change');
		$("[name=popup_gunungan1_bawah]").val(gunungan1_bawah).trigger('change');
		$("[name=popup_gunungan2_bawah]").val(gunungan2_bawah).trigger('change');
		$("[name=popup_gunungan3_bawah]").val(gunungan3_bawah).trigger('change');
		$("[name=popup_garis1]").val(garis1).trigger('change');
		$("[name=popup_garis2]").val(garis2).trigger('change');
		$("[name=popup_beem]").val(beem);
		$("[name=popup_pakan]").val(pakan);
		
		$("#exampleModal").modal('show');
	}

	function hapus(id){
		table_barang.row(id.parents('tr')).remove().draw();
	}

	function hapus_ket(id){
		table_ket.row(id.parents('tr')).remove().draw();
	}

</script>

@endsection