📁
SKYSHELL MANAGER-
🛒
PHP v7.4.33
Create Folder
Create File
Current Path:
home
/
oshofree
/
public_html
/
chbluxuries.com
/
chb_data
/
Name
Size
Permissions
Actions
📁
..
-
0755
🗑️
🔒
📄
config.php
7.06 KB
0444
🗑️
⬇️
✏️
🔒
📄
error_log
5579.97 KB
0644
🗑️
⬇️
✏️
🔒
Editing: preorder_invoice.php
<?php $sql = "SELECT pi.orderid, pi.status, pi.s, COUNT(pi.orderid) AS order_count, SUM(pi.s) AS total_s, MAX(pi.date) AS latest_date, MAX(o.staff) AS staff, MAX(o.number) AS number, MAX(o.email) AS email, MAX(o.user_id) AS user_id, MAX(o.cashier) AS cashier, GROUP_CONCAT(DISTINCT CONCAT(pi.stockname, '(', v.color, ')') ORDER BY so.s ASC SEPARATOR ', ') AS variations FROM preorder_invoice pi JOIN orders o ON pi.orderid = o.orderid JOIN stock_orders so ON pi.stockrow = so.s JOIN variation v ON so.color = v.s GROUP BY pi.orderid, pi.status ORDER BY latest_date DESC, pi.s DESC"; $sql2 = mysqli_query($con, $sql); while ($rows = mysqli_fetch_array($sql2)) { $ord = $rows['orderid']; $status = $rows['status']; $num = $rows['quantity']; $c_name = $rows['staff']; $c_phone = $rows['number']; $c_mail = $rows['email']; $theuser = $rows['user_id']; $cashier = $rows['cashier']; $itemrow = $rows['s']; $sq = "SELECT v.color FROM stock_orders so JOIN variation v ON so.color = v.s WHERE so.s='$stockrow' ORDER BY so.s ASC"; $sq2 = mysqli_query($con, $sq); $colornames = ""; while ($roe = mysqli_fetch_array($sq2)) { $colornames = $roe['color']; } $colorname = ($colornames != 'null') ? "($colornames)" : ""; $sq = "SELECT * from users where id='$theuser' ORDER BY s DESC"; $sq2 = mysqli_query($con,$sq); while($rw = mysqli_fetch_array($sq2)) { $loyalty = $rw['loyalty']; $loyal=""; if($loyalty!="0"){ $loyal='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" class="bi bi-patch-check-fill verified-'.$loyalty.'" viewBox="0 0 16 16" > <path d="M10.067.87a2.89 2.89 0 0 0-4.134 0l-.622.638-.89-.011a2.89 2.89 0 0 0-2.924 2.924l.01.89-.636.622a2.89 2.89 0 0 0 0 4.134l.637.622-.011.89a2.89 2.89 0 0 0 2.924 2.924l.89-.01.622.636a2.89 2.89 0 0 0 4.134 0l.622-.637.89.011a2.89 2.89 0 0 0 2.924-2.924l-.01-.89.636-.622a2.89 2.89 0 0 0 0-4.134l-.637-.622.011-.89a2.89 2.89 0 0 0-2.924-2.924l-.89.01-.622-.636zm.287 5.984-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 1 1 .708-.708L7 8.793l2.646-2.647a.5.5 0 0 1 .708.708z"/> </svg>'; }} //processing if($status=="processing"){ $showus="<a href='#delete" . $rows['s'] . "' data-toggle='modal' ><button style='background-color:red; border:none;' class='btn btn-sm btn-primary shadow-sm'>Confirm Invoice</button></a> <div class='modal fade' id='delete" . $rows['s'] . "' role='dialog'> <div class='vertical-alignment-helper'> <div class='modal-dialog vertical-align-center'> <div class='modal-content'> <div class='modal-header'> <h4 class='modal-title w-100 text-center' style='color:black; font-size:20px;'>Invoice Confirmation</h4> </div> <div class='modal-body w-100 ' style='color:#FFFFFF;'> <p style='color:black; font-weight:600;'>Are you sure you want to confirm this preorder as ready for delivery?</p> <div class='modal-footer border-0'><form action='' method='post' > <input type='text' name='orderid' value='".$rows['orderid']."' required hidden /> <input type='text' name='preorder' value='".$rows['status']."' required hidden /> <button style='background-color:red;' value='confirm' class='btn btn-sm btn-primary shadow-sm' type='submit' name='actionbtn'>Yes,Confirm</button></form> <button class='btn btn-sm btn-primary shadow-sm' data-dismiss='modal'>No,Cancel</button></div> </div> </div> </div> </div> </div> </div> </div>";} else if($status=="confirmed") { $showus="<a href='#delete" . $rows['s'] . "' data-toggle='modal' ><button style='background-color:#F6BE00; border:none;' class='btn btn-sm btn-primary shadow-sm' >Mark as Delivered</button></a> <div class='modal fade' id='delete" . $rows['s'] . "' role='dialog'> <div class='vertical-alignment-helper'> <div class='modal-dialog vertical-align-center'> <div class='modal-content'> <div class='modal-header'> <h4 class='modal-title w-100 text-center' style='color:black; font-size:20px;'>Mark Preorder as Delivered</h4> </div> <div class='modal-body w-100 ' style='color:#FFFFFF;'> <p style='color:black; font-weight:600;'>Are you sure you want to mark this preorder as delivered for(".$rows['stockname'].")?</p> <form action='' method='post'> <div class='modal-footer border-0'> <input type='text' name='orderid' value='".$rows['orderid']."' required hidden /> <input type='text' name='preorder' value='".$rows['status']."' required hidden /> <button style='background-color:red;' value='delivered' class='btn btn-sm btn-primary shadow-sm' type='submit' name='actionbtn'>Yes,Deliver</button></form> <button class='btn btn-sm btn-primary shadow-sm' data-dismiss='modal'>No,Cancel</button></div> </div> </div> </div> </div> </div> </div> </div>";} else{ $showus="delivered"; } echo " <tr bgcolor='#fff'> <td width='100px' >" . $ord . "</td> <td width='200px'>$c_name<br>$c_phone<br>$c_mail $loyal </td> <td width='200px'>" . $rows['variations'] . "</td> <td width='200px'><label class='badge badge-primary'>$status</label></td> <td><p>$showus</p></td> <style> @media print { .con { display: none; } @page { size: 80mm 297mm; margin:none; } body * { visibility: hidden; margin: none; overflow: hidden; font-size:14px; font-weight:600; page-break-after: always; } .print-section { page-break-after: always; } #modal".$ord.", #modal".$ord." * { visibility: visible; } .head{ width:0px; display: none; } .no-page-break { page-break-inside: avoid; } html, body { height:100%; overflow: hidden; } /* Set the width of the content area to match the receipt width */ #modal".$ord." { width: 110mm; margin: 0; padding: 5px 0; box-sizing: border-box; overflow: hidden; height: 1122px; } } </style> <td><button class='btn btn-sm btn-primary shadow-sm' type='button' data-toggle='modal' data-target='#modal".$itemrow."'> VIEW TRANSACTION</button> <div class='modal fade ReModal print-section' id='modal".$itemrow."' tabindex='-1' data-bs-backdrop='false'> <div class='modal-dialog' role='document'> <div class='modal-content'> <div class='modal-body' style='color:black;'> <p style='text-align:center; font-size:10px;'> <img src='https://chbluxuries.com/img/luxury.png' width='60px' height='60px' /><br> <b>CHBLUXURY EMPIRE</b><br> Wholesale & retail beauty supply store<br> No 19 olowu street off awolowo way Ikeja, lagos<br> Tel: 0913-394-1333, 0902-557-2552</p> <p style='text-align:left;'> <span style='color:#FF339A; font-weight:600;'>Fufilled Preorder Invoice</span><br> <span >Invoice No : $ord <br>Invoice Date: ".$dem."</span> <br>Bill To: ".$c_name." Phone: $c_phone <br>Processed By: $cashier </p> <style> @media print { .printable{ display:none; } .head{ width:0px; } .kayd td, .kayd th { border: none ; height:10px; } } .kayd td, .kayd th { border: none ; } </style> "; include "onetransaction.php"; echo" <p style='text-align:left; margin-top:4px;'>Total : ₦ ".$naira." <br>Freight: ₦0 <br>Discount: ₦0 <br>Grand Total: ₦$naira </p> <p style='text-align:center; font-size:7px; text-transform:uppercase;'> Goods Return & exchange policy <br> For hygiene reasons, we do not offer exchanges or returns except in cases of deflective goods and such goods can only be returned within 48 hours of purchased. Goods must be returned intact, as supplied in their original packs<br> No cash refund<br> Sales invoice must be tendered at the time of return<br> No Return Based on Price Compliants<br> <center><span style='font-size:7px;'><i>Thanks for your patronage. Please come again</i></span></center></p> </div> <div class='modal-footer'> <button type='button' class='btn btn-sm btn-primary shadow-sm con' onclick='functionPrint()' data-dismiss='modal'>Print Receipt</button> <form method='post' action='printdetails.php'><button type='submit' value='$ord' name='printship' class='btn btn-sm btn-primary shadow-sm con'>Print Shipping Details</button></form> </div> </div> </div> </div> </td>$cancel</tr>"; }?> <iframe id="printFrame" style="display: none;"></iframe>
💾 Save Changes