anchor.diff:      <% if @return_authorization.received? %>
         <%= money @return_authorization.amount %>
       <% else %>
  -      <%= f.text_field :amount, {:style => 'width:80px;'} %> <%= t(:rma_value) %>: <span id="rma_value"></span>
  +      <%= f.text_field :amount, {:style => 'width:80px;'} %> <%= t(:rma_value) %>: <span id="rma_value">0.00</span>
         <%= f.error_message_on :amount %>
       <% end %>
     <% end %>
  
positive.code:     variant_prices[<%= variant.id.to_s %>] = <%= variant.price %>;
    <% end %>
  
    function calculate_rma_price(object, value){
      var rma_amount = 0;
  
      $.each($("td.return_quantity input"), function(i, inpt){
        var variant_id = $(inpt).attr('id').replace("return_quantity_", "");
         rma_amount += variant_prices[variant_id] * $(inpt).val()
      });
  
      if(!isNaN(rma_amount)){
        $("span#rma_value").html(rma_amount.toFixed(2));
      }
    }
  
    $(document).ready(function(){
      $.each($("td.return_quantity input"), function(i, inpt){
        $(inpt).delayedObserver(function() {
          calculate_rma_price();
        }, 0.5);
      });
  
      calculate_rma_price();
    });
  </script>
  
negative.code:             <% elsif units.select(&:shipped?).empty? %>
                0
              <% else %>
                <%= number_field_tag "return_quantity[#{variant.id}]",
                  @return_authorization.inventory_units.group_by(&:variant)[variant].try(:size) || 0, {:style => 'width:50px;', :min => 0} %>
              <% end %>
            </td>
          </tr>
  