.header
  %h1
    Commande
    ="|"
    =@product_order.id

.padding
  %p
    Payée ?
    ="oui" if @product_order.paid
  %p
    Mode de paiment :
    -if @product_order.product_order_payment_type_ok_id == 3
      CB
    -elsif @product_order.product_order_payment_type_ok_id == 1
      Chèque
  

  %table.table
    %tr
      %td
        %h3 Adresse de facturation
        =render @product_order.particular_bill if @product_order.particular_bill
      %td
        %h3 Adresse de livraison
        =render @product_order.particular_send if @product_order.particular_send
    
  %table.table
    =render @product_order.product_order_products.order(:product_id)
  
    
    %tr
      %td{:colspan => 5, :style => "border:0;"}
      %td Total :
      %td= number_to_currency(@product_order.archived_total_articles_ttc, locale: :fr)
    
    -if @product_order.vourcher_code_archived
      %tr
        %td{:colspan => 5, :style => "border:0;"}
        %td
          =qit "Code réduction tableau", "Code de réduction "
          ="("+@product_order.vourcher_code_archived.slug+") :"
        %td  
          ="-"
          =number_to_currency @product_order.archived_vourcher_reduction_ttc, locale: :fr
    
    %tr
      %td{:colspan => 5, :style => "border:0;"}
      %td Frais de port :
      %td= number_to_currency(@product_order.archived_total_fdp, locale: :fr)
    %tr
      %td{:colspan => 5, :style => "border:0;"}
      %td
        %strong Total :
      %td
        %strong
          = number_to_currency(@product_order.archived_total_ttc, locale: :fr)
  .fdp
    %table.table
      %tr
        %td
          =@product_order.product_fdp_archived.fdp_description
        %td
          =number_to_currency @product_order.product_fdp_archived.price
  %br
  %table.table
  
    %tr
      %th Identifiant paiement
      %th Date de paiement
      %th Type de paiement
  
      %th ID Payplug
      %th N°Carte
      %th Montant
    
  
    =render @product_order.product_order_payments.order("created_at DESC")

  
%br
%br
%br