GIF89a
<?php
include('config.php');
$sel_d=mysqli_query($con,"select * from `cart` where id='$_REQUEST[id]'") or die(mysqli_error());
$data=mysqli_fetch_array($sel_d);
extract($data);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="Mosaddek">
<meta name="keyword" content="FlatLab, Dashboard, Bootstrap, Admin, Template, Theme, Responsive, Fluid, Retina">
<link rel="shortcut icon" href="img/favicon.png">
<title><?php include("include/title.php")?> | Booking Order Details</title>
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/bootstrap-reset.css" rel="stylesheet">
<!--external css-->
<link href="assets/font-awesome/css/font-awesome.css" rel="stylesheet" />
<link href="assets/advanced-datatable/media/css/demo_page.css" rel="stylesheet" />
<link href="assets/advanced-datatable/media/css/demo_table.css" rel="stylesheet" />
<!-- Custom styles for this template -->
<link href="css/style.css" rel="stylesheet">
<link href="css/style-responsive.css" rel="stylesheet" />
</head>
<body style="overflow-x: hidden;">
<!--main content start-->
<section class="panel">
<div class="row" style="padding: 20px;margin-left: 20%;margin-right: 20%;">
<table width="100%" border="1" style="border: #eee solid;
border-radius: 10px;font-size: 13px;">
<tbody>
<tr>
<td colspan="6" style="padding: 3px 18px 10px;" align="center"><strong>INVOICE</strong></td>
</tr>
<tr>
<td colspan="3" rowspan="3" style="padding: 4px 8px 10px; text-transform: uppercase; //width:50%;"> Exporter<br>
Rssinfotech Pvt. Ltd.<br>
Moti Nagar Industrial Area - 110015.<br>
Contact : +91 - 9560613581 <br>
E-mail : help@viralhoga.com<br>
Web : www.viralhoga.com<br></td>
<td style="padding: 4px 8px 10px;" colspan="2">Invoice No : <?php echo $_REQUEST['id'].$code_id?><br>
Date : <?php echo date('d-m-y H:i:s',$order_date)?> </td>
</tr>
<tr> </tr>
<tr> </tr>
<tr> </tr>
<tr> </tr>
<tr>
<td style="padding: 4px 8px 10px; text-transform: uppercase;" colspan="3">Consignee :<br>
<?php $s_qry=mysqli_query($con,"select * from `register` where reg_id='$reg_id'") or die(mysqli_error());
$d_data=mysqli_fetch_array($s_qry);?>
<?php echo $d_data['cfname']?><br>
<?php echo $d_data['cadd1']?><br>
Contact : <?php echo $d_data['ctel']?><br>
Email ID : <?php echo $d_data['cemail']?><br></td>
<td colspan="3" valign="top" style="padding: 4px 8px 10px;">Buyer(if other than consignee) Notify</td>
</tr>
<tr>
<td colspan="6" style="padding: 4px 8px 10px;">Description of Goods</td>
</tr>
<tr>
<td colspan="6"><table width="100%" border="1" style="border: #eee solid;
border-radius: 10px;font-size: 13px;" cellpadding="5" cellspacing="5">
<tr>
<td>S.N.</td>
<td>Song Name</td>
<td>Price</td>
<td>Quantity</td>
<td>Amount</td>
</tr>
<?php $i=1; $tot_priceIS=0;
$pro_qry=mysqli_query($con,"select * from product where id='$product_id'") or die(mysqli_error());
$row_data=mysqli_fetch_array($pro_qry);
$song_price = $tot_shipping_charge;
$channelPrice = $orderTime*$quantity;
$totalPrice=$song_price+$channelPrice;
$discountAmount = $totalPrice*$disPercentage/100;
$totalPayableAmount = $totalPrice;
$dcd_img=json_decode($row_data['img']);
?>
<tr>
<td><?php echo $i ?></td>
<td><img src="img/<?php echo $dcd_img[0]; ?>" alt="" height="50px"/> <br>
<?php
if(!empty($Color))echo $Color." Song<br>";
if(!empty($row_data['brand']))echo $row_data['brand']."<br>";
if($song_price!=0)echo "<strong>Song Price: </strong>".$song_price."<br>";
?></td>
<td><?php echo $orderTime?></td>
<td><?php echo $quantity ?></td>
<td><?php echo $totalPayableAmount?></td>
</tr>
<?php $tot_priceIS=$totalPayableAmount-$discountAmount;
$i++;
?>
<tr>
<td colspan="3"> </td>
<td><strong>Total</strong></td>
<td><?php echo $totalPayableAmount?>/-</td>
</tr>
<tr>
<td colspan="3"> </td>
<td><strong>Discount</strong></td>
<td><?php echo $discountAmount?>/-</td>
</tr>
<tr>
<td colspan="3"> </td>
<td><strong>GST(18%)</strong></td>
<td><?php
$gst = $tot_priceIS*18/100;
echo $gst;
?>/-</td>
</tr>
<tr>
<td colspan="3"> </td>
<td><strong>Final Total</strong></td>
<td><?php
$finalTotal = $totalPayableAmount-$discountAmount+$gst;
echo $finalTotal."/-";?> </td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="5" style="padding: 4px 8px 10px;">Amount Chargeable:
<?php
//Converting Currency Numbers to words currency format
$number = $finalTotal;
$no = round($number);
$point = round($number - $no, 2) * 100;
$hundred = null;
$digits_1 = strlen($no);
$i = 0;
$str = array();
$words = array('0' => '', '1' => 'one', '2' => 'two',
'3' => 'three', '4' => 'four', '5' => 'five', '6' => 'six',
'7' => 'seven', '8' => 'eight', '9' => 'nine',
'10' => 'ten', '11' => 'eleven', '12' => 'twelve',
'13' => 'thirteen', '14' => 'fourteen',
'15' => 'fifteen', '16' => 'sixteen', '17' => 'seventeen',
'18' => 'eighteen', '19' =>'nineteen', '20' => 'twenty',
'30' => 'thirty', '40' => 'forty', '50' => 'fifty',
'60' => 'sixty', '70' => 'seventy',
'80' => 'eighty', '90' => 'ninety');
$digits = array('', 'hundred', 'thousand', 'lakh', 'crore');
while ($i < $digits_1) {
$divider = ($i == 2) ? 10 : 100;
$number = floor($no % $divider);
$no = floor($no / $divider);
$i += ($divider == 10) ? 1 : 2;
if ($number) {
$plural = (($counter = count($str)) && $number > 9) ? 's' : null;
$hundred = ($counter == 1 && $str[0]) ? ' and ' : null;
$str [] = ($number < 21) ? $words[$number] .
" " . $digits[$counter] . $plural . " " . $hundred
:
$words[floor($number / 10) * 10]
. " " . $words[$number % 10] . " "
. $digits[$counter] . $plural . " " . $hundred;
} else $str[] = null;
}
$str = array_reverse($str);
$result = implode('', $str);
$points = ($point) ?
"." . $words[$point / 10] . " " .
$words[$point = $point % 10] : '';
echo "<b>".$result . "Rupees Only"; if(!empty($points))echo $points." Paise";echo "</b>";
?>
<br>
Declaration:<br>
<br>
<br>
<br>
We declare that this invoice shows the actual price of the goods</td>
<td colspan="1" style="padding: 4px 8px 10px;">FOR<br>
<br>
<br>
<br>Authorized Signatory</td>
</tr>
</tbody>
</table>
<center>
<input type="button" value="Print" onClick="window.print()" style="margin-top:20px" />
</center>
</div>
</section>
<!--main content end-->
</body>
</html>