=semantic_form_for [:admin, @price_document], :html => {:class => "qi_price_form"}, :remote => false do |f|
  -@p_customer = @price_document.p_customer
  =diag do
    =f.object.errors.messages
    
  
  
  = f.input :public_fournisseur_name, :label => "Nom entreprise" if @price_document.label == "Réponse fournisseur"
  .content
    =f.inputs do
      
      =f.hidden_field :price_document_type_id
      = f.hidden_field :p_customer_id
      =f.hidden_field :ref_element_type
      =f.hidden_field :ref_element_id
      =f.hidden_field :doc_ref_id
      
      
       
        
      
      =hidden_field_tag :public_edit, params[:public_edit]
      
      = @price_document.price_line_block.block_type
      
      -if @price_document.label == "Demande prix"
        .row
          .col-4
            .row
              .col
                =f.input :end_date, :label => "Fin de consultation :", :as => :date
              .col
                =f.input :avancement, :label => "Avancement (%) :", as: :select, collection: PriceDocument::AVANCEMENT, selected: PriceDocument::AVANCEMENT.first
            =f.input :list_designaton, as: :string, :label => "Désignation de la liste :"
          .col
            =f.input :acheteur_text, :label => "Envoyé à :", input_html: {rows: 5}
          .col
            =f.input :dp_comment, :label => "Commentaire demande de prix :", input_html: {rows: 5}


      
      

      -if @price_document.price_document_type_id == 6 or @price_document.price_document_type_id == 7
        = f.input :date, :label => "Date du document :", :as => :date
      .price_line_block_form
        =f.semantic_fields_for :price_line_block do |f|
          =render :partial => "admin/price_line_blocks/form_#{f.object.block_type_slug}", :locals => {:f => f}
  
      

    
    
      
  .large_actions
    .actions=f.submit "sauvegarder", :class => "btn btn-primary"
  
  

    
    
    
