Файловый менеджер - Редактировать - /home/d46091/invoice.ecogenix.in/view_report.php
Назад
<?php require_once('includes/connection.php'); require_once('includes/header.php'); $id = $_GET['id'] ?? null; // Secure your query using prepared statements in real use cases $query = "SELECT * FROM `road_challans` WHERE id = '$id' LIMIT 1"; $result = $conn->query($query); if ($result && $result->num_rows > 0) { $row = $result->fetch_assoc(); } else { echo '<div class="alert alert-danger text-center mt-4">No record found.</div>'; require_once('includes/footer.php'); exit; } $cus_state = strtolower($row['cus_state']); if ($cus_state == 'intrastate') { $cgst = !empty($row['cgst']) ? $row['cgst'] : 0; $sgst = !empty($row['sgst']) ? $row['sgst'] : 0; $igst = 0; } elseif ($cus_state == 'outerstate') { $cgst = 0; $sgst = 0; $igst = !empty($row['igst']) ? $row['igst'] : 0; } else { $cgst = $sgst = $igst = 0; } ?> <div class="content"> <div class="container mt-4"> <div class="card shadow-lg"> <div class="card-header bg-primary text-white text-center"> <div class="row"> <div class="col-lg-4"></div> <div class="col-lg-4"> <h2>Challan Details</h2> </div> <div class="col-lg-4 text-end"> <button class="btn btn-danger btn-sm" onclick="window.history.back()">BACK</button> </div> </div> </div> <div class="card-body" style="overflow-x: auto;"> <table class="table table-bordered table-hover table-striped align-middle text-center"> <tr class="table-secondary"> <th>Challan No.</th> <td><?= $row['challan_no'] ?></td> <th>Purchase Order No.</th> <td><?= $row['purchase_order_no'] ?></td> </tr> <tr> <th>Order Date</th> <td><?= $row['order_date'] ?></td> <th>Invoice Date</th> <td><?= $row['date'] ?></td> </tr> <tr> <th>Customer Name</th> <td><?= $row['name'] ?></td> <th>Customer Address</th> <td><?= $row['address1'] ?></td> </tr> <tr> <th>Vehicle No.</th> <td><?= $row['vehicle_no'] ?></td> <th>Driver No.</th> <td><?= $row['driver_no'] ?></td> </tr> <tr> <th>Delivery Vehicle Date</th> <td><?= $row['d_vehicle_date'] ?></td> <th>Date of Reach</th> <td><?= $row['date_of_reach'] ?></td> </tr> <tr> <th>Date of Unloading</th> <td><?= $row['date_of_unloading'] ?></td> <th>Destination</th> <td><?= $row['destination'] ?></td> </tr> <tr> <th>Description</th> <td><?= $row['description'] ?></td> <th>Item Description</th> <td><?= $row['itemDescription'] ?></td> </tr> <tr> <th>HSN</th> <td><?= $row['hsn'] ?></td> <th colspan="2"></th> </tr> <tr> <th>Bags</th> <td><?= $row['bags'] ?></td> <th>Quantity</th> <td><?= $row['quantity'] ?></td> </tr> <tr> <th>Quantity Billed</th> <td><?= $row['quantity_billed'] ?></td> <th>Rate</th> <td><?= $row['rate'] ?></td> </tr> <?php if ($cus_state == 'intrastate'): ?> <tr class="table-success"> <th>CGST</th> <td><?= $cgst ?></td> <th>SGST</th> <td><?= $sgst ?></td> </tr> <?php elseif ($cus_state == 'outerstate'): ?> <tr class="table-warning"> <th>IGST</th> <td><?= $igst ?></td> <th colspan="2"></th> <?php endif; ?> <tr> <th>Amount</th> <td><?= $row['amount'] ?></td> <th>Amount in Words</th> <td><?= $row['amountWords'] ?></td> </tr> <tr class="table-dark text-white"> <th>Final Amount</th> <td colspan="3"><?= $row['finalAmount'] ?></td> </tr> <tr> <th>Company Name</th> <td><?= $row['consignorName'] ?></td> <th>Company Address</th> <td><?= $row['consignorAddress'] ?></td> </tr> <tr> <th>Email</th> <td><?= $row['consignorEmail'] ?></td> <th>Phone</th> <td><?= $row['consignorPhone'] ?></td> </tr> <tr> <th>Pincode</th> <td><?= $row['consignorPincode'] ?></td> <th>GST</th> <td><?= $row['consignorGst'] ?></td> </tr> <tr class="table-secondary"> <th>Bill Book Vendor</th> <td><?= $row['bill_book_vendor'] ?></td> <th>Invoice</th> <td><?= $row['bill_book_invoice'] ?></td> </tr> <tr> <th>Date</th> <td><?= $row['bill_book_date'] ?></td> <th>Value</th> <td><?= $row['bill_book_value'] ?></td> </tr> <tr> <th>Loading Expenses</th> <td><?= $row['bill_book_loading_expenses'] ?></td> <th>Office Expenses</th> <td><?= $row['bill_book_office_expenses'] ?></td> </tr> <tr> <th>Total Cost</th> <td><?= $row['bill_book_total_cost'] ?></td> <th>Total Expenses</th> <td><?= $row['bill_book_total_exp'] ?></td> </tr> <tr> <th>Lease Expense</th> <td><?= $row['bill_book_lease_exp'] ?></td> <th>Fuel Expense</th> <td><?= $row['bill_book_fuel_exp'] ?></td> </tr> <tr> <th>Toll</th> <td><?= $row['bill_book_toll_exp'] ?></td> <th>Freight</th> <td><?= $row['bill_book_freight_exp'] ?></td> </tr> <tr> <th>Road Expense</th> <td><?= $row['bill_book_road_exp'] ?></td> <th>Vehicle Type</th> <td><?= $row['bill_book_vehicle_type'] ?></td> </tr> <tr> <th>Customer State</th> <td><?= $row['cus_state'] ?></td> <th>Days Difference</th> <td><?= $row['days_diff'] ?></td> </tr> <tr> <th>Created By</th> <td><?= $row['created_by'] ?></td> <th>Signature Time</th> <td><?= $row['sig_datetime'] ?></td> </tr> </table> </div> </div> </div> </div> <?php require_once('includes/footer.php'); ?>
| ver. 1.4 |
Github
|
.
| PHP 8.1.32 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка