%h1= @page_title
%table.transaction_list
%thead
%tr
%th Clear
%th Txn ID
%th Date
%th User
%th Category
%th Amount
%th Description
%tbody
- @transactions.each do |t|
%tr{:class => cycle('odd', 'even') + (t.deleted_at ? ' deleted' : '') }
%td
%form{:method => "put", :action => '#'}
- checked = t.reconciled ? {:checked => "1"} : {}
%input{checked.merge(:type => "checkbox", :id => "txn_#{t.id}")}
%td= t.id
%td= t.ds
%td= t.user.login
%td
%span{:id => "txn_cat_#{t.id}"}= t.category.name
%td.moneycolumn= currency_span(t.amount)
%td
%span{:id => "txn_desc_#{t.id}"}= t.descr
.txnsummary
Showing
= @transactions.length
== #{maybe_singular(@transactions.length, "transactions")}.
%p
Ending balance:
= currency_span(@txn_sum, 'endingbal')
%br
Reconciled balance:
= currency_span(@rec_sum, 'reconciled')
%br
Unreconciled balance:
= currency_span(@unrec_sum, 'unreconciled')
%p= render :partial => 'links'
%script{:type => "text/javascript"}
- if @current_acct
- rec_url = "/txn/current_reconciled?acct_id=#{@current_acct.id}"
== function updateReconciled() { new Ajax.Request('#{rec_url}' + "&r=" + Math.random(), {evalScripts: true}) }
- else
updateReconciled = false
== var known_cats = [ #{@current_group.categories.map{|c| "'#{c.name}'"}.sort.join(", ")} ];
function setuptxedit(aid, id) { setup_txn_editors(aid, id, known_cats, updateReconciled) }
- @transactions.each do |t|
== setuptxedit(#{t.account.id}, #{t.id});