This commit is contained in:
wrongecho
2024-09-14 23:43:54 +01:00
parent 6975d6ef44
commit c65db3431d
33 changed files with 211 additions and 293 deletions

View File

@@ -50,7 +50,7 @@ $grandTotal = 0;
<div class="form-group">
<select class="form-control" name="year" id="yearSelect" onchange="submit();">
<?php foreach ($years as $year): ?>
<option value="<?php echo $year; ?>" <?php if ($year == $currentYear) echo 'selected'; ?>><?php echo $year; ?></option>
<option value="<?php echo $year; ?>" <?php if ($year == $currentYear) { echo 'selected'; } ?>><?php echo $year; ?></option>
<?php endforeach; ?>
</select>
</div>
@@ -69,9 +69,9 @@ $grandTotal = 0;
<?php foreach ($categories as $category): ?>
<tr>
<td><?php echo nullable_htmlentities($category['category_name']); ?></td>
<?php
<?php
$rowTotal = 0;
foreach ($months as $index => $month):
foreach ($months as $index => $month):
$amount = getBudgetAmount($budgets, $category['category_id'], $index + 1);
$rowTotal += $amount;
$columnTotals[$index] += $amount;
@@ -80,7 +80,7 @@ $grandTotal = 0;
<?php endforeach; ?>
<td><?php echo $rowTotal; ?></td>
</tr>
<?php
<?php
$grandTotal += $rowTotal;
endforeach; ?>
</tbody>