PK

ADDRLIN : /home/anibklip/aaravpest.in/print/
FLL :
Current File : /home/anibklip/aaravpest.in/print/invoice_print_prd.php

<?php
session_start();
include".././includes/dbconnect.php";
include".././includes/functions.php";
include".././include/constants.php";

$sql1="SELECT * FROM invoices WHERE invid='$_GET[id]'";
$result1=mysql_query($sql1) or die('error in fetch');
$row1=mysql_fetch_array($result1);
?>
<head>
	<style type="text/css">
		table td{
			padding:3px;
		}
		.printo {
			border: solid
		}
		
		.cancel_div {
			z-index: 1;
			position: absolute;
			opacity: 0.2;
			padding: 140px 8px;
		}
		
		body {
			margin-left: 30px;
margin-right: 30px;
		}
		
		#maintbl {
			border-collapse: collapse;
		}
		
		#maintbl td {
			font-family: arial;
			font-size: 12px;
		}
	</style>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body onLoad1="window.print(); window.close();">
	<table border="1" width="95%" id="maintbl" cellpadding="0" style="">
		<tr>
			<td colspan="5" align="center"><img src="../img/<?php echo ($row1[user_id]=="1"?"letterhead_delhi":"letterhead")?>.jpg" width="100%" border="0" alt="" /></td>
		</tr>
		<tr>
			<td colspan="5" valign="middle" align="center">
				<h2>TAX INVOICE</h2>
			</td>
		</tr>
		<tr>
			<td colspan="3" align="left">
				Invoice No. :
				<strong>
					<?php
					$sqlu="SELECT * FROM signature";
					$resultu=mysql_query($sqlu) or die('error in fetch');
					$rowu=mysql_fetch_array($resultu);
					echo "APM/".trim($rowu['year']."/".$_GET[id]);
					?>
				</strong>
				
				<br /><br />

				<strong>
					M/s. 
					<?php
					$qc="select * from parties where headid='$row1[clnid]' ";
					$rsp = mysql_query($qc) or die(mysql_erorr());
					if( $rp = mysql_fetch_array($rsp, MYSQL_ASSOC) ){
						echo "<b>$rp[headname]</b><br>$rp[headaddress] <br>";
						echo "<br />GST: ".$rp[gst];
					}
 					//echo "<br /><br /><br />".$clnid."<br />-----".$row1[clnid]."<br>";
					?>
				</strong><br />
				<!-- Certificate No: <?php echo $row[certno]?> --> <br />
			</td>
			<td colspan="2" align="right" valign="top">
				Invoice Date: <strong><?php echo date("d-m-Y", strtotime($row1[dtd]))?></strong>
			</td>
		</tr>

		<tr>
			<th>Particulars</th>
			<th>HSN Code</th>
			<th>Quantity</th>
			<th>Rate</th>
			<th>Amount</th>
		</tr>
		<tr>
			<td valign="top" style="height:100px !important;">
				<?php
				$ar=explode("~~",$row1[particular]);
				foreach($ar as $k=>$v){
					echo "$v <br>";
				}
				?>
			</td>
			<td valign="top">
				<?php
				$ar=explode("~~",$row1[hsncode]);
				foreach($ar as $k=>$v){
					echo "$v <br>";
				}
				?>
			</td>
			<td valign="top" align="left">
				<?php
				$ar=explode("~~",$row1[qty1]);
				foreach($ar as $k=>$v){
					echo "$v <br>";
				}
				?>
			</td>
			<td valign="top" align="right">
				<?php
				$ar=explode("~~",$row1[rate]);
				foreach($ar as $k=>$v){
					echo "$v <br>";
				}
				?>
			</td>
			<td valign="top" align="right">
				<?php
				$q=explode("~~",$row1[qty1]);
				$ar=explode("~~",$row1[rate]);
				foreach($ar as $k=>$v){
					echo $v*$q[$k] ."<br>";
				}
				?>
			</td>
		</tr>
  
 
		<tr>
			<td rowspan="<?php echo ($row1[gst_combine]==1?" 3 ":"5 ")?>" colspan="3">
				<?php
				$amount=$row1['amount'];//+$row1['travel_exp']+$row1['other_exp'];
				$tax=($amount/100)*$row1['servicetax'];
				?>
				<strong>Total Invoice Amount in words</strong><br /><br />
				<?php echo ucwords(numberTowords($row1['amount']+$tax));?> Only.
			</td>
			<td>Total Amount Before Tax</td>
			<td align="right"><strong><?php echo number_format($row1['amount'],0,'.','');//+$row1['travel_exp']+$row1['other_exp']?></strong></td>
			<!-- <td>Travel Expenses </td>
			<td align="right"><?php echo $row1['travel_exp']?></td> -->
		</tr>
 
		<!-- <tr>
			<td>Other Expenses</td>
			<td align="right"><?php echo $row1['other_exp'];?></td>
		</tr> -->
		
		<?php
		if($row1[gst_combine]==0){
			?>
			<tr>
				<td>Add: CGST <?php echo $row1['servicetax']/2?>%</td>
				<td align="right"><?php echo $tax/2;?></td>
			</tr>
			<tr>
				<td>Add: SGST <?php echo $row1['servicetax']/2?>%</td>
				<td align="right"><?php echo $tax/2;?></td>
			</tr>
			<?php
		}
		?>
		<tr>
			<td>Tax Amount:<?php echo ($row1[gst_combine]==1?"I":"")?>GST <?php echo $row1['servicetax']?>%</td>
			<td align="right"><?php echo $tax;?></td>
		</tr>
		<tr>
			<td><strong>Total Amount <!-- After Tax --></strong></td>
			<td align="right"><strong><?php echo $row1['amount']+$tax;?></strong></td>
		</tr>
		<tr>
			<td colspan="3">
				<strong>Bank Details</strong> <br />
				<br /> Bank Name:-HDFC Bank, Rewari
				<br /> Account no- 50200011500640
				<br /> Bank IFSC Code:-HDFC0000250 <br />
				<strong> GST NO.:</strong>
				 06BRYPK7268L1ZQ <br /><br />

				E. & O E.
			</td>
			<td colspan="2" align="right">
				<!-- <center><small>Certified that the Particulars Given Above are true and correct:</small></center> -->
				<br />
				<br />
				<strong>For, AARAV PEST MANAGEMENT <br /><br /><br /><br /><br />Authorised Signatory</strong>
			</td>
		</tr>
	</table>
</body>


PK 99