<hr>
<form id="form_st_process" class="form-horizontal">
	<input type="hidden" name="id" value="<?php echo $data['idtransaction_group'];?>">
	<?php 
		$idrole = $this->session->userdata('idrole');
		$arr_role = array('', '1', '2');
		if (in_array($idrole, $arr_role) && $data['process_status'] == 'Menunggu Driver') {
	?>
	<div class="form-group">
		<label class="control-label col-md-2">Driver</label>
		<div class="col-md-4">
			<select class="select form-control" name="iddriver" id="iddriver">
				<option value="">Pilih Driver</option>
				<?php 
					foreach ($driver->result() as $key => $value) {
						$sel = '';
						if ($value->iduser == $data['iddriver']) {
							$sel = 'selected';
						}
						echo "<option ".$sel." value='".$value->iduser."'>".$value->name."</option>";
					}
				?>
			</select>
		</div>
	</div>
	<?php
		}
	?>
</form>
<?php 
	if ($idrole == 3 && $data['process_status'] == 'Menunggu Driver') {
?>
<button class="btn btn-success" type="button" id="btn_approve_bill"><i class="fa fa-check"></i> Setujui Bill Pengambilan</button>
<?php 
	}
?>
<?php 
	if ($idrole == 4 && $data['process_status'] == 'Penjemputan') {
?>
<button class="btn btn-success" type="button" id="btn_approve_production"><i class="fa fa-check"></i> Setujui Produksi</button>
<?php
	}
	if (in_array($idrole, $arr_role) && $data['process_status'] == 'Menunggu Driver') {
?>
<hr>
<button class="btn btn-primary" type="button" id="btn_save">Simpan</button>
<?php
	}
?>