:: **Zploit** v1.0 | Current Path: **/home/kreativepixelz/public_html/crm/**
:: Editing File: expenses_list.php
<?php include 'header.php'; $page_title = "Expenses List"; include 'breadcrumb.php'; include 'menu.php'; ?> <div class="page-body"> <div class="container-fluid"> <div class="row"> <div class="col-sm-12"> <div class="card"> <div class="card-header pb-0 card-no-border"> <h2>Expenses Management</h2> <div class="text-end"> <a href="expenses_add.php" class="btn btn-primary btn-sm"><i class="fa fa-plus"></i> Add Expense</a> </div> </div> <div class="card-body"> <div class="table-responsive"> <table class="display" id="export-button"> <thead> <tr> <th>ID</th> <th>Team Member</th> <th>Date</th> <th>Salary</th> <th>Advance</th> <th>Services</th> <th>Service Amount</th> <th>Other Cost</th> <th>Sundry</th> <th>Action</th> </tr> </thead> <tbody> <?php $sql = "SELECT e.*, t.name AS team_name FROM expenses e LEFT JOIN team_members t ON e.team_id = t.id ORDER BY e.id DESC"; $result = mysqli_query($conn, $sql); $sr = 1; if (mysqli_num_rows($result) > 0) { while ($row = mysqli_fetch_assoc($result)) { echo "<tr>"; echo "<td>{$sr}</td>"; echo "<td>{$row['team_name']}</td>"; echo "<td>{$row['expenses_date']}</td>"; echo "<td>₹ {$row['salary_amount']}</td>"; echo "<td>₹ {$row['advance_taken']}</td>"; echo "<td>{$row['services_expenses']}</td>"; echo "<td>₹ {$row['services_amount']}</td>"; echo "<td>₹ {$row['other_cost']}</td>"; echo "<td>₹ {$row['sundry_expenses']}</td>"; echo "<td> <a href='expenses_edit.php?id={$row['id']}' class='btn btn-warning btn-sm'><i class='fa fa-edit'></i></a> <a href='expenses_delete.php?id={$row['id']}' onclick=\"return confirm('Are you sure?');\" class='btn btn-danger btn-sm'><i class='fa fa-trash'></i></a> </td>"; echo "</tr>"; $sr++; } } else { echo "<tr><td colspan='10' class='text-center text-muted'>No records found</td></tr>"; } ?> </tbody> </table> </div> </div> </div> </div> </div> </div> </div> <?php include 'footer.php'; ?>