% title 'Bank statement'; % my ($total_credit, $total_debit); % while ( my $record = $records->next ) { % $total_credit += $record->credit; % $total_debit += $record->debit; % }
DatePurposeAccountDebitCredit
<%= $record->date %><%= $record->purpose %><%= $record->account %><%== money $record->debit %><%== money $record->credit %>
Current balance:<%== $total_debit ? money $total_debit : '' %><%== $total_credit ? money $total_credit : '' %>
%= include 'filter-widget'