Skip to content

Instantly share code, notes, and snippets.

@robertpfeiffer
Created December 17, 2009 10:50
Show Gist options
  • Save robertpfeiffer/258678 to your computer and use it in GitHub Desktop.
Save robertpfeiffer/258678 to your computer and use it in GitHub Desktop.
%p
=h3 @account.number @account.name
%p
%strong Description:
=h @account.description
%p
%label{:for => "account_record_time"} Super-account:
= f.select :time, @controller.years_for_select, {:include_blank => false}
%p
%strong Initial balance:
=h @account.initial_balance
%p
%table
%tr
%th  
%th Credit
%th Debit
- @account.committed_records_for_period(, nil).each do |record|
%tr
%td
=h record.description
- if record.debit == @account
%td -
%td
=h record.amount
- if record.credit == @account
%td
=h record.amount
%td -
%tr
%td sum
%td
=h @account.credit_sum
%td
=h @account.debit_sum
= link_to 'Edit', edit_object_url
|
= link_to 'Back', collection_url
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment