anchor.diff:      <% elsif params[:q] == "po" %>
       
       <%
  -      purchase_orders = PurchaseOrder.where(supplier_id: @affiliate.id).order(issue_date: :desc).paginate(page: params[:page]) 
  +      purchase_orders = PurchaseOrder.where(supplier_id: @affiliate.id)
  +                                     .order(issue_date: :desc)
  +                                     .paginate(page: params[:page], per_page: params[:per_page] || 20) 
       %>
       
       <div class="pull-right">
  
positive.code: 
      <% elsif params[:q] == "payments" %>
      
        <% payments = Payment.where(payable_type: "affiliate", payable_id: @affiliate.id).order(created_at: :desc).paginate(page: params[:page], per_page: 10) %>
  
        <%= will_paginate payments %>
        
  
negative.code:         orders = Order.where.not(status: "in cart")
                        .where(affiliate_id: @affiliate.id)
                        .order(submitted: :desc)
                        .paginate(page: params[:page], per_page: params[:per_page] || 20)
        %>
    
        <%
  