norhusna / Change-Request

Phoenix - Online Food Ordering (Ah Kong Restaurant)
0 stars 0 forks source link

CR4 - SALES MANAGEMENT #4

Closed norhusna closed 3 years ago

norhusna commented 3 years ago

Ensuring that the financial flow is more detail and precise

puterinorliana commented 3 years ago

image

puterinorliana commented 3 years ago

<?php include("../functions.php");

if((!isset($_SESSION['uid']) && !isset($_SESSION['username']) && isset($_SESSION['user_level'])) ) header("Location: login.php");

if($_SESSION['user_level'] != "admin") header("Location: login.php");

?> <!DOCTYPE html>

Sales - FOS Admin

Sales Management


All sales data here.

Sales Profit Statistics
Today RM
This Week RM
This Month RM
All Time RM
Order Sales List
query($displayOrderQuery)) { $currentspan = 0; $total = 0; //if no order if ($orderResult->num_rows == 0) { echo ""; } else { while($orderRow = $orderResult->fetch_array(MYSQLI_ASSOC)) { //basically count rowspan so no repetitive display id in each table row $rowspan = getCountID($orderRow["orderID"],"orderID","tbl_orderdetail"); if ($currentspan == 0) { $currentspan = $rowspan; $total = 0; } //get total for each order id $total += ($orderRow['price']*$orderRow['quantity']); echo ""; if ($currentspan == $rowspan) { echo ""; } echo " "; if ($currentspan == $rowspan) { $color = "badge"; switch ($orderRow['status']) { case 'waiting': $color = "badge badge-warning"; break; case 'preparing': $color = "badge badge-primary"; break; case 'ready': $color = "badge badge-success"; break; case 'cancelled': $color = "badge badge-danger"; break; case 'finish': $color = "badge badge-success"; break; case 'Completed': $color = "badge badge-success"; break; } echo ""; echo ""; echo ""; echo ""; } echo ""; $currentspan--; } } } ?>
Order # Menu Item Name Quantity Status Total (RM) Date
There are currently no order right now.
# ".$orderRow['orderID']."".$orderRow['menuName']." ".$orderRow['menuItemName']." ".$orderRow['quantity']."".$orderRow['status']."".getSalesTotal($orderRow['orderID'])."".$orderRow['order_date']."
norhusna commented 3 years ago

change request approved