%tr
  %td{:style => "width:120px"}
    = l commission.created_at, :format => "%d %b %Y"
  %td
    -if commission.product_order
      =commission.product_order.product_customer.pseudo
  %td
    
    -if commission.commission_type_id == 1
      Commission directe
    -elsif commission.commission_type_id == 2
      =i :sitemap
      Commission binaire
    -elsif commission.commission_type_id == 3
      Commission de participation
    -elsif commission.commission_type_id == 4
      Virement vers votre compte
      =commission.virement.account_rib.iban+", "
      
      référence du virement :
      =commission.virement.token.upcase
      %br
      =link_to "Détail PDF", public_virement_path(commission.virement.token) if commission.virement.sended
    
    -elsif commission.commission_type_id == 14
      Virement vers votre compte hipay
      =commission.hipay_virement.hipay_email+", "
      
      référence du virement :
      =commission.hipay_virement.token.upcase
      %br
      =link_to "Détail PDF", public_hipay_virement_path(commission.hipay_virement.token) if commission.hipay_virement.sended
      
      
      
    -elsif commission.commission_type_id == 5
      Utilisation du solde pour commande de crédits
  
  %td
    -if (commission.commission_type_id == 4 and !commission.virement.sended)
      =i :"clock-o"
    -elsif (commission.commission_type_id == 14 and !commission.hipay_virement.sended)
      =i :"clock-o"
    -elsif commission.commission_type_id == 5 and !commission.order_solde.paid
      =link_to paid_public_order_path(commission.order_solde) do
        =i :"clock-o"
        finaliser ma commande en payant le solde par CB
  
  %td{:style => "text-align:right;min-width:100px;", :class => (commission.amount < 0 ? "red" : "green")}
    =commission.amount < 0 ? "" : "+ "
    =number_to_currency commission.amount