-@import= true

-i = 0
Références non trouvées :
-count = 0
%table.table
  -@csv.each do |csv|
    -i += 1

  
    -if csv["Article"].to_s != ""
      
      -p_product_stock = PProductStock.where(:code => csv["Article"]).first
    
      -if p_product_stock
        -count+=1
        -p_product_stock.stock_ok = csv["Stock Physique"].to_s.to_i
        -p_product_stock.stock_th_ok = csv["Stock Physique"].to_s.to_i
        %tr
          %td
            =csv["Stock Physique"]
          %td
            =p_product_stock.save
        
      -else
        %tr
          %td=csv["Article"]
          %td=csv["Designation"]
          %td=csv["Stock Physique"]
    
  
    
  -if i == 10
    -#break
%p
  =count
  lignes de stock importées

.qi_header
  %h2 Importation
  
-if false
  =semantic_form_for [:admin, @j_contrat], :url => import_save_admin_j_lines_path(), :html => {:method => :post}, :remote => false do |f|
  
    =hidden_field_tag :id, @j_contrat.id
  
    .j_lines_form
      =f.semantic_fields_for :j_lines do |form|
        =render :partial => "admin/j_lines/inline_form", :locals => {:f => form}
      
    %center
      =f.submit "Importer", :class => "btn btn-primary"
      %br
      %br
      %br


