<!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><?php echo $this->lang->line('title') ?> <?php echo $year ?></title>
<link rel="stylesheet" href="<?php echo base_url()?>css/stylesheets.css" type="text/css" />
<style media="print" type="text/css">
	/*body{FONT-SIZE: 14px;FONT-FAMILY: Arial;COLOR: #000000}*/
	.printButton { display: none; }
</style>
<script language="javascript" type="text/javascript">	
function do_print(){
	window.print();
}
function do_printexcel(){
	var url = "<?php echo base_url()?>glreports/profitNloss_excel/<?php echo $year?>/<?php echo $selper?>";
	window.location.href = url;
}
/*
function do_printexcel(){
	var url = "<?php echo base_url()?>glreports/accountBalanceSummary_print";
		url = url + "<?php echo $add_month?>/EXCEL";
		window.location.href = url;
} */
</script>
<style>        
    .tots {
        border-bottom:double black;
    }
    .sep {
        border-bottom:1px solid black;
    }
    .sep {
        border-top:1px solid black;
    }
    .sep td {
        padding-bottom:5px;
    }
</style>
</head>
<div class="printButton" align="center">
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="0">
    <tr>
        <td align="center" colspan="2">
        	<?php 
			$js = 'onClick="do_print()" class="btn-icon btn-success-form Print" title="Print"';
			echo form_button('Print','<span class="i-printer">',$js);?>&nbsp;&nbsp; <?php
			$js = 'onClick="do_printexcel()" class="btn-icon btn-warning-form EXCEL" title="Download"';
			echo form_button('EXCEL','<span class="i-download">',$js);?>&nbsp;&nbsp; <?php
			$js = 'onClick="javascript:window.close();" class="btn-icon btn-danger-form Close" title="Close"';
			echo form_button('Close','<span class="i-switch">',$js);?>
        </td>
    </tr>
