<form id="form_dstb" class="form-horizontal">
	<?php 
		if (strlen($this->session->userdata('idoutlet')) == 0) {
	?>

	<div style="width:400px;">
		<select class="form-control" name="idoutlet" id="idoutlet">
			<option value="">Pilih Outlet</option>
			<?php 
				foreach ($outlet->result() as $key => $value) {
					$sel = '';
					if ($this->input->get('idoutlet') == $value->idoutlet) {
						$sel = 'selected';
					}
					echo "<option ".$sel." value='".$value->idoutlet."'>".$value->outlet_name."</option>";
				}
			?>
		</select>
	</div>
	<hr>
	<?php
		}
	?>
	<table class="table table-bordered table-condensed" id="table_dstb_list">
		<tr>
			<th width="10px">Checklist</th>
			<th>No Bill</th>
			<th>Nama</th>
			<th>Status</th>
			<th>Jumlah PCS</th>
			<th>Tgl Masuk</th>
			<th>Tgl Selesai</th>
			<th>Detail</th>
			<th>Catatan Bill</th>
		</tr>
		<?php 
			foreach ($arr_data as $key => $value) {
		?>
		<tr>
			<td align="center"><input type="checkbox" class="chk-bill" name="chk[]" value="<?php echo $value['idtransaction_group'];?>"></td>
			<td><?php echo $value['code'];?></td>
			<td><?php echo $value['customer_name'];?></td>
			<td><?php echo $value['dstb_status'];?></td>
			<td><?php echo $value['total_pcs'];?></td>
			<td><?php echo Date('d-m-Y', strtotime($value['date']));?></td>
			<td><?php echo Date('d-m-Y', strtotime($value['duedate']));?></td>
			<td align="center" width="10px"><button class="btn btn-info btn-xs btn-detail-bill" type="button" data-code="<?php echo $value['code'];?>" data-id="<?php echo $value['idtransaction_group'];?>"><i class="fa fa-list"></i> Detail Baju</button></td>
			<td><?php echo $value['note'];?></td>
		</tr>
		<?php
			}
		?>
	</table>
	<hr>

	<div class="form-group">
		<label class="control-label col-md-1">Tanggal</label>
		<div class="col-md-4"><?php echo $dstb_date;?></div>
	</div>
	<div class="form-group">
		<label class="control-label col-md-1">Driver</label>
		<div class="col-md-4"><?php echo az_select_driver();?></div>
	</div>
	<div class="form-group">
		<label class="control-label col-md-1">Produksi</label>
		<div class="col-md-4"><?php echo az_select_production();?></div>
	</div>
	<div class="form-group">
		<label class="control-label col-md-1">Catatan DSTB</label>
		<div class="col-md-4">
			<textarea class="form-control" name="dstb_note" id="dstb_note" rows="4"></textarea>
		</div>
	</div>

</form>

<hr>
<a href="<?php echo app_url();?>dstb_process"><button class="btn btn-default" type="button"><i class="fa fa-arrow-left"></i> Kembali</button></a>&nbsp;
<button class="btn btn-primary btn-save-dstb" type="button"><i class="fa fa-save"></i> Simpan DSTB</button>