D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home3
/
encodto1
/
inventory.tapaslights.com
/
tapaslights
/
Filename :
show_inventory.php
back
Copy
<?php include 'config.php'; ?> <!DOCTYPE html> <html lang="en" data-layout="vertical" data-topbar="light" data-sidebar="light" data-sidebar-size="lg" data-sidebar-image="none"> <head> <?php include 'style.php'; ?> </head> <body> <div class="main-wrapper"> <?php include 'header.php'; ?> <?php include 'sidebar.php'; ?> <div class="page-wrapper"> <div class="content container-fluid"> <div class="row"> <div class="col-lg-12"> <div class="card"> <div class="card-header"> <h5 class="card-title">Current Inventory</h5> </div> <div class="card-body table-responsive"> <?php $query = "SELECT m.*, s.seller_name AS seller_name FROM materials m JOIN sellers s ON m.seller_id = s.id ORDER BY m.created_at DESC"; $result = $conn->query($query); ?> <table class="table table-bordered table-hover"> <thead> <tr> <th>Product Name</th> <th>Material ID</th> <th>Unit</th> <th>Price/Unit</th> <th>Stock Quantity</th> <th>Seller</th> <th>Created At</th> </tr> </thead> <tbody> <?php while ($row = $result->fetch_assoc()): ?> <tr> <td><?= htmlspecialchars($row['product_name']) ?></td> <td><?= htmlspecialchars($row['c_id']) ?></td> <td><?= htmlspecialchars($row['unit']) ?></td> <td>₹<?= number_format($row['price_per_unit'], 2) ?></td> <td><?= $row['stock_quantity'] ?></td> <td><?= htmlspecialchars($row['seller_name']) ?></td> <td><?= date('d M Y, h:i A', strtotime($row['created_at'])) ?></td> </tr> <?php endwhile; ?> </tbody> </table> </div> </div> </div> </div> </div> </div> </div> <?php include 'footer.php'; ?> </body> </html>