Account Statement

Property: <%= @property_account.property_number %>

Customer: <%= @customer.full_name %>

Project: <%= @property_account.project.name %>

<% 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 %> <%= stmt.payment_title %> <%= stmt.debit? ? number_to_currency(stmt.amount) : "" %> <%= stmt.credit? ? number_to_currency(stmt.amount) : "" %> <%= stmt.description || "-" %> <%= stmt.reference_number || "-" %>

Current Balance: <%= number_to_currency(@property_account.balance) %>