anchor.diff:  
       <% elsif params[:q] == "payments" %>
       
  -    <% payments = Payment.where(payable_type: "affiliate", payable_id: @affiliate.id).where("amount < 0.0").order(created_at: :desc).paginate(page: params[:page], per_page: 10) %>
  -
  -    <%= will_paginate payments %>
  -    <table class="table table-striped table-condensed">
  -      <tr>
  -        <th>ID</th>
  -        <th>Date</th>
  -        <th>Memo</th>
  -        <th>Amount</th>
  -      </tr>
  -      <% payments.order('created_at DESC').each do |pmt| %>
  -      <tr>
  -        <td><%= pmt.id %></td>
  -        <td><%= systime pmt.created_at %></td>
  -        <td><%= pmt.memo%></td>
  -        <td><%= number_to_currency(pmt.amount, negative_format: "(%u%n)") %></td>
  -      </tr>
  -      <% end %>
  -    </table>
  -
  -    <% elsif ["campaigns", "", nil].include? params[:q] %>
  +      <% payments = Payment.where(payable_type: "affiliate", payable_id: @affiliate.id).where("amount < 0.0").order(created_at: :desc).paginate(page: params[:page], per_page: 10) %>
  +
  +      <%= will_paginate payments %>
  +      <table class="table table-striped table-condensed">
  +        <tr>
  +          <th>ID</th>
  +          <th>Date</th>
  +          <th>Memo</th>
  +          <th>Amount</th>
  +        </tr>
  +        <% payments.order('created_at DESC').each do |pmt| %>
  +        <tr>
  +          <td><%= pmt.id %></td>
  +          <td><%= systime pmt.created_at %></td>
  +          <td><%= pmt.memo%></td>
  +          <td><%= number_to_currency(pmt.amount, negative_format: "(%u%n)") %></td>
  +        </tr>
  +        <% end %>
  +      </table>
  +
  +    <% elsif params[:q] == "campaigns" %>
           <% campaigns = AffiliateCampaign.where(affiliate_id: @affiliate.id).order(created_at: :desc)%>
   
       		<table class="table table-striped table-condensed">
  
positive.code: <%= link_to "edit", edit_admin_system_affiliate_path(@affiliate), class: "btn btn-sm btn-default pull-right" %>
  <h2><i class="fa fa-rocket"></i> <%= @affiliate.name %></h2>
  <hr/>
  
  <div class="arow">
  	
  	<div class="col-md-8">
  
negative.code:         <% for ap in ap_list %>
        	<tr>
            <td><input type="checkbox" name="affiliate_product_id[]" value="<%= ap.id %>"></td>
            <td><%= link_to ap.product.sku, admin_store_product_path(ap.product)%></td>
            <td><%= ap.product.title %></td>
            <td><%= ap.sku %></td>
            <td><%= ap.price %></td>
  