<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link  rel="stylesheet" type="text/css"  href="<?php echo base_url()?>css/bootstrap/bootstrap.min.css" />
<style>
@media print {
  .tdPrint{
	  display:none;}
}
	.table th, .table td{
		line-height:10px;
	}
</style>

<script>
function do_print(){
	window.print();
}

function getExcelFile(){
	var url = "<?php echo base_url()?>ApTransactionReport/printPaymentAdviceRptExel/<?php echo $id?>";
	window.location.href = url;
	}
</script>

</head>

<body>

<table  style="width:80%; margin-top:100px; margin:auto;">
    <tbody >
        <tr>
            <td colspan="2" >
            	<?php $this->load->view('layouts/rptheader'); ?>
            </td>
        </tr> 
        <tr>
        	<td colspan="2">
              	<table class="table" cellpadding="0" cellspacing="0" width="80%">
              <!--url(<?php echo base_url()?>img/rptPaymentAdvice.png)-->
                    <thead>
                        <tr style="background:#f9c806;border-top:1px solid #dddddd;">
                            <th style="width:10%;text-align:center;">#</th>
                            <th style="width:30%;"><?php echo $this->lang->line('item') ?></th>
                            <th style="width:15%;"><?php echo $this->lang->line('UOM') ?></th>
                            <th style="text-align:right;width:10%;"><?php echo $this->lang->line('quantity') ?></th>
                            <th style="text-align:right;width:10%;"><?php echo $this->lang->line('actualQuantity'); ?></th>
                            <th style="width:20%;">&nbsp;</th>                    
                        </tr>
                    </thead>
                    <tbody>
						<?php
							$i=1;
							$j = 1;
							$total=0;
                        	foreach($datatbls as $item){
                         ?>
                        <tr>
                            <td style="text-align:center;"><?php echo $j++; ?></td>
                            <td><?php echo '['.$item->itemCode.'] '.$item->itemName; ?></td>
                            <td><?php echo $item->UOM; ?></td>
                            <td style="text-align:right;"><?php echo $item->quantity; ?></td>
                            <td>&nbsp;</td>
                            <td>&nbsp;</td>
                        </tr>
                            <?php } ?>
                        <tr>
                            <td colspan="6">
                                <p style="float:right;width:180px;text-align: left; font-size:8px; font-weight:500;margin-top:30px;"> 
                                    <?php echo $this->lang->line('preparedBy'); ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;        <?php echo $this->lang->line('approvedBy'); ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       <?php echo $this->lang->line('receivedBy'); ?>
                                </p>
                                <p style="float:right;width:180px;clear:both;text-align:left; font-size:8px; font-weight:500;">
                                    Date:
                                </p>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="6">
                                <p>
                                    <div class="row-fluid">
                                        <div class="span12"><?php echo date("m/d/Y G:i:s"); ?><p style="float:right;">Private and Confidential</p></div>
                                    </div>
                                </p>
                            </td>
                        </tr>
                        <tr class="tdPrint">
                            <td align="center" colspan="4">
                                <button title="Print" class="btn btn-primary Print" onclick="do_print()" type="button" name="Print"><i class="icon-print"></i></button> 
                                <!--<button title="Download" class="btn btn-primary EXCEL" onclick="getExcelFile()" type="button" name="EXCEL"><i class="icon-download"></i></button>&nbsp;&nbsp; -->
                                <button title="Close" class="btn btn-warning Close" onclick="javascript:window.close();" type="button" name="Close"><i class="icon-off"></i></button>        
                            </td>
                        </tr>
                	</tbody>
                </table>    
            </td>
        </tr>
       
    </tbody>
</table>
  


</body>
</html>