!!! 5 %html %head %title Transaction Report = wicked_pdf_stylesheet_link_tag 'pdf' %body - if [:summary, :both].include?(statement_type) %table.table %thead %tr.remove-top-border %th.caption.text-muted Category %th - if types.include?('charge') %th.caption.text-muted Charges - if types.include?('credit') %th.caption.text-muted Credits - if types.include?('payment') %th.caption.text-muted Payments - if types.include?('transfer') %th.caption.text-muted Transfer In %th.caption.text-muted Transfer Out %tbody - amounts.each do |amount| %tr %td.caption= amount[:title] %td - if types.include?('charge') %td.caption= number_to_currency(amount[:charges]) - if types.include?('credit') %td.caption= number_to_currency(amount[:credits]) - if types.include?('payment') %td.caption= number_to_currency(amount[:payments]) - if types.include?('transfer') %td.caption= number_to_currency(amount[:transfer_in]) %td.caption= number_to_currency(amount[:transfer_out]) %tr %td %td.caption.font-weight-bold Total - if types.include?('charge') %td.caption.font-weight-bold= number_to_currency(totals[:charges]) - if types.include?('credit') %td.caption.font-weight-bold= number_to_currency(totals[:credits]) - if types.include?('payment') %td.caption.font-weight-bold= number_to_currency(totals[:payments]) - if types.include?('transfer') %td.caption.font-weight-bold= number_to_currency(totals[:transfer_in]) %td.caption.font-weight-bold= number_to_currency(totals[:transfer_out]) - if [:details, :both].include?(statement_type) %table.table %thead %tr.remove-top-border %th.caption.text-muted Date %th.caption.text-muted Category - Memo %th.caption.text-muted Student %th.caption.text-muted Family %th.caption.text-muted.text-right Amount %tbody - details.each do |detail| %tr %td.caption= detail[:date] %td.caption %p= detail[:category_memo] - if detail[:payment_details] %p= detail[:payment_details] %td.caption= detail[:student] %td.caption= detail[:family] %td.caption.text-right= detail[:amount]