Skip to content

Commit

Permalink
Showing results in list
Browse files Browse the repository at this point in the history
  • Loading branch information
mtcnxd committed Jan 17, 2025
1 parent 08ccb29 commit 4f703af
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion wallet.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,17 @@
<div class="card-body">
<?php
$data = $bills->spendsByCategory(date('Y-m-01'), date('Y-m-t'));

echo "<ol class='list-group list-group-numbered'>";
foreach ($data as $value) {
echo "<p>".$value->category."<b>".$value->amount."</b></p>";
echo '<li class="list-group-item d-flex justify-content-between align-items-start">';
echo ' <div class="ms-2 me-auto">';
echo ' <div class="fw-bold">'.$value->category.'</div>';
echo ' </div>';
echo ' <span class="badge text-bg-primary rounded-pill">'.$value->amount.'</span>';
echo '</li>';
}
echo "</ol>";
?>
</div>
</div>
Expand Down

0 comments on commit 4f703af

Please sign in to comment.