[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: invoice.php
<?php include 'settings/settings.php'; $bil=$_REQUEST['bil']; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>INVOICE</title> <style type="text/css" media="print"> @page { size: auto; /* auto is the initial value */ margin: 0mm; /* this affects the margin in the printer settings */ } html { background-color: #FFFFFF; margin: 0px; /* this affects the margin on the html before sending to printer */ } body { } </style> <style> body{font-family: "PT Sans Caption", sans-serif; font-size:12px;} table{ border-collapse:collapse; width:100%;} table tr,td,th{ border:1px solid #333; padding:6px;} div.table{margin:2% 2%;} .left-border{ border-left: 1px solid #000;} table.top tr:nth-child(1) p { margin-top: 0px !important; margin-bottom: 0px !important; text-align:left;} table.top tr:nth-child(2){ border-bottom:none;} table.top tr:nth-child(3){border-top:none; border-bottom:none;} table.top tr:nth-child(4){border-top:none;} table.top tr:nth-child(2) td{text-align:left;} table.top tr:nth-child(3) td{text-align:left;} table.top tr:nth-child(4) td{text-align:left;} label{ font-weight:bold;} .no{border:none;} table.no tr th{ border:none;} .heigh{ border-top:none; text-align:center; } table.heigh tr:last-child td{ padding-bottom:1em;} table.heigh tr,td{} table.top{border:1px solid #333;} table.top tr,td{ border:none;} table.bottom td{ text-align:left; border:none;} table.bottom tr:nth-child(1){ border-bottom:none;} table.bottom tr:nth-child(2){ border-bottom:none; border-top:none;} table.bottom tr:nth-child(3){ border-top:none;} table.bottom tr:nth-child(4) td{ padding-top:5em; padding-bottom:2em;} .text-center{ text-align:center !important;} .text-right{ text-align:right !important;} .print{padding:7px 15px; margin:0 auto; background:rgba(0, 0, 0, 0) -moz-linear-gradient(center top , #cae0b0 0%, #a6cb7a 2%, #6da42b 100%) repeat scroll 0 0; background:#44700e; Color:#fff; } .no-print{ margin:2em 0;} @media print { .no-print, .no-print * { display: none !important; } } </style> <!-- Google Font --> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=PT+Sans+Caption:wght@400;700&display=swap" rel="stylesheet"> </head> <body> <?php $sq=$show->readwithdata('inovice','bill_id',$bil); while ($row=$sq->fetch(PDO::FETCH_ASSOC)){ $cid=$row['client_id']; $dt=date('Y-m-d',strtotime($row['date'])); } ?> <form method="post"> <div class='privacy about' style='padding:0 5em 5em 2em;'> <div class="table"> <table class="top"> <tr> <td colspan="4" class="text-center" style="border-bottom:1px solid #000; font-size:28px;"><label>INVOICE</label></td> </tr> <tr> <td width="15%"> <img src="product_img/its.jpg" style="width: 100%;"> </td> <td width="45%" style="border-right:1px solid #000;"> <h2 class="text-left"><?=$company_name?></h2> <h4 class="text-left"><?=$website?></h4> <p class="text-left"><?=$address?>,<?=$state?>,<?=$city?>,<?=$pincode?><br /> <?=$email?> || <?=$phone?><br /> CIN: <?=$cin?><br /> GST No: <?=$gst?></p> </td> <td width="40%"> <?php $s1=$show->readwithdata('client','client_id',$cid); while ($row1 = $s1->fetch(PDO::FETCH_ASSOC)){ $c_state=$row1['state']; ?> <h3 style="font-size:20px;"><b>Customer Details: <?=$row1['name']?></b></h3> <h4>Address</h4> <p><?=$row1['address']?>, <?=$row1['location']?>, <?=$row1['country']?></p> <p><b>GSTIN: </b><?=$row1['gstin']?></p> <p><b>Phone No:</b> +91 <?=$row1['phone']?></p> <p><b>Email :</b><?=$row1['email']?></p> <?php if($row['others']!=""){?> <p><?=$row1['others']?></p> <?php }?> <?php } ?> </td> </tr> </table> <style> table.new-table{ border:solid 1px #000;} table.new-table tr th{ border:solid 1px #000;} table.new-table tr{ border:none;} table.new-table tr td.no-left{ border-right:1px solid #000; } </style> <table width="100%" class="new-table"> <tr> <th colspan="2" class="text-center" style="width:18%;">Invoice Id :</th> <th colspan="2" class="text-center" style="width:18%;">Invoice Date:</th> </tr> <tr> <td colspan="2" rowspan="2" class="text-center" style="width:18%; border-right:1px solid #000;"> <label><?=$bil?></label> </td> <td colspan="2" rowspan="2" class="text-center" style="width:18%; border-right:1px solid #000;"> <label><input type="date" value="<?=$dt?>" name="date" style="border: none; outline: none;"></label> </td> <td colspan="2"></td> </tr> </table> <table width="100%" class="new-table"> <tr> <th colspan="" class="text-center" style="width:6%;">Sr.No</th> <th colspan="" class="text-center" style="width:36%;">Order Details</th> <th colspan="" class="text-center" style="width:17%;">HSN / SAC</th> <th colspan="" class="text-center" style="width:17%;">Unit Price (Rs.)</th> <th colspan="" class="text-center" style="width:6%;">Qty</th> <th colspan="" class="text-center" style="width:18%;">Total (Rs.)</th> </tr> <?php $count=1;$total1=0; //$stmt =$show->readwithdata($sr,'status','Project Confirmed'); $s12="select * from bill where bill_id='".$bil."' order by id desc";//echo $s12; $stmt2=$con->prepare($s12); $stmt2->execute(); $num11 = $stmt2->rowCount(); if($num11>0){ while ($row = $stmt2->fetch(PDO::FETCH_ASSOC)){ extract($row); $id=$row['id']; $total=intval($row['quantity']*$row['unit_price']); $total1+=$total; ?> <tr> <td colspan="" rowspan="" class="no-left" style="width:6%;"> <p><label><?=$count?>.</label> </p> </td> <td colspan="" rowspan="" class="no-left" style="width:36%;"> <p><?=$row['title']?><br> <input type="text" name="bill_note[]" style="border: none; outline: none;border-bottom: 0.5px dotted;"> </p> </td> <td colspan="" rowspan="" class="no-left" style="width:17%;"> <p><input type="text" name="hsn[]" style="border: none; outline: none;border-bottom: 0.5px dotted;"> <input type="hidden" name="id[]" value="<?=$row['id']?>"> </p> </td> <td colspan="" rowspan="" class="no-left" style="width:17%;"> <p>Rs. <?=$row['unit_price']?></p> </td> <td colspan="" rowspan="" class="no-left" style="width:6%;"> <p>1</p> </td> <td colspan="" rowspan="" class="no-left" style="width:18%;"> <p>Rs. <?=$row['total_price']?></p> </td> </tr> <?php ++$count;} } ?> </table> <table width="100%" class="new-table"> <tr> <td colspan="2" rowspan="2" class="no-left" style="width:15%;"> <p><label>Taxable Amount</label> </p> </td> <td colspan="2" rowspan="2" class="no-left" style="width:67%;"> <p>Rs. <?=convert_to_words_array($total1)?> only</p> </td> <td colspan="2" rowspan="2" class="no-left" style="width:18%;"> <p>Rs. <?=$total1?>/-</p> </td> </tr> </table> <table width="100%" class="new-table"> <tr> <td colspan="2" rowspan="2" class="no-left" style="width:70%;"> <p><label>Goods and Services Tax Details:</label> </p> </td> <?php if($c_state==$state){?> <td colspan="2" rowspan="2" class="no-left" style="width:12%;"> <p>CGST(9%)</p> <p>SGST(9%)</p> </td> <td colspan="2" rowspan="2" class="no-left" style="width:18%;"> <p>Rs <?php $cgst=.09*$total1; echo $cgst;?>/-</p> <p>Rs <?php $cgst=.09*$total1; echo $cgst;?>/-</p> <input type="hidden" name="cgst" value="<?=$cgst?>"> <input type="hidden" name="sgst" value="<?=$cgst?>"> </td> <?php }else{?> <td colspan="2" rowspan="2" class="no-left" style="width:12%;"> <input type="hidden" name="igst" value="<?=$cgst?>"> <p>IGST(18%)</p> </td> <td colspan="2" rowspan="2" class="no-left" style="width:18%;"> <p>-</p> <p>-</p> <p>Rs. <?php $cgst=.18*$total1; echo $cgst;?>/-</p> </td> <?php } ?> </tr> </table> <table width="100%" class="new-table"> <tr> <td colspan="2" rowspan="2" class="no-left" style="width:70%;"> <p><h3>Total Amount(in Words): <?=convert_to_words_array($total1+(.18*$total1))?> only</h3> </p> </td> <td colspan="2" rowspan="2" class="no-left" style="width:12%;"> <p><h3>TOTAL</h3></p> </td> <td colspan="2" rowspan="2" class="no-left" style="width:18%;"> <p><h3>Rs. <?=$total1+(.18*$total1)?>/-</h3></p> <input type="hidden" name="mtotal" value="<?=$total1+(.18*$total1)?>"> </td> </tr> </table> <input type="hidden" value="<?=$total1?>" name="total"> <table width="100%" class="new-table"> <tr> <td colspan="2" rowspan="2" class="no-left" style="width:50%;"> <h4>Bank Details:</h4> <p>Incrementer Technology Solutions Pvt. Ltd.</p> <p>A/C No. : 34634232112</p> <p>Branch : SBI Kaikhali</p> <p>IFSC: SBIN0016773</p> </td> <td colspan="2" rowspan="2" class="no-left" style="width: 24% !important; border-right: none; "> <h4>Pay Using UPI</h4> <img src="product_img/ITS-PAYMENT.jpeg" style="width: 50%;"> </td> <td colspan="2" rowspan="2" class="no-left" style="width: 23% !important; border-right: none; "> <img src="product_img/ITS-NEW.jpeg" style="width: 50%;margin: 50px 0 0;"> </td> </tr> </table> <table width="100%" class="new-table"> <tr> <td colspan="2" rowspan="2" class="no-left" style="width:45%;"> <h4>Terms & Conditions:</h4> <p>• Money once paid is not refundable.</p> <p>• The full Payment for the product have to be done on or before the due date, if delayed an additional 1% /day interest of balance amount will be charged.</p> <p>• In case of bouncing a cheque Rs. 1000/- and related add-on charges will be applicable.</p> <p>• Subject to Local Jurisdiction.</p> <p>• Terms & Conditions Applied (details on incrementertech.com)</p> </td> <td colspan="2" rowspan="2" class="no-left" style="width: 45% !important;"> <h4 style="font-size:18px;">Note: </h4> <h2 style="font-size:30px;">Thank You For The Business.</h2> </td> </tr> </table> <table class="heigh"> <tr> <td colspan="6">To provide feedback please write to incrementers@gmail.com</td> </tr> </table> <div class="no-print" align="center"> <input type="submit" name="invoice" class="btn btn-md btn-success" value="Confirm Details"> </form> <script> function myFunction() { window.print(); } </script> </div> </div> </div> </form> <?php if(isset($_POST['invoice'])){ if(isset($_POST['id'])){ foreach ($_POST['id'] as $key=>$value) { $sq="update bill set hsn='".$_POST['hsn'][$key]."',bill_note='".$_POST['bill_note'][$key]."' where id=".$_POST['id'][$key].""; $s1=$con->prepare($sq); $s1->execute(); } $sq11="update inovice set date='".date('Y-m-d',strtotime($_POST['date']))."',total='".$_POST['total']."',cgst='".$_POST['cgst']."',igst='".$_POST['igst']."',sgst='".$_POST['sgst']."',mtotal='".$_POST['mtotal']."' where bill_id='".$bil."'"; $s111=$con->prepare($sq11); $s111->execute(); echo "<script>alert('Thanks invoice has been confirmed');window.location.href='all_bill.php'</script>"; } } ?> <?php function convert_to_words_array($number) { $words = array( '0' => 'Zero', '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' ); if ($number <= 20) { return $words[$number]; } elseif ($number < 100) { return $words[10 * floor($number / 10)] . ($number % 10 > 0 ? ' ' . $words[$number % 10] : ''); } else { $output = ''; if ($number >= 1000000000) { $output .= convert_to_words_array(floor($number / 1000000000)) . ' Billion '; $number %= 1000000000; } if ($number >= 1000000) { $output .= convert_to_words_array(floor($number / 1000000)) . ' Million '; $number %= 1000000; } if ($number >= 1000) { $output .= convert_to_words_array(floor($number / 1000)) . ' Thousand '; $number %= 1000; } if ($number >= 100) { $output .= convert_to_words_array(floor($number / 100)) . ' Hundred '; $number %= 100; } if ($number > 0) { $output .= ($number <= 20) ? $words[$number] : $words[10 * floor($number / 10)] . ' ' . ($number % 10 > 0 ? $words[$number % 10] : ''); } return trim($output); } } ?> </body> </html>
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server05.hostinghome.co.in
Server IP: 192.168.74.40
PHP Version: 7.4.33
Server Software: Apache
System: Linux server05.hostinghome.co.in 3.10.0-962.3.2.lve1.5.81.el7.x86_64 #1 SMP Wed May 31 10:36:47 UTC 2023 x86_64
HDD Total: 1.95 TB
HDD Free: 677.7 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Disabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: itsweb
User ID (UID): 1619
Group ID (GID): 1621
Script Owner UID: 1619
Current Dir Owner: 1619