Server IP : 162.240.98.243 / Your IP : 18.220.245.233 Web Server : Apache System : Linux server.bti.yaw.mybluehostin.me 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : btiyawmy ( 1003) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/btiyawmy/public_html/login.easenup.in/Pharmacy/ |
Upload File : |
<?php session_start(); require_once('../../DBManager.php'); require_once('../../LoginManager.php'); require_once('../../patientmanager.php'); include 'menu.php'; include 'header.php'; include("dbconnection.php"); ?> <style> #topright { position: absolute; right: 0; top: 0; margin-top: 73px; margin-right: 30px; display: block; height: 70px; width: 70px; background: url(TRbanner.gif) no-repeat; text-indent: -999em; text-decoration: none; } #toprightj { position: absolute; right: 0; top: 0; margin-top: 73px; margin-right: 120px; display: block; height: 70px; width: 70px; background: url(TRbanner.gif) no-repeat; text-indent: -999em; text-decoration: none; } #toprightb { position: absolute; right: 0; top: 0; margin-top: 73px; margin-right: 200px; display: block; height: 70px; width: 70px; background: url(TRbanner.gif) no-repeat; text-indent: -999em; text-decoration: none; } .center { border: 1px solid grey; text-align:; } .center2 { border: 5px solid grey; text-align:; } </style> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <style> h2 { color: #4287f5; } a img { border: none; } #memo { padding-top: 50px; margin: 0 20px 0 60px; border-bottom: 1px solid #ddd; height: 200px; } #memo .logo { float: left; margin-right: 20px; } #memo .logo img { width: 150px; height: 100px; } #memo .company-info { float: right; text-align: right; } #memo .company-info > div:first-child { font-weight: bold; font-size: 22px; color: #1e73be; } #memo .company-info span { font-size: 11px; min-width: 20px; } </style> <div class="content-wrapper"> <!-- Content Header (Page header) --> <div class='center'> <section id="memo"> <div class="logo"> <?php $narayan=LoginManager::currentUser(); $usertype=LoginManager::getUserTypeByuname("$narayan"); $sql ="SELECT * FROM site_users WHERE userno='$usertype'"; $qsql = mysqli_query($con,$sql); if($rs = mysqli_fetch_array($qsql)) { $sql ="SELECT * FROM hco WHERE adminid='$rs[entered_by]'"; $qsql = mysqli_query($con,$sql); if($rs = mysqli_fetch_array($qsql)) { $sql ="SELECT * FROM admin WHERE id='$rs[adminid]'"; $qsql = mysqli_query($con,$sql); if($ra = mysqli_fetch_array($qsql)) { $services ="SELECT * FROM `services` Where adminid='$ra[id]'"; $qservices = mysqli_query($con,$services); if($rservices = mysqli_fetch_array($qservices)) { echo" <img data-logo='' src='../uploads/$rs[Logo]' /> </div> <div class='company-info'> <div>$rservices[pharmacyName]</div> <div> <span style='font-size:18px'>GST No: $rservices[GSTNo] | Lic NO: $rservices[LicNO]</br> <i class='fa fa-map-marker' aria-hidden='true'></i> $rs[Street] | $rs[Locality]</br> <i class='fa fa-envelope' aria-hidden='true'></i> $ra[EmailID] | <i class='fa fa-phone-square' aria-hidden='true'></i> $ra[numbers]</p></span> </div> "; }} } } ?> <br><br> </section> <br><br> <?php include("dbconnection.php"); $RetuneMedicine=$con->query("SELECT * FROM `PurchaseRetuneMedicine` WHERE id='$_GET[id]'"); //$RowReturn=$RetuneMedicine->fetch_assoc(); if( $RowReturn=$RetuneMedicine->fetch_assoc()) { $sqlpatient1 = "SELECT * FROM site_users WHERE userno='$RowReturn[userno]'"; $qsqlpatient1 = mysqli_query($con,$sqlpatient1); if($rsn = mysqli_fetch_array($qsqlpatient1)) { $list_vendor = "SELECT * FROM `list_vendor` WHERE vid='$RowReturn[vendor]'"; $qlist_vendor = mysqli_query($con,$list_vendor); if($rlist_vendor = mysqli_fetch_array($qlist_vendor)) echo" <div class=''> <span style='float: left; font-size:19px;'>Date : $RowReturn[created_at]</span> <span style='float: right;font-size:19px;'>Invoice Number :<b>$_GET[id]</b></span> </div> <br> <div class='checkbox'><span style='float: left; font-size:19px;'>Supplier Invoice Name : $RowReturn[invoice_no]</span><span style='float: right; font-size:19px;'>Supplier Name :<b>$rlist_vendor[name]</b></span></div> <br> <div class='checkbox'><span style='float: left; font-size:19px;'>GST No.: $rlist_vendor[emailid]</span><span style='float: right; font-size:19px;'>Mobile No. :<b>$rlist_vendor[mobile_no]</b></span></div> <div class='card-body'> <table id='example2' class='table table-bordered table-hover'> <thead> <tr> <th>Date – time </th> <th>Medication Details</th> <th>Return Quantity</th> </tr> "; }} ?> </thead> <?php include("dbconnection.php"); $RetuneMedicine=$con->query("SELECT * FROM `PurchaseRetuneMedicine` WHERE id='$_GET[id]'"); // $RowReturn=$RetuneMedicine->fetch_assoc(); // $sqlpatient2 = "SELECT * FROM purchase_invoice WHERE inventory_id='$RowReturn[inventory_id]'"; // $qsqlpatient2 = mysqli_query($con,$sqlpatient2); if($RowReturn=$RetuneMedicine->fetch_assoc()) { { $sqlpatient1 = "SELECT * FROM site_users WHERE userno='$RowReturn[userno]'"; $qsqlpatient1 = mysqli_query($con,$sqlpatient1); if($rsn = mysqli_fetch_array($qsqlpatient1)) { $pricedue=$RowReturn[AmountPaid]; echo " <tbody> <tr> <td>Created at:</b> $RowReturn[CreatedAt] <br><b>Created By:</b> $rsn[name]</td> "; echo "<td><b>Name :</b> $RowReturn[DRUGS_name] <br><b>Batch No. :</b> $RowReturn[Batch_number]<br></td>"; echo " <td>$RowReturn[ReturnQuantity]</td> </tr> "; } } } ?> </tbody> <tfoot> </tfoot> </table> <?php $RetuneMedicine=$con->query("SELECT * FROM `PurchaseRetuneMedicine` WHERE id='$_GET[id]'"); $RowReturn=$RetuneMedicine->fetch_assoc(); $sqlpatient2 = "SELECT * FROM medicine_inventory WHERE inventory_id='$RowReturn[inventory_id]'"; $qsqlpatient2 = mysqli_query($con,$sqlpatient2); if($rsn2=$qsqlpatient2->fetch_assoc()) { $disGST=$RowReturn['ReturnPrice']/100; $GSTfinal1=$disGST*$rsn2['gst']; $GSTfinal=round($GSTfinal1) ; echo" <div class='checkbox'><span style='float: left; font-size:19px;'>Amount In Word:<b> "; $number = round($RowReturn['ReturnPrice']); $no = floor($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 "Rupees ". $result . "Only" . ""; $amt=round($RowReturn[ReturnPrice]); echo"</b></b></span></div> <br> <br> <div class='checkbox'><span style='float: right; font-size:19px; margin-right:12px;'>Total MRP :<i class='fa fa-inr' aria-hidden='true'></i> $amt</span></div><br> <div class='checkbox'><span style='float: right; font-size:19px; margin-right:12px;'>GST :<i class='fa fa-inr' aria-hidden='true'></i> $GSTfinal</span></div><br> <div class='checkbox'><span style='float: right; font-size:19px; margin-right:12px;'>Payable Amt :<i class='fa fa-inr' aria-hidden='true'></i> $amt</span></div> <br> <b>"; echo" <br> <br> "; } ?> </div>