</table>
</div>
<div>
	<table border="0" cellpadding="1" cellspacing="0" width="100%">
                	<thead>
                    <tr>
                    	<td colspan="4"><?php $this->load->view('layouts/report/header2'); ?></td>
                    </tr>
                    <tr>
                    	<td colspan="4" class="tac"><h4><?php //echo $this->lang->line('asat').' : '.date("d-m-Y") ?></h4></td>
                    </tr>
                    <tr>
                        <th align="left" class="">&nbsp;&nbsp;<?php //echo $this->lang->line('description') ?></th>
                        <th class="tar tots"><?php echo $this->lang->line('thisyear') ?>&nbsp;&nbsp;</th>
            		</tr>
        			</thead>
       				 <tbody>
	<?php $bil = 0; 
	$datatbl_total = 0;
	$datatbl_budgettotal = 0;
	if($accountGroup){
		foreach($accountGroup as $datatbl):
			$bil++?>
 			<?php if ($datatbl->title == 1) {?>
            		<tr>
                		<td colspan="3">&nbsp;<strong><?php echo $this->lang->line($datatbl->acctGroupName)?></strong></td>
                	</tr>
            <?php }?>
      <?php foreach($accountdetails as $row):
				if($row->acctGroupID == $datatbl->ID){?>
      	<?php 
					if($row->currentyeardebit != '' && $row->currentyearcredit !=''){ ?>
                 <?php $totalamount =  $row->currentyeardebit - $row->currentyearcredit;if(floatval($totalamount) == 0 ) continue; ?>
                 <?php $varAmount = ($row->acctTypeID == 4)?$row->budgetAmount + $totalamount:$totalamount - $row->budgetAmount?>
            			<tr>
           					<td style="display:none" ><?php echo $row->ID; ?></td>
                			<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a title="<?php echo $this->lang->line('details');?>" class="btn btn-mini btn-link edit"><?php echo substr($row->acctCode,0, 4).'-'.substr($row->acctCode,4, 3).'-'.substr($row->acctCode,7, 2).' [ '.$row->acctName.' ]'?></a></td>
                			<td class="tar"><?php echo ($row->acctTypeID != $datatbl->acctTypeID )?number_format($totalamount,2):number_format($totalamount,2)?>&nbsp;&nbsp;</td>
                			<!-- td class="tar"><?php echo ($row->budgetAmount == 0 )?'0':number_format($row->budgetAmount,2)?>&nbsp;&nbsp;</td>
                			<td class="tar"><?php echo  ($varAmount > 0 )?number_format($varAmount,2): number_format($varAmount,2)?>&nbsp;&nbsp;</td -->
                		</tr>
             	<?php
						$datatbl_total = $datatbl_total + $totalamount;
						$datatbl_budgettotal = $datatbl_budgettotal + $row->budgetAmount;
							?>
			<?php   } ?>
			<?php } ?>
		<?php endforeach;?>
      	<?php if($groupdetails){ 
				foreach($groupdetails as $rowdet):
							$rowdet_credit = 0;
							$rowdet_budgetcredit = 0;
					if($rowdet->parentID == $datatbl->ID){
						if ($rowdet->title == 1) {?>
            				<tr>
                				<td colspan="3">&nbsp;&nbsp;&nbsp;<strong><?php echo $this->lang->line($rowdet->acctGroupName)?></strong></td>
                			</tr>
                	<?php } ?>
      				<?php foreach($accountdetails as $row):
							if($row->acctGroupID == $rowdet->ID){?>
      	<?php 
								if($row->currentyeardebit != '' && $row->currentyearcredit !=''){ ?>
                 			<?php   $totalamount = $row->currentyeardebit - $row->currentyearcredit;if(floatval($totalamount) == 0 ) continue;?>
                 			<?php $varAmount = ($row->acctTypeID == 4)?$totalamount + $row->budgetAmount : $totalamount - $row->budgetAmount?>
            						<tr>
			           					<td style="display:none" ><?php echo $row->ID; ?></td>
                						<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a title="<?php echo $this->lang->line('details');?>" class="btn btn-mini btn-link edit"><?php echo substr($row->acctCode,0, 4).'-'.substr($row->acctCode,4, 3).'-'.substr($row->acctCode,7, 2).' [ '.$row->acctName.' ]'?></a></td>
                						<td class="tar"><?php echo ($totalamount < 0 )? number_format($totalamount * -1,2):number_format($totalamount,2)?>&nbsp;&nbsp;</td>
                						<!-- td class="tar"><?php echo ($row->budgetAmount < 0 )? number_format($row->budgetAmount * -1,2) :number_format($row->budgetAmount,2)?>&nbsp;&nbsp;</td-->
                						<!--td class="tar"><?php echo ($varAmount < 0 )?number_format($varAmount * -1,2): number_format($varAmount,2)?>&nbsp;&nbsp;</td-->
                					</tr>
             	<?php
											$rowdet_credit = $rowdet_credit + $totalamount;
											$rowdet_budgetcredit = $rowdet_budgetcredit + $row->budgetAmount;
											$datatbl_total = $datatbl_total + $totalamount;
											$datatbl_budgettotal = $datatbl_budgettotal + $row->budgetAmount;
							?>
						<?php  } ?>
					<?php } ?>
				<?php endforeach;?>
				<?php foreach($groupdetails as $rowdet1): 
					$rowdet1_credit = 0; 
					$rowdet1_budgetcredit = 0; 
					?>
				<?php	if($rowdet1->parentID == $rowdet->ID){
							if ($rowdet1->title == 1) {?>
            					<tr>
                					<td colspan="3">&nbsp;&nbsp;&nbsp;<strong><?php echo $this->lang->line($rowdet1->acctGroupName)?></strong></td>
                				</tr>
                	<?php 	} ?>
				<?php   foreach($groupdetails as $rowdet2): 
					$rowdet2_credit = 0; 
					$rowdet2_budgetcredit = 0; 
					?>
				<?php		if($rowdet2->parentID == $rowdet1->ID){
								if ($rowdet2->title == 1) {?>
            						<tr>
                						<td colspan="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong><?php echo $this->lang->line($rowdet2->acctGroupName)?></strong></td>
                					</tr>
                	<?php 		} ?>
 				<?php   foreach($groupdetails as $rowdet3): 
					$rowdet3_credit = 0; 
					$rowdet3_budgetcredit = 0; ?>
				<?php		if($rowdet3->parentID == $rowdet2->ID){
								if ($rowdet3->title == 1) {?>
            						<tr>
                						<td colspan="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong><?php echo $this->lang->line($rowdet3->acctGroupName)?></strong></td>
                					</tr>
                	<?php 		} ?>
     				<?php 	  foreach($accountdetails as $row2):
									if($row2->acctGroupID == $rowdet3->ID){?>
      	<?php 
										if($row2->currentyeardebit != '' && $row2->currentyearcredit !=''){ ?>
                 			<?php   		  $totalamount =  $row2->currentyeardebit - $row2->currentyearcredit;if(floatval($totalamount) == 0 ) continue;?>
                 			<?php $varAmount = ($row2->acctTypeID == 4)?$totalamount + $row2->budgetAmount :$totalamount - $row2->budgetAmount ?>
            								<tr>
           										<td style="display:none" ><?php echo $row2->ID; ?></td>
                								<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a title="<?php echo $this->lang->line('details');?>" class="btn btn-mini btn-link edit"><?php echo substr($row2->acctCode,0, 4).'-'.substr($row2->acctCode,4, 3).'-'.substr($row2->acctCode,7, 2).' [ '.$row2->acctName.' ]'?></a></td>
                                                <?php if($rowdet3->status == 1){?>
                								<td class="tar"><?php echo ($totalamount > 0 )?number_format($totalamount ,2):number_format($totalamount* -1,2)?>&nbsp;&nbsp;</td>
                								<?php }else{?>
	                								<td class="tar"><?php echo ($totalamount > 0 )?number_format($totalamount,2):'('.number_format($totalamount * -1,2).')'?>&nbsp;&nbsp;</td>
                								<?php }?>
                                                <!--  td class="tar"><?php echo ($row2->budgetAmount == 0 )?'':number_format($row2->budgetAmount,2)?>&nbsp;&nbsp;</td>
                								<td class="tar"><?php echo ($varAmount < 0 )?"(".number_format($varAmount * -1,2).")": number_format( $varAmount,2)?>&nbsp;&nbsp;</td -->
                							</tr>
             	<?php
											$rowdet_credit = $rowdet_credit + $totalamount;
											$rowdet1_credit = $rowdet1_credit + $totalamount;
											$rowdet2_credit = $rowdet2_credit + $totalamount;
											$rowdet3_credit = $rowdet3_credit + $totalamount;
											$rowdet_budgetcredit = $rowdet_budgetcredit + $row2->budgetAmount;
											$rowdet1_budgetcredit = $rowdet1_budgetcredit + $row2->budgetAmount;
											$rowdet2_budgetcredit = $rowdet2_budgetcredit + $row2->budgetAmount;
											$rowdet3_budgetcredit = $rowdet3_budgetcredit + $row2->budgetAmount;
											$datatbl_total = $datatbl_total + $totalamount;
											$datatbl_budgettotal = $datatbl_budgettotal + $row2->budgetAmount;
							?>
						<?php  		} ?>
                	<?php   		  }	 ?>
				<?php   		  endforeach;?>
                 			<?php $varAmount = ($rowdet3->acctTypeID == 4)?$rowdet3_budgetcredit + $rowdet3_credit : $rowdet3_credit - $rowdet3_budgetcredit?>
            						<tr>
                						<td><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
											<?php echo $this->lang->line('subtotal') ?> <?php echo $this->lang->line($rowdet3->acctGroupName)?> </strong></td>
                                        <?php if($rowdet3->status == 1){?>
                						<td class="tar sep"><?php echo ($rowdet3_credit < 0 )?number_format($rowdet3_credit * -1,2):number_format($rowdet3_credit,2) ?>&nbsp;&nbsp;</td>
                 						<?php }else{?>
                						<td class="tar sep"><?php echo ($rowdet3_credit > 0 )?number_format($rowdet3_credit,2):'('.number_format($rowdet3_credit * -1,2).')' ?>&nbsp;&nbsp;</td>
                						<?php }?>
               						<!--  td class="tar"><?php echo ($rowdet3_budgetcredit < 0 )?"(".number_format($rowdet3_budgetcredit * -1,2).")":number_format($rowdet3_budgetcredit,2) ?>&nbsp;&nbsp;</td>
                						<td class="tar"><?php echo number_format($varAmount,2)?>&nbsp;&nbsp;</td-->
                					</tr>
                	<?php 		} ?>
				<?php   		  endforeach;?>
     				<?php 	  foreach($accountdetails as $row2):
									if($row2->acctGroupID == $rowdet2->ID){?>
      	<?php 
										if($row2->currentyeardebit != '' && $row2->currentyearcredit !=''){ ?>
                 			<?php   		  $totalamount =  $row2->currentyeardebit - $row2->currentyearcredit;if(floatval($totalamount) == 0 ) continue;?>
                 			<?php $varAmount = ($row2->acctTypeID == 4)?$row2->budgetAmount + $totalamount : $totalamount - $row2->budgetAmount?>
            								<tr>
           										<td style="display:none" ><?php echo $row2->ID; ?></td>
                								<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a title="<?php echo $this->lang->line('details');?>" class="btn btn-mini btn-link edit"><?php echo substr($row2->acctCode,0, 4).'-'.substr($row2->acctCode,4, 3).'-'.substr($row2->acctCode,7, 2).' [ '.$row2->acctName.' ]'?></a></td>
                								<td class="tar">
                                <?php if($row2->acctGroupID == '36'): ?>
                                  <?php  echo ($totalamount* -1 < 0 )?"(".number_format($totalamount,2).")":number_format($totalamount* -1,2)?>
                                <?php elseif($row2->acctGroupID == '44'): ?>
                                  <?php  echo ($totalamount < 0 )?"(".number_format($totalamount* -1,2).")":number_format($totalamount,2)?>
                                <?php else: ?>
                                  <?php echo ($totalamount < 0 )?number_format($totalamount * -1,2):number_format($totalamount,2)?>
                                <?php endif; ?>
                                </td>
                								<!-- td class="tar"><?php echo ($row2->budgetAmount < 0 )?"(".number_format($row2->budgetAmount * -1,2).")" :number_format($row2->budgetAmount,2)?>&nbsp;&nbsp;</td>
                								<td class="tar"><?php echo ($varAmount < 0 )?"(".number_format($varAmount * -1,2).")" : number_format( $varAmount,2)?>&nbsp;&nbsp;</td -->
                							</tr>
             	<?php
											$rowdet_credit = $rowdet_credit + $totalamount;
											$rowdet1_credit = $rowdet1_credit + $totalamount;
											$rowdet2_credit = $rowdet2_credit + $totalamount;
											$rowdet_budgetcredit = $rowdet_budgetcredit + $row2->budgetAmount;
											$rowdet1_budgetcredit = $rowdet1_budgetcredit + $row2->budgetAmount;
											$rowdet2_budgetcredit = $rowdet2_budgetcredit + $row2->budgetAmount;
											$datatbl_total = $datatbl_total + $totalamount;
											$datatbl_budgettotal = $datatbl_budgettotal + $row2->budgetAmount;
							?>
						<?php  		} ?>
                	<?php   		  }	 ?>
				<?php   		  endforeach;?>
                 			<?php $varAmount = ($rowdet2->acctTypeID == 4)?$rowdet2_budgetcredit + $rowdet2_credit :$rowdet2_credit -  $rowdet2_budgetcredit?>
            						<tr>
                						<td><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
											<?php echo $this->lang->line('subtotal') ?> <?php echo $this->lang->line($rowdet2->acctGroupName)?> </strong></td>
                                        <?php if($rowdet2->status == 1){?>
                						<td class="tar sep"><?php echo ($rowdet2_credit < 0 )?number_format($rowdet2_credit*-1,2):"(".number_format($rowdet2_credit,2).")" ?>&nbsp;&nbsp;</td>
                 						<?php }else{?>
                						<td class="tar sep"><?php echo ($rowdet2_credit < 0 )?number_format($rowdet2_credit* -1,2):number_format($rowdet2_credit,2) ?>&nbsp;&nbsp;</td>
                						<?php }?>
                						<!-- td class="tar"><?php echo ($rowdet2_budgetcredit < 0 )? "(".number_format($rowdet2_budgetcredit * -1,2).")":number_format($rowdet2_budgetcredit,2) ?>&nbsp;&nbsp;</td>
                						<td class="tar"><?php echo ($rowdet2_credit < 0 ) ? "(".number_format($varAmount* -1,2).")":number_format($varAmount,2)?>&nbsp;&nbsp;</td -->
                					</tr>
                	<?php   } ?>
				<?php   endforeach;?>
      			<?php   foreach($accountdetails as $row2):
							if($row2->acctGroupID == $rowdet1->ID){?>
      	<?php 
								if($row2->currentyeardebit != '' && $row2->currentyearcredit !=''){ ?>
                 			<?php 	$totalamount = $row2->currentyearcredit - $row2->currentyeardebit;if(floatval($totalamount) == 0 ) continue; ?>
                 			<?php $varAmount = ($row2->acctTypeID == 4)?$row2->budgetAmount + $totalamount :$totalamount - $row2->budgetAmount?>
            							<tr>
           									<td style="display:none" ><?php echo $row2->ID; ?></td>
                							<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a title="<?php echo $this->lang->line('details');?>" class="btn btn-mini btn-link edit"><?php echo substr($row2->acctCode,0, 4).'-'.substr($row2->acctCode,4, 3).'-'.substr($row2->acctCode,7, 2).' [ '.$row2->acctName.' ]'?></a></td>
                                            <?php if($rowdet1->status == 1){?>
                								<td class="tar"><?php echo ($totalamount < 0 )?'('.number_format($totalamount * -1,2).')':number_format($totalamount,2)?>&nbsp;&nbsp;</td>
                 							<?php }else{?>
                								<td class="tar"><?php echo ($totalamount < 0 )?'('.number_format($totalamount*-1,2).')':number_format($totalamount ,2)?>&nbsp;&nbsp;</td>
                							<?php }?>
                							<!--  td class="tar"><?php echo ($row2->budgetAmount < 0 )?'('.number_format($row2->budgetAmount *-1,2).')':number_format($row2->budgetAmount,2)?>&nbsp;&nbsp;</td>
                							<td class="tar"><?php echo ($varAmount < 0 )? '('.number_format($varAmount *-1,2).')' : number_format($varAmount,2)?>&nbsp;&nbsp;</td-->
                						</tr>
             	<?php
										$rowdet_credit = $rowdet_credit + $totalamount;
										$rowdet1_credit = $rowdet1_credit + $totalamount;
										$rowdet_budgetcredit = $rowdet_budgetcredit + $row2->budgetAmount;
										$rowdet1_budgetcredit = $rowdet1_budgetcredit + $row2->budgetAmount;
										$datatbl_total = $datatbl_total + $totalamount;
										$datatbl_budgettotal = $datatbl_budgettotal + $row2->budgetAmount;
							?>
						<?php  	} ?>
                	<?php   	}	 ?>
				<?php 	endforeach;?>
                 			<?php $varAmount = $rowdet1_credit-$rowdet1_budgetcredit ?>
            			  <tr>
                			<td><strong>&nbsp;&nbsp;&nbsp;&nbsp;
								<?php echo $this->lang->line('subtotal') ?> <?php echo $this->lang->line($rowdet1->acctGroupName)?> </strong></td>
                                <?php if($rowdet1->status == 1){?>
                					<td class="tar sep"><?php echo ($rowdet1_credit < 0 )?'('.number_format($rowdet1_credit * -1,2).')':number_format($rowdet1_credit,2)?>&nbsp;&nbsp;</td>
                 				<?php }else{?>
                					<td class="tar sep"><?php echo ($rowdet1_credit < 0 )?number_format($rowdet1_credit*-1,2):"(".number_format($rowdet1_credit,2).")"?>&nbsp;&nbsp;</td>
                				<?php }?>
                			<!--  td class="tar"><?php echo ($rowdet1_budgetcredit < 0 )?'('.number_format($rowdet1_budgetcredit * -1,2).')':number_format($rowdet1_budgetcredit,2) ?>&nbsp;&nbsp;</td>
                			<td class="tar"><?php echo($varAmount < 0 )?'('.number_format($varAmount * -1,2).')':  number_format($varAmount,2)?>&nbsp;&nbsp;</td -->
                		  </tr>
                	<?php } ?>
				<?php endforeach;?>
                 			<?php $varAmount = $rowdet_credit - $rowdet_budgetcredit ?>
            			  <tr>
                			<td><strong>
								<?php echo $this->lang->line('subtotal') ?> <?php echo $this->lang->line($rowdet->acctGroupName)?> </strong></td>
                                <?php if($rowdet1->status == 1){?>
                					<td class="tar sep"><?php echo ($rowdet_credit < 0 )?'('.number_format($rowdet_credit * -1,2).')':number_format($rowdet_credit,2)?>&nbsp;&nbsp;</td>
                 				<?php }else{?>
                					<td class="tar sep"><?php echo ($rowdet_credit < 0 )?number_format($rowdet_credit * -1,2):number_format($rowdet_credit ,2)?>&nbsp;&nbsp;</td>
                				<?php }?>
                			<!--  td class="tar"><?php echo ($rowdet_budgetcredit < 0 )?'('.number_format($rowdet_budgetcredit * -1,2).')':number_format($rowdet_budgetcredit,2) ?>&nbsp;&nbsp;</td>
                			<td class="tar"><?php echo ($varAmount < 0 )?'('.number_format($varAmount* -1,2).')':number_format($varAmount ,2)?>&nbsp;&nbsp;</td -->
                		  </tr>
<!-- row det -->
                <?php } ?>
		<?php  endforeach; ?>
                 			<?php $varAmount = $datatbl_total - $datatbl_budgettotal ?>
            			  <tr>
                			<td><h4><?php echo $this->lang->line($datatbl->acctGroupName)?> </h4></td>
                                <?php if($datatbl->status == 1){?>
                					<td class="tar tots"><?php echo ($datatbl_total > 0 )?number_format($datatbl_total,2):"(".number_format($datatbl_total * -1,2).")"?>&nbsp;&nbsp;</td>
                 				<?php }else{?>
                					<td class="tar tots"><?php echo ($datatbl_total > 0 )?number_format($datatbl_total,2):number_format($datatbl_total * -1,2)?>&nbsp;&nbsp;</td>
                				<?php }?>
                			<!--  td class="tar"><?php echo ($datatbl_budgettotal < 0 )? number_format($datatbl_budgettotal * -1,2): number_format($datatbl_budgettotal,2) ?>&nbsp;&nbsp;</td>
                			<td class="tar"><?php echo ($varAmount < 0 )? '('.number_format($varAmount * -1,2).")": number_format($varAmount,2)?>&nbsp;&nbsp;</td-->
                		  </tr>
        <?php } ?>
<?php  endforeach; ?>
		<!--tr>
			<td><h4><?php echo $this->lang->line('netincome') ?></h4></td>
        	<td class="tar"><?php echo ($datatbl_total<0) ? '('.number_format($datatbl_total*-1,2).")": number_format($datatbl_total,2)?>&nbsp;&nbsp;</td>
  		</tr -->
	<?php }?>
                     </tbody>
                     </table>
</div>
<div style="page-break-after:always"></div>
</html>
