
PK 
<?php
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);
//echo "sssssssssss".$row1['invstatus'];
if($row1['invstatus'] == 'dues'){
include "../includes/dbconnect2.php";
//$bk = mysql_select_db('vpgldh_bkp19-20') or die(mysql_error().' - Backup 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_gst17-18') or die(mysql_error().' - 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);
//print_r($row);
?>
<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">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
</head>
<body onLoad1="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="2" width="95%" id="maintbl" cellpadding="0" >
<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>DELHI</strong> <br />
<span style="float:right;">State Code <span style="border:1px solid #000000; padding:0px 8px;">07</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
//echo $row1[invstatus];
if($row1[invstatus]=="dues"){
include "../includes/dbconnect2.php";
}else{
}
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]";
}
}
?></td>
</tr>
<tr>
<th width="8%">Sr. No</th>
<th width="29%">Name of Product/Service</th>
<th width="12%">HSN/SAC</th>
<th width="9%">UOM</th>
<th width="8%">QTY</th>
<th width="16%">Rate</th>
<th width="18%">Amount</th>
</tr>
<tr>
<td>1</td>
<td>
<?php echo($row1['product']); ?>
<!-- Certificate No:/<?php echo "GD"." /$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"><i class="fas fa-rupee-sign"></i> <?php echo number_format($row1['amount']/$row1['qty'],2); ?></td>
<td valign="top" align="right"><i class="fas fa-rupee-sign"></i> <?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
}
?>
</strong>
</td>
<td colspan="4"><strong>Description of Goods:</strong> <?php echo $row['desgood'];?></td>
</tr>
<tr> <?php
if($row1['tcs']){
$tcs=$row1['amount']/100*1
?><?php
}
?>
<td rowspan="<?php echo ($row1[gst_combine]==1?"4":"6")?>" colspan="3">
<strong>Total Invoice Amount in words</strong><br /><br />
<?php echo ucwords(numberTowords($row1['amount']+$row1['servicetax']+ $tcs));?> Only.
</td>
<td colspan="2">Total Amount Before Tax</td>
<td colspan="2" align="right"><i class="fas fa-rupee-sign"></i> <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"><i class="fas fa-rupee-sign"></i> <strong><?php echo $row1['servicetax']/2;?></strong></td>
</tr>
<tr>
<td colspan="2">Add: SGST 9%</td>
<td colspan="2" align="right"><i class="fas fa-rupee-sign"></i> <strong><?php echo $row1['servicetax']/2;?></strong></td>
</tr>
<?php
}
?>
<tr>
<td colspan="2">Tax Amount: <?php echo ($row1[gst_combine]==1?"I":"")?>GST 18%</td>
<td colspan="2" align="right"><i class="fas fa-rupee-sign"></i> <strong><?php echo $row1['servicetax'];?></strong></td>
</tr>
<?php
if($row1['tcs']){
$tcs=$row1['amount']/100*1
?>
<tr>
<td colspan="2">TCS @1%</td>
<td colspan="2" align="right"><i class="fas fa-rupee-sign"></i> <strong><?php echo $tcs;?></strong></td>
</tr>
<?php
}
?>
<tr>
<td colspan="2">Total Amount After Tax</td>
<td colspan="2" align="right"><i class="fas fa-rupee-sign"></i> <strong style="font-size:18px;"><?php echo $row1['amount']+$row1['servicetax']+$tcs;?></strong></td>
</tr>
<tr>
<td colspan="3">
<strong>Bank Details</strong><br /><br />
Bank Name: Central Bank of India, Delhi<br />
Bank Account Number: 3684206467<br />
Bank Branch IFSC: CBIN0280295<br />
PAN No.: ABSPG9922E<br />
<strong> GST NO.: 07ABSPG9922E1ZE</strong><br />
</td>
<td colspan="4" align="right">
<center><small>Certified that the Particulars Given Above are true and correct:</small></center>
<br /><br />
<strong>For, GD FUMIGATION <br /><br /><br /><br /><br />Authorised Signatory</strong>
</td>
</tr>
</table>
</body>


PK 99