anchor.diff:  	          <% end %>
   	          <td><ul>
   	            <% if not transaction.settlement %>
  -	              <li><a href="javascript:bc.duplicateTransaction(<%= i %>)">Duplicate</a>
  +	              <li><a href="javascript:bc.duplicateTransaction(<%= transaction.to_json %>)">Duplicate</a>
   	            <% end %>
   	            <li><%= form_for transaction, :url => group_transaction_url(@group, transaction), :html => {:style => 'display:inline', :method => :delete} do %>
   	              <a href="javascript:return false" onclick="$(this).closest('form').submit()">Delete</a>
  
positive.code:   $('#new_transaction').bind('reset', function() {
      setTimeout(newTransaction, 1);
    });
    <%
      member_ids = Hash.new
      @group.members.map(&:id).each_with_index{ |m,i| member_ids[m] = i };
    %>
    var memberIds = <%=raw member_ids.to_json %>;
    var transactionData = <%=raw sorted_transactions.to_json %>;
    var duplicateTransaction = function(index) {
      var transaction = transactionData[index],
          evenSplit = transaction.amount / transaction.debits.length,
          autoSplit = _.all(transaction.debits, function(debit) {
            return evenSplit - 1 <= debit[1] && debit[1] <= evenSplit + 1
          });
      setDate();
      _.each(splitItems, function(item) { item.on(false) });
      _.each(transaction.debits, function(debit) {
        var item = splitItems[memberIds[debit[0]]],
            debitAmount = debit[1];
        if (debitAmount != 0) {
          item.auto(autoSplit).val(debitAmount);
        }
  
negative.code:            res = b.created_at <=> a.created_at if res == 0
             res
           end
           sorted_transactions.each do |transaction| %>
  		<% cache("group::#{@group.id}::transaction::#{transaction.id}") do %>
          	<tr class=t>
  	          <td>
  