Skip to content

Commit

Permalink
Number format and remove pill
Browse files Browse the repository at this point in the history
  • Loading branch information
mtcnxd committed Jan 17, 2025
1 parent c0beaf4 commit b12e412
Showing 1 changed file with 24 additions and 28 deletions.
52 changes: 24 additions & 28 deletions wallet.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,39 +165,35 @@
</div> <!-- Card -->

</div> <!-- Col -->


<div class="row">
<div class="col-md-5">
<div class="card rounded border border-custom shadow-sm mb-4">
<div class="card-header">
Spends by category
</div>
<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 '<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="text-bg-primary">'. number_format($value->amount, 2).'</span>';
echo '</li>';
}
echo "</ol>";
?>
</div>
</div> <!-- Row -->

<div class="row mb-4">
<div class="col-md-5">
<div class="card rounded border border-custom shadow-sm mb-4">
<div class="card-header">
Spends by category
</div>
<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 '<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="text-bg-primary">'."$".number_format($value->amount, 2).'</span>';
echo '</li>';
}
echo "</ol>";
?>
</div>
</div>
</div>


</div> <!-- Row -->
</div>

</div> <!-- Container -->

</body>
</html>

Expand Down

0 comments on commit b12e412

Please sign in to comment.