Sha256: 84244d3b1b7ec54dc5cbaa442d5a8b17f190338ddf31b97ebe0dd571a1f7e770

Contents?: true

Size: 709 Bytes

Versions: 89

Compression:

Stored size: 709 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]
          else
            stock_movement.originator.number
          end
        else
          ""
        end
      end

      def display_variant(stock_movement)
        variant = stock_movement.stock_item.variant
        output = variant.name
        output += "<br>(#{variant.options_text})" unless variant.options_text.blank?
        output.html_safe
      end
    end
  end
end

Version data entries

89 entries across 89 versions & 2 rubygems

Version Path
spree_backend-2.2.14 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-1.0.0 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-1.0.0.rc2 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-1.0.0.rc1 app/helpers/spree/admin/stock_movements_helper.rb
spree_backend-3.0.3 app/helpers/spree/admin/stock_movements_helper.rb
spree_backend-2.4.9 app/helpers/spree/admin/stock_movements_helper.rb
spree_backend-2.3.12 app/helpers/spree/admin/stock_movements_helper.rb
spree_backend-2.2.13 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-1.0.0.pre3 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-1.0.0.pre2 app/helpers/spree/admin/stock_movements_helper.rb
spree_backend-3.0.2 app/helpers/spree/admin/stock_movements_helper.rb
spree_backend-2.4.8 app/helpers/spree/admin/stock_movements_helper.rb
spree_backend-2.3.11 app/helpers/spree/admin/stock_movements_helper.rb
spree_backend-2.2.12 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-1.0.0.pre app/helpers/spree/admin/stock_movements_helper.rb
spree_backend-3.0.1 app/helpers/spree/admin/stock_movements_helper.rb
spree_backend-2.4.7 app/helpers/spree/admin/stock_movements_helper.rb
spree_backend-2.3.10 app/helpers/spree/admin/stock_movements_helper.rb
spree_backend-3.0.0 app/helpers/spree/admin/stock_movements_helper.rb
spree_backend-2.4.6 app/helpers/spree/admin/stock_movements_helper.rb