%tr#p_customer_sheet{:id => p_customer_sheet.id}
  %td
    ="##{p_customer_sheet.id}"
  
  %td
    -if pd = p_customer_sheet.price_documents.where(:d_prefix => "BC").first
      =pd.d_number
  
  %td
    = p_customer_sheet.p_commercial.long_name if p_customer_sheet.p_commercial
  
  %td=l p_customer_sheet.created_at, :format => :date
  %td=l p_customer_sheet.price_line_block.wish_date, :format => :date
  
  
  -if !@p_customer
    %td= p_customer_sheet.p_customer.show_name if p_customer_sheet.p_customer
  
  
  %td.numeraire
    =number_to_currency p_customer_sheet.tot_amount_ht
    
  
  %td.numeraire
    =number_to_currency p_customer_sheet.tot_amount_ttc
    
  %td
    =raw p_customer_sheet.state_html
    =ic :lock if p_customer_sheet.archived
  
  %td.actions
    -if p_customer_sheet.state == "brouillon"
      = link_to i(:"trash-o"), [:admin, p_customer_sheet], method: :delete, data: { confirm: 'Voulez-vous vraiment supprimer cette demande ? ' } , :remote => true
    -if !p_customer_sheet.archived
      = link_to i(:pencil), edit_admin_p_customer_sheet_path(p_customer_sheet), :remote => false
    = link_to i(:eye), admin_p_customer_sheet_path(p_customer_sheet), :remote => false

