
PK 
<?
include".././includes/dbconnect.php";
include".././includes/functions.php";
$sql1="SELECT * FROM invoices WHERE invid='$_GET[id]'";
$result1=mysql_query($sql1) or die('error in fetch');
$row1=mysql_fetch_array($result1);
if($row1['invstatus'] == 'Dues'){
$bk = mysql_select_db('vpgldh_backup17-18') or die('Database NOT SELECTED');
$sql="SELECT * FROM certificates WHERE certificateno='$row1[certid]'";
$result=mysql_query($sql) or die('error in fetch');
//mysql_close($bk);
mysql_select_db('vpgldh_17-18') or die('Database NOT SELECTED');
}
else{
$sql="SELECT * FROM certificates WHERE certificateno='$row1[certid]'";
$result=mysql_query($sql) or die('error in fetch');
}
//$sql="SELECT * FROM certificates WHERE certificateno='$row1[certid]'";
//$result=mysql_query($sql) or die('error in fetch');
$row=mysql_fetch_array($result);
?>
<head>
<style type="text/css">
.printo {
border:solid
}
.cancel_div{z-index:1; position:absolute; opacity:0.2; padding:140px 8px;}
body {
margin-left: 70px;
}
#maintbl{
border-collapse:collapse;
}
#maintbl td{
font-family:arial;
font-size:13px;
}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
<body onLoad="window.print(); window.close();">
<br><br>
<p> </p> <p> </p>
<?php
if($row[cancel]){
?>
<div class="cancel_div"><img src="../cancelled.png" width="670" alt="Cancel" /></div>
<?
}
?>
<p> </p>
<table border="1" width="95%" id="maintbl" cellpadding="0" style="">
<tr>
<td colspan="7" align="center">
<p> </p><h2>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);
?><?php echo "$_GET[id]";?>/<? echo $rowu['year'];?></strong><br />
Invoice Date: <strong><?php echo date("d-m-Y", strtotime($row1[dtd]))?></strong> <br />
State: <strong>Punjab</strong> <br />
<span style="float:right;">State Code <span style="border:1px solid #000000; padding:0px 8px;">03</span></span></td>
<td colspan="4" align="left">
Trasnportaion Mode : <br />
Vehicle No : <br />
Date of Supply : <br />
Place of Supply : <br />
</td>
</tr>
<tr>
<td colspan="7">Details of Receiver / Billed to: </td>
</tr>
<tr>
<td colspan="3">
<?php
if($row1['ajtid']==""){
$exp1 = explode(',',$row1['clnid']);
$ln1 = count($exp1);
for($i=1; $i<$ln1; $i++){
if($i==1){
echo "<strong>".$exp1[$i]."</strong><br />";
}else{
echo $exp1[$i]."<br />";
}
}
$q="select * from parties where headid='$row1[clnid]'";
$q=mysql_query($q) or die(mysql_error());
if($rr=mysql_fetch_array($q)){
echo "GST: $rr[gst]";
}
}else{
$exp1 = explode(',',$row1['ajtid']);
$ln1 = count($exp1);
for($i=1; $i<$ln1; $i++){
if($i==1){
echo "<strong>".$exp1[$i]."</strong><br />";
}else{
echo $exp1[$i]."<br />";
}
}
$q="select * from agents where ajid='$row1[ajtid]'";
$q=mysql_query($q) or die(mysql_error());
if($rr=mysql_fetch_array($q)){
echo "GST: $rr[ajdec]";
}
}
?>
<span style="float:right;">State Code:</span>
</td>
</tr>
<tr>
<th>Sr. No</th>
<th>Name of Product/Service</th>
<th>HSN ACS</th>
<th>UOM</th>
<th>QTY</th>
<th>Rate</th>
<th>Amount</th>
</tr>
<tr>
<td>1</td>
<td><?php echo($row1['product']); ?>
<!-- Certificate No:/<?php echo "VPC"." /$row[certificateno]";?>/<? echo $rowu['year'];?><br /><br />
<?php
if($row['conslinkno']==""){
?>
<strong> Charges for Fumigation Export Cargo<br /><br /><strong> as per Invoice No.:</strong>
<?php echo $row['distmarks'];?>
<?php
}else{
?>
<strong> Charges of Fumigation Container No.</strong><br /><?php echo $row['conslinkno'];?><br /><br /><strong> as per Invoice No.:</strong>
<?php echo $row['distmarks'];?>
<?php
}
?><br /><br />
<strong> Description of Goods:</strong> <?php echo $row['desgood'];?><br />
<strong> Destination Country:</strong> <?php echo $row['countrydes'];?> -->
</td>
<td valign="top"><?php echo($row1['hsn']); ?></td>
<td valign="top"><?php echo($row1['uom']); ?></td>
<td valign="top" align="right"><?php echo($row1['qty']); ?></td>
<td valign="top" align="right"><?php echo number_format($row1['amount']/$row1['qty'],2); ?></td>
<td valign="top" align="right"><?php echo($row1['amount']); ?></td>
</tr>
<?php
if($row1['ajtid']!=""){
?>
<tr>
<td colspan="3" align="center">
<div align="left">
<?php
$exp1 = explode(',',$row1['clnid']);
$ln1 = count($exp1);
for($i=1; $i<$ln1; $i++){
if($i==1){
echo "<strong>".$exp1[$i]."</strong>";
}else{
echo ", ".$exp1[$i];
}
}
?>
</div>
</td>
</tr>
<?php
}
?>
<tr>
<td colspan="7"><strong>Additional Declaration:</strong> <?php echo $row1[particular]?></td>
</tr>
<tr>
<td colspan="3">
<?php
if($row['conslinkno']==""){
?>
<strong> Charges for Fumigation Export Cargo<br /><br /><strong> as per Invoice No.:</strong>
<?php echo $row['distmarks'];?>
<?php
}else{
?>
<strong> Charges of Fumigation: </strong> <?php echo $row['conslinkno'];?><br /><br /><strong> as per Invoice No.:</strong>
<?php echo $row['distmarks'];?>
<?php
}
?>
</td>
<td colspan="4"><strong>Description of Goods:</strong> <?php echo $row['desgood'];?></td>
</tr>
<tr>
<td rowspan="<?php echo ($row1[gst_combine]==1?"3":"5")?>" colspan="3">
<strong>Total Invoice Amount in words</strong><br /><br />
<?php echo ucwords(numberTowords($row1['amount']+$row1['servicetax']));?> Only.
</td>
<td colspan="2">Total Amount Before Tax</td>
<td colspan="2" align="right"><strong><?php echo $row1['amount']?></strong></td>
</tr>
<?php
if($row1[gst_combine]==0){
?>
<tr>
<td colspan="2">Add: CGST 9%</td>
<td colspan="2" align="right"><strong><?php echo $row1['servicetax']/2;?></strong></td>
</tr>
<tr>
<td colspan="2">Add: SGST 9%</td>
<td colspan="2" align="right"><strong><?php echo $row1['servicetax']/2;?></strong></td>
</tr>
<?php
}
?>
<tr>
<td colspan="2">Tax Amount: GST 18%</td>
<td colspan="2" align="right"><strong><?php echo $row1['servicetax'];?></strong></td>
</tr>
<tr>
<td colspan="2">Total Amount After Tax</td>
<td colspan="2" align="right"><strong><?php echo $row1['amount']+$row1['servicetax'];?></strong></td>
</tr>
<tr>
<td colspan="3">
<strong>Bank Details</strong><br /><br />
Bank Name: Central Bank of India, LDH<br />
Bank Account Number: 3636974606<br />
Bank Branch IFSC: CBIN0282415<br />
<strong> GST NO.:</strong><br />
03AALHA2699Q1ZP
</td>
<td rowspan="2" colspan="4" align="right">
<center><small>Certified that the Particulars Given Above are true and correct:</small></center><br /><br />
<strong>For, VED PERKASH GOEL & COMPANY <br /><br /><br /><br /><br />Authorised Signatory</strong>
</td>
</tr>
<tr>
<td colspan="3" align="center"><strong>Terms and Conditions</strong></td>
</tr>
</table>
<!-- OLD INVOICE
<div style="display:none1;">
<table width="95%">
<tr>
<td colspan="6" align="center"><p> </p> <p> </p>
<p> </p>
<h2>INVOICE</h2>
<p> </p>
</tr>
<tr>
<td width="50%" colspan="4"><strong>Invoice No.:
<?
echo "VPC";
$sqlu="SELECT * FROM signature";
$resultu=mysql_query($sqlu) or die('error in fetch');
$rowu=mysql_fetch_array($resultu);
?>
/<?php echo "$_GET[id]";?>/<? echo $rowu['year'];?></strong></font></td>
<td colspan="2" align="center" valign="top"><strong>Invoice Date: <?php echo "$row1[dtd]"; ?></strong></strong>
</td>
</tr>
</table>
<?php
if($row1['ajtid']=="")
{
$exp1 = explode(',',$row1['clnid']);
$ln1 = count($exp1);
for($i=1; $i<$ln1; $i++)
{
if($i==1)
{
echo "<strong>".$exp1[$i]."</strong><br />";
}
else
{
echo $exp1[$i]."<br />";
}
}
}
else
{
$exp1 = explode(',',$row1['ajtid']);
$ln1 = count($exp1);
for($i=1; $i<$ln1; $i++)
{
if($i==1)
{
echo "<strong>".$exp1[$i]."</strong><br />";
}
else
{
echo $exp1[$i]."<br />";
}
}
}
?>
<br>
<table width="95%" border=1px cellpadding="0px" cellspacing="0px" bordercolor="black">
<tr>
<th width="55%" align="left">
Certificate No:/<?php echo "VPC"." /$row[certificateno]";?>/<? echo $rowu['year'];?></th>
<th width="35%" align="left"> Particulars </th>
<th width="10%">Amount</th>
</tr>
<tr>
<td width="55%" >
<?php
if($row['conslinkno']=="")
{
?>
<strong> Charges for Fumigation Export Cargo<br /><br /><strong> as per Invoice No.:</strong>
<?php echo $row['distmarks'];?>
<?php
}
else
{
?>
<strong> Charges of Fumigation Container No.</strong><br /><?php echo $row['conslinkno'];?><br /><br /><strong> as per Invoice No.:</strong>
<?php echo $row['distmarks'];?>
<?php
}
?> </td>
<td>
<strong> Description of Goods:</strong><br /><?php echo $row['desgood'];?><br /><br />
<strong> Destination Country:</strong><br /><?php echo $row['countrydes'];?> </td>
<td align="center" valign="middle">
<?php echo($row1['amount']); ?> </td>
</tr>
<?php
if($row1['ajtid']!="")
{
?>
<tr bordercolor="#000000">
<td colspan="3" align="center">
<div align="left">
<?php
$exp1 = explode(',',$row1['clnid']);
$ln1 = count($exp1);
for($i=1; $i<$ln1; $i++)
{
if($i==1)
{
echo "<strong>".$exp1[$i]."</strong>";
}
else
{
echo ", ".$exp1[$i];
}
}
?>
</div></td>
</tr>
<?php
}
?>
<tr>
<td width="90%"colspan="2" align="left" bordercolordark="#333333"> Remarks: <?php echo $row1['particular'];?></td>
<td align="center" valign="middle"> </td>
</tr>
<tr>
<td width="90%"colspan="2" align="right">
<strong>GST</strong> <td align="center" valign="middle"><?php echo $row1['servicetax'];?></td></tr>
<tr>
<td width="90%"colspan="2" align="right">
<strong>Total </strong> </td>
<td align="center" valign="middle">
<?php
if($row1['grandtotal']==0)
{
echo"n/a";
}
else
{
echo $row1['grandtotal'];
}
?> </td>
</tr>
</table>
<br />
<table width="95%" >
<tr>
<td>PAN No.: AALHA2699Q</td>
</tr>
<tr>
<td>All Payments to be made A/c Payee cheque /D.D only<br />
<br />Bank Details..
<br />
Bank name : Punjab National Bank, Ludhiana<br />
IFS Code: PUNB0179900<br />
A/c. No.: 1799002100076499<br /><strong> GST NO.:</strong><br />
03AALHA2699Q1ZP</td>
</tr>
<tr>
<td align="right">for VED PERKASH GOEL & COMPANY</td>
</tr>
<tr height="30px">
<td></td>
</tr>
<tr>
<td align="right">Authorised Signatory</td>
</tr>
</table>
</div>-->
</body>


PK 99