<style>
table { font-size: 10px; border-bottom: 1px solid #999; }
table th { font-weight: bold; padding: 2px 2px 2px 2px; line-height: 2; }
table td { font-weight: normal; padding: 2px 2px 2px 2px; line-height: 2; }
th.border { border-bottom: 1px solid #999; }
</style>
<table>
	<tr>
		<th>Billed From</th>
		<th>Billed To</th>
	</tr>
	<tr>
		<td>
			<br />
			&nbsp;&nbsp;&nbsp;Salihin Premier Solution,<br />
			&nbsp;&nbsp;&nbsp;555, Jalan Samudra Utara 1, Taman Samudra,<br />			
			&nbsp;&nbsp;&nbsp;68100 Batu Caves, Selangor Darul Ehsan.<br />
			&nbsp;&nbsp;&nbsp;Tel: +603-6185 9970<br />
			&nbsp;&nbsp;&nbsp;Fax: +603-6184 2524<br />
			&nbsp;&nbsp;&nbsp;info@salihinpremier.com<br />
			&nbsp;&nbsp;&nbsp;http://www.salihinpremier.com/<br />
		</td>
		
		<td>
			<br />
			&nbsp;&nbsp;&nbsp;<?php echo $detail['username']; ?>,<br />
			&nbsp;&nbsp;&nbsp;<?php echo $detail['address']; ?>,<br />			
			&nbsp;&nbsp;&nbsp;<?php echo $detail['postcode']; ?>&nbsp;<?php echo $detail['city']; ?><br />
			&nbsp;&nbsp;&nbsp;<?php echo $detail['stateName'] ? $detail['stateName']."&nbsp;" : NULL; ?><?php echo $detail['countryName']; ?><br />
			&nbsp;&nbsp;&nbsp;Tel: <?php echo $detail['phoneNo']; ?><br />
			&nbsp;&nbsp;&nbsp;Fax: <?php echo $detail['faxNo']; ?><br />
			&nbsp;&nbsp;&nbsp;Email: <?php echo $detail['email']; ?><br />
		</td>
	</tr>
	<tr><td></td><td></td></tr>
	<tr><td></td><td></td></tr>
</table>

<div>&nbsp;</div>

<table style="margin: 10px 0 0 0;">
	<tr>
		<td>
			<strong>For Project : </strong><br />
			<?php echo $detail['title']; ?><br />
			[<?php echo $detail['projectID']; ?>_<?php echo date('Ymdhis',strtotime($detail['createdTS'])); ?>]
		</td>
		<td>
			<br />
			&nbsp;&nbsp;&nbsp;<strong>Invoice No: </strong> <?php echo $detail['billID']; ?><br />
			&nbsp;&nbsp;&nbsp;<strong>Status: </strong> <?php echo $detail['paid'] ? "Paid" : "Unpaid"; ?><br />
		</td>
	</tr>
	<tr><td></td><td></td></tr>
	<tr><td></td><td></td></tr>
</table>

<div>&nbsp;</div>

<h3>Detail</h3>
<table>
	<tr class="border">
		<th>Tier</th>
		<th>Cost (RM)</th>
	</tr>
	
	<tr>
		<th><?php echo $this->lang->line('basePrice'); ?></th>
		<td class="text-right"><?php echo number_format($basePrice, 2) ?></td>
	</tr>
	
	<?php if(isset($tier1)){ ?>
		<tr class="">
			<th><?php echo $this->lang->line('lowTier'); ?> (<?php echo $tier1['voters'].' voters x RM'.number_format($tier1['rate'], 2); ?>)</th>
			<td class="text-right"><?php echo number_format($tier1['cost'], 2); ?></td>
		</tr>
	<?php } ?>
	
	<?php if(isset($tier2)){ ?>
		<tr>
			<th><?php echo $this->lang->line('midTier'); ?> (<?php echo $tier2['voters'].' voters x RM'.number_format($tier2['rate'], 2); ?>)</th>
			<td class="text-right"><?php echo number_format($tier2['cost'], 2); ?></td>
		</tr>
	<?php } ?>
	
	<?php if(isset($tier3)){ ?>
		<tr>
			<th><?php echo $this->lang->line('topTier'); ?> (<?php echo $tier3['voters'].' voters x RM'.number_format($tier3['rate'], 2); ?>)</th>
			<td class="text-right"><?php echo number_format($tier3['cost'], 2); ?></td>
		</tr>
	<?php } ?>
	<tr><td></td><td></td></tr>
	
	<tr>
		<td>
			<h3>Total Paid Cost</h3>
		</td>
		<td>
			<h3>RM <?php echo $totalPaidCost; ?></h3>
		</td>
	</tr>
	
	<tr><td></td><td></td></tr>
</table>






























