Account Statement: <%= @property_account.property_number %>

Current Balance: <%= number_to_currency(@property_account.balance) %>
<%= link_to "Download PDF", pdf_client_portal_property_account_path(@property_account, format: :pdf), class: "btn btn-primary" %>
<% running_balance = 0 %> <% @statements.each do |stmt| %> <% running_balance += stmt.debit? ? stmt.amount : -stmt.amount %> <% end %>
Date Title Debit Credit Description Reference
<%= stmt.transaction_date.strftime("%b %d, %Y") %> <%= stmt.payment_title %> <%= stmt.debit? ? number_to_currency(stmt.amount) : "" %> <%= stmt.credit? ? number_to_currency(stmt.amount) : "" %> <%= stmt.description || "-" %> <%= stmt.reference_number || "-" %>