%tr#line_stock_row{:id => line_stock.id} -tr = {} -tr[:stockable] = capture do %td -if line_stock.stockable and line_stock.stockable_type == "PriceDocument" and line_stock.stockable.price_document_type_id == 6 =link_to "Facture d'achat", [:admin, line_stock.stockable] -elsif line_stock.stockable and line_stock.stockable_type == "PriceDocument" and line_stock.stockable.price_document_type_id == 4 =link_to "Facture vente", [:admin, line_stock.stockable] -elsif line_stock.stockable and line_stock.stockable_type == "StockMovement" =link_to "Mouvement de stock manuel", [:admin, line_stock.stockable] -else Entrée manuelle -tr[:p_product_ref] = capture do %td -if line_stock.p_product_ref =link_to line_stock.p_product_ref.name, params.permit!.merge({:p_product_ref_id => line_stock.p_product_ref_id}) -tr[:actions] = capture do %td.actions = link_to i(:"trash-o"), [:admin, line_stock], method: :delete, data: { confirm: 'Voulez-vous vraiment supprimer cet enregistrement ? ' } , :remote => true = link_to i(:pencil), edit_admin_line_stock_path(line_stock), :remote => true = link_to i(:eye), admin_line_stock_path(line_stock), :remote => true =render :partial => "qi/qi_ordered_table_object", :locals => {:tr => tr, :object => line_stock}