diff --git a/functions.php b/functions.php index 0da8e59..2793603 100644 --- a/functions.php +++ b/functions.php @@ -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 ''; echo ''.$user.''; echo ''.date("F j, Y / H:i", $timestamp).''; echo ''.$description.''; echo ''.$sign.$amount.''; + echo ''.$runningBalance.''; echo ''; } }