!!! 5
%html
%head
%title Family Statement
= wicked_pdf_stylesheet_link_tag 'pdf'
%body
%div.mt-3.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}"
%div.mt-3.w-50.float-right
.d-block.overline Students
.d-block.body-2= family.student_names
- if [:summary, :both].include?(statement_type)
%table.table
%thead
%tr.remove-top-border
%th.caption.text-muted Category
%th
%th.caption.text-muted Charges
%th.caption.text-muted Credits
%th.caption.text-muted Payments
%th.caption.text-muted Transfer In
%th.caption.text-muted Transfer Out
%tbody
- amounts.each do |amount|
%tr
%td.caption= amount[:title]
%td
%td.caption= number_to_currency(amount[:charges])
%td.caption= number_to_currency(amount[:credits])
%td.caption= number_to_currency(amount[:payments])
%td.caption= number_to_currency(amount[:transfer_in])
%td.caption= number_to_currency(amount[:transfer_out])
%tr
%td
%td.caption.font-weight-bold Total
%td.caption.font-weight-bold= number_to_currency(totals[:charges])
%td.caption.font-weight-bold= number_to_currency(totals[:credits])
%td.caption.font-weight-bold= number_to_currency(totals[:payments])
%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.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.text-right= detail[:amount]