= $page_name ?>
Generate Report
$amount) { if ($key != '' && $key != null) { // Simplify and group payment method names $key = strtoupper($key); if (stripos($key, 'PAYTM') !== false) { $key = 'PAYTM'; } elseif (stripos($key, 'BANKTRANSFER') !== false) { $key = 'BANK TRANSFER'; } elseif (stripos($key, 'CASH ON DELIVERY') !== false) { $key = 'COD'; } // Combine amounts for the same payment method if (!isset($combinedPayments[$key])) { $combinedPayments[$key] = 0; } $combinedPayments[$key] += $amount; } } // Display the combined results foreach ($combinedPayments as $paymentMethod => $totalAmount) { ?>
= $paymentMethod ?>
₹= $totalAmount ?>
Invoice ID
Invoice Date
Customer Name
Payment Method
Payment Status
Total Amount
= $invoice_date ?>
= $row['first_name'] ?>
= strtoupper($row['payment_method'])?>
= $row['payment_status'] ?>
= $row['total_amount'] ?>
Total Amount