<?php
if (!isset($reportData)) {
    $reportData = [];
}
?>

<table class="table table-striped">
    <thead>
        <tr>
            <th>Date</th>
            <th>Item Name</th>
            <th>Amount</th>
            <th>Status</th>
            <!--<th>Action</th> -->
			
        </tr>
		</thead>
        <tbody>
                <?php if (!empty($paymentData)): ?>
                    <?php foreach ($paymentData  as $payments): ?>
                        <tr>			
                            <td><?php echo htmlspecialchars($payments['payment_date'] ?? ''); ?></td>
                            <td><?php echo htmlspecialchars($payments['notes'] ?? ''); ?></td>
                            <td><?php echo htmlspecialchars($payments['body_amount'] ?? ''); ?></td>
                            <td><?php echo htmlspecialchars($payments['verified']?? ''); ?></td>
                            
							 <td>
                                <?php if (isset($payments['id'])): ?>
                                    <!--<a href="edit_category.php?id=<?php echo $payments['id']; ?>" class="btn btn-warning btn-sm">Edit</a> -->
									<!--<a href="delete_category.php?id=<?php echo $paymentData['body_amount']; ?>" class="btn btn-danger btn-sm" onclick="return confirm('Are you sure you want to delete this category?');">Delete</a> -->
                                <?php else: ?>
                                    <span class="text-danger">ID not found</span>
                                <?php endif; ?>
                            </td>
                        </tr>
                    <?php 
						$totalLaybuy+=$payments['body_amount'];
					
					
					endforeach; ?>
                <?php else: ?>
                    <tr>
                        <td colspan="5" class="text-center">No Payment data found.</td>
                    </tr>
                <?php endif; ?>
            </tbody>
     
</table>