%tr.sheet_line#sheet_line{:id => p_sheet_line.id, :data => {:p_sheet_line_id => p_sheet_line.id}}

  
  %td.order_number
    =link_to admin_p_customer_sheet_path(p_sheet_line.p_customer_sheet) do
      =p_sheet_line.p_product.name

  %td.qte
    %strong=p_sheet_line.qte

  %td.address
    =link_to admin_p_customer_path(p_sheet_line.p_customer_sheet.p_customer) do
      -if p_sheet_line.p_customer_sheet.particular_send.organisation?
        =p_sheet_line.p_customer_sheet.particular_send.organisation
    
      -if p_sheet_line.p_customer_sheet.particular_send.firstname? or p_sheet_line.p_customer_sheet.particular_send.name?
        %strong
          =p_sheet_line.p_customer_sheet.particular_send.name
          =p_sheet_line.p_customer_sheet.particular_send.firstname
          
  %td
    =p_sheet_line.particular_send.cp
  %td
    =p_sheet_line.particular_send.city
  
  -if @p_ship_tour and !@p_ship_tour.state
    %td.take 
      =ic :arrows
      
  -if @p_ship_tour_truck and @p_ship_tour.state == "en-cours"
    %td
      -p_ship_tour_truck_sheet_line = @p_ship_tour_truck.p_ship_tour_truck_sheet_lines.where(:p_sheet_line_id => p_sheet_line.id).first
      -if p_ship_tour_truck_sheet_line
        =link_to "Annuler la livraison de cette commande", [:admin, p_ship_tour_truck_sheet_line], :method => :delete, :data => {:confirm => "Voulez-vous vraiment retirer cette commande de la livraison ? Cela ne marque pas la commande comme refusée."}
