File "orderInvoice.php"
Full Path: /home/krishnamexports/public_html/panel/pages/slider/orderInvoice.php
File size: 10.12 KB
MIME-type: text/x-php; charset=us-ascii
Charset: utf-8
<?php
if(isset($_GET['order_id']))
{
$order_id = $_GET['order_id'];
$sqlInvoice = mysqli_query($cn,"select *,sum(total),sum(delivery_charge) from `tbl_order` where `order_id`='".$order_id."'");
$sqlInvoiceData = mysqli_fetch_array($sqlInvoice);
}
$sql = mysqli_query($cn, "select * from tbl_home where id='1'");
$sqlData = mysqli_fetch_array($sql);
?>
<div class="col-lg-12 grid-margin stretch-card">
<div class="card">
<div class="card-header bg-transparent header-elements-inline">
<h6 class="card-title">Order Invoice</h6>
<div class="header-elements">
<div class="header-elements">
<button type="button" class="btn btn-light btn-sm ml-3" onclick='printDiv();'><i class="icon-printer mr-2"></i> Print</button>
</div>
</div>
</div>
<div class="card-body" id="DivIdToPrint">
<style type="text/css" media="all">
@import "css/style.css";
</style>
<style>
.table thead th {
vertical-align: bottom;
border: 1px solid #000;
}
.table th, .table td {
padding: 10px 3px;
vertical-align: top;
border: 1px solid #000;
}
</style>
<div class="row">
<div class="col-sm-6">
<div class="mb-4">
<img src="../logo/<?php echo $sqlData['logo'];?>" class="mb-3 mt-2" alt="logo" style="width:150px;">
<ul class="list list-unstyled mb-0">
<span class="text-muted" style="font-size:20px;"><?php echo $sqlData['company_name'];?></span>
<p><strong><?php echo $sqlData['address'];?></strong></p>
<p class="my-2"><strong>MOBILE : </strong> <?php echo $sqlData['contact'];?></span></p>
<p class="my-2"><strong>GST NO. : </strong> <?php echo $sqlData['gst'];?></span></p>
</ul>
</div>
</div>
<div class="col-sm-6">
<div class="mb-4">
<div class="text-sm-right">
<h4 class="text-primary mb-2 mt-md-2">Invoice #<?php echo $order_id;?></h4>
<ul class="list list-unstyled mb-0">
<li>Invoice Date: <span class="font-weight-semibold"><?php echo date('F d, Y',strtotime($sqlInvoiceData['date']));?></span></li>
</ul>
</div>
</div>
</div>
</div>
<div class="d-md-flex flex-md-wrap">
<div class="mb-4 mb-md-2">
<span class="text-muted">CUSTOMR DETAIL</span>
<ul class="list list-unstyled mb-0">
<p class="my-2"><strong>NAME : </strong> <?php echo $sqlInvoiceData['name'];?></span></p>
<p class="my-2"><strong>EMAIL : </strong> <?php echo $sqlInvoiceData['email'];?></span></p>
<p class="my-2"><strong>MOBILE : </strong> <?php echo $sqlInvoiceData['phone'];?></span></p>
<p class="my-2"><strong>ALT. CONTACT : </strong> <?php echo $sqlInvoiceData['alternate_mobile'];?></span></p>
<h6>ADDRESS</h6>
<p style="width:60%;margin:0;"><?php echo $sqlInvoiceData['address'];?>, <?php echo $sqlInvoiceData['city'];?>, <?php echo $sqlInvoiceData['country'];?></p>
<p class="my-2"><strong>LANDMARK : </strong> <?php echo $sqlInvoiceData['landmark'];?></span></p>
</ul>
</div>
<div class="mb-2 ml-auto">
<span class="text-muted">PAYMENT DETAILS</span>
<div class="d-flex flex-wrap wmin-md-400">
<ul class="list list-unstyled mb-0">
<li><h5 class="my-2">Total Amount : </h5></li>
<li>Payment Mode : </li>
</ul>
<ul class="list list-unstyled text-right mb-0 ml-auto">
<li><h5 class="font-weight-semibold my-2">₹<?php echo $sqlInvoiceData['order_total'];?></h5></li>
<li><span class="font-weight-semibold"><?php echo strtoupper($sqlInvoiceData['payment_type']);?></span></li>
</ul>
</div>
</div>
</div>
<div class="table-responsive">
<table class="table table-lg">
<thead>
<tr>
<th width="10 %">S.NO</th>
<th>Description</th>
<th class="text-right">SKU</th>
<th class="text-right">Qty</th>
<th class="text-left">Addi. Info</th>
</tr>
</thead>
<tbody>
<?php
$sr = 1;
$sqlInvoice2 = mysqli_query($cn,"select * from `tbl_order` where `order_id`='".$order_id."'");
while($sqlInvoiceData2 = mysqli_fetch_array($sqlInvoice2))
{
$sqlProduct = mysqli_query($cn,"select * from `tbl_product` where `id`='".$sqlInvoiceData2['product_id']."'");
$sqlProductData = mysqli_fetch_array($sqlProduct);
?>
<tr>
<td><h6 class="mb-0">#<?php echo $sr++;?></h6></td>
<td>
<h6 class="mb-0"><?php echo $sqlInvoiceData2['product_name'];?>
<?php if(!empty($sqlInvoiceData2['size'])){?>
<h6><strong>SIZE : </strong> <span><?php echo $sqlInvoiceData2['size'];?></span></h6>
<?php }?>
<?php if(!empty($sqlInvoiceData2['polish'])){?>
<h6><strong>POLISH : </strong> <span><?php echo $sqlInvoiceData2['polish'];?></span></h6>
<?php }?></h6>
</td>
<td class="text-right"><?php echo $sqlProductData['skucode'];?></td>
<td class="text-right"><?php echo $sqlInvoiceData2['qty'];?></td>
<td class="text-left"><?php echo $sqlInvoiceData2['remark'];?></td>
</tr>
<?php }?>
<tr>
<th width="10%">Remark</th>
<th width="80%" colspan="4"><?php echo $sqlInvoiceData['notes'];?></th>
</tr>
</tbody>
</table>
</div>
<br />
<div class="row">
<div class="col-sm-6">
<table class="table table-lg">
<tr>
<td style="border: none !important;">
<div class="d-md-flex flex-md-wrap">
<div class="mb-4 mb-md-2">
<span class="text-muted" style="font-size:16px;">OUR BANK DETAIL</span>
<ul class="list list-unstyled mb-0">
<li><strong>Account Holder Name :</strong> <?php echo $sqlData['ac_name'];?></li>
<li><strong>Bank Name :</strong> <?php echo $sqlData['bank'];?></li>
<li><strong>Branch Name :</strong> <?php echo $sqlData['branch'];?></li>
<li><strong>Account Number :</strong> <?php echo $sqlData['ac_no'];?></li>
<li><strong>IFSC :</strong> <?php echo $sqlData['ifsc_code'];?> </li>
<li><strong>SWIFT CODE :</strong> <?php echo $sqlData['swift_code'];?> </li>
</ul>
</div>
</div>
</td>
</tr>
<!--<tr>
<td style="border: none !important;">
<span class="text-muted" style="font-size:16px;">Term & Conditions</span>
<ul class="list list-unstyled mb-0">
<li>Subject to Jaipur Jurisdiction.</li>
<li>Goods once sold will not taken back.</li>
<li>Interest @ 18% will be charged if will is not paid with 3 days.</li>
</ul>
</td>
</tr>-->
</table>
</div>
<div class="col-sm-6">
<table class="table table-lg">
<tr>
<td style="border:none;">
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<ul class="list list-unstyled mb-0">
<li style="text-align:right;">For <?php echo $sqlData['company_name'];?></li>
<li><br /><br /></li>
<li></li>
<li style="text-align:right;"><strong>Autorised Signature</strong></li>
</ul>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
<style>
.text-muted, .preview-list .preview-item .preview-item-content p .content-category{color:#000 !important;font-weight:600;}
</style>
<script>
function printDiv()
{
var divToPrint=document.getElementById('DivIdToPrint');
var newWin=window.open('','Print-Window');
newWin.document.open();
newWin.document.write('<html><body onload="window.print()">'+divToPrint.innerHTML+'</body></html>');
newWin.document.close();
setTimeout(function(){newWin.close();},10);
}
</script>