-p_sheet_line = p_ship_tour_truck_sheet_line.p_sheet_line

%tr.sheet_line#p_ship_tour_truck_sheet_line{:id => p_ship_tour_truck_sheet_line.id, :data => {:p_sheet_line_id => p_sheet_line.id}}
  %td
    -if p_ship_tour_truck_sheet_line.ok?
      .round.green
    -else
      .round.orange
  
  %td.order_number
    =link_to admin_p_customer_sheet_path(p_sheet_line.p_customer_sheet) do
      =p_sheet_line.p_product.name

  
  %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
  
  
  %td.qte
    %strong=p_sheet_line.qte
  
  
  %td.qte
    %strong=number_to_currency p_sheet_line.price_ttc, :precision => 4
  
  %td
    -if p_ship_tour_truck_sheet_line.canceled
      Annulé
    
  
  %td.qte
    -if p_ship_tour_truck_sheet_line.qte_shiped?
      %strong=p_ship_tour_truck_sheet_line.qte_shiped
  
  
  %td.qte
    
    -if p_ship_tour_truck_sheet_line.price_shiped?
      %strong=number_to_currency (p_ship_tour_truck_sheet_line.price_shiped*(1.0+p_sheet_line.tva)), :precision => 4
  %td
    =p_ship_tour_truck_sheet_line.p_payments.count if p_ship_tour_truck_sheet_line.p_payments.count > 0
  
  %td
    =link_to i(:pencil), edit_admin_p_ship_tour_truck_sheet_line_path(p_ship_tour_truck_sheet_line), :remote => true if @p_ship_tour and @p_ship_tour.state != "livrée"

