:: **Zploit** v1.0 | Current Path: **/home/kreativepixelz/www/crm/**
:: Editing File: invoice.php
<?php include 'header.php'; $page_title = "Invoices List"; include 'breadcrumb.php'; include 'menu.php'; ?> <style> .btn-warning { background-color: #c27502 !important; } </style> <div class="page-body"> <div class="container-fluid"> <div class="row"> <div class="col-sm-12"> <div class="card"> <div class="row"> <div class="col-sm-8"> <div class="card-header pb-0 card-no-border"> <h2>Invoices</h2> </div> </div> <div class="col-sm-4"> <div class="card-header pb-0 card-no-border text-end"> <a href="invoice_add.php" class="btn btn-primary btn-sm"> <i class="fa fa-plus"></i> Add Invoice </a> </div> </div> </div> <div class="card-body"> <div class="dt-ext table-responsive"> <table class="display" id="export-button"> <thead> <tr> <th>#</th> <th>Client Name</th> <th>Invoice No</th> <th>Invoice Date</th> <th>Payment Mode</th> <th>Sub Total (₹)</th> <th>Tax Total (₹)</th> <th>Grand Total (₹)</th> <th>Action</th> </tr> </thead> <tbody> <?php $sql = "SELECT i.*, c.name AS client_name FROM invoices i JOIN clients c ON i.client_id = c.id ORDER BY i.id DESC"; $result = mysqli_query($conn, $sql); $i = 1; while ($row = mysqli_fetch_assoc($result)) { $invoice_date = date('d M Y, h:i A', strtotime($row['invoice_date'])); echo "<tr> <td>{$i}</td> <td>{$row['client_name']}</td> <td>{$row['invoice_no']}</td> <td>{$invoice_date}</td> <td>{$row['payment_mode']}</td> <td>₹" . number_format($row['sub_total'], 2) . "</td> <td>₹" . number_format($row['tax_total'], 2) . "</td> <td><b>₹" . number_format($row['grand_total'], 2) . "</b></td> <td> <a href='invoice_print.php?id={$row['id']}' class='btn btn-success btn-sm' target='_blank'> <i class='fa fa-print'></i> </a> <a href='invoice_edit.php?payment_id={$row['id']}&client_id={$row['client_id']}' class='btn btn-warning btn-sm'> <i class='fa fa-edit'></i> </a> <a href='invoice_delete.php?id={$row['id']}' class='btn btn-danger btn-sm' onclick=\"return confirm('Are you sure you want to delete this invoice?');\"> <i class='fa fa-trash'></i> </a> </td> </tr>"; $i++; } ?> </tbody> </table> </div> </div> </div> </div> </div> </div> </div> <?php include 'footer.php'; ?>