Sha256: 2b69f9f1cb41f9e6ca23eedf177d36f5c0399edd513cf66cc79176bf608ae681

Contents?: true

Size: 903 Bytes

Versions: 35

Compression:

Stored size: 903 Bytes

Contents

module Spree
  module Admin
    module StockMovementsHelper
      def pretty_originator(stock_movement)
        if stock_movement.originator.respond_to?(:number)
          if stock_movement.originator.respond_to?(:order)
            link_to stock_movement.originator.number, [:edit, :admin, stock_movement.originator.order]
          elsif stock_movement.originator.is_a?(Spree::StockTransfer)
            link_to stock_movement.originator.number, spree.admin_stock_transfer_url(stock_movement.originator)
          else
            stock_movement.originator.number
          end
        else
          ''
        end
      end

      def display_variant(stock_movement)
        variant = stock_movement.stock_item.variant
        output = [variant.name]
        output << variant.options_text unless variant.options_text.blank?
        safe_join(output, '<br />'.html_safe)
      end
    end
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
spree_backend-4.8.4 app/helpers/spree/admin/stock_movements_helper.rb
spree_backend-4.8.3 app/helpers/spree/admin/stock_movements_helper.rb
spree_backend-4.8.2 app/helpers/spree/admin/stock_movements_helper.rb
spree_backend-4.8.1 app/helpers/spree/admin/stock_movements_helper.rb
spree_backend-4.2.7 app/helpers/spree/admin/stock_movements_helper.rb
spree_backend-4.3.3 app/helpers/spree/admin/stock_movements_helper.rb
spree_backend-4.7.2 app/helpers/spree/admin/stock_movements_helper.rb
spree_backend-4.6.2 app/helpers/spree/admin/stock_movements_helper.rb
spree_backend-4.7.1 app/helpers/spree/admin/stock_movements_helper.rb
spree_backend-4.7.0 app/helpers/spree/admin/stock_movements_helper.rb
spree_backend-4.6.1 app/helpers/spree/admin/stock_movements_helper.rb
spree_backend-4.6.0 app/helpers/spree/admin/stock_movements_helper.rb
spree_backend-4.5.1 app/helpers/spree/admin/stock_movements_helper.rb
spree_backend-4.5.0 app/helpers/spree/admin/stock_movements_helper.rb
spree_backend-4.2.6 app/helpers/spree/admin/stock_movements_helper.rb
spree_backend-4.3.2 app/helpers/spree/admin/stock_movements_helper.rb
spree_backend-4.4.1 app/helpers/spree/admin/stock_movements_helper.rb
spree_backend-4.4.0 app/helpers/spree/admin/stock_movements_helper.rb
spree_backend-4.4.0.rc2 app/helpers/spree/admin/stock_movements_helper.rb
spree_backend-4.3.1 app/helpers/spree/admin/stock_movements_helper.rb