
<!-- PEMEGANG SAHAM -->
<div class="box box-warning">
	<div class="box-header with-border">
		<h3 class="box-title">Senarai Pemegang Saham</h3>
		<div class="box-tools pull-right">
			<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
		</div>
	</div>
	
	<div class="box-body">
		<div style="overflow: auto; padding: 0.25%">
			<button id="addNewShareholder" class="btn btn-sm bg-blue pull-right" onclick="javascript:OpenModal('shareholder',0);">
				<span class="glyphicon glyphicon-plus"></span> <?php echo $this->lang->line('Add'); ?>
			</button>
		</div>
		<table id="shareholderTable" class="table dtable table-striped">
			<thead>
				<tr>
					<th>Bil</th>
					<th>Nama</th>
					<th>Kad Pengenalan</th>
					<th>Unit Saham (RM)</th>
					<th>Peratusan (%)</th>
					<th>Bumiputera</th>
					<th>&nbsp;</th>
				</tr>
			</thead>
			<tbody>
			<?php
			if($company['shareholders']) {
				foreach($company['shareholders'] as $key=>$value) {
					?>
					<tr>
						<td><?php echo ($key+1); ?></td>
						<td><a href="Javascript:OpenModal('shareholder',<?php echo $value->ID; ?>)"><?php echo $value->name; ?></a></td>
						<td><?php echo $value->ic; ?></td>
						<td><?php echo number_format($value->unit,2); ?></td>
						<td><?php echo $value->percent; ?></td>
						<td><?php echo ($value->bumi) ? "<i class=\"fa fa-check\"></i>" : "<i class=\"fa fa-times\"></i>"; ?></td>
						<td><a class="btn btn-xs bg-red"
									onclick="return PromptDelete();"
									href="<?php echo base_url(); ?>apply/delete/<?php echo $value->ID; ?>/shareholder"><i class="fa fa-trash"></i></a></td>
					</tr>
					<?php
				}
			}
			?>
			</tbody>
		</table>
	</div>
</div>

<!-- PENGARAH -->
<div class="box box-warning">
	<div class="box-header with-border">
		<h3 class="box-title">Senarai Ahli Lembaga Pengarah</h3>
		<div class="box-tools pull-right">
			<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
		</div>
	</div>
	
	<div class="box-body">
		<div style="overflow: auto; padding: 0.25%">
			<button id="addNewDirector" class="btn btn-sm bg-blue pull-right" onclick="javascript:OpenModal('director',0);">
				<span class="glyphicon glyphicon-plus"></span> <?php echo $this->lang->line('Add'); ?>
			</button>
		</div>
		<table id="directorTable" class="table dtable table-striped">
			<thead>
				<tr>
					<th>Bil</th>
					<th>Nama</th>
					<th>Kad Pengenalan</th>
					<th>Bumiputera</th>
					<th>&nbsp;</th>
				</tr>
			</thead>
			<tbody>
			<?php
			if($company['directors']) {
				foreach($company['directors'] as $key=>$value) {
					?>
					<tr>
						<td><?php echo ($key+1); ?></td>
						<td><a href="Javascript:OpenModal('director',<?php echo $value->ID; ?>)"><?php echo $value->name; ?></a></td>
						<td><?php echo $value->ic; ?></td>
						<td><?php echo ($value->bumi) ? "<i class=\"fa fa-check\"></i>" : "<i class=\"fa fa-times\"></i>"; ?></td>
						<td><a class="btn btn-xs bg-red"
									onclick="return PromptDelete();"
									href="<?php echo base_url(); ?>apply/delete/<?php echo $value->ID; ?>/director"><i class="fa fa-trash"></i></a></td>
					</tr>
					<?php
				}
			}
			?>
			</tbody>
		</table>
	</div>
</div>

<!-- MANAGEMENT -->
<div class="box box-warning">
	<div class="box-header with-border">
		<h3 class="box-title">Senarai Pengurusan Tertinggi Syarikat</h3>
		<div class="box-tools pull-right">
			<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
		</div>
	</div>
	
	<div class="box-body">
		<div style="overflow: auto; padding: 0.25%">
			<button id="addNewMgmt" class="btn btn-sm bg-blue pull-right" onclick="javascript:OpenModal('mgmt',0);">
				<span class="glyphicon glyphicon-plus"></span> <?php echo $this->lang->line('Add'); ?>
			</button>
		</div>
		<table id="mgmtTable" class="table dtable table-striped">
			<thead>
				<tr>
					<th>Bil</th>
					<th>Nama</th>
					<th>Kad Pengenalan</th>
					<th>Jawatan</th>
					<th>Bumiputera</th>
					<th>&nbsp;</th>
				</tr>
			</thead>
			<tbody>
			<?php
			if($company['mgmts']) {
				foreach($company['mgmts'] as $key=>$value) {
					?>
					<tr>
						<td><?php echo ($key+1); ?></td>
						<td><a href="Javascript:OpenModal('mgmt',<?php echo $value->ID; ?>)"><?php echo $value->name; ?></a></td>
						<td><?php echo $value->ic; ?></td>
						<td><?php echo (GetPositionName($value->position,$positions)); ?></td>
						<td><?php echo ($value->bumi) ? "<i class=\"fa fa-check\"></i>" : "<i class=\"fa fa-times\"></i>"; ?></td>
						<td><a class="btn btn-xs bg-red"
									onclick="return PromptDelete();"
									href="<?php echo base_url(); ?>apply/delete/<?php echo $value->ID; ?>/mgmt"><i class="fa fa-trash"></i></a></td>
					</tr>
					<?php
				}
			}
			?>
			</tbody>
		</table>
	</div>
</div>