!!! 5
%html
%head
%title Statement
= wicked_pdf_stylesheet_link_tag 'pdf'
%body
.w-50.float-left
%strong.d-block.subtitle-2= family.name
.d-block.body-2= family.address
.d-block.body-2.mb-2= "#{family.city}, #{family.state} #{family.zip}"
.w-50.float-left
.d-block.overline Student
.d-block.body-2.mb-5= student.full_name
- if [:summary, :both].include?(statement_type)
%table.table
%thead
%tr.remove-top-border
%th.caption.text-muted Catgeory
%th.caption.text-muted.text-right Charges
%th.caption.text-muted.text-right Credits
%th.caption.text-muted.text-right Payments
%th.caption.text-muted.text-right Transfer In
%th.caption.text-muted.text-right Transfer Out
%tbody
- amounts.each do |amount|
%tr
%td.caption= amount[:title]
%td.caption.text-right= number_to_currency(amount[:charge])
%td.caption.text-right= number_to_currency(amount[:credit])
%td.caption.text-right= number_to_currency(amount[:payment])
%td.caption.text-right= number_to_currency(amount[:transfer_in])
%td.caption.text-right= number_to_currency(amount[:transfer_out])
%tr
%td.caption.text-right.font-weight-bold Totals
%td.caption.font-weight-bold.text-right= number_to_currency(totals[:charge])
%td.caption.font-weight-bold.text-right= number_to_currency(totals[:credit])
%td.caption.font-weight-bold.text-right= number_to_currency(totals[:payment])
%td.caption.font-weight-bold.text-right= number_to_currency(totals[:transfer_in])
%td.caption.font-weight-bold.text-right= 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.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.text-right= detail[:amount]