<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>																		
<page footer="page">
	<div class="trans">
		<table border="0" cellspacing="0" cellpadding="0" style="width:100%">
			<tr>
				<td style="text-align:left;padding-left:10px;"> 
					<div class="customer"><?php echo lang($tType.'_inv'); ?> </div>
					<h2>{pdf_type}</h2>
				</td>
				<td style="width:25%;vertical-align:top">
					<table style="width:80%">
						<tr>
							<td class="label">{tNo_text}</td>
							<td class="label">{tNo}</td>
						</tr>
						<tr>
							<td class="label">{tDate_text}</td>
							<td>{tDate}</td>
						</tr>
						<?php if ($dueDate) { ?>
							<tr>
								<td class="label">{dueDate_text}</td>
								<td>{dueDate}</td>
							</tr>
						<?php } ?>
						<?php if ($ref) { ?>
							<tr>
								<td class="label">Reference No</td>
								<td>{ref}</td>
							</tr>
						<?php } ?>
					</table>
				</td>
				<td style="width:33%;vertical-align:top">
					{company_address}
				</td>
			</tr>
			<tr><td style="padding:20px 0pc 20px 0px;" colspan="3">
				<div style="border-bottom:1px solid #eeeeee;"></div>
			</td></tr>
			<tr>
				<td style="width:33%;" valign="top">					
					<h4><?php echo !empty($contact['name']) ?$contact['name']:'' ;?></h4>
					<table border="0" cellspacing="0" cellpadding="0" style="width:100%;">
						<tbody>
							<tr>
								<td style="width:25%"><?php echo lang("GSTIN"); ?></td>
								<td><?php echo !empty($contact['taxNo'])?$contact['taxNo']:'-'; ?></td>
							</tr>
							<tr>
								<td><?php echo lang("POS"); ?></td>
								<td><?php echo !empty($pos)?$pos:'-'; ?></td>
							</tr>
						</tbody>
					</table>
				</td>
				<td style="width:33%;">
					<h4><?php echo lang('Billing Address'); ?> </h4>
					{billing_addr}
				</td>
				<td style="width:33%;">
					<h4><?php echo lang('Shipping Address');?> </h4>
					{shipping_addr}
				</td>			
			</tr>
			<tr>
				<td colspan="3" style="padding-top:20px;" >
					<!-- <div class="middlecol"> -->
						<table border="0" cellspacing="0" cellpadding="0" style="width:100%;border-color:#EEEEEE;" class="middlecol">
							<thead>
								<tr>
								<th style="width:45%;border-left:1px solid #999999;"><?php echo lang("ItemDescription"); ?></th>
								<th style="width:10%"><?php echo lang("Tax"); ?></th>
								<th style="width:10%"><?php echo lang("Qty"); ?></th>
								<th style="width:10%"><?php echo lang("Rate"); ?></th>								
								<th style="width:10%"><?php echo lang("Discount"); ?></th>
								<th style="width:10%"><?php echo lang("Amount"); ?></th>
								</tr>
							</thead>
							<tbody>
								{details}
									<tr>
										<td style="border-left:1px solid #999999;">{itemName}</td>
										<td>{taxName}</td>
										<td style="text-align:right">{qty} <sub>{unit}</sub></td>
										<td style="text-align:right">{rate}</td>
										<td style="text-align:right">{discAmount}</td>
										<td style="text-align:right">{taxableAmount}</td>
									</tr>
								{/details}
								<tr>
									<td colspan="2" style="border-bottom:none !important;"></td>
									<td class="label" colspan="3" style="text-align:right;"><?php echo lang("Sub Total"); ?></td>
									<td  class="label" style="text-align:right">{taxableAmount}</td>
								</tr>
								<?php if (!empty($tax)) { ?>
									{tax}
									<tr>
										<td colspan="2" style="border-bottom:none !important;"></td>
										<td colspan="3" style="text-align:right;border-bottom:none !important;">{taxTypeCode} @ {taxRate}% on {taxableAmt}</td>
										<td style="text-align:right;border-bottom:none !important;">{taxValue}</td>
									</tr>
									{/tax}
								<?php } ?>
								<tr>
									<td colspan="2" style="border-bottom:none !important;"></td>
									<td class="label" colspan="3" style="text-align:right;">Total </td>
									<td class="label" style="text-align:right">{totAmount}</td>
								</tr>
								<?php if (!empty($trans_payment)) { ?>
									{trans_payment}
									<tr>
										<td colspan="2" style="border-bottom:none !important;"></td>
										<td colspan="3" style="text-align:right;border-bottom:none !important;">{payment_type} #{tNo}</td>
										<td style="text-align:right;border-bottom:none !important;">{allotAmt}</td>
									</tr>
									{/trans_payment}
								<?php } ?>
								<tr>
									<td colspan="2" style="border-bottom:none !important;"></td>
									<td class="label" colspan="3" style="text-align:right;"><?php echo $dueAmount_text; ?> </td>
									<td class="label" style="text-align:right">{dueAmount}</td>
								</tr>				
							</tbody>
						</table>
					<!-- </div> -->
				</td>
			</tr>
		</table>
	</div>
	<?php if ($notes) {?>
	<div class="notes">
			<div><?php echo lang("Notes"); ?></div>
			<div style="color: #666666;padding-left: 10px;padding-top: 5px;width: 100%;">{notes}</div>
	</div>
	<?php } ?>
	<div class="notes">
			<div><?php echo lang("Terms"); ?> </div>
			<div style="color: #666666;padding-left: 10px;padding-top: 5px;width: 100%;">{terms} <?php echo lang("E & O.E") ?></div>
	</div>
	<page_footer>
		<table align="center" border="0" cellspacing="0" cellpadding="0" style="width:100%;">
				<tr>
					<td style="text-align:right;width:50%;">
					</td>
					<td style="text-align:right;width:50%;">
						<?php echo lang("Authorized Signature") ?>
					</td>
				</tr>
		</table>
	</page_footer>
<style>

.trans
{
 color:#666666;
 font-size:12px;
 width: 100%;
 min-height: 30%;
 margin: 0px;
}
table td {
	color:#000000;
}

table td.label {
	color:#000000;
	font-weight:bold;
}
table td h4, table td h5 {
	color:#000000;
	margin-top:0px;
	margin-bottom:5px;
}
.customer {
 width:40%; 
 height: 15px;
 background:#D3D3D3;
 color:#FFF;
 font-weight: bold;
 padding: 7px 17px 7px 7px;
 text-align: right;
 margin-left: -30px;
}

table.middlecol tr th, table.middlecol tr td {
	border-right:1px solid #999999;
	border-bottom:1px solid #999999;
}
.middlecol{
 color:#666666;
 width: 100%;
 height: 60%;
}
.middlecol th{
 background:#D3D3D3;
 text-align:center;
 color:#FFF;
 font-weight:bold;
 vertical-align: middle;
 padding: 5px;
}
.middlecol tr.odd{
 background:#EAEAEA;
}
.middlecol tr.even{
 background:#FFFFFF;
}
.middlecol td{
 padding-right:10px;
 padding: 8px;
}
.tax_disable{
 display:none;
}
.notes{
	font-size: 11px;
	color: #000000;
    width: 100%;
}	
</style>
</page>
