buildTable: add Balance After column showing per-entry running_balance
This commit is contained in:
@@ -183,11 +183,16 @@ function buildTable () {
|
||||
|
||||
$amount = number_format($amount, 0); // Format the amount as an integer
|
||||
|
||||
$runningBalance = isset($entry['running_balance']) && $entry['running_balance'] !== null
|
||||
? '$' . number_format((int)$entry['running_balance'], 0)
|
||||
: '—';
|
||||
|
||||
echo '<tr class="'.$class.'">';
|
||||
echo '<td>'.$user.'</td>';
|
||||
echo '<td>'.date("F j, Y / H:i", $timestamp).'</td>';
|
||||
echo '<td>'.$description.'</td>';
|
||||
echo '<td>'.$sign.$amount.'</td>';
|
||||
echo '<td>'.$runningBalance.'</td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user