
-if !(Admin::SPECIAL_USER_ID.include?(current_admin.id) and (donator_transaction.recurrent and donator_transaction.tr_payment_ok and donator_transaction.tr_payment_ok.tr_payment_type_id == 3 and donator_transaction) and donator_transaction.recurrent_date_id == 16)

  - if (donator_transaction.tr_payment_ok and (((donator_transaction.tr_payment_ok.tr_payment_type and donator_transaction.tr_payment_ok.tr_payment_type_id != 3) or (donator_transaction.tr_payment_ok.tr_payment_type and donator_transaction.tr_payment_ok.tr_payment_type_id == 3 and donator_transaction.paid == true)) or (@recurrent_date) )) or @force_donator_render
    %tr#donator_transaction{:id => donator_transaction.id, :class => ("donate_cb " if !donator_transaction.recurrent and donator_transaction.tr_payment_ok.tr_payment_type_id == 3).to_s + ("recurrent_cb " if donator_transaction.recurrent and donator_transaction.tr_payment_ok and donator_transaction.tr_payment_ok.tr_payment_type_id == 3).to_s + ("recurrent_sepa " if donator_transaction.tr_payment_ok and donator_transaction.tr_payment_ok.tr_payment_type_id == 5).to_s + ("donate_cheque " if donator_transaction.tr_payment_ok and donator_transaction.tr_payment_ok.tr_payment_type_id == 1).to_s  }
    
      %td
        
        =donator_transaction.id
      %td
        -if !Admin::SPECIAL_USER_ID.include?(current_admin.id)
          =link_to i(:pencil), edit_sepa_admin_donator_transaction_path(donator_transaction), :remote => true if donator_transaction.tr_payment_type_id == 5 and !donator_transaction.exported
      %td
        =l donator_transaction.created_at, :format => :short_numbers
      %td
        =l donator_transaction.paid_at, :format => :short_numbers if donator_transaction.paid_at?
      %td
        -if donator_transaction.paid
          %strong{:style => "color:green"}
            Oui
    

  

      
      %td
        -if donator_transaction.particular_bill.organisation?
          =donator_transaction.particular_bill.organisation
          %br
        %strong
          =donator_transaction.particular_bill.firstname
    
          =donator_transaction.particular_bill.name
        %br
        =donator_transaction.particular_bill.address_2
      
        -if donator_transaction.particular_bill.address_3?
          %br
          =donator_transaction.particular_bill.address_3
        %br
        =donator_transaction.particular_bill.cp
    
        =donator_transaction.particular_bill.city
        %br
        =donator_transaction.particular_bill.country
      %td
        =donator_transaction.particular_bill.email
        %br
        =donator_transaction.particular_bill.tel
      %td
  
        =donator_transaction.tr_payment_ok.tr_payment_type.name if donator_transaction.tr_payment_ok and  donator_transaction.tr_payment_ok.tr_payment_type
      %td
        =number_to_currency donator_transaction.total
        -if @total and donator_transaction.paid
          -@total += donator_transaction.total
          - @total_nbr += 1
      %td
        -if donator_transaction.recurrent
   
          %strong Mensuel
  
  
  

      -if donator_transaction.transaction_items[0].transaction_content_type == "TransactionDonate"
        %td
          Don
        %td
      -elsif donator_transaction.transaction_items[0].transaction_content_type == "TransactionJoin"
        %td
          Adhésion
        %td
      -elsif donator_transaction.transaction_items[0].transaction_content_type == "TransactionAbo"
        %td
          Abonnement
        %td
      -elsif donator_transaction.transaction_items[0].transaction_content_type == "TransactionSponsorship"
        %td
          Parrainage
        %td
          =donator_transaction.transaction_items[0].transaction_content.sponsorship_animal.name
      -else
        %td
          =donator_transaction.transaction_items[0].transaction_content_type
  
      %td.actions
        =#link_to i(:pencil), edit_admin_donator_transaction_path(donator_transaction)
        -if !Admin::SPECIAL_USER_ID.include?(current_admin.id)
          =link_to i(:eye), admin_donator_transaction_path(donator_transaction)
      
        -if !donator_transaction.paid and donator_transaction.recurrent_payment and donator_transaction.recurrent_payment.ogone_alias?
          =link_to "payer maintenant par alias", paid_by_alias_admin_donator_transaction_path(donator_transaction)
      
      
        =#link_to i(:"trash-o"), admin_donator_transaction_path(donator_transaction), :method => :delete, :data => {:confirm => "Voulez-vous vraiment supprimer cette fiche donateur ?"}
      
